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

# Get a quote

> Get the best aggregated route for a swap on one chain or across two chains.

`POST /quotes` returns the best route Olympex finds across its liquidity sources for a swap on one chain (`mode: "single-chain"`) or a transfer between two chains (`mode: "cross-chain"`). Pass the returned `aggregatorId` to [`POST /swap`](/api-reference/swap/build-swap) to get transaction calldata from the same liquidity source.

Signed endpoint. Send `Content-Type: application/json`, the canonical JSON body, and the four headers `x-api-key-id`, `x-value-info`, `x-passphrase` and `x-signature` described in [Sign requests](/authentication/sign-requests).

## Units

| Field | Unit |
| - | - |
| `params.amount` | Decimal string in human-readable units of the input token. `"10"` is 10 USDT. |
| `quote.outAmount`, `toTokenAmount`, `minimumReceived` | Integer string in base units of the output token. `"9979975"` is 9.979975 USDC. |
| `quote.fromTokenAmount` (cross-chain) | The input amount, echoed in human-readable units. |
| `params.slippage` | Percent as a string. `"1"` is 1%. |
| `params.gasPrice` (single-chain) | Gas price hint in whole gwei, as a string, rounded up. Some sources reject fractional gwei. On a chain whose gas price is below 1 gwei, the rounded hint is `"1"`, higher than the chain's gas price. The hint doesn't set the gas price of your transaction: your wallet or signer does. |
| `quote.estimatedGas` (single-chain) | Gas units that the source estimates for its own part of the route. It doesn't include the Olympex contracts, so the swap uses more gas: estimate the transaction itself with `eth_estimateGas`. `"0"` means the source gave no estimate. |
| `dataFeeTransaction` | Wei for `effectiveGasPrice` (the gas price the estimate used) and `transactionFee`, USD for the `*InUSD` and price fields, human-readable input-token units for `transactionFeeInToken` and `valueToApprove`. It's based on `estimatedGas`, so treat the fee as a lower bound. |

## Single-chain and cross-chain bodies

* Single-chain bodies use `chainId`, `inTokenAddress` and `outTokenAddress`, and require `gasPrice`. The optional `includeGasInfo`, `orderBy`, `gasMultiplier` and `excludeMetaAggregatorId` apply only here.
* Cross-chain bodies use `fromChainId`, `toChainId`, `inTokenAddress` and `outTokenAddress`, the same token fields as single-chain bodies. Unknown top-level keys are rejected with `400`.
* Signed requests from API accounts receive cross-chain routes from `okx` or `rango`.
* Every quote carries `integratorFeeBreakdown`. `protocolFeeBps` is the Olympex protocol fee in basis points (`15` is 0.15%) and can be fractional, and it applies even when you send no `fees`. Add `fees` to charge your own integrator fee: `integratorMarginBps` then equals `fees.feeBps`. Liquidity sources can also charge their own fees inside the route: those are already reflected in `outAmount` and aren't part of `integratorFeeBreakdown`. The `200 With integrator fee` example adds `"fees": {"feeBps": 25, "feeRecipient": "0x1E67cb01969D79B2B895179e4A07D24a839dBb52"}` to the single-chain body. See [Gas and fees](/concepts/gas-and-fees#the-fee-breakdown).
* `"includeGasInfo": true` adds `dataFeeTransaction`. For a limit order, quote the same pair and amount this way: `transactionFeeInToken` estimates the execution gas cost in the token sold, which the maker's allowance must cover on top of `amount`. The estimate leaves out the Olympex contracts' gas, so add a buffer to `valueToApprove` before you approve it. See [Order signatures and allowances](/concepts/order-authorization#how-much-to-approve).
* A pair and amount that no source can route returns `422 NO_ROUTE`, on single-chain and cross-chain quotes. It can be temporary: retry later with backoff, or change the amount or the pair.

<Note>
  A quote is not reserved. Prices move between the quote and the swap, so request the swap right after the quote and protect it with `slippage`.
</Note>

## Routes

On single-chain quotes, `routes` shows the path as the source reports it. Use it for display only:

* `routes[].percentage` is the value the source reports. The values don't always sum to 100, because later hops can appear as separate routes at 100.
* `subRoutes[].from` and `to` are token addresses as the source reports them. Case and the native-token address (`0xeeee…` or the zero address) vary by source, so compare addresses case-insensitively.

On cross-chain quotes, `middlewareRoute` can also show a native token as `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` or as the zero address, depending on the provider. Treat both as native.

<RequestExample>
  ```bash cURL theme={null}
  # Single-chain quote: 10 USDT to USDC on Polygon.
  # Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
  METHOD=POST
  ENDPOINT=/quotes
  QUERY=''
  BODY='{"mode":"single-chain","params":{"amount":"10","chainId":137,"gasPrice":"35","inTokenAddress":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f","outTokenAddress":"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359","slippage":"1"}}'
  TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
  NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
  BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
  VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
  MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
  curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
    -H "content-type: application/json" \
    -H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
    -H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
    -H "x-passphrase: $OLYMPEX_PASSPHRASE" \
    -H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')" \
    --data-raw "$BODY"
  ```

  ```ts TypeScript theme={null}
  import { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests

  type QuoteData = { mode: "single-chain"; quote: { aggregatorId: string; outAmount: string } };

  const data = await olympexRequest<QuoteData>("POST", "/quotes", {
    mode: "single-chain",
    params: {
      chainId: 137,
      inTokenAddress: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", // USDT
      outTokenAddress: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", // USDC
      amount: "10",
      slippage: "1",
      gasPrice: "35",
    },
  });
  console.log(data.quote.aggregatorId, data.quote.outAmount);
  ```

  ```python Python theme={null}
  from sign_request import olympex_request  # /authentication/sign-requests

  data = olympex_request("POST", "/quotes", {
      "mode": "single-chain",
      "params": {
          "chainId": 137,
          "inTokenAddress": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",  # USDT
          "outTokenAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",  # USDC
          "amount": "10",
          "slippage": "1",
          "gasPrice": "35",
      },
  })
  print(data["quote"]["aggregatorId"], data["quote"]["outAmount"])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Single-chain theme={null}
  {
    "success": true,
    "data": {
      "mode": "single-chain",
      "quote": {
        "outAmount": "9979975",
        "estimatedGas": "1578462",
        "aggregatorId": "oneInch",
        "aggregatorOrder": [
          "oneInch",
          "uniswapV3Hermes"
        ],
        "market": [],
        "routes": [
          {
            "percentage": 90.23750000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 9.762500000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "to": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_DODO_V2",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "to": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          }
        ],
        "gasMultiplier": "NONE",
        "integratorFeeBreakdown": {
          "protocolFeeBps": 15,
          "integratorMarginBps": 0,
          "protocolFeeAmount": "14969",
          "integratorMarginAmount": "0"
        }
      }
    },
    "meta": {
      "requestId": "EdttSh29oAMEPhw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 200 Single-chain with gas info theme={null}
  {
    "success": true,
    "data": {
      "mode": "single-chain",
      "quote": {
        "outAmount": "9979975",
        "estimatedGas": "1578462",
        "aggregatorId": "oneInch",
        "aggregatorOrder": [
          "oneInch",
          "uniswapV3Hermes"
        ],
        "market": [],
        "routes": [
          {
            "percentage": 90.23750000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 9.762500000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "to": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_DODO_V2",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "to": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          }
        ],
        "dataFeeTransaction": {
          "effectiveGasPrice": "385800996250",
          "transactionFee": "608972212142767500",
          "transactionFeeInUSD": "0.074812",
          "transactionFeeInToken": "0.074812",
          "valueToApprove": "10.074812",
          "nativePrice": "0.12285",
          "tokenPrice": "1"
        },
        "gasMultiplier": "NONE",
        "integratorFeeBreakdown": {
          "protocolFeeBps": 15,
          "integratorMarginBps": 0,
          "protocolFeeAmount": "14969",
          "integratorMarginAmount": "0"
        }
      }
    },
    "meta": {
      "requestId": "EdtwKiuLoAMEPYQ=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 200 With integrator fee theme={null}
  {
    "success": true,
    "data": {
      "mode": "single-chain",
      "quote": {
        "outAmount": "9954962",
        "estimatedGas": "1578462",
        "aggregatorId": "oneInch",
        "aggregatorOrder": [
          "oneInch",
          "uniswapV3Hermes"
        ],
        "market": [],
        "routes": [
          {
            "percentage": 90.23750000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 9.762500000000001,
            "subRoutes": [
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "dexes": [
                  {
                    "name": "POLYGON_BALANCER_V2",
                    "percentage": 100
                  }
                ]
              },
              {
                "from": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "to": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V4",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xa3fa99a148fa48d14ed51d610c367c61876997f1",
                "to": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_DODO_V2",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
                "to": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "dexes": [
                  {
                    "name": "POLYGON_QUICKSWAP",
                    "percentage": 100
                  }
                ]
              }
            ]
          },
          {
            "percentage": 100,
            "subRoutes": [
              {
                "from": "0xac0f66379a6d7801d7726d5a943356a172549adb",
                "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
                "dexes": [
                  {
                    "name": "POLYGON_UNISWAP_V3",
                    "percentage": 100
                  }
                ]
              }
            ]
          }
        ],
        "gasMultiplier": "NONE",
        "integratorFeeBreakdown": {
          "protocolFeeBps": 15,
          "integratorMarginBps": 25,
          "protocolFeeAmount": "14932",
          "integratorMarginAmount": "24887"
        }
      }
    },
    "meta": {
      "requestId": "EdtzTjP3IAMEPSw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 200 Cross-chain theme={null}
  {
    "success": true,
    "data": {
      "mode": "cross-chain",
      "quote": {
        "aggregatorId": "rango",
        "estimatedGas": "162807827210550000",
        "estimateCostInUSD": "0.020004848960669123",
        "fromTokenAmount": "10",
        "toTokenAmount": "9985000",
        "minimumReceived": "9885149",
        "bridgeInfo": {
          "icon": "https://raw.githubusercontent.com/rango-exchange/assets/main/swappers/BOB/icon.svg",
          "displayName": "BOB Gateway"
        },
        "middlewareRoute": {
          "chainFrom": [],
          "chainTo": [
            {
              "fromAsset": {
                "address": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "decimals": 6,
                "symbol": "USDT"
              },
              "toAsset": {
                "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                "decimals": 6,
                "symbol": "USDT"
              }
            }
          ]
        },
        "integratorFeeBreakdown": {
          "protocolFeeBps": 15,
          "integratorMarginBps": 0,
          "protocolFeeAmount": "15000",
          "integratorMarginAmount": "0"
        }
      }
    },
    "meta": {
      "requestId": "EduMjjALIAMEP4Q=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request body",
      "details": [
        {
          "field": "params.chainId",
          "message": "Invalid input: expected number, received string"
        },
        {
          "field": "params.inTokenAddress",
          "message": "Must be a valid EVM address"
        },
        {
          "field": "params.amount",
          "message": "Invalid input: expected string, received number"
        },
        {
          "field": "params.gasPrice",
          "message": "Invalid input: expected string, received undefined"
        }
      ]
    },
    "meta": {
      "requestId": "ENUlmg3dIAMEMEw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 422 No route theme={null}
  {
    "success": false,
    "error": {
      "code": "NO_ROUTE",
      "message": "No route found for this pair and amount. Providers may also be temporarily unavailable; retrying later can succeed.",
      "details": [
        {
          "message": "The quote could be retrieved but the route is not available"
        }
      ]
    },
    "meta": {
      "requestId": "E7ef-j_MoAMEPBw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 403 Gateway theme={null}
  {
    "message": "Forbidden"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml api-reference/openapi.json POST /quotes
openapi: 3.0.3
info:
  title: Olympex REST API
  version: 1.0.0
  description: >-
    Aggregated swap quotes and transactions, limit orders and DCA strategies on
    EVM chains, plus the chain and token catalog. Every response uses the same
    envelope, except the API gateway's own responses (`{"message": …}`): `401`
    or `403` when the signed headers are missing or rejected, `429` when it
    throttles requests, and `500` or `503` when it can't get a response from
    Olympex in time. Chain IDs are integers on every endpoint. Signed endpoints
    require four signed headers; see [Sign
    requests](https://docs.olympex.io/authentication/sign-requests).
  termsOfService: https://docs.olympex.io/legal/terms
  contact:
    name: Olympex partnerships
    email: partners@olympex.io
    url: https://docs.olympex.io
servers:
  - url: https://api-rest.olympex.io/api/v1
    description: Olympex REST API v1
security: []
tags:
  - name: Accounts
    description: Create API credentials.
  - name: Quotes
    description: Aggregated single-chain and cross-chain quotes.
  - name: Swap
    description: Unsigned transaction calldata for a quoted route.
  - name: TxStatus
    description: Track a cross-chain transfer after you broadcast it.
  - name: Transactions
    description: On-chain status of a transaction you broadcast.
  - name: Chains and tokens
    description: Enabled chains and the tokens listed on each.
  - name: Limit orders
    description: Orders that Olympex executes when the market reaches your price.
  - name: DCA
    description: Strategies that buy a token in equal orders over time.
  - name: Docs
    description: Machine-readable API description.
paths:
  /quotes:
    post:
      tags:
        - Quotes
      summary: Get a quote
      description: >-
        Returns the best aggregated route for a swap on one chain (`mode:
        "single-chain"`) or across two chains (`mode: "cross-chain"`). Input
        amounts are human-readable decimals; output amounts are integer strings
        in the output token's base units. Pass the returned `aggregatorId` to
        `POST /swap`. Optional `fees` adds your integrator fee on signed
        requests.
      operationId: getQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
            examples:
              singleChain:
                summary: 'Single-chain: 10 USDT to USDC on Polygon'
                value:
                  mode: single-chain
                  params:
                    amount: '10'
                    chainId: 137
                    gasPrice: '35'
                    inTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                    outTokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                    slippage: '1'
              crossChain:
                summary: 'Cross-chain: 10 USDT on Polygon to USDT on Ethereum'
                value:
                  mode: cross-chain
                  params:
                    amount: '10'
                    fromChainId: 137
                    inTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                    outTokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                    slippage: '1'
                    toChainId: 1
              withFees:
                summary: Single-chain with a 0.25% integrator fee
                value:
                  fees:
                    feeBps: 25
                    feeRecipient: '0x1E67cb01969D79B2B895179e4A07D24a839dBb52'
                  mode: single-chain
                  params:
                    amount: '10'
                    chainId: 137
                    gasPrice: '35'
                    inTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                    outTokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                    slippage: '1'
              singleChainWithGasInfo:
                summary: Single-chain with gas and fee estimate
                value:
                  mode: single-chain
                  params:
                    amount: '10'
                    chainId: 137
                    gasPrice: '35'
                    includeGasInfo: true
                    inTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                    outTokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                    slippage: '1'
      responses:
        '200':
          description: Quote generated. `data.mode` matches the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteSuccessResponse'
              examples:
                singleChain:
                  summary: Single-chain
                  value:
                    success: true
                    data:
                      mode: single-chain
                      quote:
                        outAmount: '9979975'
                        estimatedGas: '1578462'
                        aggregatorId: oneInch
                        aggregatorOrder:
                          - oneInch
                          - uniswapV3Hermes
                        market: []
                        routes:
                          - percentage: 90.23750000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 9.762500000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                to: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                dexes:
                                  - name: POLYGON_QUICKSWAP_V3
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_DODO_V2
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                to: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                dexes:
                                  - name: POLYGON_QUICKSWAP
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_UNISWAP_V3
                                    percentage: 100
                        gasMultiplier: NONE
                        integratorFeeBreakdown:
                          protocolFeeBps: 15
                          integratorMarginBps: 0
                          protocolFeeAmount: '14969'
                          integratorMarginAmount: '0'
                    meta:
                      requestId: EdttSh29oAMEPhw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                singleChainWithGasInfo:
                  summary: 'Single-chain with includeGasInfo: true'
                  value:
                    success: true
                    data:
                      mode: single-chain
                      quote:
                        outAmount: '9979975'
                        estimatedGas: '1578462'
                        aggregatorId: oneInch
                        aggregatorOrder:
                          - oneInch
                          - uniswapV3Hermes
                        market: []
                        routes:
                          - percentage: 90.23750000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 9.762500000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                to: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                dexes:
                                  - name: POLYGON_QUICKSWAP_V3
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_DODO_V2
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                to: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                dexes:
                                  - name: POLYGON_QUICKSWAP
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_UNISWAP_V3
                                    percentage: 100
                        dataFeeTransaction:
                          effectiveGasPrice: '385800996250'
                          transactionFee: '608972212142767500'
                          transactionFeeInUSD: '0.074812'
                          transactionFeeInToken: '0.074812'
                          valueToApprove: '10.074812'
                          nativePrice: '0.12285'
                          tokenPrice: '1'
                        gasMultiplier: NONE
                        integratorFeeBreakdown:
                          protocolFeeBps: 15
                          integratorMarginBps: 0
                          protocolFeeAmount: '14969'
                          integratorMarginAmount: '0'
                    meta:
                      requestId: EdtwKiuLoAMEPYQ=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                crossChain:
                  summary: 'Cross-chain: USDT on Polygon to USDT on Ethereum'
                  value:
                    success: true
                    data:
                      mode: cross-chain
                      quote:
                        aggregatorId: rango
                        estimatedGas: '162807827210550000'
                        estimateCostInUSD: '0.020004848960669123'
                        fromTokenAmount: '10'
                        toTokenAmount: '9985000'
                        minimumReceived: '9885149'
                        bridgeInfo:
                          icon: >-
                            https://raw.githubusercontent.com/rango-exchange/assets/main/swappers/BOB/icon.svg
                          displayName: BOB Gateway
                        middlewareRoute:
                          chainFrom: []
                          chainTo:
                            - fromAsset:
                                address: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                decimals: 6
                                symbol: USDT
                              toAsset:
                                address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                                decimals: 6
                                symbol: USDT
                        integratorFeeBreakdown:
                          protocolFeeBps: 15
                          integratorMarginBps: 0
                          protocolFeeAmount: '15000'
                          integratorMarginAmount: '0'
                    meta:
                      requestId: EduMjjALIAMEP4Q=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                withFees:
                  summary: Single-chain with a 25 bps integrator fee
                  value:
                    success: true
                    data:
                      mode: single-chain
                      quote:
                        outAmount: '9954962'
                        estimatedGas: '1578462'
                        aggregatorId: oneInch
                        aggregatorOrder:
                          - oneInch
                          - uniswapV3Hermes
                        market: []
                        routes:
                          - percentage: 90.23750000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 9.762500000000001
                            subRoutes:
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                dexes:
                                  - name: POLYGON_BALANCER_V2
                                    percentage: 100
                              - from: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                                to: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                dexes:
                                  - name: POLYGON_UNISWAP_V4
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xa3fa99a148fa48d14ed51d610c367c61876997f1'
                                to: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                dexes:
                                  - name: POLYGON_QUICKSWAP_V3
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_DODO_V2
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'
                                to: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                dexes:
                                  - name: POLYGON_QUICKSWAP
                                    percentage: 100
                          - percentage: 100
                            subRoutes:
                              - from: '0xac0f66379a6d7801d7726d5a943356a172549adb'
                                to: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359'
                                dexes:
                                  - name: POLYGON_UNISWAP_V3
                                    percentage: 100
                        gasMultiplier: NONE
                        integratorFeeBreakdown:
                          protocolFeeBps: 15
                          integratorMarginBps: 25
                          protocolFeeAmount: '14932'
                          integratorMarginAmount: '24887'
                    meta:
                      requestId: EdtzTjP3IAMEPSw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '400':
          description: >-
            The body failed validation. `error.details` lists each field and why
            it failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request body
                  details:
                    - field: params.chainId
                      message: 'Invalid input: expected number, received string'
                    - field: params.inTokenAddress
                      message: Must be a valid EVM address
                    - field: params.amount
                      message: 'Invalid input: expected string, received number'
                    - field: params.gasPrice
                      message: 'Invalid input: expected string, received undefined'
                meta:
                  requestId: ENUlmg3dIAMEMEw=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '401':
          description: >-
            A signing header is missing. The gateway answers with
            `{"message":"Unauthorized"}` before your request reaches Olympex;
            the handler answers with the `UNAUTHORIZED` envelope when the
            authorizer context is missing.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Unauthorized
        '403':
          description: >-
            Authentication failed: unknown key, wrong passphrase, invalid
            signature, timestamp outside the ±300 s window, reused nonce, or
            inactive account (gateway `{"message":"Forbidden"}`). The handler
            answers with the `FORBIDDEN` envelope when the body does not match
            the signed `bodyHash`.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                gateway:
                  summary: Signature rejected by the gateway
                  value:
                    message: Forbidden
                bodyHash:
                  summary: Body does not match the signed hash
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: Invalid body hash
                      details: []
                    meta:
                      requestId: ENXGDhsXIAMEMEw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '404':
          description: >-
            Unknown path or wrong method (`NOT_FOUND`). `error.message` names
            the method and path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: No route for GET /api/v1/quote
                  details: []
                meta:
                  requestId: E7edogG4IAMEPYA=
                  version: v1
        '422':
          description: >-
            `NO_ROUTE`: no liquidity source returned a usable route for this
            pair and amount. Olympex doesn't yet tell apart no liquidity, an
            unsupported pair or amount, and every source failing or timing out,
            so retry later with backoff, and change the amount or pair if it
            persists. `error.details` carries the source's message: display it,
            don't parse it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                singleChain:
                  summary: No route (single-chain)
                  value:
                    success: false
                    error:
                      code: NO_ROUTE
                      message: >-
                        No route found for this pair and amount. Providers may
                        also be temporarily unavailable; retrying later can
                        succeed.
                      details:
                        - message: >-
                            The quote could be retrieved but the route is not
                            available
                    meta:
                      requestId: E7ef-j_MoAMEPBw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                crossChain:
                  summary: No route (cross-chain)
                  value:
                    success: false
                    error:
                      code: NO_ROUTE
                      message: >-
                        No route found for this pair and amount. Providers may
                        also be temporarily unavailable; retrying later can
                        succeed.
                      details:
                        - message: Could not retrieve the cross chain quote
                    meta:
                      requestId: E7ev1jVHoAMEVuw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '500':
          description: >-
            Olympex hit an unexpected error (`QUOTE_ERROR`,
            `CROSS_CHAIN_QUOTE_ERROR` or `INTERNAL_ERROR`), or the gateway could
            not get a response (`{"message":"Internal Server Error"}`), for
            example after a timeout of about 30 seconds. Retry with backoff. A
            pair with no route returns `422 NO_ROUTE` instead.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not get a response in time (the integration
            timeout is about 30 seconds) or the service is briefly unavailable.
            Returned by the gateway. Retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                message: Service Unavailable
      security:
        - ApiKeyId: []
          ValueInfo: []
          Passphrase: []
          Signature: []
components:
  schemas:
    QuoteRequest:
      oneOf:
        - $ref: '#/components/schemas/SingleChainQuoteRequest'
        - $ref: '#/components/schemas/CrossChainQuoteRequest'
      discriminator:
        propertyName: mode
        mapping:
          single-chain: '#/components/schemas/SingleChainQuoteRequest'
          cross-chain: '#/components/schemas/CrossChainQuoteRequest'
    QuoteSuccessResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          oneOf:
            - title: Single-chain
              type: object
              required:
                - mode
                - quote
              properties:
                mode:
                  type: string
                  enum:
                    - single-chain
                quote:
                  $ref: '#/components/schemas/SingleChainQuote'
            - title: Cross-chain
              type: object
              required:
                - mode
                - quote
              properties:
                mode:
                  type: string
                  enum:
                    - cross-chain
                quote:
                  $ref: '#/components/schemas/CrossChainQuote'
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          $ref: '#/components/schemas/Meta'
    GatewayError:
      type: object
      required:
        - message
      description: >-
        Returned by the API gateway itself: `401` or `403` when the signed
        headers are missing or rejected, `429` when it throttles requests, and
        `500` or `503` when it can't get a response from Olympex in time. It has
        no `success`, `error` or `meta`.
      properties:
        message:
          type: string
          example: Forbidden
    SingleChainQuoteRequest:
      title: Single-chain
      type: object
      required:
        - mode
        - params
      properties:
        mode:
          type: string
          enum:
            - single-chain
        params:
          type: object
          required:
            - chainId
            - inTokenAddress
            - outTokenAddress
            - amount
            - slippage
            - gasPrice
          properties:
            chainId:
              type: integer
              minimum: 0
              exclusiveMinimum: true
              maximum: 9007199254740991
              description: EVM chain ID as an integer, for example `137` for Polygon.
            inTokenAddress:
              type: string
              minLength: 1
              description: >-
                Token you sell. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`
                for the chain's native token. Any valid EVM address (lowercase
                or EIP-55 checksum).
            outTokenAddress:
              type: string
              minLength: 1
              description: >-
                Token you buy. Any valid EVM address (lowercase or EIP-55
                checksum).
            amount:
              type: string
              minLength: 1
              description: >-
                Amount of the input token as a decimal string in human-readable
                units, for example `"1.5"` for 1.5 USDC. Do not convert to base
                units.
              example: '10'
            slippage:
              type: string
              minLength: 1
              description: Maximum slippage as a percentage string. `"1"` means 1%.
              example: '1'
            gasPrice:
              type: string
              minLength: 1
              description: >-
                Gas price hint in whole gwei as a string, for example `"35"`.
                Round up: some sources reject fractional gwei.
              example: '35'
            excludeMetaAggregatorId:
              type: array
              items:
                type: string
                minLength: 1
              description: >-
                Liquidity sources to leave out, for example
                `["zeroExV2AllowanceHolder"]`. Unknown IDs are ignored.
            includeGasInfo:
              type: boolean
              description: >-
                When `true`, the quote includes `dataFeeTransaction` and
                `estimatedGas` is scaled by `gasMultiplier`. Default `false`.
            orderBy:
              type: string
              enum:
                - MAX_ESTIMATE_GAS
                - MAX_OUT_AMOUNT
                - MIN_ESTIMATE_GAS
              description: How to rank routes. Default `MAX_OUT_AMOUNT` (best output).
            gasMultiplier:
              type: string
              enum:
                - HIGH
                - LOW
                - MEDIUM
                - NONE
              description: >-
                Scales `estimatedGas` when `includeGasInfo` is `true`: `NONE`
                1×, `LOW` 1.55×, `MEDIUM` 2×, `HIGH` 4×. Default `NONE`.
        fees:
          $ref: '#/components/schemas/FeeOptions'
    CrossChainQuoteRequest:
      title: Cross-chain
      type: object
      required:
        - mode
        - params
      additionalProperties: false
      properties:
        mode:
          type: string
          enum:
            - cross-chain
        params:
          type: object
          required:
            - inTokenAddress
            - outTokenAddress
            - fromChainId
            - toChainId
            - amount
            - slippage
          properties:
            inTokenAddress:
              type: string
              minLength: 1
              description: >-
                Token you send on the source chain. Any valid EVM address
                (lowercase or EIP-55 checksum).
            outTokenAddress:
              type: string
              minLength: 1
              description: >-
                Token you receive on the destination chain. Any valid EVM
                address (lowercase or EIP-55 checksum).
            fromChainId:
              type: integer
              minimum: 0
              exclusiveMinimum: true
              maximum: 9007199254740991
              description: Source chain ID as an integer.
            toChainId:
              type: integer
              minimum: 0
              exclusiveMinimum: true
              maximum: 9007199254740991
              description: Destination chain ID as an integer.
            amount:
              type: string
              minLength: 1
              description: >-
                Amount of the input token as a decimal string in human-readable
                units, for example `"1.5"` for 1.5 USDC. Do not convert to base
                units.
              example: '10'
            slippage:
              type: string
              minLength: 1
              description: Maximum slippage as a percentage string. `"1"` means 1%.
              example: '1'
        fees:
          $ref: '#/components/schemas/FeeOptions'
    SingleChainQuote:
      type: object
      required:
        - outAmount
        - aggregatorId
      properties:
        outAmount:
          type: string
          description: >-
            Expected output as an integer string in base units of
            `outTokenAddress`. `10034668` of a 6-decimal token is 10.034668.
        aggregatorId:
          type: string
          description: >-
            Liquidity source that produced the winning route. Pass it to `POST
            /swap`.
        estimatedGas:
          type: string
          nullable: true
          description: >-
            Gas units estimated by the source. `"0"` means the source did not
            provide an estimate.
        aggregatorOrder:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Sources that returned a quote, best first. Use them as fallbacks for
            `POST /swap`.
        market:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/QuoteMarket'
        routes:
          type: array
          items:
            $ref: '#/components/schemas/QuoteRoute'
          description: How the input is split across venues.
        dataFeeTransaction:
          $ref: '#/components/schemas/DataFeeTransaction'
        gasMultiplier:
          type: string
          nullable: true
          description: Multiplier applied, echoed from the request. Default `NONE`.
        integratorFeeBreakdown:
          $ref: '#/components/schemas/IntegratorFeeBreakdown'
    CrossChainQuote:
      type: object
      required:
        - aggregatorId
        - estimateCostInUSD
        - fromTokenAmount
        - toTokenAmount
        - minimumReceived
      properties:
        aggregatorId:
          type: string
          description: >-
            Cross-chain provider. Signed API accounts receive `okx` or `rango`.
            Pass it to `POST /swap`.
        estimateCostInUSD:
          type: string
          description: >-
            The provider's estimate of the transfer's cost in USD. What it
            includes varies by provider.
        fromTokenAmount:
          type: string
          description: The input amount, echoed in human-readable units.
        toTokenAmount:
          type: string
          description: Expected amount received on the destination chain, in base units.
        minimumReceived:
          type: string
          description: Minimum amount received after slippage, in base units.
        estimatedGas:
          type: string
          nullable: true
          description: >-
            Provider-reported estimate. Its unit depends on the provider (gas
            units or a native-token fee in wei); use it for display only.
        estimatedTime:
          type: string
          nullable: true
          description: Provider-reported transfer time estimate, when available.
        bridgeInfo:
          type: object
          properties:
            icon:
              type: string
              description: Bridge logo URL. Can be empty.
            displayName:
              type: string
              description: Bridge name.
        middlewareRoute:
          type: object
          additionalProperties: true
          description: >-
            Swaps performed on the source (`chainFrom`) and destination
            (`chainTo`) chains around the bridge.
        integratorFeeBreakdown:
          $ref: '#/components/schemas/IntegratorFeeBreakdown'
    Meta:
      type: object
      required:
        - requestId
        - version
      properties:
        requestId:
          type: string
          description: Unique ID for this request. Include it when you contact support.
        version:
          type: string
          default: v1
          description: API version that served the request.
        accountType:
          type: string
          description: >-
            Account type resolved by the signature check, for example
            `integrator`. Present when the request was authenticated; absent on
            the `404` for an unknown path or method.
        apiKeyId:
          type: string
          format: uuid
          description: >-
            The API key ID that signed the request. Present when the request was
            authenticated; absent on the `404` for an unknown path or method.
    ErrorBody:
      type: object
      required:
        - code
        - message
        - details
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code. `VALIDATION_ERROR` (400),
            `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for
            an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), and
            for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`,
            `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`,
            `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`,
            `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by
            its HTTP status.
        message:
          type: string
          description: Human-readable summary. Don't parse it.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    FeeOptions:
      type: object
      description: >-
        Your integrator fee. It appears in
        `integratorFeeBreakdown.integratorMarginBps` and
        `integratorMarginAmount`.
      properties:
        feeBps:
          type: integer
          minimum: 0
          maximum: 100
          description: Your fee in basis points, from 0 to 100 (1%).
          example: 25
        feeRecipient:
          type: string
          minLength: 1
          description: >-
            EVM address that receives your fee. Required when `feeBps` is
            greater than 0; the zero address is rejected.
          example: '0x1E67cb01969D79B2B895179e4A07D24a839dBb52'
    QuoteMarket:
      type: object
      description: Another venue's price for the same trade.
      properties:
        dexName:
          type: string
        swapAmount:
          type: string
          description: Output in base units of the output token.
        dexImageURL:
          type: string
    QuoteRoute:
      type: object
      properties:
        percentage:
          type: number
          description: >-
            Percentage the source reports for this route. Later hops can appear
            as separate routes at 100, so the values don't always sum to 100.
            Display only.
        subRoutes:
          type: array
          items:
            $ref: '#/components/schemas/QuoteSubRoute'
    DataFeeTransaction:
      type: object
      description: >-
        Gas cost estimate for the transaction. Present when `includeGasInfo` is
        `true`.
      properties:
        effectiveGasPrice:
          type: string
          description: Gas price the estimate used, in wei.
        transactionFee:
          type: string
          description: '`estimatedGas × effectiveGasPrice`, in wei.'
        transactionFeeInUSD:
          type: string
          description: Estimated gas cost in USD.
        transactionFeeInToken:
          type: string
          description: >-
            Estimated gas cost converted to the input token, in human-readable
            units.
        valueToApprove:
          type: string
          description: >-
            `amount` plus `transactionFeeInToken`, in human-readable units of
            the input token.
        nativePrice:
          type: string
          description: Price of the native token in USD.
        tokenPrice:
          type: string
          description: Price of the input token in USD.
    IntegratorFeeBreakdown:
      type: object
      nullable: true
      description: >-
        Fees on this quote for your API account. `protocolFeeBps` is the Olympex
        protocol fee in basis points (`15` is 0.15%), and it applies even when
        you set no fee. `integratorMarginBps` is your fee from `fees.feeBps`, in
        basis points. The amounts are in base units of the output token
        (single-chain) or the source token (cross-chain).
      properties:
        protocolFeeBps:
          type: number
          description: >-
            Olympex protocol fee in basis points: `15` is 0.15%. It can be
            fractional. It applies even when you set no integrator fee.
        integratorMarginBps:
          type: integer
          description: Your `feeBps`, in basis points.
        protocolFeeAmount:
          type: string
          description: >-
            Protocol fee in base units: of the output token for single-chain, of
            the source token for cross-chain.
        integratorMarginAmount:
          type: string
          description: >-
            Your fee in base units: of the output token for single-chain, of the
            source token for cross-chain.
    ErrorDetail:
      type: object
      additionalProperties: true
      description: >-
        Validation errors carry `field` and `message`; other errors carry
        `message` only.
      properties:
        field:
          type: string
          description: >-
            Dot path of the invalid field, for example `params.chainId`. Empty
            for the top level.
        message:
          type: string
    QuoteSubRoute:
      type: object
      properties:
        from:
          type: string
          description: >-
            Token address as the source reports it. Case and the native-token
            address (`0xeeee…` or the zero address) vary by source.
        to:
          type: string
          description: >-
            Token address as the source reports it. Case and the native-token
            address (`0xeeee…` or the zero address) vary by source.
        dexes:
          type: array
          items:
            $ref: '#/components/schemas/QuoteDex'
    QuoteDex:
      type: object
      properties:
        name:
          type: string
          description: Venue identifier, for example `POLYGON_UNISWAP_V3`.
        percentage:
          type: number
          description: Share of this hop routed through the venue, in percent.
  securitySchemes:
    ApiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: >-
        Your API key ID (UUID). See [Sign
        requests](https://docs.olympex.io/authentication/sign-requests).
    ValueInfo:
      type: apiKey
      in: header
      name: x-value-info
      description: >-
        Base64 of `timestamp + "\n" + nonce + "\n" + bodyHash`, where
        `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters
        and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.
    Passphrase:
      type: apiKey
      in: header
      name: x-passphrase
      description: Your account passphrase. Treat it like the secret key.
    Signature:
      type: apiKey
      in: header
      name: x-signature
      description: >-
        Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key
        string (UTF-8, not decoded), of seven lines joined with `\n`, with no
        trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the
        uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the
        request path including `/api/v1`, without the query string, for example
        `/api/v1/limit-order/<id>`. `canonicalQuery` is the query parameters
        decoded (`+` is a space), sorted by key and then by value, re-encoded
        per RFC 3986 and joined with `&`, or the empty string when there is no
        query. Headers signed for one request are rejected on any other. See
        [Sign requests](https://docs.olympex.io/authentication/sign-requests).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.