Skip to main content
POST
/
v3
/
quote
/
prepare-call-quote
curl --request POST \
--url https://be.onebalance.io/api/v3/quote/prepare-call-quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"accounts": [
{
"type": "solana",
"accountAddress": "EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6"
},
{
"type": "kernel-v3.3-ecdsa",
"accountAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"signerAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"deploymentType": "EIP7702"
}
],
"targetChain": "eip155:42161",
"calls": [
{
"to": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"data": "0xa9059cbb0000000000000000000000004EbcFae0C3e747C95504CA7c79c46f725Cb4c7520000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0"
}
],
"tokensRequired": [
{
"assetType": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"amount": "10000"
}
],
"fromAssetId": "ob:usdc"
}'
{
"accounts": [
{
"type": "solana",
"accountAddress": "EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6"
},
{
"type": "kernel-v3.3-ecdsa",
"accountAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"signerAddress": "0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8",
"deploymentType": "EIP7702"
}
],
"chainOperation": {
"userOp": {
"sender": "0xdb69a4ded06aad92c69c42232b691cfd8bf347e8",
"nonce": "913479994650515257524606220465835134743662536739504622017003723935449089",
"callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb0000000000000000000000004ebcfae0c3e747c95504ca7c79c46f725cb4c752000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
"callGasLimit": "2831389",
"verificationGasLimit": "46313",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "13011",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x"
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 42161,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0x68752061ab5e1f42561b192a3ea5e70c4005b62a7ea4698b14a35ab0004f6687"
}
},
"assetType": "eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"amount": "10000"
},
"tamperProofSignature": "0x6316c2fe49d51af45b7bb7bb311395595fe29b7bd9de2e219cba0942fda2461c1c3f19108d6f391cd02c7cdc7d218ff0945d32ba784be1357b3c954ff7ae254e1c"
}

Authorizations

x-api-key
string
header
required

Body

application/json
accounts
(Role-based Account · object | Basic Account · object | EIP-7702 Account · object | Solana Account · object)[]
required
Required array length: 1 - 10 elements
  • Role-based Account
  • Basic Account
  • EIP-7702 Account
  • Solana Account
Example:
targetChain
string
required
Example:
calls
object[]
required
Minimum length: 1
Example:
tokensRequired
object[]
required
Example:
allowanceRequirements
object[]
Example:
overrides
object[]
Example:
validAfter
string
Example:
validUntil
string
Example:
fromAssetId
string
Example:
slippageTolerance
integer
Required range: x >= 1
Example:

Response

accounts
(Role-based Account · object | Basic Account · object | EIP-7702 Account · object | Solana Account · object)[]
required
  • Role-based Account
  • Basic Account
  • EIP-7702 Account
  • Solana Account
Example:
chainOperation
object
required
tamperProofSignature
string
required
Example:
callType
enum<string>
Available options:
same_chain_exclude_solver,
cross_chain_with_solver,
same_chain_with_solver,
cross_chain_with_solver_and_swaps
Example:
sourceAssetBalances
object[]
Example:
delegation
object