For the complete documentation index, see llms.txt. This page is also available as Markdown.

Account

One account's orders, fills, positions, balances, triggers, backstop transfers and unified activity feed. {account} is a 20-byte 0x address.

Get Orders

get

The account's orders with their fills, newest first by (deadline, nonce, order_id). /clob/fills/{account} and the activity fill entries are the per-fill record that also carries the fee and running totals. Backstop position transfers appear as terminal rows with kind: backstop_transfer.

Two paging modes:

  • Cursor (default): pass next_cursor back as cursor; null on the last page. until bounds the first page.

  • Offset: set offset. cursor and until are then ignored and next_cursor is null; page with offset += limit while offset < total_count.

Cache-Control: public, max-age=31536000, immutable when the page's upper bound (cursor or until) has been reached by solution time and every returned order is terminal, otherwise no-store. Offset pages are no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
timestampinteger · int64Optional

The lowest tick deadline accepted, in microseconds — typically the highest timestamp (or solution_now) already held. The node answers once the state behind the route has reached it, otherwise 503 after its wait (default 2s, POD_RPC_TIMESTAMP_WAIT). Omitted means answer now.

untilinteger · int64Optional

Upper bound on order deadline, unix seconds. Ignored when cursor or offset is set.

limitinteger · max: 500Optional

Page size, capped at 500.

Default: 500
cursorstringOptional

next_cursor from the previous page, "{deadline_us}:{nonce}:{order_id_hex}". Malformed is a 400.

offsetintegerOptional

Skip this many newest-first rows. Switches to offset mode.

orderbookstringOptional

32-byte value, 0x hex. Orderbook ids, order ids and hashes.

Example: 0x0000000000000000000000000000000000000000000000000000000000000001Pattern: ^0x[a-fA-F0-9]{64}$
statusstring · enumOptional
  • pending: submitted, not yet in the book
  • active: resting in the book
  • filled: completely filled
  • expired: TTL passed
  • canceled: canceled by the owner
  • margin_canceled: removed by the engine because the owner's margin was exhausted
  • self_trade_canceled: removed by the engine because it was about to fill against an order of the same owner
  • post_only_refused: a post_only order removed because it would have taken liquidity in the batch that admitted it
  • invalid: rejected at execution and never entered the book; see invalid_reason

Everything except pending and active is terminal.

Possible values:
Responses
200

Order page

application/json
next_cursorstring · nullableRequired

Cursor for the next page. null on the last page and in offset mode.

total_countintegerRequired

Orders matching the filters, across all pages.

solution_nowinteger · int64Required

Unix time in microseconds, as a JSON number

Example: 1704153600000000
get/clob/orders/{account}
GET /v1/clob/orders/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "orders": [
    {
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "market_type": "spot",
      "kind": "user_signed",
      "order_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "bidder": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
      "nonce": 1,
      "order_type": "limit",
      "status": "pending",
      "side": "buy",
      "price": "0x6f05b59d3b200000",
      "initial_size": "-1000000000000000000",
      "filled_base_amount": "0x6f05b59d3b200000",
      "filled_quote_amount": "0x6f05b59d3b200000",
      "fee": "0x6f05b59d3b200000",
      "deadline": "1704153600000000",
      "end": 1704153600000000,
      "included_batch": 1704153600000000,
      "invalid_reason": "text",
      "effective_price": "0x6f05b59d3b200000",
      "fills": [
        {
          "base_amount": "0x6f05b59d3b200000",
          "quote_amount": "0x6f05b59d3b200000",
          "timestamp": 1704153600000000,
          "price": "0x6f05b59d3b200000"
        }
      ],
      "reduce_only": true,
      "ioc": true,
      "post_only": true,
      "direction": "buy",
      "realized_pnl": "-1000000000000000000",
      "grouping": "none",
      "trigger_type": "take_profit"
    }
  ],
  "next_cursor": "text",
  "total_count": 1,
  "solution_now": 1704153600000000
}

Get Fills

get

The account's fills in the window [from_us, to_us), newest first. Capped at 500 rows; narrow the window to read further back.

An orderbook id that names no book returns no rows.

Cache-Control: no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
orderbookstringOptional

32-byte value, 0x hex. Orderbook ids, order ids and hashes.

Example: 0x0000000000000000000000000000000000000000000000000000000000000001Pattern: ^0x[a-fA-F0-9]{64}$
from_usstringOptional

Unix time in microseconds, as a decimal string

Example: 1704153600000000Pattern: ^[0-9]+$
to_usstringOptional

Unix time in microseconds, as a decimal string

Example: 1704153600000000Pattern: ^[0-9]+$
limitinteger · min: 1 · max: 500Optional

Maximum rows, clamped to [1, 500].

Default: 500
Responses
200

Fills

application/json
get/clob/fills/{account}
GET /v1/clob/fills/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "fills": [
    {
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "base_token": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
      "quote_token": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
      "order_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "order_type": "limit",
      "initial_size": "-1000000000000000000",
      "fee": "0x6f05b59d3b200000",
      "base_amount": "0x6f05b59d3b200000",
      "quote_amount": "0x6f05b59d3b200000",
      "timestamp": 1704153600000000,
      "price": "0x6f05b59d3b200000"
    }
  ]
}

Get Perp Positions

get

The account's live perp positions and account-level aggregates, read from the execution engine. Spot holdings are on /clob/balances/{account}. An account the node has never seen returns an empty list and zero aggregates.

Cache-Control: no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
timestampinteger · int64Optional

The lowest tick deadline accepted, in microseconds — typically the highest timestamp (or solution_now) already held. The node answers once the state behind the route has reached it, otherwise 503 after its wait (default 2s, POD_RPC_TIMESTAMP_WAIT). Omitted means answer now.

Responses
200

Positions

application/json
total_unrealized_pnlstringOptional

Signed 256-bit integer, decimal string

Example: -1000000000000000000Pattern: ^-?[0-9]+$
total_realized_pnlstringOptional

Lifetime, spot and perp.

Example: -1000000000000000000Pattern: ^-?[0-9]+$
perps_equitystringOptional

Cash adjusted for unsettled funding, plus perp unrealized PnL.

Example: -1000000000000000000Pattern: ^-?[0-9]+$
account_valuestringOptional

perps_equity plus the mark value of spot holdings and quote escrowed in resting spot buys.

Example: -1000000000000000000Pattern: ^-?[0-9]+$
cashstringOptional

Signed 256-bit integer, decimal string

Example: -1000000000000000000Pattern: ^-?[0-9]+$
withdrawable_cashstringOptional

What a withdrawal or transfer can take now: max(0, equity − max(initial_margin, transfer_margin_ratio × notional)), where notional is Σ |size| × mark and transfer_margin_ratio is a network parameter (10% by default). Equity counts unrealized PnL.

Example: 0x6f05b59d3b200000Pattern: ^0x[a-fA-F0-9]+$
net_depositsstringOptional

Native collateral deposited minus withdrawn. Lifetime PnL is account_value − net_deposits.

Example: -1000000000000000000Pattern: ^-?[0-9]+$
timestampinteger · int64Optional

Deadline of the last executed tick on the answering node, read together with the state above; 0 before the first tick. Comparable across nodes.

Example: 1704153600000000
get/clob/positions/{account}
GET /v1/clob/positions/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "positions": [
    {
      "kind": "perp",
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "base_symbol": "text",
      "quote_symbol": "text",
      "side": "long",
      "size": "-1000000000000000000",
      "notional": "0x6f05b59d3b200000",
      "entry_price": "0x6f05b59d3b200000",
      "mark_price": "0x6f05b59d3b200000",
      "margin": "0x6f05b59d3b200000",
      "leverage": "0x6f05b59d3b200000",
      "funding_accrued": "-1000000000000000000",
      "funding_basis": "-1000000000000000000",
      "cost_basis": "-1000000000000000000",
      "entry_funding": "-1000000000000000000",
      "liquidation_price": "0x6f05b59d3b200000",
      "unrealized_pnl": "-1000000000000000000",
      "realized_pnl": "-1000000000000000000",
      "stop_loss": "text",
      "take_profit": "text"
    }
  ],
  "total_unrealized_pnl": "-1000000000000000000",
  "total_realized_pnl": "-1000000000000000000",
  "perps_equity": "-1000000000000000000",
  "account_value": "-1000000000000000000",
  "cash": "-1000000000000000000",
  "withdrawable_cash": "0x6f05b59d3b200000",
  "net_deposits": "-1000000000000000000",
  "timestamp": 1704153600000000
}

Get Balances

get

The account's live spot holdings and cash, read from the execution engine.

Cache-Control: no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
timestampinteger · int64Optional

The lowest tick deadline accepted, in microseconds — typically the highest timestamp (or solution_now) already held. The node answers once the state behind the route has reached it, otherwise 503 after its wait (default 2s, POD_RPC_TIMESTAMP_WAIT). Omitted means answer now.

Responses
200

Balances

application/json
cashstringOptional

Signed 256-bit integer, decimal string

Example: -1000000000000000000Pattern: ^-?[0-9]+$
withdrawable_cashstringOptional

Unsigned 256-bit integer, 0x hex

Example: 0x6f05b59d3b200000Pattern: ^0x[a-fA-F0-9]+$
net_depositsstringOptional

Signed 256-bit integer, decimal string

Example: -1000000000000000000Pattern: ^-?[0-9]+$
timestampinteger · int64Optional

Deadline of the last executed tick on the answering node, read together with the state above; 0 before the first tick. Comparable across nodes.

Example: 1704153600000000
get/clob/balances/{account}
GET /v1/clob/balances/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "balances": [
    {
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "base_symbol": "text",
      "quote_symbol": "text",
      "balance": "0x6f05b59d3b200000",
      "free_balance": "0x6f05b59d3b200000",
      "locked_balance": "0x6f05b59d3b200000",
      "cost_basis": "0x6f05b59d3b200000",
      "mark_price": "0x6f05b59d3b200000",
      "unrealized_pnl": "-1000000000000000000",
      "realized_pnl": "-1000000000000000000"
    }
  ],
  "cash": "-1000000000000000000",
  "withdrawable_cash": "0x6f05b59d3b200000",
  "net_deposits": "-1000000000000000000",
  "timestamp": 1704153600000000
}

Get Triggers

get

The account's armed TP/SL triggers, read from the execution engine, sorted by (orderbook_id, order_id). Pass next_cursor back as cursor for the next page.

Cache-Control: no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
timestampinteger · int64Optional

The lowest tick deadline accepted, in microseconds — typically the highest timestamp (or solution_now) already held. The node answers once the state behind the route has reached it, otherwise 503 after its wait (default 2s, POD_RPC_TIMESTAMP_WAIT). Omitted means answer now.

orderbookstringOptional

32-byte value, 0x hex. Orderbook ids, order ids and hashes.

Example: 0x0000000000000000000000000000000000000000000000000000000000000001Pattern: ^0x[a-fA-F0-9]{64}$
limitinteger · min: 1 · max: 200Optional

Page size, clamped to [1, 200].

Default: 200
cursorstringOptional

next_cursor from the previous page, "{orderbook_id}:{order_id}" (both 0x hex). Malformed is a 400.

Responses
200

Trigger page

application/json
total_countintegerRequired

Triggers matching the filter, before paging.

next_cursorstring · nullableRequired

Cursor for the next page. null on the last page.

get/clob/triggers/{account}
GET /v1/clob/triggers/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "triggers": [
    {
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "order_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "bidder": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
      "nonce": 1,
      "size": "-1000000000000000000",
      "limit_price": "0x6f05b59d3b200000",
      "trigger_price": "0x6f05b59d3b200000",
      "trigger_type": "take_profit",
      "grouping": "none",
      "reduce_only": true,
      "ioc": true,
      "deadline": "1704153600000000",
      "end": 1
    }
  ],
  "total_count": 1,
  "next_cursor": "text"
}

Get Backstop Transfers

get

The account's backstop sweeps as raw events, newest first, with the cash and equity detail the orders feed omits.

With no query parameters the route returns the whole list, capped at 500, and no next_cursor. Setting any of orderbook, limit or cursor switches to paged reads of at most 200 rows; pass next_cursor back as cursor.

An orderbook id that names no book returns no rows.

Cache-Control: no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
orderbookstringOptional

32-byte value, 0x hex. Orderbook ids, order ids and hashes.

Example: 0x0000000000000000000000000000000000000000000000000000000000000001Pattern: ^0x[a-fA-F0-9]{64}$
limitinteger · min: 1 · max: 200Optional

Page size, clamped to [1, 200].

Default: 200
cursorstringOptional

next_cursor from the previous page, "{ts}:{id}". Malformed is a 400.

Responses
200

Backstop transfers

application/json
total_countintegerRequired
next_cursorstringOptional

Cursor for the next page. Omitted on the last page and when unpaged.

solution_nowinteger · int64Required

Unix time in microseconds, as a JSON number

Example: 1704153600000000
get/clob/backstop-transfers/{account}
GET /v1/clob/backstop-transfers/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "backstop_transfers": [
    {
      "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "size": "text",
      "cash": "text",
      "mark_price": "text",
      "equity": "text",
      "realized_pnl": "text",
      "timestamp_us": 1704153600000000
    }
  ],
  "total_count": 1,
  "next_cursor": "text",
  "solution_now": 1704153600000000
}

Get Account Activity

get

Everything that happened to the account, as an ActivityFrame: a map from batch deadline to that batch's entries. Entries are tagged by k (ActivityEntry). Within a batch, entries are ordered by kind (order, fill, modify, termination, backstop, bridge_transfer, transfer, modify_reject, cancel_reject), then by book ascending, then in engine order.

Pages are newest first and hold whole batches. Batches are added while the entry count stays within limit; the newest batch in the window is always served, even when it alone exceeds limit. Pass next back as to for the older page.

An order entry, at the batch that admitted it, is the order as /clob/orders/{account} serves it: its current status, totals and fills, so it needs no folding of the later entries. A fill, modify, termination, modify_reject or cancel_reject names its order by id and book; one of an order placed before the window is not hydrated.

Seed from this route, then subscribe to the pod_activity websocket channel with since = solution_now.

Cache-Control: public, max-age=31536000, immutable when to <= solution_now and every order on the page is terminal, otherwise no-store.

Path parameters
accountstringRequired

20-byte address, 0x hex

Example: 0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
fromstringOptional

Unix time in microseconds, as a decimal string

Example: 1704153600000000Pattern: ^[0-9]+$
tostringOptional

Unix time in microseconds, as a decimal string

Example: 1704153600000000Pattern: ^[0-9]+$
timestampinteger · int64Optional

The lowest tick deadline accepted, in microseconds — typically the highest timestamp (or solution_now) already held. The node answers once the state behind the route has reached it, otherwise 503 after its wait (default 2s, POD_RPC_TIMESTAMP_WAIT). Omitted means answer now.

limitinteger · min: 1 · max: 2000Optional

Entries per page after the type filter, clamped to [1, 2000]. A page can exceed it by its newest batch.

Default: 500
activity_typesstringOptional

Comma-separated kinds to include: order, fill, modify, termination, backstop, bridge_transfer, transfer, modify_reject, cancel_reject. Defaults to all. An unknown or empty name is a 400 (invalid activity_types).

Example: order,fill
Responses
200

Activity page

application/json
nextstring · nullableRequired

The oldest served batch minus 1µs when older history may exist, otherwise null. Pass it as to.

Pattern: ^[0-9]+$
solution_nowinteger · int64Required

Unix time in microseconds, as a JSON number

Example: 1704153600000000
get/clob/activity/{account}
GET /v1/clob/activity/{account} HTTP/1.1
Host: rpc.podtestnet.dev
Accept: */*
{
  "activity": {
    "1704153600000000": [
      {
        "k": "order",
        "orderbook_id": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "market_type": "spot",
        "kind": "user_signed",
        "order_id": "0x9a8b7c6d5e4f30211a2b3c4d5e6f70819a8b7c6d5e4f30211a2b3c4d5e6f7081",
        "tx_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
        "bidder": "0x1234567890abcdef1234567890abcdef12345678",
        "nonce": 42,
        "order_type": "limit",
        "status": "filled",
        "side": "sell",
        "price": "0x4563918244f40000",
        "initial_size": "-1000000000000000000",
        "filled_base_amount": "0xde0b6b3a7640000",
        "filled_quote_amount": "0x4563918244f40000",
        "fee": "0x0",
        "deadline": "1704153600000000",
        "end": 18446744073709552000,
        "included_batch": 1704153600000000,
        "effective_price": "0x4563918244f40000",
        "fills": [
          {
            "base_amount": "0xde0b6b3a7640000",
            "quote_amount": "0x4563918244f40000",
            "timestamp": 1704153600000000,
            "price": "0x4563918244f40000"
          }
        ],
        "direction": "sell"
      },
      {
        "k": "fill",
        "id": "0x9a8b7c6d5e4f30211a2b3c4d5e6f70819a8b7c6d5e4f30211a2b3c4d5e6f7081",
        "book": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "b": "1000000000000000000",
        "q": "5000000000000000000",
        "tb": "1000000000000000000",
        "tq": "5000000000000000000",
        "tf": "0",
        "f": "0",
        "st": "filled"
      }
    ],
    "1704150000000000": [
      {
        "k": "bridge_transfer",
        "tx": "0x51d20000000000000000000000000000000000000000000000000000000000bb",
        "idx": 0,
        "tok": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "amt": "1000000000000000000000"
      }
    ]
  },
  "next": "1704149999999999",
  "solution_now": 1704153600100000
}

Last updated