{
  "openapi": "3.0.0",
  "info": {
    "title": "OpenOcean V4 Swap API API",
    "description": "OpenOcean V4 Swap API - a solution designed to deliver the fastest, rate-best, and most accurate DeFi trading API on 40+ chains",
    "version": "1.0.0",
    "contact": {
      "email": "contact@openocean.finance",
      "url": "https://t.me/OpenOceanQNSupport"
    }
  },
  "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/807/v4/{chain}/tokenList": {
      "get": {
        "summary": "Returns a list of supported tokens on the specified chain, including token addresses, symbols, decimals, and other metadata.",
        "description": "Returns a list of supported tokens on the specified chain, including token addresses, symbols, decimals, and other metadata.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#get-tokenlist"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          }
        ],
        "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/807/v4/{chain}/gasPrice": {
      "get": {
        "summary": "Returns the current gas price on the specified chain, including recommended standard, fast, and instant gas price values.",
        "description": "Returns the current gas price on the specified chain, including recommended standard, fast, and instant gas price values.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#get-gasprice"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          }
        ],
        "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/807/v4/{chain}/getTransaction": {
      "get": {
        "summary": "Returns the status and details of a transaction on the specified chain using the provided transaction hash.",
        "description": "Returns the status and details of a transaction on the specified chain using the provided transaction hash.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#get-transaction"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "hash",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x756b98a89714be5c640ea9922aba12e0c94bc30e5a17e111d1aa40373cc24782"
          }
        ],
        "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/807/v4/{chain}/decodeInputData": {
      "get": {
        "summary": "Decodes the provided hex-encoded transaction input data, returning the parsed token addresses, amounts, recipient address, and other transaction parameters in a human-readable format.",
        "description": "Decodes the provided hex-encoded transaction input data, returning the parsed token addresses, amounts, recipient address, and other transaction parameters in a human-readable format.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#decodeinputdata"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "data",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x90411a3200000000000000000000000055877bd7f2ee37bde55ca4b271a3631f3a7ef121000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d00000000000000000000000055877bd7f2ee37bde55ca4b271a3631f3a7ef1210000000000000000000000002ff855378cd29f120cdf9d675e959cb5422ec5f20000000000000000000000000000000000000000000000004563918244f4000000000000000000000000000000000000000000000000000044a6195911e4446f00000000000000000000000000000000000000000000000045579d7b95f3809a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000095db36aa7787e8c513e77988b4fa176156767ffb00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e5b07cdb0000000000000000000000002c3c320d49019d4f9a92352e947c7e5acfe47d6800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000004563918244f4000000000000000000000000000055877bd7f2ee37bde55ca4b271a3631f3a7ef12100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e55d398326f99059ff775485246999027b31979550000648ac76a51cc950d9822d68b83fe1ad97b32cd580d00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000648a6a1e850000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d000000000000000000000000922164bbbd36acf9e854acbbf32facc949fcaeef00000000000000000000000000000000000000000000000045579d7b95f3809a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a49f8654220000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d00000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000064d1660f990000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d0000000000000000000000002ff855378cd29f120cdf9d675e959cb5422ec5f200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "swap"
          }
        ],
        "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/807/v4/{chain}/quote": {
      "get": {
        "summary": "Returns a real-time quote, including the estimated output amount, price impact, and gas cost.",
        "description": "Returns a real-time quote, including the estimated output amount, price impact, and gas cost.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#quote"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "inTokenAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x55d398326f99059ff775485246999027b3197955"
          },
          {
            "name": "outTokenAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"
          },
          {
            "name": "amountDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "5000000000000000000"
          },
          {
            "name": "gasPriceDecimals",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1000000000"
          }
        ],
        "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/807/v4/{chain}/swap": {
      "get": {
        "summary": "Returns a swap transaction payload, including the optimized route, expected output, and transaction data required to execute the swap on-chain.",
        "description": "Returns a swap transaction payload, including the optimized route, expected output, and transaction data required to execute the swap on-chain.",
        "externalDocs": {
          "url": "https://apis.openocean.finance/developer/apis/swap-api/api-v4#swapquote"
        },
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Path parameter"
          },
          {
            "name": "inTokenAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x55d398326f99059ff775485246999027b3197955"
          },
          {
            "name": "outTokenAddress",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "5"
          },
          {
            "name": "gasPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0x2FF855378Cd29f120CDF9d675E959cb5422ec5f2"
          },
          {
            "name": "referrer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0xD4eb4cbB1ECbf96a1F0C67D958Ff6fBbB7B037BB"
          }
        ],
        "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://t.me/OpenOceanQNSupport"
  }
}