Authorizations
The OneBalance API uses API keys to authenticate requests. All API requests require authentication using an API key passed in the x-api-key
header:
curl -X 'GET' \
'https://be.onebalance.io/api/path-to/endpoint' \
-H 'x-api-key: ${ONEBALANCE_API_KEY}' \
...
A public API key is available for testing purposes with limited usage: 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11
.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Learn how to generate API access tokens at OneBalance Docs.
Body
Details of the accounts, calls, and token requirements.
V3 prepare call request with multi-account support for cross-chain contract calls
Array of account configurations. Each account type must be unique. Supports mixed Solana and EVM accounts for cross-chain operations.
1 - 10
elements[
{
"type": "solana",
"accountAddress": "EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6"
},
{
"type": "kernel-v3.3-ecdsa",
"accountAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"signerAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"deploymentType": "EIP7702"
}
]
Target chain in CAIP-2 notation (e.g. "eip155:42161" for Arbitrum).
"eip155:42161"
Array of contract calls to be executed on the target chain.
1
Array of tokens needed for these calls on the target chain.
Optional array of token approvals required for the calls. Approvals need to be explicitly defined. Any approval passed as a call would result in a failing request.
Optional state overrides (e.g., fake balances for simulation).
Permit valid after value in block timestamp.
Permit valid until value in block timestamp.
Source asset identifier to spend from for bridging to target chain. Can be either aggregated asset ID (e.g., "ob:usdc") or CAIP-19 asset type (e.g., "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"). This field enables cross-chain spending from specific assets in multi-account setups.
"ob:usdc"
Slippage tolerance in basis points (1/100th of a percent). For example, 50 = 0.5%, 100 = 1%, 1000 = 10%.
x >= 1
50
Response
Call quote prepared successfully
V3 response from prepare-call-quote containing all necessary data to execute contract calls with multi-account support
Array of account configurations involved in the operation
[
{
"type": "solana",
"accountAddress": "EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6"
},
{
"type": "kernel-v3.3-ecdsa",
"accountAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"signerAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"deploymentType": "EIP7702"
}
]
Operation (including userOp and typed data) to be executed on the target chain Chain operation containing user operation data, typed data to sign, and optional EIP-7702 delegation.
When EIP-7702 delegation is required, the delegation field will be present and must be signed before submission.
Tamper-proof signature for the entire call request
"0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b"
Type of operation indicating the routing strategy for multi-account operations Type of call operation indicating the routing strategy:
same_chain_exclude_solver
: Operation on the same chain without solver involvementcross_chain_with_solver
: Cross-chain operation requiring solver assistancesame_chain_with_solver
: Same-chain operation with solver involvementcross_chain_with_solver_and_swaps
: Complex cross-chain operation with multiple swaps
same_chain_exclude_solver
, cross_chain_with_solver
, same_chain_with_solver
, cross_chain_with_solver_and_swaps
"cross_chain_with_solver"
Available balances across all accounts that could be used for this operation
EIP-7702 delegation object that needs to be signed before execution. Only present when using EIP-7702 accounts that require delegation.
EIP-7702 delegation configuration for smart account operations. When an EOA needs to be delegated to a smart account contract, this object contains the delegation details that must be signed by the user.