Perpetual Info Queries

All perpetual info queries are sent as POST /info with the appropriate type field. No authentication is required.

Get Perpetual Metadata

Returns the list of all perpetual markets with their trading parameters.

POST /info
{ "type": "meta" }

Response

FieldTypeDescription
universeArrayList of perpetual markets
universe[].namestringMarket symbol (e.g., "BTC")
universe[].szDecimalsintSize decimal places (lot size = 10^(-szDecimals))
universe[].maxLeverageintMaximum allowed leverage
universe[].onlyIsolatedboolWhether only isolated margin mode is available
{
  "universe": [
    { "name": "BTC", "szDecimals": 5, "maxLeverage": 50, "onlyIsolated": false },
    { "name": "ETH", "szDecimals": 4, "maxLeverage": 50, "onlyIsolated": false },
    { "name": "SOL", "szDecimals": 2, "maxLeverage": 20, "onlyIsolated": false }
  ]
}

The array index is the asset ID used in order placement. universe[0] corresponds to asset index 0.

Get All Mid Prices

Returns the current mid price for every perpetual market.

POST /info
{ "type": "allMids" }

Response

A Map<string, string> mapping coin symbols to mid prices:

{
  "BTC": "67432.5",
  "ETH": "3521.2",
  "SOL": "142.8"
}

Get L2 Order Book

Returns a snapshot of the L2 order book for a specific market.

POST /info
{ "type": "l2Book", "coin": "BTC" }

Request Fields

FieldTypeRequiredDescription
coinstringYesMarket symbol

Response

FieldTypeDescription
coinstringMarket symbol
levels[Array, Array][bids, asks] — each level is an object with px, sz, n
timeintSnapshot timestamp in milliseconds
{
  "coin": "BTC",
  "levels": [
    [
      { "px": "67430.0", "sz": "1.50000", "n": 3 },
      { "px": "67425.0", "sz": "0.80000", "n": 1 }
    ],
    [
      { "px": "67435.0", "sz": "0.50000", "n": 2 },
      { "px": "67440.0", "sz": "1.10000", "n": 1 }
    ]
  ],
  "time": 1700000000000
}

Level fields:

  • px — price level (string)
  • sz — total size at this level (string)
  • n — number of orders at this level (int)

Get User State (Clearinghouse)

Returns the full account state including positions, margin, and PnL.

POST /info
{ "type": "clearinghouseState", "user": "0x1234...abcd" }

Response

FieldTypeDescription
assetPositionsArrayOpen positions with leverage, entry price, unrealized PnL, and margin
crossMarginSummaryObjectCross margin summary: accountValue, totalMarginUsed, totalNtlPos, totalRawUsd
marginSummaryObjectTotal margin summary across all positions
withdrawablestringAmount available for withdrawal
{
  "assetPositions": [
    {
      "position": {
        "coin": "BTC",
        "szi": "0.01000",
        "entryPx": "67000.0",
        "leverage": { "type": "cross", "value": 10 },
        "unrealizedPnl": "4.32",
        "marginUsed": "67.00"
      }
    }
  ],
  "crossMarginSummary": {
    "accountValue": "125000.50",
    "totalMarginUsed": "12500.00",
    "totalNtlPos": "50000.00",
    "totalRawUsd": "75000.00"
  },
  "marginSummary": {
    "accountValue": "125000.50",
    "totalMarginUsed": "12500.00"
  },
  "withdrawable": "112500.50"
}

Get Open Orders

Returns all active open orders for a user.

POST /info
{ "type": "openOrders", "user": "0x1234...abcd" }

Response

Array of open orders:

FieldTypeDescription
coinstringMarket symbol
limitPxstringLimit price
oidintOrder ID
sidestring"B" (bid/buy) or "A" (ask/sell)
szstringRemaining size
timestampintOrder creation timestamp (ms)
[
  {
    "coin": "BTC",
    "limitPx": "67000.0",
    "oid": 12345,
    "side": "B",
    "sz": "0.01000",
    "timestamp": 1700000000000
  }
]

Get User Fills

Returns recent trade fills for a user.

POST /info
{ "type": "userFills", "user": "0x1234...abcd" }

Response

Array of fills:

FieldTypeDescription
coinstringMarket symbol
pxstringFill price
szstringFill size
sidestring"B" or "A"
timeintFill timestamp (ms)
hashstringTransaction hash
oidintOrder ID
closedPnlstringRealized PnL from this fill
dirstringTrade direction description
crossedboolWhether this fill crossed the spread (taker)

Get User Fills by Time

Returns fills within a specific time range.

POST /info
{
  "type": "userFillsByTime",
  "user": "0x1234...abcd",
  "startTime": 1700000000000,
  "endTime": 1700100000000,
  "aggregateByTime": false
}
FieldTypeRequiredDescription
startTimeintYesStart timestamp (ms, inclusive)
endTimeintNoEnd timestamp (ms, exclusive)
aggregateByTimeboolNoIf true, aggregates fills by timestamp

Get Funding History

Returns historical funding rate data for a perpetual market.

POST /info
{ "type": "fundingHistory", "coin": "BTC", "startTime": 1700000000000 }

Response

Array of funding records:

FieldTypeDescription
coinstringMarket symbol
fundingRatestringFunding rate for the period
premiumstringPremium component
timeintFunding timestamp (ms)

Get Candle Snapshot

Returns historical OHLCV candlestick data.

POST /info
{
  "type": "candleSnapshot",
  "req": {
    "coin": "BTC",
    "interval": "1h",
    "startTime": 1700000000000,
    "endTime": 1700100000000
  }
}

Supported Intervals

1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w

Response

Array of candles:

FieldTypeDescription
tintCandle open time (ms)
TintCandle close time (ms)
ostringOpen price
hstringHigh price
lstringLow price
cstringClose price
vstringVolume
nintTrade count

Get User Fees

Returns the user’s fee tier information.

POST /info
{ "type": "userFees", "user": "0x1234...abcd" }

Get Order Status

Returns the status of a specific order.

POST /info
{ "type": "orderStatus", "user": "0x1234...abcd", "oid": 12345 }

Get User Rate Limit

Returns the user’s current rate limit usage.

POST /info
{ "type": "userRateLimit", "user": "0x1234...abcd" }

Get Staking Summary

Returns staking delegation information.

POST /info
{ "type": "delegatorSummary", "user": "0x1234...abcd" }

Response

FieldTypeDescription
delegatedstringTotal amount delegated
undelegatedstringAmount not delegated
totalPendingWithdrawalstringPending withdrawal amount
nPendingWithdrawalsintNumber of pending withdrawals