{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-perp-market-schema.json",
  "title": "PerpMarket",
  "description": "Paid. Perp market + funding (Hyperliquid, Binance, Bybit).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-market-api-openapi.yml#/components/schemas/PerpMarket",
  "type": "object",
  "properties": {
    "venue": {
      "type": "string",
      "description": "The venue the markets are on (Hyperliquid)"
    },
    "coin": {
      "type": [
        "string",
        "null"
      ],
      "description": "The coin asked for, as the venue names it; null when listing the most-traded markets"
    },
    "markets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string"
          },
          "markPx": {
            "type": [
              "number",
              "null"
            ]
          },
          "oraclePx": {
            "type": [
              "number",
              "null"
            ]
          },
          "midPx": {
            "type": [
              "number",
              "null"
            ]
          },
          "prevDayPx": {
            "type": [
              "number",
              "null"
            ]
          },
          "change24hPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "fundingRate": {
            "type": [
              "number",
              "null"
            ],
            "description": "Funding per interval, as a decimal (0.0000125 = 0.00125%). Positive = longs pay shorts"
          },
          "intervalHours": {
            "type": "number",
            "description": "Length of one funding interval (Hyperliquid: 1)"
          },
          "fundingAprPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "fundingRate x (8760 / intervalHours) x 100, not compounded"
          },
          "premium": {
            "type": [
              "number",
              "null"
            ]
          },
          "openInterest": {
            "type": [
              "number",
              "null"
            ],
            "description": "In coins"
          },
          "openInterestUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "volume24hUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "maxLeverage": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "coin",
          "markPx",
          "oraclePx",
          "midPx",
          "prevDayPx",
          "change24hPct",
          "fundingRate",
          "intervalHours",
          "fundingAprPct",
          "premium",
          "openInterest",
          "openInterestUsd",
          "volume24hUsd",
          "maxLeverage"
        ]
      },
      "description": "One market when a coin was named; otherwise the most-traded by 24h volume"
    },
    "crossVenueFunding": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "venue": {
            "type": "string"
          },
          "fundingRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "intervalHours": {
            "type": [
              "number",
              "null"
            ]
          },
          "fundingAprPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "nextFundingTime": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "venue",
          "fundingRate",
          "intervalHours",
          "fundingAprPct",
          "nextFundingTime"
        ]
      },
      "description": "The same coin's NEXT funding on Binance and Bybit (and Hyperliquid), as Hyperliquid publishes it"
    },
    "source": {
      "type": "string",
      "description": "Where the data came from"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time the upstream data was read"
    },
    "note": {
      "type": "string",
      "description": "How to read the numbers, and their limits"
    }
  },
  "required": [
    "venue",
    "coin",
    "markets",
    "crossVenueFunding",
    "source",
    "asOf",
    "note"
  ]
}