{
  "openapi": "3.0.0",
  "info": {
    "title": "00Swap Public API",
    "version": "0.1.0",
    "description": "Swap crypto across 30+ assets from any script, bot or AI agent. No API key, no account, no KYC.\n\nFlow: GET /v1/orders/config → GET /v1/orders/preview → POST /v1/orders/quote → POST /v1/orders → GET /v1/orders/{id}. Amounts are decimal strings; fees are already included in expectedOutput.\n\nGuide: https://00swap.com/api · Markdown for LLMs: https://00swap.com/api.md · https://00swap.com/llms.txt"
  },
  "servers": [
    {
      "url": "https://api.00swap.com"
    }
  ],
  "externalDocs": {
    "description": "Public API guide",
    "url": "https://00swap.com/api"
  },
  "tags": [],
  "paths": {
    "/v1/orders/config": {
      "get": {
        "operationId": "OrdersController_configuration",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersConfigDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Assets, service fee, enabled providers and whether new orders are open",
        "description": "No authentication. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/preview": {
      "get": {
        "operationId": "OrdersController_preview",
        "parameters": [
          {
            "name": "provider",
            "required": false,
            "in": "query",
            "description": "Price this provider alone; omitted, every enabled provider answers together",
            "schema": {
              "enum": [
                "near",
                "relay",
                "swapkit"
              ],
              "type": "string"
            }
          },
          {
            "name": "slippageBps",
            "required": true,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sendAmount",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPreviewDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Live prices of every provider, no addresses needed",
        "description": "No authentication. Rate limit 180 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/quote": {
      "post": {
        "operationId": "OrdersController_quote",
        "parameters": [
          {
            "name": "x-order-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderInputDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderQuotesDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Signed executable routes for real addresses",
        "description": "Requires your own secret `x-order-token` header: 64 lowercase hex characters you generate and keep. Rate limit 30 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders": {
      "post": {
        "operationId": "OrdersController_create",
        "parameters": [
          {
            "name": "x-order-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Create an order from one quoteToken and get the deposit address",
        "description": "Requires your own secret `x-order-token` header: 64 lowercase hex characters you generate and keep. Rate limit 5 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "operationId": "OrdersController_get",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-order-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Stored order state: status, amounts, deadlines, payout transaction",
        "description": "Requires your own secret `x-order-token` header: 64 lowercase hex characters you generate and keep. Rate limit 60 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/private/preview": {
      "get": {
        "operationId": "OrdersController_privatePreview",
        "parameters": [
          {
            "name": "route",
            "required": false,
            "in": "query",
            "description": "Price only this private route",
            "schema": {
              "enum": [
                1,
                2,
                3
              ],
              "type": "number"
            }
          },
          {
            "name": "slippageBps",
            "required": true,
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sendAmount",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivatePreviewDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Private two-hop swap: live prices of route 1 or 2, no addresses needed",
        "description": "No authentication. Rate limit 120 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/private/quote": {
      "post": {
        "operationId": "OrdersController_privateQuote",
        "parameters": [
          {
            "name": "x-order-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivateOrderInputDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateQuotesDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Private two-hop swap: signed routes for real addresses plus an EVM hub refund address",
        "description": "Requires your own secret `x-order-token` header: 64 lowercase hex characters you generate and keep. Rate limit 30 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/orders/private": {
      "post": {
        "operationId": "OrdersController_privateCreate",
        "parameters": [
          {
            "name": "x-order-token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDto"
                }
              }
            }
          }
        },
        "tags": [
          "Orders"
        ],
        "summary": "Private two-hop swap: create the order from one quoteToken",
        "description": "Requires your own secret `x-order-token` header: 64 lowercase hex characters you generate and keep. Rate limit 5 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/markets/prices": {
      "get": {
        "operationId": "MarketsController_prices",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketPricesResponseDto"
                }
              }
            }
          },
          "503": {
            "description": "1Click is unconfigured or unavailable"
          }
        },
        "tags": [
          "Markets"
        ],
        "summary": "USD prices of supported tokens",
        "description": "No authentication. Rate limit 60 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/markets/sparklines": {
      "get": {
        "operationId": "MarketsController_sparklines",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketSparklinesResponseDto"
                }
              }
            }
          }
        },
        "tags": [
          "Markets"
        ],
        "summary": "Recent price history of the main coins",
        "description": "No authentication. Rate limit 30 requests per minute per IP. Guide with examples: https://00swap.com/api"
      }
    },
    "/v1/site/status": {
      "get": {
        "operationId": "SiteController_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteStatusDto"
                }
              }
            }
          }
        },
        "tags": [
          "Site"
        ],
        "summary": "Maintenance status",
        "description": "No authentication. Guide with examples: https://00swap.com/api"
      }
    },
    "/health/live": {
      "get": {
        "operationId": "HealthController_live",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "System"
        ],
        "summary": "Liveness check",
        "description": "No authentication. Guide with examples: https://00swap.com/api"
      }
    }
  },
  "components": {
    "schemas": {
      "OrdersConfigDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "privateEnabled": {
            "type": "boolean",
            "description": "Private two-hop swaps: 1Click, which settles every private hop 2, is live"
          },
          "feeBps": {
            "type": "number",
            "description": "Service commission of regular and wallet swaps"
          },
          "privateFeeBps": {
            "type": "number",
            "description": "Service commission of private swaps"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderAssetDto"
            }
          },
          "provider": {
            "type": "string"
          },
          "hubRefundDefault": {
            "type": "boolean",
            "description": "The hub refund address of a private swap may be left empty"
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "near",
                "relay",
                "swapkit"
              ]
            }
          }
        },
        "required": [
          "enabled",
          "privateEnabled",
          "feeBps",
          "privateFeeBps",
          "assets",
          "provider",
          "hubRefundDefault",
          "providers"
        ]
      },
      "OrderAssetDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "symbol": {
            "type": "string",
            "description": "User-facing ticker; codes remain unique across networks"
          },
          "network": {
            "type": "string"
          },
          "decimals": {
            "type": "number"
          },
          "memo": {
            "type": "boolean"
          },
          "refundDefault": {
            "type": "boolean",
            "description": "A refund address may be left empty when sending this asset: the service's own wallet is used"
          }
        },
        "required": [
          "code",
          "symbol",
          "network",
          "decimals",
          "memo",
          "refundDefault"
        ]
      },
      "OrderPreviewDto": {
        "type": "object",
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderPreviewRouteDto"
            }
          },
          "providerErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderProviderErrorDto"
            }
          },
          "pricedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Set when the provider could not be asked under load and these are its last figures, priced at this time"
          }
        },
        "required": [
          "routes",
          "providerErrors"
        ]
      },
      "OrderPreviewRouteDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "near",
              "swapkit",
              "relay"
            ]
          },
          "liquidityProvider": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "feeBps": {
            "type": "number"
          },
          "feeAmount": {
            "type": "string",
            "description": "App fee in input asset, already included in provider quote"
          },
          "estimatedSeconds": {
            "type": "number",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inboundFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderInboundFeeDto"
            }
          }
        },
        "required": [
          "provider",
          "liquidityProvider",
          "expectedOutput",
          "minimumOutput",
          "feeBps",
          "feeAmount",
          "estimatedSeconds",
          "warnings",
          "inboundFees"
        ]
      },
      "OrderInboundFeeDto": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "asset"
        ]
      },
      "OrderProviderErrorDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Machine-readable reason; `busy` means out of capacity for now, not a refusal of this swap"
          },
          "retryAfterMs": {
            "type": "number",
            "description": "With code `busy`: milliseconds after which asking again is worthwhile"
          }
        },
        "required": [
          "provider",
          "message"
        ]
      },
      "OrderInputDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "to": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "sendAmount": {
            "type": "string",
            "example": "100"
          },
          "recipient": {
            "type": "string",
            "description": "Address on the destination chain"
          },
          "refundTo": {
            "type": "string",
            "description": "Refund address on the source chain"
          },
          "slippageBps": {
            "type": "number",
            "minimum": 10,
            "maximum": 300,
            "description": "Price tolerance the trader picked, forwarded to every provider"
          }
        },
        "required": [
          "from",
          "to",
          "sendAmount",
          "recipient",
          "refundTo",
          "slippageBps"
        ]
      },
      "OrderQuotesDto": {
        "type": "object",
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderQuoteDto"
            }
          },
          "providerErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderProviderErrorDto"
            }
          }
        },
        "required": [
          "routes",
          "providerErrors"
        ]
      },
      "OrderQuoteDto": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "near",
              "swapkit",
              "relay"
            ]
          },
          "liquidityProvider": {
            "type": "string"
          },
          "estimatedSeconds": {
            "type": "number",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inboundFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderInboundFeeDto"
            }
          },
          "quoteToken": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "feeBps": {
            "type": "number"
          },
          "feeAmount": {
            "type": "string",
            "description": "App fee in input asset, already included in provider quote"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "provider",
          "liquidityProvider",
          "estimatedSeconds",
          "warnings",
          "inboundFees",
          "quoteToken",
          "expectedOutput",
          "minimumOutput",
          "feeBps",
          "feeAmount",
          "expiresAt"
        ]
      },
      "CreateOrderDto": {
        "type": "object",
        "properties": {
          "quoteToken": {
            "type": "string"
          }
        },
        "required": [
          "quoteToken"
        ]
      },
      "OrderDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "to": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "sendAmount": {
            "type": "string",
            "example": "100"
          },
          "recipient": {
            "type": "string",
            "description": "Address on the destination chain"
          },
          "refundTo": {
            "type": "string",
            "description": "Refund address on the source chain"
          },
          "slippageBps": {
            "type": "number",
            "minimum": 10,
            "maximum": 300,
            "description": "Price tolerance the trader picked, forwarded to every provider"
          },
          "split": {
            "description": "A private order whose deposit was split: it is paid on to these parts",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderSplitDto"
              }
            ]
          },
          "splitOf": {
            "description": "A part of a split private order",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderSplitOfDto"
              }
            ]
          },
          "private": {
            "type": "boolean",
            "description": "Two-hop private order"
          },
          "hubRefundTo": {
            "type": "string"
          },
          "route": {
            "type": "number",
            "description": "Private route number the order was created from"
          },
          "hops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderHopDto"
            }
          },
          "round": {
            "$ref": "#/components/schemas/OrderRoundDto"
          },
          "hubRefund": {
            "$ref": "#/components/schemas/HubRefundDto"
          },
          "serviceRefund": {
            "type": "boolean",
            "description": "The refund address is the service's own wallet: a refund there is returned by support"
          },
          "hubServiceRefund": {
            "type": "boolean",
            "description": "The hub refund address is the service's own wallet"
          },
          "custodial": {
            "type": "boolean",
            "description": "Private BTC order paid to our node's transit address; forwarded to hop 1 after confirmationsRequired"
          },
          "requoted": {
            "$ref": "#/components/schemas/OrderRequoteDto"
          },
          "confirmationsRequired": {
            "type": "number"
          },
          "depositConfirmations": {
            "type": "number",
            "nullable": true,
            "description": "Confirmations of the least-confirmed coin at the transit address"
          },
          "provider": {
            "type": "string"
          },
          "liquidityProvider": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "receiveAmount": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "actualOutput": {
            "type": "string",
            "nullable": true
          },
          "refundedAmount": {
            "type": "string",
            "nullable": true
          },
          "depositAddress": {
            "type": "string",
            "nullable": true
          },
          "depositMemo": {
            "type": "string",
            "nullable": true,
            "description": "Destination tag/memo that must accompany the deposit, when the chain uses one"
          },
          "fromNetwork": {
            "type": "string"
          },
          "toNetwork": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "providerStatus": {
            "type": "string",
            "nullable": true
          },
          "attentionRequired": {
            "type": "boolean"
          },
          "feeBps": {
            "type": "number"
          },
          "feeAmount": {
            "type": "string"
          },
          "destinationTx": {
            "type": "string",
            "nullable": true
          },
          "depositDeadline": {
            "type": "string",
            "nullable": true
          },
          "refundDeadline": {
            "type": "string",
            "nullable": true
          },
          "depositReceived": {
            "type": "string",
            "description": "A part payment: what has arrived at depositAddress so far, in the deposit asset"
          },
          "depositMissing": {
            "type": "string",
            "description": "A part payment that can still be topped up: what to send to depositAddress, in the deposit asset, before closesAt"
          },
          "lastCheckedAt": {
            "type": "string",
            "nullable": true
          },
          "closesAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the order closes if it does not advance: the deposit window while awaiting a deposit, the provider's deadline after; null once finished"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "from",
          "to",
          "sendAmount",
          "recipient",
          "refundTo",
          "slippageBps",
          "provider",
          "liquidityProvider",
          "id",
          "receiveAmount",
          "minimumOutput",
          "actualOutput",
          "refundedAmount",
          "depositAddress",
          "depositMemo",
          "fromNetwork",
          "toNetwork",
          "status",
          "providerStatus",
          "attentionRequired",
          "feeBps",
          "feeAmount",
          "destinationTx",
          "depositDeadline",
          "refundDeadline",
          "lastCheckedAt",
          "closesAt",
          "createdAt"
        ]
      },
      "OrderSplitDto": {
        "type": "object",
        "properties": {
          "partUsd": {
            "type": "number",
            "description": "USD worth of a part when the order was split"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderSplitPartDto"
            }
          }
        },
        "required": [
          "partUsd",
          "parts"
        ]
      },
      "OrderSplitPartDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The part's own order id; GET /v1/orders/{id} with the same token"
          },
          "index": {
            "type": "number",
            "description": "Number of the part, from 1"
          },
          "sendAmount": {
            "type": "string"
          },
          "receiveAmount": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "actualOutput": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "hops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderHopDto"
            }
          },
          "round": {
            "$ref": "#/components/schemas/OrderRoundDto"
          },
          "destinationTx": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "index",
          "sendAmount",
          "receiveAmount",
          "minimumOutput",
          "actualOutput",
          "status",
          "hops",
          "destinationTx"
        ]
      },
      "OrderHopDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "OrderRoundDto": {
        "type": "object",
        "properties": {
          "current": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "current",
          "total"
        ]
      },
      "OrderSplitOfDto": {
        "type": "object",
        "properties": {
          "splitId": {
            "type": "string",
            "format": "uuid"
          },
          "index": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "splitId",
          "index",
          "total"
        ]
      },
      "HubRefundDto": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "nullable": true
          },
          "intents": {
            "type": "boolean",
            "description": "Kept in the NEAR Intents account of hubRefundTo rather than paid out on a chain"
          }
        },
        "required": [
          "symbol",
          "amount",
          "intents"
        ]
      },
      "OrderRequoteDto": {
        "type": "object",
        "properties": {
          "quotedAmount": {
            "type": "string",
            "description": "Amount the order was first quoted for"
          },
          "receivedAmount": {
            "type": "string",
            "description": "Amount that arrived and is swapped"
          }
        },
        "required": [
          "quotedAmount",
          "receivedAmount"
        ]
      },
      "PrivatePreviewDto": {
        "type": "object",
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrivatePreviewRouteDto"
            }
          },
          "providerErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderProviderErrorDto"
            }
          },
          "advice": {
            "$ref": "#/components/schemas/PrivateAdviceDto"
          },
          "pricedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Set when the provider could not be asked under load and these are its last figures, priced at this time"
          }
        },
        "required": [
          "routes",
          "providerErrors"
        ]
      },
      "PrivatePreviewRouteDto": {
        "type": "object",
        "properties": {
          "route": {
            "type": "number",
            "description": "Private route number; stable per route, names no provider"
          },
          "expectedOutput": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "feeBps": {
            "type": "number"
          },
          "feeAmount": {
            "type": "string",
            "description": "App fee in input asset, already included in the quote"
          },
          "estimatedSeconds": {
            "type": "number",
            "nullable": true
          },
          "estimatedMaxSeconds": {
            "type": "number",
            "nullable": true,
            "description": "Longest the swap may take, when it can run several rounds; estimatedSeconds is the shortest"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "netOutput": {
            "type": "string",
            "description": "Private BTC→BTC route 1 with the admin flag privateNetQuoteEnabled on: the amount sent less the service commission. Display only; network and provider costs come on top, minimumOutput is what is guaranteed."
          },
          "indicative": {
            "type": "boolean",
            "description": "Priced from the commission alone because 1Click could not be asked: expectedOutput is netOutput and minimumOutput is not known yet. The signed quote asks 1Click again."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "route",
          "expectedOutput",
          "minimumOutput",
          "feeBps",
          "feeAmount",
          "estimatedSeconds",
          "warnings",
          "expiresAt"
        ]
      },
      "PrivateAdviceDto": {
        "type": "object",
        "properties": {
          "lossBps": {
            "type": "number",
            "description": "Round-trip loss of the best route, in basis points"
          },
          "toleranceBps": {
            "type": "number",
            "description": "Loss the routing treats as normal for this pair, in basis points"
          },
          "suggestedMinimum": {
            "type": "string",
            "description": "Send amount at which the flat cost falls under the tolerance"
          },
          "asset": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ],
            "description": "Asset `suggestedMinimum` is denominated in"
          }
        },
        "required": [
          "lossBps",
          "toleranceBps",
          "suggestedMinimum",
          "asset"
        ]
      },
      "PrivateOrderInputDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "to": {
            "type": "string",
            "enum": [
              "BTC",
              "ETH",
              "SOL",
              "USDC",
              "USDT",
              "DAI",
              "WBTC_ETH",
              "USDC_ARB",
              "CBBTC_BASE",
              "ARB_ETH",
              "ARB_USDT",
              "BASE_ETH",
              "BASE_USDC",
              "POL_USDC",
              "POL_USDT",
              "BNB",
              "BSC_USDT",
              "BSC_USDC",
              "AVAX",
              "POL",
              "BCH",
              "DOGE",
              "XRP",
              "TRX",
              "TRON_USDT",
              "GRAM",
              "TON_USDT",
              "NEAR",
              "WNEAR",
              "STNEAR",
              "NEAR_USDT",
              "NEAR_USDC",
              "NEAR_BTC",
              "NEAR_ETH",
              "WBTC",
              "ZEC"
            ]
          },
          "sendAmount": {
            "type": "string",
            "example": "100"
          },
          "recipient": {
            "type": "string",
            "description": "Address on the destination chain"
          },
          "refundTo": {
            "type": "string",
            "description": "Refund address on the source chain"
          },
          "slippageBps": {
            "type": "number",
            "minimum": 10,
            "maximum": 300,
            "description": "Price tolerance the trader picked, forwarded to every provider"
          },
          "hubRefundTo": {
            "type": "string",
            "description": "EVM address that receives the intermediate asset back if the confidential hop fails; for the nBTC hub the refund stays in this address's NEAR Intents account"
          }
        },
        "required": [
          "from",
          "to",
          "sendAmount",
          "recipient",
          "refundTo",
          "slippageBps",
          "hubRefundTo"
        ]
      },
      "PrivateQuotesDto": {
        "type": "object",
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrivateQuoteDto"
            }
          },
          "providerErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderProviderErrorDto"
            }
          },
          "advice": {
            "$ref": "#/components/schemas/PrivateAdviceDto"
          }
        },
        "required": [
          "routes",
          "providerErrors"
        ]
      },
      "PrivateQuoteDto": {
        "type": "object",
        "properties": {
          "route": {
            "type": "number",
            "description": "Private route number; stable per route, names no provider"
          },
          "estimatedSeconds": {
            "type": "number",
            "nullable": true
          },
          "estimatedMaxSeconds": {
            "type": "number",
            "nullable": true,
            "description": "Longest the swap may take, when it can run several rounds; estimatedSeconds is the shortest"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quoteToken": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "minimumOutput": {
            "type": "string"
          },
          "feeBps": {
            "type": "number"
          },
          "feeAmount": {
            "type": "string",
            "description": "App fee in input asset, already included in the quote"
          },
          "netOutput": {
            "type": "string",
            "description": "Private BTC→BTC route 1 with the admin flag privateNetQuoteEnabled on: the amount sent less the service commission. Display only; network and provider costs come on top, minimumOutput is what is guaranteed."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "route",
          "estimatedSeconds",
          "warnings",
          "quoteToken",
          "expectedOutput",
          "minimumOutput",
          "feeBps",
          "feeAmount",
          "expiresAt"
        ]
      },
      "MarketPricesResponseDto": {
        "type": "object",
        "properties": {
          "fetchedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this server last fetched upstream, not when the browser asked"
          },
          "cacheTtlMs": {
            "type": "number",
            "description": "How long this snapshot is cached server-side, in ms"
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketPriceDto"
            }
          }
        },
        "required": [
          "fetchedAt",
          "cacheTtlMs",
          "tokens"
        ]
      },
      "MarketPriceDto": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "example": "nep141:eth.bridge.near"
          },
          "blockchain": {
            "type": "string",
            "example": "eth"
          },
          "symbol": {
            "type": "string",
            "example": "ETH"
          },
          "decimals": {
            "type": "number",
            "example": 18
          },
          "price": {
            "type": "number",
            "nullable": true,
            "example": 2507.77,
            "description": "USD, as reported by NEAR 1Click"
          },
          "priceUpdatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "contractAddress": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "assetId",
          "blockchain",
          "symbol",
          "decimals",
          "price",
          "priceUpdatedAt",
          "contractAddress"
        ]
      },
      "MarketSparklinesResponseDto": {
        "type": "object",
        "properties": {
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "cacheTtlMs": {
            "type": "number"
          },
          "sparklines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketSparklineDto"
            }
          }
        },
        "required": [
          "fetchedAt",
          "cacheTtlMs",
          "sparklines"
        ]
      },
      "MarketSparklineDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "BTC"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "changePct": {
            "type": "number",
            "example": -1.24
          }
        },
        "required": [
          "code",
          "points",
          "changePct"
        ]
      },
      "SiteStatusDto": {
        "type": "object",
        "properties": {
          "maintenance": {
            "type": "boolean"
          },
          "maintenanceUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Expected end of the works, UTC."
          }
        },
        "required": [
          "maintenance",
          "maintenanceUntil"
        ]
      }
    }
  }
}
