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
| Method | Path | Description |
|---|---|---|
GET | /api/explorer/search/:query | What a hash, batch number, account index, or address names |
GET | /api/explorer/tx/:txHash | One trade, or one L1 transaction |
GET | /api/explorer/batches | Newest batches, 20 |
GET | /api/explorer/batch/:batchNumber | One batch |
GET | /api/explorer/batch/:batchNumber/trades | Trades in the batch |
GET | /api/explorer/batch/:batchNumber/requests | L1 requests in the batch |
GET | /api/explorer/batch/:batchNumber/rows | Trade digests, once the batch is executed |
GET | /api/explorer/account/:account | Balances for an index or an address |
GET | /api/explorer/account/:account/activity | That account’s trades and transfers |
:account is a decimal account index or an 0x address.
Search
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:
| Field | Meaning |
|---|---|
kind | L1 |
txHash | Transaction hash |
blockNumber | Block number |
timestamp | Unix seconds |
from | Sender |
proxyAddress | ZkLoaf proxy |
events | The rows below |
An event kind is BATCH, REQUEST, PAYOUT, or UNSATISFIED. A BATCH event has step COMMIT, PROVE, or EXECUTE.
| Status | code | Meaning |
|---|---|---|
400 | INVALID_REQUEST | :txHash is not 0x and 64 hex digits |
404 | { "error": "Transaction not found" } | |
503 | Lookups 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:
| Field | Meaning |
|---|---|
batchNumber | The batch |
status | SEALED, EXECUTED, or FINAL |
proxyAddress | ZkLoaf proxy, or null |
commit, prove, execute | { txHash, blockNumber } or null |
executedAt | Unix seconds, or null |
tradeCount, withdrawalCount, l1RequestCount | Row 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.
| Field | Meaning |
|---|---|
rowIndex | Row in the batch |
l1RequestId | L1 request id |
type | DEPOSIT, CHANGE_PUBKEY, CREATE_MARKET, UPDATE_MARKET, CANCEL_ALL, WITHDRAW, REGISTER_ASSET, UPDATE_ASSET, SET_ORACLE, EXIT_POOL, or SET_WITHDRAW_FEE |
accountIndex | Account 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 |
l1TxHash | L1 transaction hash |
journaledAt | When 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.
| Status | code | Meaning |
|---|---|---|
400 | INVALID_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" } | |
503 | The account or its activity could not be read | |
500 | { "error": "Failed to fetch account" } or "Failed to fetch account activity" |