Discover/MoonDev API
live

MoonDev APImoondev.com

Access MoonDev's live crypto feeds via API: Hyperliquid positions near liquidation, fees leaderboard, PnL stats by address, and Polymarket sweep trades.

Endpoint health
verified 3d ago
pnl_for_address
stream_config
clips_check
all_datastreams
polymarket_expiring
12/12 passing latest checkself-healing
Endpoints
12
Updated
26d ago

What is the MoonDev API?

The MoonDev API exposes 12 endpoints covering live Hyperliquid trading data, Polymarket market intelligence, and stream metadata from moondev.com. The positions_feed endpoint returns the top 50 longs and 50 shorts ranked by proximity to liquidation, with per-position fields including entry price, liquidation price, leverage, and PnL. The all_datastreams endpoint aggregates the major feeds in a single call, optionally scoped to a specific EVM address.

Try it
API key for the MoonDev positions feed.
api.parse.bot/scraper/fc823bb7-01ea-4b22-b26c-dc8faacf37fc/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/fc823bb7-01ea-4b22-b26c-dc8faacf37fc/positions_feed?api_key=moondevapi_qe' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace moondev-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: MoonDev crypto datastream SDK — bounded, re-runnable."""
from parse_apis.moondev_public_crypto_datastream_api import (
    MoonDev, Period, AddressInvalid
)

client = MoonDev()

# Fetch the fees leaderboard and inspect the top trader.
leaderboard = client.feesleaderboards.get()
print(f"Leaderboard has {leaderboard.count} entries")
top_trader = leaderboard.leaderboard[0]
print(f"Top trader: {top_trader.address}, fees: {top_trader.total_fees_paid}")

# Get current positions feed — live longs/shorts near liquidation.
feed = client.positionsfeeds.get()
print(f"Feed updated: {feed.updated_at}, ws: {feed.ws_connected}")
for pos in feed.longs[:2]:
    print(f"  Long {pos.coin}: ${pos.value:,.0f} liq {pos.distance_pct}% away")

# Create a share code for the top trader's address, then view PnL.
try:
    pnl = client.pnlviews.for_address(
        address=top_trader.address, period=Period.PERP_ALL_TIME
    )
    print(f"PnL profitable: {pnl.statistics.is_profitable}, volume: {pnl.statistics.volume}")
except AddressInvalid as exc:
    print(f"Invalid address: {exc.address}")

# Browse expiring Polymarket markets.
for market in client.polymarkets.expiring(limit=3):
    print(f"  Expiring: {market.title} in {market.hours_until:.1f}h")

# Stream schedule for today.
config = client.streamconfigs.get()
print(f"Stream: {config.headline} on {config.stream_date} at {config.stream_time_start}")

print("Exercised: feesleaderboards.get / positionsfeeds.get / pnlviews.for_address / polymarkets.expiring / streamconfigs.get")
All endpoints · 12 totalmissing one? ·

Public aggregated positions feed showing the top 50 longs and 50 shorts by proximity to liquidation. Returns position details including entry price, liquidation price, leverage, PnL, and websocket connectivity status. Positions are sourced from Hyperliquid via MoonDev's real-time websocket connection.

Input
ParamTypeDescription
api_keystringAPI key for the MoonDev positions feed.
Response
{
  "type": "object",
  "fields": {
    "longs": "array of long position objects",
    "shorts": "array of short position objects",
    "updated_at": "ISO datetime string of last feed update",
    "ws_connected": "boolean websocket connection status",
    "total_positions": "integer total positions in the feed",
    "price_age_seconds": "float seconds since last price update"
  },
  "sample": {
    "data": {
      "longs": [
        {
          "pnl": -1948.95,
          "coin": "xyz:DRAM",
          "size": 1923,
          "value": 112495.5,
          "address": "REDACTED_SECRET",
          "leverage": 20,
          "liq_price": 57.91,
          "entry_price": 59.51,
          "distance_pct": 0.9,
          "current_price": 58.44
        }
      ],
      "shorts": [
        {
          "pnl": -1595.58,
          "coin": "BTC",
          "size": -1.60293,
          "value": 99622.1,
          "address": "REDACTED_SECRET",
          "leverage": 30,
          "liq_price": 62438.89,
          "entry_price": 61154.5,
          "distance_pct": 0.51,
          "current_price": 62119.5
        }
      ],
      "updated_at": "2026-06-11T02:16:25.247740+00:00",
      "ws_connected": true,
      "total_positions": 4284,
      "price_age_seconds": 0.62
    },
    "status": "success"
  }
}

About the MoonDev API

Hyperliquid Positions and PnL

The positions_feed endpoint returns up to 100 positions total — 50 longs and 50 shorts — ranked by how close each is to liquidation on Hyperliquid. Each position object includes entry price, liquidation price, leverage, current PnL, and feed freshness indicators (ws_connected, price_age_seconds, updated_at). To narrow the feed to a single trader, positions_by_address accepts an EVM address (address) and returns only the matching positions from that same feed window. Addresses with no entries in the top 100 return empty arrays.

PnL Share Codes and Statistics

PnL data is organized around share codes. hl_share_create accepts an EVM address and returns a share_code (plus existing_code if one was already registered). hl_share_view takes that code and a period selector to return chart_data (arrays of timestamp, account value, and PnL), a statistics block with current_value, total_pnl, volume, and is_profitable, plus views, data_points, and available_periods. If you want both steps in one call, pnl_for_address accepts an address and period directly, creates or reuses the share code internally, and returns the full stats response with share_code included.

Fees Leaderboard and Polymarket Feeds

fees_leaderboard returns the top 25 Hyperliquid addresses by fees paid, with per-entry fields covering total_trades, total_volume, total_fees_paid, bot_fees, savings, and patience_savings — no input parameters needed. The polymarket_sweeps endpoint returns recent large sweep trades with market details, USD amounts, outcomes, and trader info; polymarket_expiring returns markets sorted by time remaining, with slug, title, end_time (Unix timestamp), volume, and hours_until fields. Both Polymarket endpoints accept a limit parameter; passing 0 returns all available items.

Aggregate and Utility Endpoints

all_datastreams is a one-shot aggregator that calls fees leaderboard, positions feed, Polymarket sweeps/expiring, stream config, clips check, and data status in a single request. When an address is provided, it also fetches pnl_for_address and positions_by_address results. Optional boolean flags (include_positions, include_clips, include_stream) control which sub-streams are included, and any stream that fails is captured in an errors object rather than failing the whole response. data_status returns last-updated timestamps and file sizes for the liquidations and open-interest premium datasets without downloading any files.

Reliability & maintenanceVerified

The MoonDev API is a managed, monitored endpoint for moondev.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when moondev.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official moondev.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
12/12 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Monitor which Hyperliquid positions are closest to liquidation across longs and shorts in real time.
  • Look up a specific trader's open positions and PnL history by EVM address using positions_by_address and pnl_for_address.
  • Build a fees analytics dashboard using the fees_leaderboard fields: total_fees_paid, bot_fees, savings, and patience_savings.
  • Detect large Polymarket sweep trades and surface them alongside the originating market details.
  • Alert on Polymarket markets expiring within a configurable hours_until threshold from the polymarket_expiring feed.
  • Pull all major MoonDev datastreams in a single API call via all_datastreams, scoped to an address if needed.
  • Check freshness of MoonDev's liquidations and open-interest datasets before deciding whether to trigger a download.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does MoonDev have an official developer API?+
MoonDev does not publish a documented public developer API. The endpoints exposed here are derived from the public JSON data MoonDev surfaces on moondev.com.
What does `positions_feed` actually return, and how fresh is the data?+
It returns the top 50 long and top 50 short positions on Hyperliquid ranked by proximity to liquidation. Each position includes entry price, liquidation price, leverage, and PnL. The response includes price_age_seconds and ws_connected fields so you can assess data freshness directly from the payload.
Does the API expose historical Hyperliquid trade history or order data beyond PnL chart series?+
Not currently. The API covers PnL time series (via hl_share_view and pnl_for_address), current open positions, and the fees leaderboard. Individual trade history, order books, and fill-level data are not included. You can fork this API on Parse and revise it to add endpoints covering those data shapes.
Can I retrieve Polymarket sweep data for a specific market or outcome rather than the full feed?+
Not currently. polymarket_sweeps returns a flat list of recent sweeps across all markets; filtering by market slug or outcome is not a supported parameter. The limit param controls result count only. You can fork the API on Parse and revise it to add market-level filtering logic.
What happens in `all_datastreams` if one sub-stream fails?+
Failed sub-streams are recorded in the errors object keyed by stream name, while successfully fetched streams appear normally in the streams object. The endpoint returns a timestamp_ms for the whole response regardless of partial failures, so callers can handle degraded results without the entire call failing.
Page content last updated . Spec covers 12 endpoints from moondev.com.
Related APIs in Crypto Web3See all →
polymarketanalytics.com API
Track any trader's performance on Polymarket by retrieving their wallet positions, trade history, profit/loss records, category breakdowns, and deposit/withdrawal activity. Monitor trading strategies and market exposure across multiple prediction markets in real-time.
app.hyperliquid.xyz API
Access real-time leaderboard rankings, market data for perpetual and spot markets, order books, and detailed trader analytics on the Hyperliquid decentralized exchange. Monitor top traders' open positions and identify delta-neutral trading strategies.
polymarket.com API
Browse top Polymarket events and markets by volume/liquidity and view the Polymarket trader leaderboard (profit or volume) over common timeframes.
worldmonitor.app API
Monitor global events and geopolitical developments in real-time by accessing live conflict reports, military movements, cyber threats, economic indicators, maritime activity, and 15 other critical intelligence categories. Track everything from supply chain disruptions and infrastructure status to market quotes, weather patterns, and displacement data to stay ahead of worldwide geopolitical shifts.
bloomberg.com API
Track stock indices, commodities, currencies, and bonds in real-time, while monitoring market movers and staying updated with the latest financial news. Get comprehensive Bloomberg market data to make informed investment decisions across multiple asset classes.
studio.glassnode.com API
Access comprehensive on-chain and market analytics for cryptocurrencies, including asset fundamentals, supply dynamics, futures data, and profit/loss metrics. Search and analyze assets with historical chart data and market overview information to track crypto performance and trends.
cmegroup.com API
Get CME Group market data including FedWatch interest-rate probabilities, futures quotes and settlements, volume/open interest history, and options expirations and near-the-money option chains.
barchart.com API
Monitor live stock quotes and commodity prices, analyze options chains with gamma exposure data, and access historical market time series to track top-performing stocks. Use real-time and historical data to make informed trading and investment decisions across equities and commodities.