Authorizations
Body
application/json
Response
Example:
- Role-based Account
- Basic Account
- EIP-7702 Account
Example:
Example:
Example:
curl --request POST \
--url https://be.onebalance.io/api/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"from": {
"account": {
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xE20295ec513DEf805D9c3083b0C8EaB64692D764"
},
"asset": {
"assetId": "ob:eth"
},
"amount": "1000000000000000"
},
"to": {
"asset": {
"assetId": "ob:usdc"
}
}
}'{
"id": "0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d",
"account": {
"type": "role-based",
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0"
},
"originChainsOperations": [
{
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530300722547379539971600052481264750391572034956634531672621056",
"callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000",
"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": "0xaab2ddac63e4a7e25b7d339cacdff2f9280025cef27699ffe5f5e9e9625b15eb"
}
},
"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",
"delegation": {
"contractAddress": "0xd6CEDDe84be40893d153Be9d467CD6aD37875b28",
"nonce": 0,
"signature": {
"chainId": 10,
"contractAddress": "0xd6CEDDe84be40893d153Be9d467CD6aD37875b28",
"nonce": 0,
"r": "0x129b258b9d85f91dab87e488dea08e2803e88a96bb6a967d16fe158a09d95d0d",
"s": "0x52adbaca42ea5b316df5ac0a6ae5f544f5eb450d94c76164e27252101e22d3c3",
"v": "0x1b",
"yParity": 0,
"type": "Signed"
}
}
},
"originToken": {
"aggregatedAssetId": "ob: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": "ob:usdc",
"amount": "100000000",
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "100",
"minimumAmount": "100",
"minimumFiatValue": "100",
"symbol": "USDC",
"name": "USDC",
"decimals": 18,
"recipientAccount": "eip155:42161:0x895Cf62399bF1F8b88195E741b64278b41EB7F09"
},
"expirationTimestamp": "1686239400",
"tamperProofSignature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}Request a quote for transferring or swapping assets.
Asset Flexibility:
curl --request POST \
--url https://be.onebalance.io/api/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"from": {
"account": {
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xE20295ec513DEf805D9c3083b0C8EaB64692D764"
},
"asset": {
"assetId": "ob:eth"
},
"amount": "1000000000000000"
},
"to": {
"asset": {
"assetId": "ob:usdc"
}
}
}'{
"id": "0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d",
"account": {
"type": "role-based",
"sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
"adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
"accountAddress": "0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0"
},
"originChainsOperations": [
{
"userOp": {
"sender": "0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b",
"nonce": "1120126849530300722547379539971600052481264750391572034956634531672621056",
"callData": "0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000",
"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": "0xaab2ddac63e4a7e25b7d339cacdff2f9280025cef27699ffe5f5e9e9625b15eb"
}
},
"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",
"delegation": {
"contractAddress": "0xd6CEDDe84be40893d153Be9d467CD6aD37875b28",
"nonce": 0,
"signature": {
"chainId": 10,
"contractAddress": "0xd6CEDDe84be40893d153Be9d467CD6aD37875b28",
"nonce": 0,
"r": "0x129b258b9d85f91dab87e488dea08e2803e88a96bb6a967d16fe158a09d95d0d",
"s": "0x52adbaca42ea5b316df5ac0a6ae5f544f5eb450d94c76164e27252101e22d3c3",
"v": "0x1b",
"yParity": 0,
"type": "Signed"
}
}
},
"originToken": {
"aggregatedAssetId": "ob: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": "ob:usdc",
"amount": "100000000",
"assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"fiatValue": "100",
"minimumAmount": "100",
"minimumFiatValue": "100",
"symbol": "USDC",
"name": "USDC",
"decimals": 18,
"recipientAccount": "eip155:42161:0x895Cf62399bF1F8b88195E741b64278b41EB7F09"
},
"expirationTimestamp": "1686239400",
"tamperProofSignature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?