OneBalance quotes enable cross-chain operations including asset transfers, swaps, and arbitrary contract interactions. They facilitate the core transaction lifecycle by providing cost estimates and execution plans.
Account Setup Required: Quotes require proper account configuration. See Account Models for setup instructions.
Quote Types
Unified Quotes
For transfers and swaps between aggregated or chain-specific assets.
curl -X POST "https://be.onebalance.io/api/v1/quote" \
-H "x-api-key: ONEBALANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": {
"account": {
"sessionAddress": "0x1cBF...",
"adminAddress": "0xc162...",
"accountAddress": "0xE202..."
},
"asset": { "assetId": "ds:eth" },
"amount": "1000000000000000000"
},
"to": {
"asset": { "assetId": "ds:usdc" }
}
}'
Contract Call Quotes
For arbitrary smart contract interactions with automatic token routing.
curl -X POST "https://be.onebalance.io/api/quotes/prepare-call-quote" \
-H "x-api-key: ONEBALANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account": {
"sessionAddress": "0x1cBF...",
"adminAddress": "0xc162...",
"accountAddress": "0xE202..."
},
"targetChain": "eip155:8453",
"calls": [{
"to": "0x...",
"data": "0x...",
"value": "0x0"
}],
"tokensRequired": [{
"assetType": "eip155:8453/erc20:0x...",
"amount": "1000000"
}]
}'
Quote Lifecycle
Request Quote
Generate a quote with pricing and execution plan
Sign Transaction
Sign the typed data using your wallet or signer
Execute Quote
Submit the signed quote for on-chain execution
Key Features
- Cross-chain routing - Use tokens from any supported chain
- Gas abstraction - No need for native tokens on target chains
- Automatic approvals - ERC20 approvals handled automatically
- Quote expiration - Time-limited quotes ensure fresh pricing
Responses are generated using AI and may contain mistakes.