{
  "openapi": "3.1.0",
  "info": {
    "title": "LeoDex Swap API",
    "version": "1.0.0",
    "summary": "Crosschain swaps from your code, bot or AI agent with one public key.",
    "description": "Swap between chains with three calls: get a quote, get a deposit address and send to it from any wallet, then track the swap. No wallet to connect and nothing to sign.\n\n**API key.** Everyone uses the same public key, sent as the `Api-Key` header. The key rotates, so never hard-code it: copy the current key from https://leodex.io/swap-api or https://leodex.io/swap-api.md. On `403 KEY_INACTIVE`, fetch it again.\n\n**Fees.** The same as leodex.io: 0.45% on most swaps, 0.02% on stablecoin-to-stablecoin and same-asset swaps. Every quote shows all fees.\n\n**Amounts.** Send `amount` as a decimal string in display units (`0.01` BTC). Quote outputs (`expected_amount_out`) are in the smallest unit of `to_asset` (wei, sats); divide by 10^decimals, with decimals from `GET /assets`.\n\n**Non-custodial.** You send funds straight to the swap provider. LeoDex never holds them. If a swap fails, the provider refunds to your `from_address`.\n\n**Rules for AI agents.** Always call `/quote-deposit` for prices; never quote from memory. Show the quote and get an explicit yes before `POST /deposit-address`. Never invent or reuse a receive or refund address. Never ask for a private key or seed phrase.",
    "contact": { "name": "LeoDex", "url": "https://leodex.io/contact" }
  },
  "externalDocs": {
    "description": "Full guide for developers and AI agents, with the current key",
    "url": "https://leodex.io/swap-api.md"
  },
  "servers": [{ "url": "https://api.leokit.dev", "description": "Production" }],
  "security": [{ "ApiKey": [] }],
  "tags": [
    { "name": "Deposit flow", "description": "The three calls: quote, deposit address, status. Send from any wallet." },
    { "name": "Wallet mode", "description": "Every route, including same-chain swaps, THORChain and Maya. Returns a transaction for you to sign and broadcast." },
    { "name": "Reference", "description": "Asset ids and decimals." }
  ],
  "paths": {
    "/quote-deposit": {
      "get": {
        "tags": ["Deposit flow"],
        "operationId": "getDepositQuote",
        "summary": "Get a quote",
        "description": "Quotes from the routes that can mint a deposit address (Chainflip, NEAR Intents and Relay), sorted best first. The offer with `smart_recommended: true` is the pick. Pass the returned `quote_id` to `POST /deposit-address`. Rates hold for about 30 seconds.",
        "parameters": [
          { "$ref": "#/components/parameters/FromAsset" },
          { "$ref": "#/components/parameters/ToAsset" },
          { "$ref": "#/components/parameters/Amount" },
          { "$ref": "#/components/parameters/SlippageBps" }
        ],
        "responses": {
          "200": {
            "description": "quote_id and quotes (the offers), best first",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/QuoteResponse" },
                "example": {
                  "quote_id": "0193f5a2-7c1e-7b3d-9a40-2f6d8e1c4b77",
                  "timestamp": "2026-11-05T12:00:00.000Z",
                  "quotes": [
                    {
                      "protocol": "chainflip",
                      "data": {
                        "protocol": "chainflip",
                        "expected_amount_out": 341200000000000000,
                        "out_asset_decimal": 18,
                        "expected_amount_out_usd": 1121.4,
                        "input_amount_usd": 1130.25,
                        "total_swap_seconds": 552,
                        "expires_at": 1793966430000,
                        "ttl_seconds": 30,
                        "route": ["BTC.BTC", "ETH.USDC-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "ETH.ETH"],
                        "fees": [
                          { "type": "Affiliate Fee", "asset": "ETH.ETH", "amount": 0.00154, "usd": 5.06 }
                        ],
                        "supports_deposit_address": true
                      },
                      "flags": ["OPTIMAL", "CHEAPEST"],
                      "smart_recommended": true
                    }
                  ]
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "404": {
            "description": "No deposit-address route for this pair (`NO_DEPOSIT_ADDRESS_ROUTE`). Use wallet mode or another token.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },
    "/deposit-address": {
      "post": {
        "tags": ["Deposit flow"],
        "operationId": "createDepositAddress",
        "summary": "Get a deposit address",
        "description": "Mints a one-time deposit address for a quote. Send exactly `amount` of `from_asset` to `deposit_address` before `expires_at`, from any wallet. Omit `protocol` to use the recommended offer. Calling again with the same `quote_id` and body returns the same address; a different body for the same `quote_id` returns `409 DEPOSIT_IDEMPOTENCY_CONFLICT`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/DepositAddressRequest" },
              "example": {
                "quote_id": "0193f5a2-7c1e-7b3d-9a40-2f6d8e1c4b77",
                "from_address": "bc1qexamplerefundaddress0000000000000000",
                "to_address": "0x0000000000000000000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Where and how much to send",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/DepositAddress" },
                "example": {
                  "deposit_address": "bc1qexampledepositaddress000000000000000",
                  "amount": "0.01",
                  "amount_raw": "1000000",
                  "decimals": 8,
                  "from_asset": "BTC.BTC",
                  "to_asset": "ETH.ETH",
                  "network": "BTC",
                  "protocol": "chainflip",
                  "chainflip_channel_id": "12345678-Bitcoin-1234",
                  "payment_uri": "bitcoin:bc1qexampledepositaddress000000000000000?amount=0.01",
                  "qr_url": "https://example.com/qr/0193f5a2-7c1e-7b3d-9a40-2f6d8e1c4b77.png",
                  "expires_at": 1793967600000
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "409": { "$ref": "#/components/responses/Conflict" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },
    "/status": {
      "post": {
        "tags": ["Deposit flow", "Wallet mode"],
        "operationId": "getSwapStatus",
        "summary": "Track a swap",
        "description": "Poll every 10 seconds. Stop at `success`, `failed` or `refunded`; anything else means keep polling. Refunds go to `from_address`. In wallet mode, also send the `tx_id` you broadcast.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/StatusRequest" },
              "example": { "quote_id": "0193f5a2-7c1e-7b3d-9a40-2f6d8e1c4b77" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current state",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SwapStatus" },
                "example": {
                  "status": "swapping",
                  "type": "swap",
                  "protocol": "chainflip",
                  "from_token": "BTC.BTC",
                  "to_token": "ETH.ETH",
                  "in_amount": 0.01,
                  "out_amount": null,
                  "from_address": "bc1qexamplerefundaddress0000000000000000",
                  "to_address": "0x0000000000000000000000000000000000000001",
                  "dest_tx_hash": null,
                  "refund_tx_hash": null,
                  "error": null,
                  "date": 1793966450000,
                  "status_url": "https://scan.chainflip.io/channels/12345678-Bitcoin-1234"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },
    "/assets": {
      "get": {
        "tags": ["Reference"],
        "operationId": "listAssets",
        "summary": "List assets",
        "description": "Every asset id with its decimals. Large response; send `Accept-Encoding: gzip`. Tokens with `supports_deposit_address: false` need wallet mode.",
        "responses": {
          "200": {
            "description": "All assets",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AssetList" },
                "example": {
                  "tokens": [
                    {
                      "identifier": "BTC.BTC",
                      "blockchain": "BTC",
                      "symbol": "BTC",
                      "address": null,
                      "decimals": 8,
                      "price_usd": 113025.0,
                      "is_popular": true,
                      "verified": true,
                      "display_symbol": "BTC",
                      "supports_deposit_address": true
                    }
                  ]
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" },
          "503": {
            "description": "Assets are still loading after a restart. Retry after the `Retry-After` seconds.",
            "headers": { "Retry-After": { "schema": { "type": "integer" } } },
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
          }
        }
      }
    },
    "/quote": {
      "get": {
        "tags": ["Wallet mode"],
        "operationId": "getQuote",
        "summary": "Get every offer (wallet mode)",
        "description": "Quotes from every route, including same-chain swaps, THORChain and Maya. Pass `quote_id` and the chosen offer's `protocol` to `POST /deposit`.",
        "parameters": [
          { "$ref": "#/components/parameters/FromAsset" },
          { "$ref": "#/components/parameters/ToAsset" },
          { "$ref": "#/components/parameters/Amount" },
          { "$ref": "#/components/parameters/SlippageBps" },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "description": "Your address on the source chain. Some routes need it for an executable quote.",
            "schema": { "type": "string" }
          },
          {
            "name": "destination",
            "in": "query",
            "required": false,
            "description": "Your receive address on the destination chain.",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "quote_id and quotes (the offers), best first",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuoteResponse" } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    },
    "/deposit": {
      "post": {
        "tags": ["Wallet mode"],
        "operationId": "createDeposit",
        "summary": "Get the transaction to sign (wallet mode)",
        "description": "Returns what to sign for the chosen offer: THORChain and Maya memos, EVM approvals, DEX swaps. The shape depends on the route. Sign and broadcast it yourself, then call `POST /status` with `quote_id` and `tx_id`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/DepositRequest" },
              "example": {
                "quote_id": "0193f5a2-7c1e-7b3d-9a40-2f6d8e1c4b77",
                "protocol": "thorchain",
                "from_address": "bc1qexamplerefundaddress0000000000000000",
                "to_address": "0x0000000000000000000000000000000000000001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Route-specific signing instructions",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepositInstructions" } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "409": { "$ref": "#/components/responses/Conflict" },
          "429": { "$ref": "#/components/responses/TooManyRequests" },
          "503": { "$ref": "#/components/responses/ServiceUnavailable" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Api-Key",
        "description": "The public Swap API key. It rotates: copy the current key from https://leodex.io/swap-api or https://leodex.io/swap-api.md and never hard-code it."
      }
    },
    "parameters": {
      "FromAsset": {
        "name": "from_asset",
        "in": "query",
        "required": true,
        "description": "Asset to send, as CHAIN.TICKER (BTC.BTC) or CHAIN.TICKER-CONTRACT for tokens. See GET /assets.",
        "schema": { "type": "string" },
        "example": "BTC.BTC"
      },
      "ToAsset": {
        "name": "to_asset",
        "in": "query",
        "required": true,
        "description": "Asset to receive, in the same format as from_asset.",
        "schema": { "type": "string" },
        "example": "ETH.ETH"
      },
      "Amount": {
        "name": "amount",
        "in": "query",
        "required": true,
        "description": "Amount of from_asset as a decimal string in display units. More decimals than the asset has returns 400 AMOUNT_TOO_PRECISE.",
        "schema": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$" },
        "example": "0.01"
      },
      "SlippageBps": {
        "name": "slippage_bps",
        "in": "query",
        "required": false,
        "description": "Slippage tolerance in basis points. Defaults to 150; leodex.io uses 300.",
        "schema": { "type": "integer", "minimum": 0, "default": 150 },
        "example": 300
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input. Common codes: BAD_REQUEST, INVALID_ASSET_FORMAT, AMOUNT_TOO_PRECISE, AMOUNT_TOO_SMALL, SAME_CHAIN_NOT_SUPPORTED, NO_DEPOSIT_ADDRESS_PROTOCOL, UNSUPPORTED_PROTOCOL, RELEASE_ROUTE_DISABLED, PLACEHOLDER_ADDRESS_BLOCKED.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": { "error": "BTC supports up to 8 decimal places.", "status": 400, "code": "AMOUNT_TOO_PRECISE" }
          }
        }
      },
      "Unauthorized": {
        "description": "No Api-Key header, or an unknown key (MISSING_OR_UNKNOWN_KEY).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": {
              "error": "Missing or unknown API key.",
              "status": 401,
              "code": "MISSING_OR_UNKNOWN_KEY",
              "hint": "Send the header Api-Key: <your key>.",
              "docs": "https://leodex.io/swap-api"
            }
          }
        }
      },
      "Forbidden": {
        "description": "KEY_INACTIVE: the key was rotated; fetch https://leodex.io/swap-api.md for the current one. PUBLIC_KEY_ROUTE_NOT_ALLOWED: that route isn't part of the Swap API.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" },
            "example": {
              "error": "This API key is inactive.",
              "status": 403,
              "code": "KEY_INACTIVE",
              "hint": "If you use the public Swap API key, copy the current key from the docs page.",
              "docs": "https://leodex.io/swap-api"
            }
          }
        }
      },
      "Conflict": {
        "description": "This quote already has a deposit for different parameters (DEPOSIT_IDEMPOTENCY_CONFLICT), or one is still being prepared (DEPOSIT_IN_PROGRESS). Get a new quote, or retry shortly.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      },
      "TooManyRequests": {
        "description": "Too many requests from you, or LeoDex is busy. Wait retry_after_seconds, then retry.",
        "headers": { "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer" } } },
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Busy" } } }
      },
      "ServiceUnavailable": {
        "description": "LeoDex can't reach its swap engine. Wait retry_after_seconds, then retry. After a deposit-address retry, use only the newest address.",
        "headers": { "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer" } } },
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Busy" } } }
      }
    },
    "schemas": {
      "Busy": {
        "type": "object",
        "required": ["error", "code", "retry_after_seconds"],
        "properties": {
          "error": { "type": "string", "description": "Plain words, e.g. \"LeoDex is busy right now. Please try again in a few moments.\"" },
          "code": { "type": "string", "enum": ["EDGE_RATE_LIMITED", "UPSTREAM_UNAVAILABLE"] },
          "retry_after_seconds": { "type": "integer", "description": "Seconds to wait before retrying. Also sent as the Retry-After header." }
        }
      },
      "Error": {
        "type": "object",
        "required": ["error", "status"],
        "properties": {
          "error": { "type": "string", "description": "What went wrong, in plain words." },
          "status": { "type": "integer", "description": "The HTTP status." },
          "code": { "type": "string", "description": "Stable machine-readable code, when there is one." },
          "hint": { "type": "string" },
          "docs": { "type": "string", "format": "uri" },
          "traceId": { "type": "string" }
        }
      },
      "Fee": {
        "type": "object",
        "required": ["type", "asset", "amount"],
        "properties": {
          "type": { "type": "string", "examples": ["Affiliate Fee", "Network Fee", "Outbound Fee"] },
          "asset": { "type": "string" },
          "amount": { "type": "number", "description": "In display units of asset." },
          "usd": { "type": ["number", "string", "null"] }
        }
      },
      "QuoteData": {
        "type": "object",
        "required": ["expected_amount_out"],
        "description": "Route details. Fields vary by provider; unknown fields can be ignored.",
        "properties": {
          "protocol": { "type": "string" },
          "expected_amount_out": {
            "type": ["number", "string"],
            "description": "Estimated amount received after fees, in the smallest unit of to_asset (wei, sats). Divide by 10^out_asset_decimal."
          },
          "out_asset_decimal": { "type": "integer", "description": "Decimals of to_asset (18 for ETH, 8 for BTC)." },
          "expected_amount_out_usd": { "type": ["number", "null"] },
          "input_amount_usd": { "type": ["number", "null"] },
          "total_swap_seconds": { "type": ["number", "null"], "description": "Estimated time to complete." },
          "expires_at": { "type": "integer", "description": "When the rate expires, in Unix milliseconds." },
          "ttl_seconds": { "type": "integer" },
          "route": { "type": "array", "items": { "type": "string" } },
          "fees": { "type": "array", "items": { "$ref": "#/components/schemas/Fee" } },
          "supports_deposit_address": { "type": "boolean", "description": "Always true on /quote-deposit offers." }
        }
      },
      "QuoteOffer": {
        "type": "object",
        "required": ["protocol", "data"],
        "properties": {
          "protocol": {
            "type": "string",
            "description": "Route id. Pass it as protocol to POST /deposit (wallet mode) or optionally to POST /deposit-address.",
            "examples": ["chainflip", "near", "relay", "thorchain"]
          },
          "data": { "$ref": "#/components/schemas/QuoteData" },
          "flags": {
            "type": "array",
            "items": { "type": "string", "enum": ["OPTIMAL", "CHEAPEST", "FASTEST"] }
          },
          "smart_recommended": { "type": "boolean", "description": "True on the one offer LeoDex recommends." },
          "expectedAmountOutNum": { "type": "number" },
          "totalFeesUsd": { "type": "number" },
          "totalSwapSeconds": { "type": "number" }
        }
      },
      "QuoteResponse": {
        "type": "object",
        "required": ["quote_id", "quotes"],
        "properties": {
          "quote_id": { "type": "string", "description": "Pass to POST /deposit-address, POST /deposit and POST /status." },
          "timestamp": { "type": "string", "format": "date-time" },
          "quotes": {
            "type": "array",
            "description": "Offers, best first. Use the one with smart_recommended: true.",
            "items": { "$ref": "#/components/schemas/QuoteOffer" }
          }
        }
      },
      "DepositAddressRequest": {
        "type": "object",
        "required": ["quote_id", "from_address", "to_address"],
        "properties": {
          "quote_id": { "type": "string" },
          "from_address": { "type": "string", "description": "Your refund address on the source chain. Refunds go here if the swap fails." },
          "to_address": { "type": "string", "description": "Your receive address on the destination chain." },
          "protocol": {
            "type": "string",
            "enum": ["chainflip", "near", "relay-deposit", "relay", "bob"],
            "description": "Optional. Omit it to use the recommended offer. relay is an alias of relay-deposit."
          }
        }
      },
      "DepositAddress": {
        "type": "object",
        "required": ["deposit_address", "amount", "from_asset", "to_asset", "protocol", "expires_at"],
        "properties": {
          "deposit_address": { "type": "string", "description": "Send from_asset here, from any wallet." },
          "amount": { "type": "string", "description": "Send exactly this much, in display units." },
          "amount_raw": { "type": "string", "description": "The same amount in the smallest unit." },
          "decimals": { "type": "integer" },
          "from_asset": { "type": "string" },
          "to_asset": { "type": "string" },
          "network": { "type": "string" },
          "protocol": { "type": "string", "examples": ["chainflip", "near", "relay-deposit"] },
          "chainflip_channel_id": { "type": ["string", "null"] },
          "payment_uri": { "type": "string", "description": "Wallet payment link (BIP21-style) with the amount." },
          "qr_url": { "type": "string", "format": "uri", "description": "QR image of payment_uri." },
          "expires_at": { "type": "integer", "description": "Send before this time, in Unix milliseconds. At least 20 minutes on the deposit flow." }
        }
      },
      "StatusRequest": {
        "type": "object",
        "required": ["quote_id"],
        "properties": {
          "quote_id": { "type": "string" },
          "tx_id": { "type": "string", "description": "Wallet mode only: the hash of the transaction you broadcast." }
        }
      },
      "SwapStatus": {
        "type": "object",
        "required": ["status"],
        "description": "Fields vary by provider; unknown fields can be ignored.",
        "properties": {
          "status": {
            "type": "string",
            "description": "Final states: success, failed, refunded. Anything else: keep polling. Older swaps may show completed, which means success.",
            "examples": ["pending", "confirming", "swapping", "sending", "success", "failed", "refunded"]
          },
          "type": { "type": "string" },
          "protocol": { "type": "string" },
          "from_token": { "type": ["string", "null"] },
          "to_token": { "type": ["string", "null"] },
          "in_amount": { "type": ["number", "string", "null"] },
          "out_amount": { "type": ["number", "null"], "description": "Amount delivered, as the provider reports it." },
          "from_address": { "type": ["string", "null"] },
          "to_address": { "type": ["string", "null"] },
          "dest_tx_hash": { "type": ["string", "null"], "description": "Delivery transaction on the destination chain." },
          "refund_tx_hash": { "type": ["string", "null"] },
          "error": { "type": ["string", "null"] },
          "date": { "type": ["integer", "null"], "description": "Unix milliseconds." },
          "status_url": { "type": "string", "description": "Provider tracking page." }
        }
      },
      "Asset": {
        "type": "object",
        "required": ["identifier"],
        "properties": {
          "identifier": { "type": "string", "description": "The asset id to use in from_asset and to_asset." },
          "blockchain": { "type": "string" },
          "symbol": { "type": "string" },
          "display_symbol": { "type": "string" },
          "address": { "type": ["string", "null"], "description": "Token contract, or null for a native asset." },
          "decimals": { "type": ["integer", "null"] },
          "price_usd": { "type": ["number", "null"] },
          "is_popular": { "type": ["boolean", "null"] },
          "verified": { "type": "boolean" },
          "supports_deposit_address": { "type": "boolean", "description": "False means the deposit flow can't take this token; use wallet mode. Absent means unknown." }
        }
      },
      "AssetList": {
        "type": "object",
        "required": ["tokens"],
        "properties": {
          "tokens": { "type": "array", "items": { "$ref": "#/components/schemas/Asset" } }
        }
      },
      "DepositRequest": {
        "type": "object",
        "required": ["quote_id", "protocol", "from_address", "to_address"],
        "properties": {
          "quote_id": { "type": "string" },
          "protocol": { "type": "string", "description": "The protocol of the offer you chose from GET /quote." },
          "from_address": { "type": "string", "description": "The address that signs and sends; refunds go here." },
          "to_address": { "type": "string", "description": "Your receive address on the destination chain." }
        }
      },
      "DepositInstructions": {
        "type": "object",
        "description": "Route-specific: for example unsigned transactions to sign, or an inbound address and memo. Sign and broadcast it yourself.",
        "additionalProperties": true
      }
    }
  }
}
