Skip to main content
POST
/
v3
/
quote
/
execute-quote
curl --request POST \
  --url https://be.onebalance.io/api/v3/quote/execute-quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "id": "0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d",
  "accounts": [
    {
      "type": "role-based",
      "sessionAddress": "0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1",
      "adminAddress": "0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8",
      "accountAddress": "0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0"
    }
  ],
  "originChainsOperations": [],
  "originToken": {
    "assetType": [
      "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
      "eip155:1/slip44:60"
    ],
    "fiatValue": [],
    "aggregatedAssetId": "ob:eth",
    "amount": "800000000000000"
  },
  "destinationToken": {
    "assetType": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
    "fiatValue": "1000000000000000000",
    "aggregatedAssetId": "ob:usdc",
    "amount": "800000000000000"
  },
  "expirationTimestamp": "1686239400",
  "tamperProofSignature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12345678",
  "slippage": {
    "origin": {
      "percent": "0.5",
      "usd": "2.50",
      "value": "5000"
    },
    "destination": {
      "percent": "0.5",
      "usd": "2.50",
      "value": "5000"
    }
  },
  "fees": {
    "assets": {
      "eip155:1/slip44:60": "1000000000000000",
      "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "500000"
    },
    "cumulativeUSD": "5.50"
  }
}
'
{
  "error": "UnauthorizedException",
  "message": "Invalid or missing API key",
  "statusCode": 401,
  "timestamp": "2024-12-18T14:38:24.793Z",
  "path": "/api/xxx/xxx"
}

Authorizations

x-api-key
string
header
required

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

application/json

Quote response with support for multiple blockchain types (v3)

id
string
required

Unique quote identifier

Example:

"0xcd3a5cfe80d1b84db755bfb8ebe0a617ff153cc48ab6d5ab28436386f06ce100"

accounts
(Role-based Account · object | Basic Account · object | EIP-7702 Account · object | Solana Account · object)[]
required

Array of accounts used in this quote

Minimum array length: 1

Account configuration supporting multiple blockchain types.

Account Compatibility Rules:

  • Cannot combine multiple accounts of the same chain type
  • Solana accounts can be combined with any EVM account type
  • Single account operations are supported for any account type

Supported Account Types:

  • role-based: Traditional EVM account with session/admin addresses
  • kernel-v3.1-ecdsa: Kernel v3.1 ECDSA smart account
  • kernel-v3.3-ecdsa: Kernel v3.3 ECDSA smart account with EIP-7702 support
  • solana: Solana blockchain account
Example:
[
{
"type": "solana",
"accountAddress": "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5"
}
]
originChainsOperations
object[]
required

Array of blockchain operations to execute, supporting both EVM and Solana

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.

Example:
[
{
"type": "solana",
"instructions": [
{
"keys": [
{
"pubkey": "J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5",
"isSigner": true,
"isWritable": true
}
],
"programId": "11111111111111111111111111111111",
"data": "020000008096980000000000"
}
],
"recentBlockHash": "2UoZifqUWTS8vZF25LrpJJUwabdDrfRqXSLMScDh4WDp",
"feePayer": "6roz4r5VGs67YdDvjNdALSQgXZecwqUzpqvmKTdmjXyH",
"assetType": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501",
"amount": "10000000",
"dataToSign": "gAIABQ1XDQTmmqW/djyUx9QxVovp4LBhd9nKW9lbKmZgBJpASP2prCGRAhJ2LZxv7WJqmNSI35tMGa1fy+dTOYTdb2um"
}
]
originToken
object
required
destinationToken
object
required
expirationTimestamp
string
required

Unix timestamp when the quote expires

Example:

"1752673847"

tamperProofSignature
string
required

Cryptographic signature to verify quote integrity

Example:

"0x1ae7e61279f297d5e6bd702388db0069a3cc2b5168eecd91b53ea0b8bbdf7c412742dd8f0ab778c9a3faa7be38031ce6279b65c202b920c65632840accf01d021c"

slippage
object

Slippage information for origin and destination

Example:
{
"origin": {
"percent": "3.57",
"usd": "0.059593",
"value": "59761"
},
"destination": {
"percent": "3.45",
"usd": "0.054180",
"value": "54279"
}
}
fees
object

Fee breakdown by asset type

Example:
{
"assets": {
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501": "183581",
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": "93373"
},
"cumulativeUSD": "0.12"
}

Response

Quote executed successfully