Skip to main content

Documentation Index

Fetch the complete documentation index at: https://staging-docs.orderly.network/llms.txt

Use this file to discover all available pages before exploring further.

Order history filtered by closed status (FILLED / CANCELLED / REJECTED). Spans live and archive tables — windows that cross the 92-day archive cutoff are queried across both. Includes both ordinary and algo orders (algo rows include trigger_price / trigger_status). Weight: 5

Request

{
  "type": "historicalOrders",
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "symbol": "PERP_ETH_USDC",
  "status": "FILLED",
  "start_time": 1715000000000,
  "end_time": 1715600000000,
  "limit": 100
}
FieldTypeRequiredDefaultNotes
addressstringYesWallet address
broker_idstringNoOptional
account_idstringNoOptional
symbolstringNoSymbol filter
statusstringNoall threeFILLED / CANCELLED (alias CANCELED) / REJECTED, case-insensitive
start_timeint64Nonow (UTC day snap) − 24hms epoch
end_timeint64Nonowms epoch
limitintNo1001..500
cursorstringNoOpaque cursor

Response

FieldTypeNotes
typestringOrdinary (LIMIT, MARKET, IOC, POST_ONLY, FOK, LIQUIDATE, BID, ASK, SETTLEMENT) or algo (STOP_MARKET, STOP_LIMIT, TAKE_PROFIT_MARKET, TAKE_PROFIT_LIMIT, OCO, TRAILING_STOP, BRACKET, POSITIONAL_TP_SL, TP_SL, STOP_TRIGGER, STOP_BRACKET)
statusstringFILLED / CANCELLED / REJECTED
average_executed_pricestring | nullexecuted_amount / executed_quantity; null if zero fills
trigger_price, trigger_statusstring | nullAlgo rows only
realized_pnlstring | nullnull on algo rows
reduce_onlybool | nullAlgo rows only

Notes

  • Status mapping: FILLED → [3], CANCELLED → [5], REJECTED → [6]; omitting status queries all three
  • Default window is UTC-day-snapped now − 24h — pass an explicit start_time for longer lookbacks
  • Archive cutoff is 92 days. Queries spanning that boundary transparently combine live and archived orders
  • Sort: (created_time DESC, order_id DESC)
{
  "success": true,
  "data": {
    "rows": [
      {
        "order_id": "123456789",
        "symbol": "PERP_ETH_USDC",
        "side": "BUY",
        "type": "LIMIT",
        "price": "2128.31",
        "quantity": "164.45",
        "total_executed_quantity": "164.45",
        "average_executed_price": "2128.29",
        "trigger_price": null,
        "trigger_status": null,
        "status": "FILLED",
        "total_fee": "0.002",
        "fee_asset": "USDC",
        "realized_pnl": "100.50",
        "reduce_only": false,
        "created_time": 1714900000000,
        "updated_time": 1714901000000
      }
    ],
    "next_cursor": null
  },
  "ts": 1779269143700
}