{
  "openapi": "3.0.0",
  "info": {
    "title": "0x Swap API API",
    "description": "Swap API is a institutional-grade DEX aggregation and smart order routing REST API that allows you to find the best price and easily submit the trade with just a few lines of code.Swap API allows you to add crypto trading in your application with just a single API integration. It finds the best real-time price across 100+ liquidity sources, both public (AMMs) and private (professional market makers), across 17+ supported chains.",
    "version": "1.0.0",
    "contact": {
      "email": "QNSupport@0xproject.com",
      "url": "https://portal.usepylon.com/0x/forms/qn-support-query"
    }
  },
  "servers": [
    {
      "url": "https://{quicknode_endpoint}",
      "description": "Your Quicknode endpoint",
      "variables": {
        "quicknode_endpoint": {
          "default": "your-endpoint.quiknode.pro",
          "description": "Your Quicknode endpoint URL"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "REST API",
      "description": "endpoints for the add-on"
    }
  ],
  "paths": {
    "/addon/1117/swap/permit2/price": {
      "get": {
        "summary": "Get the indicative price for a swap using Permit2 to set allowances",
        "description": "Get the indicative price for a swap using Permit2 to set allowances",
        "externalDocs": {
          "url": "https://0x.org/docs/api#tag/Swap/operation/swap::permit2::getPrice"
        },
        "parameters": [
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "buyToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xdac17f958d2ee523a2206206994597c13d831ec7"
          },
          {
            "name": "sellToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
          },
          {
            "name": "sellAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/1117/swap/permit2/quote": {
      "get": {
        "summary": "Get the firm quote for a swap using Permit2 to set allowances",
        "description": "Get the firm quote for a swap using Permit2 to set allowances",
        "externalDocs": {
          "url": "https://0x.org/docs/api#tag/Swap/operation/swap::permit2::getQuote"
        },
        "parameters": [
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "buyToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xdac17f958d2ee523a2206206994597c13d831ec7"
          },
          {
            "name": "sellToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
          },
          {
            "name": "sellAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          },
          {
            "name": "taker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x70a9f34f9b34c64957b9c401a97bfed35b95049e"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/1117/swap/allowance-holder/price": {
      "get": {
        "summary": "Get the indicative price for a swap using Allowance Holder to set allowances",
        "description": "Get the indicative price for a swap using Allowance Holder to set allowances",
        "externalDocs": {
          "url": "https://0x.org/docs/api#tag/Swap/operation/swap::allowanceHolder::getPrice"
        },
        "parameters": [
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "buyToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xdac17f958d2ee523a2206206994597c13d831ec7"
          },
          {
            "name": "sellToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
          },
          {
            "name": "sellAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/1117/swap/allowance-holder/quote": {
      "get": {
        "summary": "Get the firm quote for a swap using Allowance Holder to set allowances",
        "description": "Get the firm quote for a swap using Allowance Holder to set allowances",
        "externalDocs": {
          "url": "https://0x.org/docs/api#tag/Swap/operation/swap::allowanceHolder::getQuote"
        },
        "parameters": [
          {
            "name": "chainId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "buyToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xdac17f958d2ee523a2206206994597c13d831ec7"
          },
          {
            "name": "sellToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
          },
          {
            "name": "sellAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          },
          {
            "name": "taker",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x70a9f34f9b34c64957b9c401a97bfed35b95049"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    },
    "/addon/1117/swap/chains": {
      "get": {
        "summary": "Get list of supported chains for swap",
        "description": "Get list of supported chains for swap",
        "externalDocs": {
          "url": "https://0x.org/docs/api#tag/Swap/operation/swap::chains"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "tags": [
          "REST API"
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Support Documentation",
    "url": "https://portal.usepylon.com/0x/forms/qn-support-query"
  }
}