Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

API Reference

Every integration makes the same three moves: read a snapshot with POST /info, keep it live over WebSocket, and write with a signed POST /exchange action. Reads are unauthenticated. Writes are signed locally by your own agent key, so there are no API keys to provision.

New here? Run Try Testnet to see a full client work in your browser, follow the call order in Integration flows, then read Signing before writing your own client — or let the TypeScript SDK handle it.

Find the right API

Pick what you are building. Each line lists its calls in order; live marks a WebSocket subscription. Hover a name to see what it does.

Trading

Market data

Account & funds

Outcome markets

Builders & keys

Browse by data instead

Pick the row for the data, then the column for how you need it. A dash means that transport has no equivalent — public trades, for example, exist only as a stream.

SnapshotPOST /infoStreamWebSocketWritePOST /exchange
InstrumentsSymbols, ids, contract params
Stream—
Write—
Order bookDepth and top of book
Snapshotl2Book
Write—
Public tradesThe tape
Snapshot—
Write—
CandlesOHLCV for charts
Write—
Balances & transfersSub-account balances, deposits, withdrawals
Stream—
FundingFunding settlements
SnapshotuserFundings
Write—
Fees & referralRates, tiers, referral
Stream—
Write—
Agent keysWho may sign for an account
Stream—
ChainBlocks, epochs, explorer
Write—

Endpoints

EndpointWhat it doesReference
POST /infoRead-only queries — balances, positions, orders, fills, history, the book, market metadata, deposit settingsInfo API
POST /exchangeEvery write — orders, cancels, margin, fund movements, builder codes. One signed action per request.Exchange API
WS /wsNode stream — books, trades, account updates, chain dataWebSocket API
WS /api-wsAPI-service stream — tickers, trade lists, candles, history snapshots, and async Outcome failuresWebSocket API
WS /ws-rtdsCrypto reference prices for Outcome underlyings — spot, Chainlink, TWAPWebSocket API
TxRelay /api/v1/bridge/…Cross-chain deposit / peg addresses, on a separate hostTxRelay API

The Info, WebSocket, Exchange, and TxRelay references are Beta: endpoints are live and stable in shape, but some pages are still being written. Limits are on Rate limits.

Networks

One host per network serves /info, /exchange, /ws, /api-ws, /ws-rtds, /account, and the testnet faucet — it routes each request to the node or the API service for you. TxRelay has its own host.

MainnetTestnet
API hosthttps://rpc.txflow.comhttps://rpc.txflow-testnet.xyz
Faucet — POST /request-fund—same as API host
TxRelay — /api/v1/bridgehttps://api-bridge.txflow.comhttps://devnet-bridge.txflow.net
EIP-712 network nameTxFlow-MainnetTxFlow-Testnet
Chain ID8692511
Signing apiVersion (EIP-712 version)11

The network name and chain ID go into the EIP-712 domain, which keeps a testnet signature from replaying on mainnet.

Every code sample and Try it panel targets testnet, so nothing copied from these docs can hit mainnet by accident. Swap the host and the domain values above when you go live.

Conventions

Content typeapplication/json on both POST endpoints
Version headersend x-api-version: 2026-08-16 on every /info and /exchange request — every sample here does, and responses are documented in that format
Responses/info: { "success": true, "code": 0, "data": … }, or success: false with code and message on error. /exchange: see Response
Field casecamelCase, except the Outcome metadata responses, which are snake_case
Numbersquantities and prices are strings, to avoid float rounding
Instrument idsThe index from perpMeta, or an Outcome market's instrument_id from outcomeMeta. In requests, coin and the /info asset filter take it as a numeric string ("coin": "1") — every endpoint accepts that form, and node reads such as l2Book accept no other; instrumentId / instrumentIds and the /exchange fields a / asset take it as an integer ("a": 1). In responses, coin is a display name whose form varies by endpoint (BTC-USDC, BTC, OUTCOME-4991183) — match rows on asset / instrumentId instead, compared as numbers (asset is "1" in some responses and 1 in others).
Account typesaccountType is perp or outcome (perps is accepted as an alias)
Noncesmillisecond timestamps, unique per signer
Timethe consensus timestamp is the chain's only clock — see Consensus & Execution