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
| Field | Type | Description |
|---|---|---|
universe | Array | List of perpetual markets |
universe[].name | string | Market symbol (e.g., "BTC") |
universe[].szDecimals | int | Size decimal places (lot size = 10^(-szDecimals)) |
universe[].maxLeverage | int | Maximum allowed leverage |
universe[].onlyIsolated | bool | Whether 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 index0.
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
| Field | Type | Required | Description |
|---|---|---|---|
coin | string | Yes | Market symbol |
Response
| Field | Type | Description |
|---|---|---|
coin | string | Market symbol |
levels | [Array, Array] | [bids, asks] — each level is an object with px, sz, n |
time | int | Snapshot 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
| Field | Type | Description |
|---|---|---|
assetPositions | Array | Open positions with leverage, entry price, unrealized PnL, and margin |
crossMarginSummary | Object | Cross margin summary: accountValue, totalMarginUsed, totalNtlPos, totalRawUsd |
marginSummary | Object | Total margin summary across all positions |
withdrawable | string | Amount 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:
| Field | Type | Description |
|---|---|---|
coin | string | Market symbol |
limitPx | string | Limit price |
oid | int | Order ID |
side | string | "B" (bid/buy) or "A" (ask/sell) |
sz | string | Remaining size |
timestamp | int | Order 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:
| Field | Type | Description |
|---|---|---|
coin | string | Market symbol |
px | string | Fill price |
sz | string | Fill size |
side | string | "B" or "A" |
time | int | Fill timestamp (ms) |
hash | string | Transaction hash |
oid | int | Order ID |
closedPnl | string | Realized PnL from this fill |
dir | string | Trade direction description |
crossed | bool | Whether 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
}| Field | Type | Required | Description |
|---|---|---|---|
startTime | int | Yes | Start timestamp (ms, inclusive) |
endTime | int | No | End timestamp (ms, exclusive) |
aggregateByTime | bool | No | If 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:
| Field | Type | Description |
|---|---|---|
coin | string | Market symbol |
fundingRate | string | Funding rate for the period |
premium | string | Premium component |
time | int | Funding 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:
| Field | Type | Description |
|---|---|---|
t | int | Candle open time (ms) |
T | int | Candle close time (ms) |
o | string | Open price |
h | string | High price |
l | string | Low price |
c | string | Close price |
v | string | Volume |
n | int | Trade 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
| Field | Type | Description |
|---|---|---|
delegated | string | Total amount delegated |
undelegated | string | Amount not delegated |
totalPendingWithdrawal | string | Pending withdrawal amount |
nPendingWithdrawals | int | Number of pending withdrawals |