At a glance
1
Quote
POST /api/v1/quotes with what you sell, what you buy and one amount. source is optional: without it, each venue quotes from your defaults.2
Pick a quote
Read how it runs from the fields above. The quote fixes its source; to change it, requote.
3
Order
POST /api/v1/orders with quoteId, an Idempotency-Key, and whatever that quote asks for (below). Lost the answer? Recover it by quote, never with a new key.4
Follow
Read
GET /api/v1/orders/{orderId}, or receive webhooks, until terminal is true (Order status).The five ways a trade runs
All five are Basic: execution at the venue, through its API or its own smart contracts. On-chain does not mean Advanced; Advanced (TetraFi’s router and escrow) is not open yet.
Exchange account, prefunded
Exchange account, prefunded
Deposit first:
GET /api/v1/workspaces/{workspaceId}/venue-accounts/{venueAccountId}/deposit-instructions says where. The trade spends the account’s balance at the venue and settles on the venue’s own ledger (venueLedger, immediate). A quote whose next.kind is fund has an account short by readiness.amount (Before your first trade).OTC or credit account
OTC or credit account
The trade goes on the account’s credit and is netted with your other trades in a settlement window. The quote carries
creditPortion, creditCheck and settlement.window; your order consents to that window with settlementWindowId. A trade that spends only what the account already holds settles at once instead. A key only reads settlement actions (they are for members).On-chain venue, TetraFi signs
On-chain venue, TetraFi signs
The trade runs from an organisation wallet on Turnkey or Privy. Its owners approve, once per venue, a signing grant with per-trade and per-day caps that the provider itself enforces, and the wallet is granted to your key (Give a key organisation wallets). TetraFi then signs each trade inside those caps, with no approval per trade. The wallet holds the funds and pays the gas.
On-chain venue, you sign
On-chain venue, you sign
Name your wallet’s address in
source.tradingWallets. Each on-chain quote carries signing.firstStep; you sign it and send it with the order, and sign any later step on POST /api/v1/orders/{orderId}/steps/{stepId}. You pay your own gas (Sign with your own wallet, the recipe).Settlement method and timing
Settlement method and timing
settlement.timing is immediate, byDeadline (a pay-in, by its deadline) or delayed (in a settlement window, or whenever either side asks). Both lists can grow: treat a value you do not know as other.Planned, not available yet
Planned, not available yet
People approving one trade elsewhere (
signing.mode owners or custodian, with an order next.kind of approve and an approvalUrl), Solana and Tron steps, more venues for your own wallet, and custody wallets that TetraFi signs for (Sign with your own wallet, under What comes next). Keep following the order on any value you do not know.Pay in after the order
On apayIn quote you order first, then send the money over the venue’s own rail, such as a bank transfer. The venue delivers once your payment is credited; the quote’s payIn states the deadline and what happens to late money.
The payIn terms
The payIn terms
With a deadline,
settlement.timing is byDeadline. Every value list can grow: treat an unknown one as other.Follow the payment
Follow the payment
The trade’s leg, in
legs[].tradeLeg of GET /api/v1/workspaces/{workspaceId}/trades/{tradeId}, carries fundingDeadlineAt (the trade’s own deadline, never later than the quote’s terms), status (awaiting_funds, then funds_received, or expired_unfunded or late_funds), and fundsReceivedAt with creditedAmount once the venue credits it.Next
Choose wallets and accounts
Name the source a quote trades from.
Place an order
Order a quote and retry safely.