Skip to content
onelayer.
All tools

Tool detail

3Route

Prices a token swap for one amount on a given chain - expected input, output and gas - without constructing an executable transaction.

Categories: Defi

Use when

  • get a swap price quote for a token pair
  • price an exact-output swap amount
  • quote a swap against a specific past block

Not for

  • not an executable transaction - informational quote only, can change with liquidity
  • not for pricing several amounts or pairs at once - use the batch quote operation

Inputs

GET path param {chainId}; query: src, dst, amount (required, patterns); blockNumber, fee, gasPrice, timestamp and other flags (optional)

Admitted input schema

{
  "type": "object",
  "properties": {
    "amount": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "pattern": "^[0-9]+$",
      "description": "Positive amount in smallest units, as an integer string.",
      "examples": [
        "1000000000000000000"
      ]
    },
    "blockNumber": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "dst": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "description": "Address of the token being bought; take one from the token-list operation for the selected chain, or use the zero address, or the case-insensitive sentinel 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, for the chain's native asset.",
      "examples": [
        "0x5fc5360d0400a0fd4f2af552add042d716f1d168"
      ]
    },
    "excludedProtocols": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096
    },
    "fee": {
      "type": "number",
      "minimum": 0,
      "maximum": 3,
      "default": 0
    },
    "gasPrice": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "pattern": "^[0-9]+$",
      "examples": [
        "1000000000"
      ]
    },
    "includeBlockNumber": {
      "type": "boolean",
      "default": false
    },
    "includeProtocols": {
      "type": "boolean",
      "default": false
    },
    "includeTokensInfo": {
      "type": "boolean",
      "default": false
    },
    "isExactOutput": {
      "type": "boolean",
      "default": false
    },
    "protocols": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096
    },
    "src": {
      "type": "string",
      "minLength": 0,
      "maxLength": 4096,
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "description": "Address of the token being sold; use the zero address, or the case-insensitive sentinel 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, for the chain's native asset",
      "examples": [
        "0x0000000000000000000000000000000000000000"
      ]
    },
    "timestamp": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "src",
    "dst",
    "amount"
  ],
  "additionalProperties": false
}

Endpoint

Method
GET
URL
https://api.3route.io/v1/pro/{chainId}/quote

Payment

Protocol
x402
Listed price
0.001 USDC per call on Base
Payment method
exact
Network
eip155:8453
Asset
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Listed terms are catalog metadata. The caller supplies inputs and calls the tool outside Onelayer. If payment is required, the caller uses a compatible wallet to pay.

Source

Record
GET https://api.3route.io/v1/pro/:chainId/quote
Retrieved
2026-09-30T20:37:07.382Z
Catalog file SHA-256
6837ccddf886f0007cf3727ea9d27faaa5047b51b4f425345c554ce1c271a524
Catalog built
2026-09-30T22:31:58.034Z