{
  "openapi": "3.0.1",
  "info": {
    "title": "DuneAPI",
    "description": "Dune API",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.dune.com/api"
    }
  ],
  "paths": {
    "/v1/dex/pairs/{chain}": {
      "get": {
        "summary": "DEX Pair Stats",
        "description": "Given a blockchain, retrieves essential metadata and statistical data for token pairs.\nMetadata encompasses all pool addresses associated with the token pair, the DEXs or\nprojects where they are available, and their token addresses. Key statistics provided\ninclude one-day, seven-day, and thirty-day trading volumes, USD liquidity,\nand the seven-day volume-to-liquidity ratio.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "path",
            "description": "The blockchain where the token pair is traded",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eigenlayer/avs-metadata": {
      "get": {
        "summary": "AVS Metadata",
        "description": "Get metadata for all registered AVSs on Eigenlayer,\nincluding `avs_name`, `avs_contract_address`, `website`, `twitter`, `logo`, `description`",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eigenlayer/avs-stats": {
      "get": {
        "summary": "AVS Metrics",
        "description": "Get metrics for AVSs, including `num_operators`, `total_TVL`, `num_stakers`,\nand TVL for each strategy like cbETH, stETH etc.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eigenlayer/operator-metadata": {
      "get": {
        "summary": "Operator Metadata",
        "description": "Get metadata for all registered operators on Eigenlayer, including\n`operator_name`, `operator_contract_address`, `website`, `twitter`, `logo`, `description`",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eigenlayer/operator-stats": {
      "get": {
        "summary": "Operator Metrics",
        "description": "Get metrics for operators, including `operator_name`, `operator_contract_address`,\n`total_TVL`, `num_stakers`, and TVL for each strategy like cbETH, stETH etc.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eigenlayer/operator-to-avs-mapping": {
      "get": {
        "summary": "Operator <> AVS Mapping",
        "description": "Get a mapping of which operator is registered on which AVS, including the time of registration",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/endpoints/{handle}/{endpoint_slug}/results": {
      "get": {
        "summary": "Custom Endpoints",
        "description": "Create custom API endpoints from Dune queries",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "handle",
            "in": "path",
            "description": "Your user or team handle",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_slug",
            "in": "path",
            "description": "The name of the endpoint as slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/execution/{execution_id}/cancel": {
      "post": {
        "summary": "Cancel a triggered execution request given the execution ID",
        "description": "Cancel a triggered execution request given the execution ID",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "path",
            "description": "The unique identifier of the execution",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.CancelQueryExecutionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/execution/{execution_id}/results": {
      "get": {
        "summary": "Given an execution ID, returns result of a an execution request",
        "description": "Given an execution ID, returns result of a an execution request",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "path",
            "description": "Execution ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/execution/{execution_id}/results/csv": {
      "get": {
        "summary": "Get results of a query execution in CSV format",
        "description": "Given a query ID, returns the latest executed result of a query on Dune in CSV format",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "path",
            "description": "Execution ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/execution/{execution_id}/status": {
      "get": {
        "summary": "Check the status of an execution request",
        "description": "Check the status of an execution request",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "execution_id",
            "in": "path",
            "description": "Execution ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.GetExecutionStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/farcaster/trends/channels": {
      "get": {
        "summary": "Farcaster Channels",
        "description": "Get trending farcaster channels that have had casts in the last 14 days",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/farcaster/trends/memecoins": {
      "get": {
        "summary": "Farcaster Memecoins",
        "description": "Get trending farcaster memecoins that have been casted",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/farcaster/trends/users": {
      "get": {
        "summary": "Farcaster Users",
        "description": "Get trending farcaster users who have casted in the last 14 days",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/marketshare/{market}/{chain}": {
      "get": {
        "summary": "Marketplace Market Share",
        "description": "Given a chain, get the market share in terms of USD transacting\nvolume and number of trades for either `dex` or `nft` sector.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "market",
            "in": "path",
            "description": "Sector of the marketshare, either 'dex' or 'nft'",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "path",
            "description": "Chain name (use Dune namespace, e.g. ethereum, solana, bnb, polygon, etc)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/materialized-views": {
      "get": {
        "summary": "This lists all materialized view owned by the account tied to the API key",
        "description": "This lists all materialized view owned by the account tied to the API key",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of materialized views to return on a page. Default and max 10000",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset used for pagination. Use the value provided on a previous response under next_offset",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/matviews.MatviewsListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "This upserts (create or replace) a materialized view from an existing query",
        "description": "This upserts a materialized view from an existing query. If the materialized view with the given name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Matview Name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "MatviewsUpsertRequest",
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/matviews.MatviewsUpsertRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/matviews.MatviewsUpsertResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/v1/materialized-views/{name}": {
      "get": {
        "summary": "This fetches a materialized view given a name",
        "description": "This fetches a materialized view given a name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Matview Name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/matviews.MatviewsGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "This deletes a materialized view given a full name",
        "description": "This deletes a materialized view given a full name",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Matview Name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/matviews.MatviewsDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/materialized-views/{name}/refresh": {
      "post": {
        "summary": "This refreshes a materialized view",
        "description": "This refreshes a materialized view",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Matview Name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "MatviewsRefreshRequest",
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/matviews.MatviewsRefreshRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/matviews.MatviewsRefreshResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/v1/points/linea/lxp": {
      "get": {
        "summary": "Linea LXP",
        "description": "Get Linea LXP balance for wallet, along with Farcaster social stats and onchain behavior metrics",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query": {
      "post": {
        "summary": "Create and save a query on Dune",
        "description": "This API allows for anyone to create a query.\nThe owner of the query will be under the context of the API key.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "CreateQueryRequest",
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/models.CreateQueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.CreateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/v1/query/{queryId}": {
      "get": {
        "summary": "Returns the details of a query on Dune",
        "description": "This API allows for anyone to read the sql text,\nparameters, name, tags, and state of a query.\nFor private queries, only the API key generated\nunder the context of the owner of that query will work.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.GetQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update the details of a query on Dune",
        "description": "This API allows for anyone to update the sql text,\nparameters, name, tags, and state of a query. Only the API key\ngenerated under the context of the owner of that query will work.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.UpdateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{queryId}/archive": {
      "post": {
        "summary": "Archive Query on Dune",
        "description": "This API allows for anyone to archive a query. Only the API key\ngenerated under the context of the owner of that query will work.\nThis does not delete the query, but will make\nit uneditable/unexecutable",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.UpdateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{queryId}/private": {
      "post": {
        "summary": "Private Query on Dune",
        "description": "This API allows for anyone to private a query. Only the API key\ngenerated under the context of the owner of that query will work.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.UpdateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{queryId}/unarchive": {
      "post": {
        "summary": "Unarchive Query on Dune",
        "description": "This API allows for anyone to unarchive a query. Only the API key\ngenerated under the context of the owner of that query will work.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.UpdateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{queryId}/unprivate": {
      "post": {
        "summary": "Unprivate a query on Dune",
        "description": "This API allows for anyone to unprivate a query. Only the API key\ngenerated under the context of the owner of that query will work.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.UpdateQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{query_id}/execute": {
      "post": {
        "summary": "Execute, or run a query for the specified query ID",
        "description": "Execute, or run a query for the specified query ID",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_id",
            "in": "path",
            "description": "Unique identifier of the query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "performance",
            "in": "query",
            "description": "The performance engine tier the execution will be run on. Can be either `medium` or `large`. Credits are consumed based on actual compute resources used. Medium is the default, large provides more resources for complex queries.",
            "schema": {
              "type": "string",
              "enum": [
                "medium",
                "large"
              ]
            }
          },
          {
            "name": "query_parameters",
            "in": "query",
            "description": "SQL Query parameters in json key-value pairs. Each parameter is to be provided in key-value pairs. This enables you to execute a parameterized query with the provided values for your parameter keys. Partial submission of parameters is allowed. For example, if the query expects three parameters and you only pass in two, the third one will automatically use its default value as defined in the Query Parameter Editor page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ExecuteQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{query_id}/results": {
      "get": {
        "summary": "Get Latest Query Result",
        "description": "Given a query ID, returns the latest executed result of a query on Dune in JSON format",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_id",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/query/{query_id}/results/csv": {
      "get": {
        "summary": "Given a query ID, returns the latest executed result of a query on Dune as CSV",
        "description": "Given a query ID, returns the latest executed result of a query on Dune as CSV",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_id",
            "in": "path",
            "description": "Query ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sql/execute": {
      "post": {
        "summary": "Execute raw SQL query",
        "description": "Execute raw SQL query without requiring a stored query ID",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "SQL query and performance configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/models.ExecuteSQLRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ExecuteQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "sql"
      }
    },
    "/v1/table/upload/csv": {
      "post": {
        "summary": "Upload CSV",
        "description": "This API allows for anyone to upload a CSV as a table in Dune. The size limit\nper upload is currently 200MB. Your storage is limited by plan, 1MB on free,\n15GB on plus, and 50GB on premium.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "payload",
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/models.CSVUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.CSVUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "payload"
      }
    },
    "/v1/tables": {
      "get": {
        "summary": "List all tables owned by the account tied to the API key",
        "description": "List all tables owned by the account tied to the API key",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of tables to return on a page. Default: 50, max: 10000",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset used for pagination. Negative values are treated as 0",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tables/create": {
      "post": {
        "summary": "TableCreate is the /v1/table endpoint which creates an empty table.",
        "description": "Execute, or run a query for the specified query ID",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_private",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "namespace",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table_name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableCreateResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tables/{namespace}/{table_name}": {
      "post": {
        "summary": "Insert the data in a file into a table.",
        "description": "TableInsert is the /v1/table/:namespace/:table_name/insert endpoint which insert into a table.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "path",
            "description": "The namespace of the table to delete",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table_name",
            "in": "path",
            "description": "The table name of the table to delete",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tableName",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableDeleteResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableDeleteResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a Dune table with the specified name and namespace.",
        "description": "Delete a Dune table with the specified name and namespace.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "path",
            "description": "The namespace of the table to delete",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table_name",
            "in": "path",
            "description": "The table name of the table to delete",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableDeleteResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableDeleteResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tables/{namespace}/{table_name}/clear": {
      "post": {
        "summary": "Clear data in a table.",
        "description": "Clear data in a table. It removes all the data in the specified table, but does not delete the table.",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Alternative to using the X-Dune-Api-Key header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "path",
            "description": "The namespace of the table to clear",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table_name",
            "in": "path",
            "description": "The table name of the table to clear",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tableName",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.TableClearResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trends/evm/contracts/{chain}": {
      "get": {
        "summary": "Trending Contracts",
        "description": "Get trending contracts deployed on any EVM chain based on activity in last 30 days",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "path",
            "description": "The blockchain where the token pair is traded",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allow_partial_results",
            "in": "query",
            "description": "This enables returning a query result that was too large and only a partial result is\navailable. By default allow_partial_results is set to false and a failed state is returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "description": "Specifies a comma-separated list of column names to return. If omitted, all columns are included.\nTip: use this to limit the result to specific columns, reducing datapoints cost of the call.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "description": "Expression to filter out rows from the results to return. This expression is similar to\na SQL WHERE clause. More details about it in the Filtering section of the doc.\nThis parameter is incompatible with sample_count.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ignore_max_datapoints_per_request",
            "in": "query",
            "description": "There is a default 250,000 datapoints limit to make sure you don't accidentally spend all\nyour credits in one call. To ignore the max limit, you can add\nignore_max_datapoints_per_request=true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit number of rows to return. This together with 'offset' allows easy pagination through\nresults in an incremental and efficient way. This parameter is incompatible\nwith sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset row number to start (inclusive, first row means offset=0) returning results\nfrom. This together with 'limit' allows easy pagination through results in an\nincremental and efficient way. This parameter is incompatible with sampling (sample_count).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "queryID",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sample_count",
            "in": "query",
            "description": "Number of rows to return from the result by sampling the data. This is useful when you\nwant to get a uniform sample instead of the entire result. If the result has less\nthan the sample count, the entire result is returned. Note that this will return a\nrandomized sample, so not every call will return the same result. This parameter is\nincompatible with `offset`, `limit`, and `filters` parameters.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Expression to define the order in which the results should be returned. This expression\nis similar to a SQL ORDER BY clause. More details about it in the Sorting section of the doc.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.ReadExecutionResultResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error402"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error404"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "post": {
        "summary": "Get Usage Data",
        "description": "Get usage data for the authenticated customer including private queries, dashboards,\nbytes used/allowed, and billing periods",
        "parameters": [
          {
            "name": "X-Dune-Api-Key",
            "in": "header",
            "description": "API Key for the service",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "API Key, alternative to using the HTTP header X-Dune-Api-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Request payload with optional start_date and end_date",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/models.GetUsageRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.GetUsageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error403"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/models.Error500"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "payload"
      }
    }
  },
  "components": {
    "schemas": {
      "matviews.MatviewListElement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "is_private": {
            "type": "boolean"
          },
          "query_id": {
            "type": "integer"
          },
          "sql_id": {
            "type": "string"
          },
          "table_size_bytes": {
            "type": "integer"
          }
        }
      },
      "matviews.MatviewsDeleteResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "matviews.MatviewsGetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "is_private": {
            "type": "boolean"
          },
          "last_execution_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "owner_team_id": {
            "type": "integer"
          },
          "owner_user_id": {
            "type": "integer"
          },
          "query_id": {
            "type": "integer"
          },
          "sql_id": {
            "type": "string"
          },
          "table_size_bytes": {
            "type": "integer"
          }
        }
      },
      "matviews.MatviewsListResponse": {
        "type": "object",
        "properties": {
          "materialized_views": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/matviews.MatviewListElement"
            }
          },
          "next_offset": {
            "type": "integer"
          }
        }
      },
      "matviews.MatviewsRefreshRequest": {
        "type": "object",
        "properties": {
          "performance": {
            "type": "string",
            "description": "Performance level of the refresh\nAvailable options: `medium`, `large`, defaults to `medium`"
          }
        }
      },
      "matviews.MatviewsRefreshResponse": {
        "type": "object",
        "properties": {
          "execution_id": {
            "type": "string",
            "description": "Unique identifier for the execution triggered to refresh the materialized view",
            "example": "01HZ065JVE23C23FM2HKWQP2RT"
          },
          "sql_id": {
            "type": "string",
            "description": "Unique identifier for the materialized view",
            "example": "dune.dune.result_erc_20_token_summary"
          }
        }
      },
      "matviews.MatviewsUpsertRequest": {
        "type": "object",
        "properties": {
          "cron_expression": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "is_private": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "performance": {
            "type": "string",
            "description": "Performance level of the refresh. Available options: `medium`, `large`"
          },
          "query_id": {
            "type": "integer"
          }
        }
      },
      "matviews.MatviewsUpsertResponse": {
        "type": "object",
        "properties": {
          "execution_id": {
            "type": "string",
            "description": "Unique identifier for the execution triggered to refresh the materialized view",
            "example": "01HZ065JVE23C23FM2HKWQP2RT"
          },
          "name": {
            "type": "string",
            "description": "Unique identifier for the materialized view",
            "example": "dune.dune.result_erc_20_token_summary"
          }
        }
      },
      "models.BillingPeriod": {
        "type": "object",
        "properties": {
          "credits_included": {
            "type": "number",
            "description": "Float value"
          },
          "credits_used": {
            "type": "number",
            "description": "Float value"
          },
          "end_date": {
            "type": "string",
            "description": "YYYY-MM-DD format"
          },
          "start_date": {
            "type": "string",
            "description": "YYYY-MM-DD format"
          }
        }
      },
      "models.CSVUploadRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "description": "The data to be uploaded in CSV format."
          },
          "description": {
            "type": "string",
            "description": "Description of the upload."
          },
          "is_private": {
            "type": "boolean",
            "description": "Indicates if the upload is private."
          },
          "table_name": {
            "type": "string",
            "description": "The name of the table to store the data."
          }
        }
      },
      "models.CSVUploadResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicator if the request was successful"
          },
          "table_name": {
            "type": "string",
            "description": "The name of the table that was created",
            "example": "ten_year_us_interest_rates"
          }
        }
      },
      "models.CancelQueryExecutionResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        }
      },
      "models.CreateQueryRequest": {
        "required": [
          "name",
          "query_sql"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "The description of the created query."
          },
          "is_private": {
            "type": "boolean",
            "description": "Indicates if the query is private, meaning that only the\nteam or, in case of personal queries, the user that created it can see it.",
            "example": true
          },
          "name": {
            "type": "string",
            "description": "The name of the createc query."
          },
          "parameters": {
            "type": "array",
            "description": "The parameters that the SQL query accepts.",
            "items": {
              "$ref": "#/components/schemas/models.Parameter"
            }
          },
          "query_sql": {
            "type": "string",
            "description": "The SQL of the query."
          },
          "tags": {
            "type": "array",
            "description": "The tags of the query.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "models.CreateQueryResponse": {
        "type": "object",
        "properties": {
          "query_id": {
            "type": "integer",
            "description": "The Unique ID of the created query",
            "example": 1
          }
        }
      },
      "models.EnumFromResults": {
        "type": "object",
        "properties": {
          "columnName": {
            "type": "string"
          },
          "queryId": {
            "type": "integer"
          }
        }
      },
      "models.Error400": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Bad Request"
          }
        }
      },
      "models.Error401": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Invalid API Key"
          }
        }
      },
      "models.Error402": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "This API request would exceed your configured limits per billing cycle."
          }
        }
      },
      "models.Error403": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Not allowed to execute query. Query is archived, unsaved or not enough permissions"
          }
        }
      },
      "models.Error404": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Object not found"
          }
        }
      },
      "models.Error500": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Internal error"
          }
        }
      },
      "models.ExecuteQueryResponse": {
        "type": "object",
        "properties": {
          "execution_id": {
            "type": "string",
            "example": "01HKZJ2683PHF9Q9PHHQ8FW4Q1"
          },
          "state": {
            "type": "string",
            "example": "QUERY_STATE_PENDING"
          }
        }
      },
      "models.ExecuteSQLRequest": {
        "type": "object",
        "required": [
          "sql"
        ],
        "properties": {
          "sql": {
            "type": "string",
            "description": "The SQL query to execute",
            "example": "SELECT * FROM dex.trades WHERE block_time > now() - interval '1' day LIMIT 10"
          },
          "performance": {
            "type": "string",
            "description": "The performance engine tier the execution will be run on. Can be either `medium` or `large`. Medium consumes 10 credits, and large consumes 20 credits, per run. Default is `medium`.",
            "enum": [
              "medium",
              "large"
            ],
            "default": "medium"
          }
        }
      },
      "models.ExecutionResultMetadata": {
        "type": "object",
        "properties": {
          "column_names": {
            "type": "array",
            "description": "Names of the columns in the result set.",
            "example": [
              "Rank",
              "Project",
              "Volume"
            ],
            "items": {
              "type": "string"
            }
          },
          "column_types": {
            "type": "array",
            "description": "Types of the columns in the result set.",
            "example": [
              "double",
              "varchar",
              "bigint"
            ],
            "items": {
              "type": "string"
            }
          },
          "datapoint_count": {
            "type": "integer",
            "description": "Results cell count is used for billing/pricing plans\nhere we expose the these values to the user, so that they can track their costs",
            "example": 1000
          },
          "execution_time_millis": {
            "type": "integer",
            "description": "Time in milliseconds that the query took to execute.",
            "example": 1000
          },
          "pending_time_millis": {
            "type": "integer",
            "description": "Time in milliseconds that the query was pending before execution.",
            "example": 1000
          },
          "result_set_bytes": {
            "type": "integer",
            "description": "ResultSetBytes represents the raw data bytes returned by the SQL execution engine, it includes:\n + total nr of bytes used on 1 line with all the column names (the header of the result set)\n + total nr of bytes for all the row values (the result set of rows)\n\nit doesn't include overheads such as the presence of column names for every row in the JSON result type.\nit also doesn't include opmitizations such as compression",
            "example": 1000
          },
          "row_count": {
            "type": "integer",
            "description": "Number of rows in the result set for the current page of results.",
            "example": 10
          },
          "total_result_set_bytes": {
            "type": "integer",
            "description": "Total number of bytes in the result set. This doesn't include the json representation overhead.",
            "example": 10000
          },
          "total_row_count": {
            "type": "integer",
            "description": "Number of rows in the result set for the entire result set.",
            "example": 1000
          }
        }
      },
      "models.GetExecutionStatusResponse": {
        "type": "object",
        "properties": {
          "cancelled_at": {
            "type": "string",
            "description": "Timestamp of when the query execution was cancelled, if applicable.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "error": {
            "type": "object",
            "description": "In case the execution had an error, this object will contain the error details",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.QueryResultError"
              }
            ]
          },
          "execution_cost_credits": {
            "type": "number",
            "description": "Cost of the execution"
          },
          "execution_ended_at": {
            "type": "string",
            "description": "Timestamp of when the query execution ended.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "execution_id": {
            "type": "string",
            "description": "Unique identifier for the execution of the query and corresponding result.",
            "example": "01HKZJ2683PHF9Q9PHHQ8FW4Q1"
          },
          "execution_started_at": {
            "type": "string",
            "description": "Timestamp of when the query execution started.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "expires_at": {
            "type": "string",
            "description": "Timestamp of when the query result expires.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "is_execution_finished": {
            "type": "boolean",
            "description": "Whether the state of the query execution is terminal. This can be used for polling purposes.",
            "example": true
          },
          "max_inflight_interactive_executions": {
            "type": "integer",
            "description": "Number of interactive executions this customer can have running in parallel",
            "example": 3
          },
          "max_inflight_interactive_reached": {
            "type": "integer",
            "description": "Total number of interactive executions this user has submitted which are still in progress\nonly set to > 0 if the user has reached the limit of concurrent interactive executions",
            "example": 5
          },
          "query_id": {
            "type": "integer",
            "description": "Unique identifier of the query.",
            "example": 1234
          },
          "queue_position": {
            "type": "integer",
            "example": 1
          },
          "result_metadata": {
            "type": "object",
            "description": "Metadata about the execution of the query, including details like column names, row counts, and execution times.",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.ExecutionResultMetadata"
              }
            ]
          },
          "state": {
            "type": "string",
            "description": "The state of the query execution.",
            "example": "QUERY_STATE_COMPLETED"
          },
          "submitted_at": {
            "type": "string",
            "description": "Timestamp of when the query was submitted.",
            "example": "2024-12-20T11:04:18.724658237Z"
          }
        }
      },
      "models.GetQueryResponse": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "The description of the query",
            "example": "Calculate the average dex volume"
          },
          "is_archived": {
            "type": "boolean",
            "description": "Indicates if the query is archived.\nArchived queries cannot be executed.",
            "example": false
          },
          "is_private": {
            "type": "boolean",
            "description": "Indicates if the query is private.",
            "example": true
          },
          "is_unsaved": {
            "type": "boolean",
            "description": "Indicates if the query is unsaved.",
            "example": false
          },
          "name": {
            "type": "string",
            "description": "The name of the query",
            "example": "My Query"
          },
          "owner": {
            "type": "string",
            "description": "username or team handle",
            "example": "dune"
          },
          "parameters": {
            "type": "array",
            "description": "The parameters that can modify the execution of the sql.",
            "items": {
              "$ref": "#/components/schemas/models.Parameter"
            }
          },
          "query_engine": {
            "type": "string",
            "description": "The query engine used to execute the query.",
            "example": "medium"
          },
          "query_id": {
            "type": "integer",
            "description": "The unique ID of the query",
            "example": 123
          },
          "query_sql": {
            "type": "string",
            "description": "The SQL query text.",
            "example": "SELECT * FROM dex.trades"
          },
          "tags": {
            "type": "array",
            "description": "Tags associated with the query.",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "integer",
            "description": "Version of the query, gets incremented every time the query is updated.",
            "example": 1
          }
        }
      },
      "models.GetUsageRequest": {
        "type": "object",
        "properties": {
          "end_date": {
            "type": "string",
            "description": "Optional field in YYYY-MM-DD format"
          },
          "start_date": {
            "type": "string",
            "description": "Optional field in YYYY-MM-DD format"
          }
        }
      },
      "models.GetUsageResponse": {
        "type": "object",
        "properties": {
          "billing_periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/models.BillingPeriod"
            }
          },
          "bytes_allowed": {
            "type": "integer"
          },
          "bytes_used": {
            "type": "integer"
          },
          "private_dashboards": {
            "type": "integer"
          },
          "private_queries": {
            "type": "integer"
          }
        }
      },
      "models.Parameter": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "enumFromResults": {
            "$ref": "#/components/schemas/models.EnumFromResults"
          },
          "enumOptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isFreeformAllowed": {
            "type": "boolean"
          },
          "isMultiselect": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "models.QueryResultData": {
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "Metadata about the execution of the query, including details like column names,\nrow counts, and execution times.",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.ExecutionResultMetadata"
              }
            ]
          },
          "rows": {
            "type": "array",
            "description": "A list of rows. A row is dictionary of key-value pairs returned by the query,\neach pair corresponding to a column",
            "items": {
              "$ref": "#/components/schemas/models.Row"
            }
          },
          "update_type": {
            "type": "string",
            "description": "The type of update operation from Trino (e.g., \"SET SESSION\")"
          }
        }
      },
      "models.QueryResultError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "A descriptive message about the error.",
            "example": "Error: Line 1:1: mismatched input 'selecdt'"
          },
          "metadata": {
            "type": "object",
            "description": "Metadata about the syntax error that occurred, if applicable.",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.SyntaxErrorMetadata"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of error that occurred.",
            "example": "syntax_error"
          }
        }
      },
      "models.ReadExecutionResultResponse": {
        "type": "object",
        "properties": {
          "cancelled_at": {
            "type": "string",
            "description": "Timestamp of when the query execution was cancelled, if applicable.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "error": {
            "type": "object",
            "description": "In case the execution had an error, this object will contain the error details",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.QueryResultError"
              }
            ]
          },
          "execution_ended_at": {
            "type": "string",
            "description": "Timestamp of when the query execution ended.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "execution_id": {
            "type": "string",
            "description": "Unique identifier for the execution of the query.",
            "example": "01HKZJ2683PHF9Q9PHHQ8FW4Q1"
          },
          "execution_started_at": {
            "type": "string",
            "description": "Timestamp of when the query execution started.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "expires_at": {
            "type": "string",
            "description": "Timestamp of when the query result expires.",
            "example": "2024-12-20T11:04:18.724658237Z"
          },
          "is_execution_finished": {
            "type": "boolean",
            "description": "Whether the state of the query execution is terminal. This can be used for polling purposes.",
            "example": true
          },
          "next_offset": {
            "type": "integer",
            "description": "Offset that can be used to retrieve the next page of results.",
            "example": 100
          },
          "next_uri": {
            "type": "string",
            "description": "URI that can be used to fetch the next page of results.",
            "example": "https://api.dune.com/api/v1/execution/01HKZJ2683PHF9Q9PHHQ8FW4Q1/results?offset=100&limit=100"
          },
          "query_id": {
            "type": "integer",
            "description": "Unique identifier of the query.",
            "example": 1234
          },
          "result": {
            "type": "object",
            "description": "The object containing the results and metadata of the query execution",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.QueryResultData"
              }
            ]
          },
          "state": {
            "type": "string",
            "description": "The state of the query execution.",
            "example": "QUERY_STATE_COMPLETED"
          },
          "submitted_at": {
            "type": "string",
            "description": "Timestamp of when the query was submitted.",
            "example": "2024-12-20T11:04:18.724658237Z"
          }
        }
      },
      "models.Row": {
        "type": "object",
        "additionalProperties": {
          "type": "object"
        }
      },
      "models.SyntaxErrorMetadata": {
        "type": "object",
        "properties": {
          "column": {
            "type": "integer",
            "description": "The column number at which the syntax error occurred.",
            "example": 73
          },
          "line": {
            "type": "integer",
            "description": "The line number at which the syntax error occurred in the query.",
            "example": 10
          }
        }
      },
      "models.TableClearResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "models.TableColumn": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "nullable": {
            "type": "boolean"
          },
          "type": {
            "type": "array",
            "description": "ColumnType is a json.RawMessage so that we can support objects like Array and Struct.",
            "items": {
              "type": "integer"
            }
          }
        }
      },
      "models.TableColumnInfo": {
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional column metadata"
          },
          "name": {
            "type": "string",
            "description": "Column name"
          },
          "nullable": {
            "type": "boolean",
            "description": "Whether the column can contain null values"
          },
          "type": {
            "type": "string",
            "description": "Column data type"
          }
        }
      },
      "models.TableCreateResponse": {
        "type": "object",
        "properties": {
          "already_existed": {
            "type": "boolean"
          },
          "example_query": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "namespace": {
            "type": "string"
          },
          "table_name": {
            "type": "string"
          }
        }
      },
      "models.TableDeleteResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "models.TableListElement": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "description": "List of table columns",
            "items": {
              "$ref": "#/components/schemas/models.TableColumnInfo"
            }
          },
          "created_at": {
            "type": "string",
            "description": "ISO 8601 timestamp of table creation"
          },
          "full_name": {
            "type": "string",
            "description": "Fully qualified table name (catalog.schema.table)"
          },
          "is_private": {
            "type": "boolean",
            "description": "Whether the table is private"
          },
          "owner": {
            "type": "object",
            "description": "Owner information",
            "allOf": [
              {
                "$ref": "#/components/schemas/models.TableOwner"
              }
            ]
          },
          "purged_at": {
            "type": "string",
            "description": "ISO 8601 timestamp of when table was purged"
          },
          "table_size_bytes": {
            "type": "string",
            "description": "Size of the table in bytes"
          },
          "updated_at": {
            "type": "string",
            "description": "ISO 8601 timestamp of last update"
          }
        }
      },
      "models.TableListResponse": {
        "type": "object",
        "properties": {
          "next_offset": {
            "type": "integer",
            "description": "Offset for next page of results"
          },
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/models.TableListElement"
            }
          }
        }
      },
      "models.TableOwner": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string",
            "description": "User or team identifier"
          },
          "type": {
            "type": "string",
            "description": "Type of entity that created the table"
          }
        }
      },
      "models.UpdateQueryResponse": {
        "type": "object",
        "properties": {
          "query_id": {
            "type": "integer",
            "description": "The unique ID of the query that was updated"
          }
        }
      }
    }
  },
  "x-original-swagger-version": "2.0"
}