> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onebalance.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get quote

> Request a quote for transferring or swapping assets.

**Asset Flexibility:**
- Use aggregated assets (e.g., "ob:usdc") for optimal cross-chain routing
- Use chain-specific assets (e.g., "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831") for precise control
- Mix and match aggregated and specific assets in the same transaction




## OpenAPI

````yaml post /v1/quote
openapi: 3.1.0
info:
  version: 1.6.2
  title: OneBalance API
  description: >
    # OneBalance API


    The OneBalance API provides a programmatic interface for managing OneBalance
    resources using standard HTTP requests. The API documentation includes a
    design and technology overview, followed by detailed endpoint information.


    ## Features


    OneBalance API provides a complete chain abstraction toolkit:


    - Smart Account Management: Predict addresses and deploy accounts

    - Cross-Chain Balances: View aggregated balances across multiple chains

    - Multichain Transactions: Execute transfers and swaps using aggregated
    balances

    - Transaction Status: Track multichain transaction history and status

    - Token Aggregation: Access unified token lists and pricing information


    Enterprise API Access: Need higher rate limits, dedicated infrastructure, or
    custom SLAs? [Contact our sales](mailto:sales@onebalance.io) team for
    enterprise API solutions.


    ## Base URL


    OneBalance API is built on REST principles and is served over HTTPS. To
    ensure data privacy, unencrypted HTTP is not supported.


    The Base URL for all API endpoints is:


    ```bash

    https://be.onebalance.io/api

    ```


    ## Quickstart


    Try our reference application at
    [app.onebalance.io](https://app.onebalance.io) to see the API in action or
    jump straight into our [API
    Reference](https://docs.onebalance.io/api-reference/account/predict-address)
    to start building.


    ## Authentication


    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:


    ```bash

    curl -X 'GET' \
      'https://be.onebalance.io/api/path-to/endpoint' \
      -H 'x-api-key: 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11'
    ```


    A public API key is available for testing purposes with limited usage:
    **42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11**


    All API requests must be made over
    [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP
    will fail. API requests without authentication will also fail.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: OneBalance Support
    email: support@onebalance.io
  termsOfService: https://onebalance.io/terms-of-service
servers:
  - url: https://be.onebalance.io/api
    description: Production environment
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    x-displayName: Smart Accounts
    description: >-
      Manage and predict addresses for OneBalance smart accounts. These accounts
      enable features like resource locks and streamlined cross-chain
      interactions.
  - name: Assets
    x-displayName: Aggregated Assets
    description: >-
      Retrieve details about supported aggregated assets. Aggregated assets
      represent a unified view of a token across multiple chains, simplifying
      cross-chain operations.
  - name: Balances
    x-displayName: Aggregated Balances
    description: >-
      Access and track aggregated asset balances for user accounts. These
      balances reflect a user's total holdings of an asset across all supported
      chains, usable for multichain transactions.
  - name: Chains
    x-displayName: Supported Chains
    description: >-
      List and get details about the blockchain networks currently integrated
      with and supported by the OneBalance platform.
  - name: Status
    x-displayName: Transaction Status & History
    description: >-
      Track the real-time status of quote executions and retrieve complete
      transaction histories for user accounts, offering visibility into
      multichain operations.
  - name: Quotes
    x-displayName: Quotes & Execution
    description: >-
      Request, prepare, and execute quotes for various cross-chain operations
      including asset transfers, swaps, and arbitrary contract interactions.
      These endpoints facilitate the core transaction lifecycle on OneBalance.
paths:
  /v1/quote:
    post:
      tags:
        - Quotes
      summary: Get quote
      description: >
        Request a quote for transferring or swapping assets.


        **Asset Flexibility:**

        - Use aggregated assets (e.g., "ob:usdc") for optimal cross-chain
        routing

        - Use chain-specific assets (e.g.,
        "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831") for
        precise control

        - Mix and match aggregated and specific assets in the same transaction
      operationId: getQuote
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/quote-request-v1'
            examples:
              RoleBasedAggregatedToAggregated:
                summary: Role-based account - Aggregated token to aggregated token swap
                description: >-
                  Both source and destination chains are optimized by the
                  Toolkit using role-based account
                value:
                  from:
                    account:
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      accountAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
                    asset:
                      assetId: ob:eth
                    amount: '1000000000000000'
                  to:
                    asset:
                      assetId: ob:usdc
              RoleBasedAggregatedToSpecificWithRecipient:
                summary: >-
                  Role-based account - Aggregated token to chain-specific token
                  with custom recipient
                description: >-
                  Source chain optimized by Toolkit, destination chain
                  explicitly specified with different recipient using role-based
                  account
                value:
                  from:
                    account:
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      accountAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
                    asset:
                      assetId: ob:usdc
                    amount: '1000000'
                  to:
                    asset:
                      assetId: >-
                        eip155:8453/erc20:0x532f27101965dd16442e59d40670faf5ebb142e4
                    account: eip155:8453:0x742d35Cc6634C0532925a3b844Bc454e4438f44e
              RoleBasedSpecificToSpecific:
                summary: >-
                  Role-based account - Chain-specific token to chain-specific
                  token swap
                description: >-
                  Direct swap between tokens on specific chains without
                  aggregation using role-based account
                value:
                  from:
                    account:
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      accountAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
                    asset:
                      assetId: >-
                        eip155:8453/erc20:0x2da56acb9ea78330f947bd57c54119debda7af71
                    amount: '1000000000000000000000000'
                  to:
                    asset:
                      assetId: >-
                        eip155:8453/erc20:0x9a26f5433671751c3276a065f57e5a02d2817973
              RoleBasedSpecificToAggregated:
                summary: Role-based account - Chain-specific token to aggregated token
                description: >-
                  Convert a chain-specific token to an aggregated token for
                  broader liquidity access using role-based account
                value:
                  from:
                    account:
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      accountAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
                    asset:
                      assetId: >-
                        eip155:8453/erc20:0x2da56acb9ea78330f947bd57c54119debda7af71
                    amount: '1000000000000000000000000'
                  to:
                    asset:
                      assetId: ob:usdc
              RoleBasedCrossChainBridge:
                summary: Role-based account - Cross-chain bridge operation
                description: >-
                  Bridge the same token between different chains (e.g., USDC
                  from Arbitrum to Optimism) using role-based account
                value:
                  from:
                    account:
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      accountAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
                    asset:
                      assetId: >-
                        eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831
                    amount: '1000000'
                  to:
                    asset:
                      assetId: >-
                        eip155:10/erc20:0x0b2c639c533813f4aa9d7837caf62653d097ff85
              BasicAccountAggregatedSwap:
                summary: Basic account - Aggregated token swap with custom recipient
                description: >-
                  Swap aggregated tokens using a basic account setup with
                  kernel-v3.1-ecdsa and custom recipient
                value:
                  from:
                    account:
                      type: kernel-v3.1-ecdsa
                      signerAddress: '0x5d6fb4eb211a6a2e406a1111b54d26c534753c8e'
                      accountAddress: '0xb7bc0d7baf6761c302ff6772dfd8f9e22ec706e7'
                    asset:
                      assetId: ob:eth
                    amount: '1000000000000000'
                  to:
                    asset:
                      assetId: ob:usdc
                    account: eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e
      responses:
        '200':
          description: Quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/quote'
        '401':
          $ref: '#/components/responses/unauthorized'
        4XX:
          description: Quote failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
components:
  schemas:
    quote-request-v1:
      type: object
      properties:
        from:
          description: Origin information for the quote
          allOf:
            - $ref: '#/components/schemas/quote-origin'
        to:
          description: Target information for the quote
          allOf:
            - $ref: '#/components/schemas/quote-target'
        slippageTolerance:
          $ref: '#/components/schemas/slippage-tolerance'
      required:
        - from
        - to
    quote:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the quote
          example: '0xfa6094cd9d65416c975e3498cc5c2ca17df6c4cfa37e16f84f2736296dd98b5d'
        account:
          description: >-
            Account details. Required to check the signature before sending
            on-chain
          allOf:
            - $ref: '#/components/schemas/account'
        originChainsOperations:
          description: Information about the origin of the quote
          type: array
          items:
            $ref: '#/components/schemas/chain-operation'
          example:
            - 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:
          description: >-
            The operation that will be executed on the destination chain if an
            arbitrary execution is requested
          allOf:
            - $ref: '#/components/schemas/chain-operation'
        originToken:
          description: Source tokens
          allOf:
            - $ref: '#/components/schemas/origin-asset-used'
        destinationToken:
          description: Destination token
          allOf:
            - $ref: '#/components/schemas/destination-asset-used'
        expirationTimestamp:
          type: string
          description: UNIX timestamp of when the quote gets stale
          example: '1686239400'
        tamperProofSignature:
          type: string
          description: Signature to ensure the quote hasn't been tampered with
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
      required:
        - id
        - account
        - originChainsOperations
        - originToken
        - destinationToken
        - expirationTimestamp
        - tamperProofSignature
    http-exception:
      type: object
      properties:
        error:
          type: string
          description: Error name
          example: Validation failed
        message:
          type: string
          description: Error message
          example: >-
            Validation error: Must be a valid hex string starting with 0x at
            "address"
        statusCode:
          type: number
          description: Error status code
          example: 400
      required:
        - error
        - message
        - statusCode
    quote-origin:
      type: object
      properties:
        account:
          allOf:
            - $ref: '#/components/schemas/account'
        asset:
          description: >
            Asset to quote from. Choose between:

            - **Aggregated assets**: Let OneBalance optimize across chains
            (e.g., "ob:eth")

            - **Chain-specific assets**: Spend from exact tokens on specific
            chains (e.g.,
            "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48")
          oneOf:
            - $ref: '#/components/schemas/aggregated-asset'
            - $ref: '#/components/schemas/specific-asset'
          example:
            assetId: ob:eth
        amount:
          type: string
          description: Amount to quote (used for exact_input)
          example: '1000000000000000000'
      required:
        - account
        - asset
    quote-target:
      type: object
      properties:
        account:
          type: string
          description: >-
            CAIP account ID for the recipient (if transferring to another
            account)
          example: eip155:1:0x742d35Cc6634C0532925a3b844Bc454e4438f44e
        asset:
          description: >
            Asset to quote to. Choose between:

            - **Aggregated assets**: Let OneBalance find optimal destination
            (e.g., "ob:usdc")

            - **Chain-specific assets**: Target exact tokens on specific chains
            (e.g.,
            "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831")
          oneOf:
            - $ref: '#/components/schemas/aggregated-asset'
            - $ref: '#/components/schemas/specific-asset'
          example:
            assetId: ob:usdc
        amount:
          type: string
          description: Amount to receive (used for exact_output)
          example: '1000000'
      required:
        - asset
    slippage-tolerance:
      type: integer
      description: |
        Slippage tolerance in basis points (1/100th of a percent).
        For example, 50 = 0.5%, 100 = 1%, 1000 = 10%.
      minimum: 1
      example: 50
    account:
      type: object
      description: >
        Account information that supports both role-based and basic account
        types. OneBalance supports a modular architecture designed to
        accommodate various account types with different validators, versions,
        and deployment methods.


        Learn more about account types and their capabilities at [OneBalance
        Account Models](https://docs.onebalance.io/concepts/accounts).
      oneOf:
        - $ref: '#/components/schemas/role-based-account'
        - $ref: '#/components/schemas/kernel-v3-1-account'
        - $ref: '#/components/schemas/kernel-v3-3-account'
    chain-operation:
      type: object
      description: >
        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.
      properties:
        userOp:
          description: User Operation data (serialized).
          allOf:
            - $ref: '#/components/schemas/serialized-user-operation'
        typedDataToSign:
          description: Typed data to sign (EIP-712).
          allOf:
            - $ref: '#/components/schemas/hash-typed-data-parameters'
        assetType:
          type: string
          description: CAIP-19/CAIP-20 asset type, or e.g. "eth", "erc20:0x..." etc.
          example: eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
        amount:
          type: string
          description: Amount in the smallest unit (wei for ETH, or token decimals).
          example: '8000000'
        delegation:
          allOf:
            - $ref: '#/components/schemas/delegation'
          description: >
            EIP-7702 delegation object (present only if account needs delegation
            on this chain).


            Must be signed using wallet's signAuthorization method before
            submission.
      required:
        - userOp
        - typedDataToSign
        - assetType
        - amount
    origin-asset-used:
      type: object
      properties:
        aggregatedAssetId:
          type: string
          description: The aggregated asset ID (e.g., ob:usd)
          example: ob:eth
        amount:
          type: string
          description: The amount of the token
          example: '1000000000000000000'
        assetType:
          description: >-
            The type of the individual assets (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...)
          example:
            - eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
            - eip155:1/slip44:60
          type: array
          items:
            type: string
        fiatValue:
          description: The fiat values of the individual asset types
          type: array
          items:
            $ref: '#/components/schemas/asset-used-fiat'
          example:
            - assetType: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
              fiatValue: '1800.00'
            - assetType: eip155:1/slip44:60
              fiatValue: '1800.00'
      required:
        - aggregatedAssetId
        - amount
        - assetType
        - fiatValue
    destination-asset-used:
      type: object
      properties:
        aggregatedAssetId:
          type: string
          description: The aggregated asset ID (e.g., ob:usd)
          example: ob:usdc
        amount:
          type: string
          description: The amount of the token
          example: '100000000'
        assetType:
          type: string
          description: >-
            The type of the individual asset (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...)
          example: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
        fiatValue:
          type: string
          description: The fiat value of the individual asset in USD
          example: '100'
        minimumAmount:
          type: string
          description: The minimum amount of the token
          example: '100'
        minimumFiatValue:
          type: string
          description: The minimum fiat value of the token
          example: '100'
        symbol:
          type: string
          description: The token symbol (e.g., USDC, ETH)
          example: USDC
        name:
          type: string
          description: The human-readable name of the token
          example: USDC
        decimals:
          type: integer
          description: The number of decimal places for the token
          example: 18
        recipientAccount:
          type: string
          description: >-
            The recipient account address with chain identifier where the
            destination tokens will be received
          example: eip155:42161:0x895Cf62399bF1F8b88195E741b64278b41EB7F09
      required:
        - aggregatedAssetId
        - amount
        - assetType
        - fiatValue
    HttpUnauthorizedException:
      type: object
      properties:
        error:
          type: string
          description: Error name
          example: UnauthorizedException
        message:
          type: string
          description: Error message
          example: Invalid or missing API key
        statusCode:
          type: number
          description: Error status code
          example: 401
        timestamp:
          type: string
          description: Error timestamp
          example: '2024-12-18T14:38:24.793Z'
        path:
          type: string
          description: Error path
          example: /api/account/predict-address
      required:
        - error
        - message
        - statusCode
        - timestamp
        - path
    aggregated-asset:
      type: object
      properties:
        assetId:
          type: string
          description: The aggregated asset ID (e.g., ob:usd, ob:eth)
          example: ob:eth
          pattern: ^[a-z0-9]+:[a-z0-9.+-]+$
      required:
        - assetId
    specific-asset:
      type: object
      properties:
        assetId:
          type: string
          description: The specific asset ID in CAIP-19 format
          example: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
          pattern: ^[a-z0-9]+:[a-zA-Z0-9-]+/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$
      required:
        - assetId
    role-based-account:
      type: object
      title: Role-based Account
      description: >
        Role-based account using RoleBasedValidator with Kernel 3.1. Always has
        Resource Lock enabled.

        Allows a `user_admin` role (think user cold wallet) next to the signer
        role to rotate keys and execute trustless rage quit in emergency cases.

        Secure in emergency cases related to WaaS/TEE but consumes slightly more
        gas.
      properties:
        type:
          type: string
          description: Account type identifier for role-based accounts
          enum:
            - role-based
          example: role-based
        sessionAddress:
          type: string
          description: >-
            Address associated with user's ECDSA signing key used for
            session-based operations
          example: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
          pattern: ^0x[a-fA-F0-9]{40}$
        adminAddress:
          type: string
          description: >-
            Address selected by the user as backup admin. Can perform rage quit
            and key rotation. Must be different from sessionAddress.
          example: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >-
            Address of user's smart contract wallet (counterfactual if not yet
            deployed)
          example: '0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0'
          pattern: ^0x[a-fA-F0-9]{40}$
      required:
        - type
        - sessionAddress
        - adminAddress
        - accountAddress
    kernel-v3-1-account:
      type: object
      title: Basic Account
      description: >
        Basic account using ECDSAValidator with Kernel v3.1. Standard
        ERC4337-compliant smart account

        that provides core account abstraction functionality without advanced
        features.
      properties:
        type:
          type: string
          description: Account type identifier for Kernel v3.1 ECDSA accounts
          enum:
            - kernel-v3.1-ecdsa
          example: kernel-v3.1-ecdsa
        signerAddress:
          type: string
          description: >-
            Address of the signer for this account using standard ECDSA
            authentication
          example: '0x5d6fb4eb211a6a2e406a1111b54d26c534753c8e'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >-
            Address of user's smart contract wallet (counterfactual if not yet
            deployed)
          example: '0xb7bc0d7baf6761c302ff6772dfd8f9e22ec706e7'
          pattern: ^0x[a-fA-F0-9]{40}$
        deploymentType:
          type: string
          description: Deployment type - only ERC4337 supported for Kernel v3.1
          enum:
            - ERC4337
          example: ERC4337
      required:
        - type
        - signerAddress
        - accountAddress
    kernel-v3-3-account:
      type: object
      title: EIP-7702 Account
      description: >
        Advanced account using ECDSAValidator with Kernel v3.3. Supports both
        traditional ERC4337 deployment

        and EIP-7702 delegation for transforming existing EOAs into smart
        accounts.
      properties:
        type:
          type: string
          description: Account type identifier for Kernel v3.3 ECDSA accounts
          enum:
            - kernel-v3.3-ecdsa
          example: kernel-v3.3-ecdsa
        signerAddress:
          type: string
          description: >-
            Address of the signer for this account using standard ECDSA
            authentication
          example: '0x5d6fb4eb211a6a2e406a1111b54d26c534753c8e'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >
            Address of user's smart contract wallet (for EIP-4337) or EOA
            address (for EIP-7702).


            **For EIP-7702**: Same as signerAddress - uses the existing EOA
            address.
          example: '0xb7bc0d7baf6761c302ff6772dfd8f9e22ec706e7'
          pattern: ^0x[a-fA-F0-9]{40}$
        deploymentType:
          type: string
          description: >
            Deployment type of the account:

            - `ERC4337`: Traditional smart contract account deployment

            - `EIP7702`: Delegate existing EOA to smart account contract (Kernel
            v3.3 exclusive feature)
          enum:
            - ERC4337
            - EIP7702
          example: ERC4337
      required:
        - type
        - signerAddress
        - accountAddress
    serialized-user-operation:
      type: object
      properties:
        sender:
          type: string
          description: The address of the sender (EOA or Smart Contract).
          example: '0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b'
        nonce:
          type: string
          description: >-
            Nonce for the UserOp, ensures uniqueness. Incremented for each
            operation.
          example: 1120126849530...
        factory:
          type: string
          description: >-
            The address of the factory that may be used to create an account
            contract (optional for deployed accounts).
          example: '0xd703aae79538628d27099b8c4f621be4ccd142d5'
        factoryData:
          type: string
          description: >-
            Hex-encoded data for the factory (optional, if needed to deploy or
            initialize an account).
          example: 0xc5265d5d000000000000000000000000...
        callData:
          type: string
          description: Hex-encoded data representing the actual call to be made.
          example: 0xe9ae5c530100000000000000000000000000...
        callGasLimit:
          type: string
          description: Gas limit for executing the callData portion.
          example: '737280'
        verificationGasLimit:
          type: string
          description: Gas limit for the verification step (signature checks, etc.).
          example: '3076170'
        preVerificationGas:
          type: string
          description: Gas used for overhead, e.g., hashing, EVM overhead, etc.
          example: '0'
        maxFeePerGas:
          type: string
          description: Maximum fee (in wei) per gas unit.
          example: '0'
        maxPriorityFeePerGas:
          type: string
          description: Priority fee (tip) per gas unit.
          example: '0'
        paymaster:
          type: string
          description: Address of the paymaster that will sponsor or pay for gas.
          example: '0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4'
        paymasterVerificationGasLimit:
          type: string
          description: Gas limit for the paymaster verification step.
          example: '19219'
        paymasterPostOpGasLimit:
          type: string
          description: Additional gas limit for the paymaster post-operation.
          example: '0'
        paymasterData:
          type: string
          description: Additional data used by the paymaster, if any.
          example: 0x
        signature:
          type: string
          description: Signature for the entire user operation.
          example: 0x8cbd9df26744e2a02cde9fb8832d2b5f...
      required:
        - sender
        - nonce
        - callData
        - callGasLimit
        - verificationGasLimit
        - preVerificationGas
        - maxFeePerGas
        - maxPriorityFeePerGas
        - paymaster
        - paymasterVerificationGasLimit
        - paymasterPostOpGasLimit
        - paymasterData
        - signature
    hash-typed-data-parameters:
      type: object
      properties:
        domain:
          type: object
          description: >-
            EIP-712 domain separator data (e.g. name, version, chainId,
            verifyingContract).
          example:
            name: RoleBasedECDSAValidator
            version: 1.4.3
            chainId: 10
            verifyingContract: '0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA'
        types:
          type: object
          description: >-
            EIP-712 type definitions for the message. Must include at least the
            primary type.
          example:
            Approve:
              - name: callDataAndNonceHash
                type: bytes32
        primaryType:
          type: string
          description: Primary type string from the types object.
          example: Approve
        message:
          type: object
          description: Data to be signed (structured according to the types).
          example:
            callDataAndNonceHash: 0xaab2ddac63e4a7e25b7d339cacdff2f9...
      required:
        - domain
        - types
        - primaryType
        - message
    delegation:
      type: object
      description: >-
        EIP-7702 delegation configuration for smart account operations. When an
        EOA needs to be delegated to a smart account contract, this object
        contains the delegation details that must be signed by the user.
      properties:
        contractAddress:
          type: string
          description: Address of the Kernel v3.3 smart account contract to delegate to
          example: '0xd6CEDDe84be40893d153Be9d467CD6aD37875b28'
          pattern: ^0x[a-fA-F0-9]{40}$
        nonce:
          type: integer
          description: >-
            Delegation nonce for preventing replay attacks. Must match the
            current nonce for the account on the target chain.
          example: 0
          minimum: 0
        signature:
          allOf:
            - $ref: '#/components/schemas/delegation-signature'
          description: >-
            Delegation signature (populated after signing with wallet's
            signAuthorization method)
      required:
        - contractAddress
        - nonce
    asset-used-fiat:
      type: object
      properties:
        assetType:
          type: string
          description: >-
            The CAIP-19 asset type identifier (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...).
          example: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
        fiatValue:
          type: string
          description: The fiat value of the individual asset in USD
          example: '100'
      required:
        - assetType
        - fiatValue
    delegation-signature:
      type: object
      description: >-
        EIP-7702 delegation signature structure containing the ECDSA signature
        components for the delegation authorization
      properties:
        chainId:
          type: integer
          description: Chain ID where delegation occurs
          example: 10
          minimum: 1
        contractAddress:
          type: string
          description: >-
            Contract address being delegated to (must match delegation
            contractAddress)
          example: '0xd6CEDDe84be40893d153Be9d467CD6aD37875b28'
          pattern: ^0x[a-fA-F0-9]{40}$
        nonce:
          type: integer
          description: Delegation nonce (must match delegation nonce)
          example: 0
          minimum: 0
        r:
          type: string
          description: ECDSA signature r value
          example: '0x129b258b9d85f91dab87e488dea08e2803e88a96bb6a967d16fe158a09d95d0d'
          pattern: ^0x[a-fA-F0-9]{64}$
        s:
          type: string
          description: ECDSA signature s value
          example: '0x52adbaca42ea5b316df5ac0a6ae5f544f5eb450d94c76164e27252101e22d3c3'
          pattern: ^0x[a-fA-F0-9]{64}$
        v:
          type: string
          description: ECDSA signature v value (recovery ID)
          example: '0x1b'
          pattern: ^0x[a-fA-F0-9]{2}$
        yParity:
          type: integer
          description: Y parity of the signature point (0 or 1)
          example: 0
          enum:
            - 0
            - 1
        type:
          type: string
          description: >-
            Signature type identifier indicating the signature has been
            completed
          enum:
            - Signed
          example: Signed
      required:
        - chainId
        - contractAddress
        - nonce
        - r
        - s
        - v
        - yParity
        - type
  responses:
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HttpUnauthorizedException'
          example:
            error: UnauthorizedException
            message: Invalid or missing API key
            statusCode: 401
            timestamp: '2024-12-18T14:38:24.793Z'
            path: /api/xxx/xxx
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        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:


        ```bash

        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](https://docs.onebalance.io).

````