The API may change until launch. Every change is listed in the Changelog.
Before you start
- Switch on Read treasury for the key. Without it, these reads are refused with
403. - The paths name your workspace:
TETRAFI_WORKSPACE_IDis theworkspaceIdthatGET /api/v1/meanswers for your key.
List your exchange accounts
GET /api/v1/workspaces/{workspaceId}/venue-enablements lists the workspace’s exchange accounts, oldest first, in items. Each item’s accountId is the {venueAccountId} the reads below take.
The page holds up to
limit items (20 by default, at most 100). To read every account, pass nextCursor back as cursor until it is null. A cursor this list did not issue answers 400 INVALID_CURSOR.
Output on test networks
Read the balances
GET /api/v1/workspaces/{workspaceId}/venue-accounts/{venueAccountId}/balances answers with what the venue last reported for the account.
Output on test networks
Read the deposit history
GET …/venue-accounts/{venueAccountId}/deposit-history lists the deposits the venue credited to the account for one asset on one network, chainRef (CAIP-2, such as eip155:1). Both are required.
Each answer is one read of the venue’s own credit history over the last lookbackDays days (1 to 30, 7 by default), returned whole with its since and until. It is not paged: there is no cursor, because a venue’s history has no position that stays stable from one read to the next. A window holding more than 1,000 of the venue’s records answers no credits, with reasonCode DEPOSIT_HISTORY_WINDOW_TOO_LARGE: read a shorter window.
GET …/venue-accounts/{venueAccountId}/deposit-instructions lists the pairs the account takes deposits on, in options. A venue that publishes no networks answers options: [] and names its assets in unconfirmedNetworkAssets: the networks of those deposits are not verified, so never send real funds on them.
credits lists each deposit. null means the history could not be read, and reason says why: it never means there were no deposits. [] is a real empty history.
Output on test networks
Refusals
Every other code is in Error codes.