Overview
The Transactions API is the execution-facing part of the 1tx backend. Use it when you want 1tx to:- choose the best source chain for a deposit,
- calculate quotes and slippage-protected minimum outputs,
- and return the exact calldata bundle your user should sign.
- Call
POST /transactions/buyorPOST /transactions/sell. - Present the returned transaction bundle to the user wallet.
- Send the transactions in order.
- For cross-chain buys, monitor the bridge via the CCTP API using the source transaction hash.
Transaction build endpoints require both a bearer token and an API key. Discovery endpoints such as
/instruments, /chains, and /quotes only require an API key.Build Buy Transaction
POST/transactions/buy
Build a transaction bundle that calls router buy() for a 1tx instrument.
The backend will:
- validate the instrument,
- auto-select a source chain unless
sourceChainIdis provided, - quote the deposit on the destination chain,
- add an approval transaction only when needed,
- and return the calldata bundle to execute.
Request Body
Response
Response Fields
Notes
- The approval transaction is only included when current allowance is insufficient.
- For cross-chain buys, the router transaction still runs on the source chain.
- The returned calldata already includes the correct
fastTransfer/maxFeeparameters expected by the current router flow. - When
referralFeeBps > 0, the fee is deducted from the user’s USDC input before swap and deposit.referralWalletmust be a non-zero address. The router caps the referral fee at 500 bps (5%).
Build Sell Transaction
POST/transactions/sell
Build a transaction bundle that calls router sell() for a 1tx instrument.
Withdrawals are currently same-chain only.
Request Body
Response
Get User Balances
GET/transactions/balances/:userAddress
Scan supported chains for the user’s USDC balance. This is useful when you want to show source-chain selection before calling POST /transactions/buy.
Response
Recommended Execution Flow
For same-chain buys:- Call
POST /transactions/buy. - Execute returned transactions in order.
- Call
POST /transactions/buy. - Execute returned transactions in order on
sourceChainId. - Wait for the source router transaction hash.
- Poll
GET /cctp/relay/tx/:sourceTxHashuntil the bridge job reaches a terminal state.
Legacy Endpoints
The following endpoints still exist for backwards compatibility with older clients, but are not part of the recommended integration path:POST /transactions/operations/:operationId/confirmGET /transactions/operations/:operationId