Exact numbers
Prices, quantities, strikes and amounts are sent as exact fixed-point objects, never as floats:value = units × 10^-decimals, so the example above is 105000.123456. units is a decimal integer string and may be negative (for example, a short position).
decimals, so rescale before you compare. Balances and premiums are always in USDC atoms (decimals: 6).
Pagination
/markets, /positions, /orders and /fills use cursors:
- Pass
nextCursorback ascursor, unchanged, with the same filters.nextCursor: nullmeans you have the last page. - Cursors are opaque. A cursor used with different filters, on another route, or after a cursor format change returns
400 INVALID_CURSOR. When that happens, drop the cursor and start again from the first page.
/executions does not use cursors. It uses a sequence checkpoint instead (see Executions).
List markets
GET /mm/v1/markets
{ markets, nextCursor, limit, serverTimeMs }.
- With no
statusfilter, results are sorted byinstrumentId. Use this for a complete catalog sync. - With a
statusfilter, results are sorted by expiry, theninstrumentId. A market that changes status while you are paging can be missed, so use the unfiltered listing when you need every market.
Market fields
Status and pauses
tradingPaused is separate from status. A market can be ACTIVE but paused. Treat a paused market as not tradable until tradingPaused goes back to false. D1 does not publish the reason for a pause.
Get one market
GET /mm/v1/markets/{instrumentId}
market has the same fields as in the list (shortened above). settlement summarizes the accepted settlement:
An unknown
instrumentId returns 404 NOT_FOUND. A malformed one returns 400 MALFORMED_REQUEST.
Order book
GET /mm/v1/markets/{instrumentId}/orderbook
bidsandasksare aggregated price levels, best first: highest bid first, lowest ask first.quantityis the total resting quantity at the level.ownQuantityis the part of it that belongs to you, or0if none.- The book does not show individual orders or who placed them.
Partial and truncated books
D1 reads a bounded number of resting orders per side. When a book is very deep:partial: truemarks the one level where that bound was reached. ItsquantityandownQuantityare lower bounds: there may be more at that price.truncated: truemeans more book exists than is shown, either beyonddepthor beyond the read bound.
partial level are complete. Do not treat the last level of a truncated book as the full liquidity at that price.