{
 "openapi": "3.1.0",
 "info": {
  "title": "GasNow API",
  "version": "1.0.0",
  "description": "Live crypto fee data from GasNow (gasnow.tools): gas prices, Bitcoin fees, the USD cost to send USDT and other coins on 12 networks, exchange withdrawal fees and bridge costs. Free, no key, 30 requests per minute per IP. Credit \"GasNow (gasnow.tools)\".",
  "contact": {
   "url": "https://gasnow.tools/contact.html"
  }
 },
 "servers": [
  {
   "url": "https://mddqwppgucgzefzddajy.supabase.co/functions/v1"
  }
 ],
 "paths": {
  "/gas-api/v1/gas": {
   "get": {
    "operationId": "getGasPrice",
    "summary": "Live gas price on an EVM chain (gwei)",
    "parameters": [
     {
      "name": "chain",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism",
        "polygon",
        "bnb",
        "avalanche"
       ],
       "default": "ethereum"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Gas tiers",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/gas-api/v1/bitcoin": {
   "get": {
    "operationId": "getBitcoinFees",
    "summary": "Bitcoin fee rates (sat/vB)",
    "responses": {
     "200": {
      "description": "Fee rates",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/gas-api/v1/fees": {
   "get": {
    "operationId": "getNetworkFees",
    "summary": "USD cost to send the native coin, send USDT/USDC and swap on 12 networks",
    "responses": {
     "200": {
      "description": "Costs by network",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/get-crypto-data": {
   "get": {
    "operationId": "getCryptoData",
    "summary": "Exchange withdrawal fees, bridge quotes, BRL rate or the full market snapshot",
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "exchange_fees",
        "bridge_quotes",
        "network_fees",
        "fx",
        "snapshot",
        "fear_greed",
        "market_stress",
        "news"
       ]
      },
      "description": "exchange_fees: withdrawal fee per exchange/coin/network. bridge_quotes: cheapest route between networks. snapshot: everything on the dashboard."
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "json",
        "text"
       ]
      },
      "description": "text returns Markdown (snapshot only)"
     }
    ],
    "responses": {
     "200": {
      "description": "{ data: ... }",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 }
}