Skip to main content
GET
List TWAP orders

Authorizations

X-Monaco-Signature
string
header
required

Ed25519 session-key request signing. Every authenticated request carries three headers: X-Monaco-PublicKey (64-char lowercase-hex session public key), X-Monaco-Timestamp (Unix milliseconds, within 30s of server time), and X-Monaco-Signature (hex ed25519 signature). The signature is over METHOD\npath?query\ntimestamp_ms\nSHA256_hex(body), where the body hash is the SHA-256 of the empty byte string when there is no body. Obtain the session keypair from POST /api/v1/auth/challenge followed by POST /api/v1/auth/verify.

Query Parameters

pageSize
integer<uint32>
default:20

Items per page (max 100 in page-number mode; up to 1000 when pageToken is present)

Required range: 1 <= x <= 1000
state
string
tradingPairId
string<uuid>

Trading pair identifier (UUID)

Minimum string length: 1
pageToken
string

Pagination cursor with two states:

  • Omitted or empty string (""): start a cursor walk with no prior position, from the newest TWAP parent.
  • Non-empty: an opaque cursor from a previous response's next_page_token; results resume immediately after that position.

total is the matching row count, bounded at a server ceiling of 10,000 and saturating there. Pages are keyset seeks on (createdAt, id), so a page size up to 1000 is allowed. Filters must match the request that produced the token; a token replayed against different filters is rejected.

marginAccountId
string

Narrows the caller's own TWAP parents to one margin account; total counts the same narrowed set. A spot TWAP has no margin account, so any value leaves spot TWAPs out. An account the caller does not own matches none of their TWAPs and returns an empty page.

excludeSubAccounts
boolean

Main-account-only view: keeps TWAP parents on the caller's main margin account in this application, plus spot TWAPs, and leaves out every sub-account TWAP. total counts the same narrowed set. A wallet with no margin account gets its spot TWAPs. Cannot be combined with margin_account_id (InvalidArgument).

Response

OK

orders
object[] | null
total
integer<uint32> | null

Matching TWAP orders, counted up to a server ceiling of 10,000 and saturating there, so a caller with more than that reads the cap rather than a lifetime total.

Example:

3

pageSize
integer<uint32> | null

Items per page

Example:

20

nextPageToken
string | null

Cursor for the next page, minted only when a further page exists — the read over-fetches one row to decide, so there is no "maybe more" state. Empty on the final page (including a full final page, since nothing follows it). Follow it until it comes back empty; that empty token is the definitive end of the walk, so no extra zero-row request is needed. Do not feed the empty token back as page_token — an empty input page_token restarts the walk from the newest row.