Get call quote
Gets a quote for arbitrary contract call operations on a specific chain. This endpoint handles the execution of pre-signed user operations with typed data signatures, supporting interactions with smart contracts.
POST
/
quotes
/
call-quote
curl --request POST \
--url https://be.onebalance.io/api/quotes/call-quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"account": {
"accountAddress": "0xb8e4b017f4a8870E3eB4eb15c5e180D2a34D877B",
"adminAddress": "0x8FA09fc75bC2619e594cCb720096627DCaA7c5C4",
"sessionAddress": "0xBbef1E2dEA96c1c2001Eb48136e513A855F46097"
},
"chainOperation": {
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530300722547379539971600052481264750391572034956634531672621056",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e4190000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002443c3b752b01a24bd06230f3f54e5bf266ae7a41750ee3b789fa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000bbef1e2dea96c1c2001eb48136e513a855f460970000000000000000000000008fa09fc75bc2619e594ccb720096627dcaa7c5c400000000000000000000000078264308ad049116f52162822801b5ebfd8f5cea00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b8e4b017f4a8870e3eb4eb15c5e180d2a34d877b00000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000bbef1e2dea96c1c2001eb48136e513a855f460970000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b8e4b017f4a8870e3eb4eb15c5e180d2a34d877b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5fbf5224261061a92bddb673cbfeb9849737cb80c5b5ae535007a1d57a377294c5a61033baef242b93faede408322feb651c"
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9280025cef27699ffe5f5e9e9625b15eb"
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
},
"tamperProofSignature": "0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b",
"fromAggregatedAssetId": "int:usdc"
}'
{
"id": "0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d",
"account": {
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0"
},
"originChainsOperations": [
{
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530...",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000...",
"callData": "0xe9ae5c530100000000000000000000000000...",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5f..."
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9..."
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
}
],
"destinationChainOperation": {
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530...",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000...",
"callData": "0xe9ae5c530100000000000000000000000000...",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5f..."
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9..."
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
},
"originToken": {
"aggregatedAssetId": "ds:eth",
"amount": "1000000000000000000",
"assetType": [
"eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"eip155:1/slip44:60"
],
"fiatValue": [
{
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "1800.00"
},
{
"assetType": "eip155:1/slip44:60",
"fiatValue": "1800.00"
}
]
},
"destinationToken": {
"aggregatedAssetId": "ds:usdc",
"amount": "100000000",
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "100",
"minimumAmount": "100",
"minimumFiatValue": "100"
},
"expirationTimestamp": "1686239400",
"tamperProofSignature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
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: f9703eaqsbma20tmtphg2jirm0hk8z8v2hkodrfrvhfm6ziesi7p38u991bnih5f
.
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
application/json
Response
200
application/json
Call quote
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://be.onebalance.io/api/quotes/call-quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"account": {
"accountAddress": "0xb8e4b017f4a8870E3eB4eb15c5e180D2a34D877B",
"adminAddress": "0x8FA09fc75bC2619e594cCb720096627DCaA7c5C4",
"sessionAddress": "0xBbef1E2dEA96c1c2001Eb48136e513A855F46097"
},
"chainOperation": {
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530300722547379539971600052481264750391572034956634531672621056",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e4190000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002443c3b752b01a24bd06230f3f54e5bf266ae7a41750ee3b789fa0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000bbef1e2dea96c1c2001eb48136e513a855f460970000000000000000000000008fa09fc75bc2619e594ccb720096627dcaa7c5c400000000000000000000000078264308ad049116f52162822801b5ebfd8f5cea00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b8e4b017f4a8870e3eb4eb15c5e180d2a34d877b00000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000bbef1e2dea96c1c2001eb48136e513a855f460970000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b8e4b017f4a8870e3eb4eb15c5e180d2a34d877b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5fbf5224261061a92bddb673cbfeb9849737cb80c5b5ae535007a1d57a377294c5a61033baef242b93faede408322feb651c"
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9280025cef27699ffe5f5e9e9625b15eb"
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
},
"tamperProofSignature": "0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b",
"fromAggregatedAssetId": "int:usdc"
}'
{
"id": "0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d",
"account": {
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0"
},
"originChainsOperations": [
{
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530...",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000...",
"callData": "0xe9ae5c530100000000000000000000000000...",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5f..."
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9..."
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
}
],
"destinationChainOperation": {
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530...",
"factory": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"factoryData": "0xc5265d5d000000000000000000000000...",
"callData": "0xe9ae5c530100000000000000000000000000...",
"callGasLimit": "737280",
"verificationGasLimit": "3076170",
"preVerificationGas": "0",
"maxFeePerGas": "0",
"maxPriorityFeePerGas": "0",
"paymaster": "0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4",
"paymasterVerificationGasLimit": "19219",
"paymasterPostOpGasLimit": "0",
"paymasterData": "0x",
"signature": "0x8cbd9df26744e2a02cde9fb8832d2b5f..."
},
"typedDataToSign": {
"domain": {
"name": "RoleBasedECDSAValidator",
"version": "1.4.3",
"chainId": 10,
"verifyingContract": "0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA"
},
"types": {
"Approve": [
{
"name": "callDataAndNonceHash",
"type": "bytes32"
}
]
},
"primaryType": "Approve",
"message": {
"callDataAndNonceHash": "0xaab2ddac63e4a7e25b7d339cacdff2f9..."
}
},
"assetType": "eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"amount": "8000000"
},
"originToken": {
"aggregatedAssetId": "ds:eth",
"amount": "1000000000000000000",
"assetType": [
"eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"eip155:1/slip44:60"
],
"fiatValue": [
{
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "1800.00"
},
{
"assetType": "eip155:1/slip44:60",
"fiatValue": "1800.00"
}
]
},
"destinationToken": {
"aggregatedAssetId": "ds:usdc",
"amount": "100000000",
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "100",
"minimumAmount": "100",
"minimumFiatValue": "100"
},
"expirationTimestamp": "1686239400",
"tamperProofSignature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
Assistant
Responses are generated using AI and may contain mistakes.