{
 "openapi": "3.1.0",
 "info": {
  "title": "PerpDEX Guide open data",
  "version": "1",
  "description": "Static JSON rebuilt with the site. No key, CORS open, cached for an hour. Free to republish with a visible \"Data: PerpDEX Guide\" link to perpdexguide.com. Editorial content (reviews, guides, comparisons) is all rights reserved.",
  "contact": {
   "url": "https://perpdexguide.com/about/"
  },
  "license": {
   "name": "Data: PerpDEX Guide attribution required",
   "url": "https://perpdexguide.com/data-definitions/#open-data"
  }
 },
 "externalDocs": {
  "description": "Dataset definitions",
  "url": "https://perpdexguide.com/data-definitions/#open-data"
 },
 "servers": [
  {
   "url": "https://perpdexguide.com"
  }
 ],
 "paths": {
  "/api/v1/markets.json": {
   "get": {
    "summary": "Perp listings by asset across the tracked venues",
    "description": "One row per asset with the venues that list it, each venue’s symbol, published or derived max leverage, and the venue-published name and categories where available. From the weekly venue-coverage snapshot.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Markets"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/fees.json": {
   "get": {
    "summary": "Verified base-tier perp fees by venue",
    "description": "Maker and taker rates as published by each venue, with the dated source page each figure was verified on. Numeric fields are decimals (0.00045 = 0.045%).",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Fees"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/funding-history.json": {
   "get": {
    "summary": "Seven days of hourly funding",
    "description": "Hourly funding series for the venues that publish an hourly-native history.",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/FundingHistory"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Attribution": {
    "type": "object",
    "required": [
     "text",
     "url",
     "license"
    ],
    "properties": {
     "text": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "license": {
      "type": "string"
     }
    }
   },
   "Markets": {
    "type": "object",
    "required": [
     "schema",
     "generatedAt",
     "assets",
     "attribution"
    ],
    "properties": {
     "schema": {
      "type": "string",
      "const": "perpdexguide.markets/1"
     },
     "generatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Build time of this file."
     },
     "definition": {
      "type": "string",
      "format": "uri"
     },
     "snapshotAt": {
      "type": "string",
      "description": "Date of the venue-coverage snapshot."
     },
     "assetCount": {
      "type": "integer"
     },
     "venues": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": "string"
        }
       }
      }
     },
     "assets": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     }
    }
   },
   "Fees": {
    "type": "object",
    "required": [
     "schema",
     "generatedAt",
     "venues",
     "attribution"
    ],
    "properties": {
     "schema": {
      "type": "string",
      "const": "perpdexguide.fees/1"
     },
     "generatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Build time of this file."
     },
     "definition": {
      "type": "string",
      "format": "uri"
     },
     "note": {
      "type": "string"
     },
     "venues": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     }
    }
   },
   "FundingHistory": {
    "type": "object",
    "required": [
     "schema",
     "generatedAt",
     "series",
     "attribution"
    ],
    "properties": {
     "schema": {
      "type": "string",
      "const": "perpdexguide.funding-history/1"
     },
     "generatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Build time of this file."
     },
     "definition": {
      "type": "string",
      "format": "uri"
     },
     "fetchedAt": {
      "type": "string"
     },
     "periodHours": {
      "type": "integer"
     },
     "note": {
      "type": "string"
     },
     "series": {
      "type": "array",
      "items": {
       "type": "object"
      }
     },
     "attribution": {
      "$ref": "#/components/schemas/Attribution"
     }
    }
   }
  }
 }
}