Prepares the necessary data structure for executing one or more contract calls on a target chain. This endpoint helps construct the appropriate user operation, handles token allowance requirements, and generates a signed quote ready for execution.
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.
Details of the account, calls, and token requirements.
Account details (smart account / EOA and related addresses).
Target chain in CAIP-2 notation (e.g. "eip155:10" for Optimism).
"eip155:10"
Array of calls to be executed.
[
{
"data": "0xa9059cbb0000000000000000000000004ebcfae0c3e747c95504ca7c79c46f725cb4c752000000000000000000000000000000000000000000000000000000000000000100000000",
"to": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"value": "0"
}
]Array of approvals required for the call. Approvals need to be explicitly defined. Any approval pased as call would result into a failing request.
[
{
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000",
"spender": "0xb8e4b017f4a8870E3eB4eb15c5e180D2a34D877B"
}
]Array of tokens needed for these calls.
[
{
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
}
]Optional state overrides (e.g., fake balances for simulation).
[
{
"address": "0xb8e4b017f4a8870E3eB4eb15c5e180D2a34D877B",
"balance": "0x1"
}
]Permit valid after value in block timestamp.
"1686239400"
Permit valid until value in block timestamp.
"1686339400"
Slippage tolerance in basis points (1/100th of a percent). For example, 50 = 0.5%, 100 = 1%, 1000 = 10%.
x >= 150
Call quote prepared successfully
Response from prepare-call-quote containing all necessary data to execute contract calls on the target chain
Account configuration for the operation
Operation (including userOp and typed data) to be executed on-chain
Tamper-proof signature for the entire call request
"0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b"
Type of operation indicating the routing strategy
same_chain_exclude_solver, cross_chain_with_solver, same_chain_with_solver, cross_chain_with_solver_and_swaps "cross_chain_with_solver"
Available balances for source assets that could be used for this operation
[
{
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"balance": "8000000",
"decimals": 6,
"fiatValue": 8
}
]