Basics
The Coinbase Clearing REST API provides read-only queries of Coinbase Clearing LLC (CBC) data. All requests and responses use theapplication/json content type. Every endpoint is a POST that takes a JSON request body.
Paths are relative to the
/cdp-api base path. Environments are described on the Coinbase Clearing Connectivity page; REST API host names are not published yet.
Request structure
Every endpoint takes the same top-level request body:
A request with no filters:
Response structure
Every endpoint returns the same top-level response body:Pagination
Every endpoint uses bookmark-based pagination:- Send the first request with
"bookmark": nulland"paging": "NEXT_PAGE". - The response includes a
bookmarkstring and anatEndboolean. - If
atEndisfalse, send the next request with the returnedbookmarkvalue. - Repeat until
atEndistrue.
bookmark from the previous response:
atEnd set to true:
Filtering and sorting
queryArgs holds a typed query argument for each filterable field. All query argument fields are optional; include only the ones you need. Each query argument has two optional properties:
Filters in the same
group are combined with AND. Groups are combined with OR.
Operators by type
Filter examples
Query arguments are nested the same way as the response fields. For example, trade fields sit undertrade, and settlement results fields sit under settlementResults.
Trades from a trade date onward, newest first (POST /api/trades/get-page):
POST /api/settlement-results/get-page):
POST /api/price/get-page):
For prices,
businessDate is part of instrumentPriceKey, so filter it under instrumentPriceKey. instrumentPrice has no businessDate field.queryArgs are listed for each endpoint under REST Endpoints.