Skip to Content
API ReferenceExplorer API

Explorer

Public reads of trades, batches, and accounts. No authentication. List, batch, account, tx, and search responses are cached briefly. A batch’s trades and requests, and an account’s activity, are not cached.

Endpoints

MethodPathDescription
GET/api/explorer/search/:queryWhat a hash, batch number, account index, or address names
GET/api/explorer/tx/:txHashOne trade, or one L1 transaction
GET/api/explorer/batchesNewest batches, 20
GET/api/explorer/batch/:batchNumberOne batch
GET/api/explorer/batch/:batchNumber/tradesTrades in the batch
GET/api/explorer/batch/:batchNumber/requestsL1 requests in the batch
GET/api/explorer/batch/:batchNumber/rowsTrade digests, once the batch is executed
GET/api/explorer/account/:accountBalances for an index or an address
GET/api/explorer/account/:account/activityThat account’s trades and transfers

:account is a decimal account index or an 0x address.

GET /api/explorer/search/:query

{ "results": [ { "kind": "TRADE", "txHash": "0xabc…" }, { "kind": "BATCH", "batchNumber": 12 }, { "kind": "ACCOUNT", "accountIndex": 4, "address": "0xdef…" } ] }

kind is TRADE, L1_TX, BATCH, or ACCOUNT.

Transaction

GET /api/explorer/tx/:txHash

A trade:

{ "kind": "TRADE", "txHash": "0xabc…", "tradeId": 9001, "executedAt": 1764000000, "ticker": "TERA", "name": "Tera", "aggressorSide": "BUY", "price": 167.49, "quantity": 2.5, "value": 418.725, "buy": { "orderId": 880, "address": "0x…", "role": "TAKER", "fee": 0.25, "type": "LIMIT", "timeInForce": "GTC", "limitPrice": 168, "quantity": 2.5, "filledBefore": 0, "placedAt": 1763999000 }, "sell": { "orderId": 881, "address": "0x…", "role": "MAKER", "fee": 0.1, "type": "LIMIT", "timeInForce": "GTC", "limitPrice": 167.49, "quantity": 10, "filledBefore": 1, "placedAt": 1763998000 }, "proof": null, "hashed": { "id": "9001", "marketIndex": 2048, "buyOrderId": "880", "sellOrderId": "881" } }

proof is the same object as on trade history: null, PENDING, or IN_BATCH. hashed is the full EIP-712 trade message. It carries each signature as its keccak256 (buySignatureHash / sellSignatureHash), not the signature bytes.

Field
id
marketIndex
buyOrderId
sellOrderId
buyer
seller
price
quantity
paymentAmount
buyerFeeAmount
sellerFeeAmount
buyerIsAggressor
createdAt
buySignatureHash
sellSignatureHash

An L1 transaction:

FieldMeaning
kindL1
txHashTransaction hash
blockNumberBlock number
timestampUnix seconds
fromSender
proxyAddressZkLoaf proxy
eventsThe rows below

An event kind is BATCH, REQUEST, PAYOUT, or UNSATISFIED. A BATCH event has step COMMIT, PROVE, or EXECUTE.

StatuscodeMeaning
400INVALID_REQUEST:txHash is not 0x and 64 hex digits
404{ "error": "Transaction not found" }
503Lookups are busy, or L1 could not be read. Retry shortly
500{ "error": "Failed to fetch transaction" }

Batches

GET /api/explorer/batches returns { "batches": [...] }. Each entry has the fields of one batch below.

One batch, GET /api/explorer/batch/:batchNumber:

FieldMeaning
batchNumberThe batch
statusSEALED, EXECUTED, or FINAL
proxyAddressZkLoaf proxy, or null
commit, prove, execute{ txHash, blockNumber } or null
executedAtUnix seconds, or null
tradeCount, withdrawalCount, l1RequestCountRow counts

An unknown batch returns 404 { "error": "Batch not found" }.

GET /api/explorer/batch/:batchNumber/trades?cursor=

{ "trades": [ { "txHash": "0xabc…", "l2BlockNumber": 12, "rowIndex": 0, "ticker": "TERA", "aggressorSide": "BUY", "price": 167.49, "quantity": 2.5, "executedAt": 1764000000 } ], "nextCursor": 50 }

Pass nextCursor as cursor. null is the last page. Page size is 50.

GET /api/explorer/batch/:batchNumber/requests?cursor= is the same shape with requests.

FieldMeaning
rowIndexRow in the batch
l1RequestIdL1 request id
typeDEPOSIT, CHANGE_PUBKEY, CREATE_MARKET, UPDATE_MARKET, CANCEL_ALL, WITHDRAW, REGISTER_ASSET, UPDATE_ASSET, SET_ORACLE, EXIT_POOL, or SET_WITHDRAW_FEE
accountIndexAccount index
asset{ assetId, symbol, decimals, amount, credited, paid } for a DEPOSIT or WITHDRAW, otherwise null. Amounts are the token’s base units. credited is what a deposit credited the account. paid is what a withdraw request paid out. Each is null on the other type
l1TxHashL1 transaction hash
journaledAtWhen Loaf took in the request, in unix seconds

GET /api/explorer/batch/:batchNumber/rows is the batch’s trade digests, one row per book trade or perps event, { block_number, row_index, l2_trade_digest }, once the batch is executed. 404 { "error": "Batch not executed" } before then, and for an unknown batch.

Account

GET /api/explorer/account/4 or GET /api/explorer/account/0xabc…

{ "accountIndex": 4, "address": "0xabc…", "asOf": 1764000000, "assets": [ { "assetId": 3, "symbol": "USDC", "decimals": 6, "isQuote": true, "total": "100000000", "hold": "0", "available": "100000000", "ticker": null, "name": null, "markPrice": 1, "value": 100 } ] }

Balance fields match portfolio balances. ticker and name are set when the asset is a listed market’s base. value is total at markPrice when both exist. Cash has markPrice 1.

GET /api/explorer/account/:account/activity?cursor=

{ "items": [ { "kind": "TRADE", "tradeId": 9001, "ticker": "TERA", "source": "TRADE" }, { "kind": "TRANSFER", "journalSeq": 40, "type": "DEPOSIT", "symbol": "USDC" } ], "nextCursor": null }

A TRADE item is a trade-history row with source TRADE, plus kind. Perps events are not listed. On these items pool and closedPnl are null, and direction is BUY or SELL. A TRANSFER item is a portfolio transfer plus kind. cursor is opaque. Pass nextCursor back unchanged.

StatuscodeMeaning
400INVALID_REQUEST:account is not a decimal account index or an 0x address, or cursor is not a nextCursor this route returned
404{ "error": "Account not found" }
503The account or its activity could not be read
500{ "error": "Failed to fetch account" } or "Failed to fetch account activity"
Last updated on