Skip to main content
Read what each wallet and exchange account holds and the TetraFi fees you pay; these reads never move money.

At a glance

Paths are under /api/v1/workspaces/{workspaceId}. Your workspace id is the workspaceId from GET /api/v1/me (Permissions).

Every balance in one list

GET …/balances reads TetraFi’s last observation and never asks a chain or venue. Filter with asset, accountKind and accountId; an account that cannot be stated is listed in unavailable, never as a zero row.
Personal wallets are never listed; bank account balances cannot be observed.Page with limit (1 to 100) and cursor until nextCursor is null; if accounts change mid-paging, restart without a cursor.
Response (shortened)
An account whose balance cannot be stated is listed in unavailable on every page: show it as unavailable, not empty. Each entry has accountKind, accountId, asset and chain when known, a reasonCode, and the asOf of the source’s last answer.incomplete means the list may leave accounts out; reason accessSettingsUnavailable says access settings could not be read. Read again shortly.
Response (shortened)

List your exchange accounts

GET …/venue-enablements lists venue accounts in items, oldest first, keyed by venueEnablementId. Read balances from a configured account; a walletBased venue trades from your wallets, so read those.
Page with limit (20 by default, at most 100) and cursor.
Output on test networks

One exchange account

GET …/venue-accounts/{venueAccountId}/balances answers what the venue last reported for the account, one line per asset. available is free less TetraFi’s commitments to open trades and withdrawals.
Output on test networks
In the history, credits: null means it could not be read; [] is truly empty. Over 1,000 venue records answers no credits with reasonCode DEPOSIT_HISTORY_WINDOW_TOO_LARGE: read a shorter window.
Output on test networks
A venue that publishes no networks answers options: [] and lists its assets in unconfirmedNetworkAssets. Their networks are not verified: never send real funds on them.

Fee schedule

GET …/fee-schedule answers the schedule in force now (current) and every change already scheduled (upcoming); it reads only. Every member can read fees, but a key needs Read fee schedule: no other permission includes it.
Response (shortened)
object
The schedule in force.
array
Scheduled changes, oldest first, each with its effectiveFrom and the whole schedule from then. [] means none.
Each rate has ratePpm and effectiveFrom:
  • ratePpm: a decimal string in parts per million (100 ppm is one basis point, 0.01%). Read it as a decimal, not a float.
  • effectiveFrom: the RFC 3339 date-time it applies from.

Refusals

A key without Read fee schedule is refused with 403.
Every other code is in Error codes.

Run the balances script

Lists exchange accounts, then reads one’s balances and deposits.

Run the fees script

Reads your current and upcoming fees.

Next

Trades and settlement

Every trade, its settlement, and credit.

Errors and refusals

Fix, retry or recover.