{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hitbtc/json-schema/hitbtc-market-data-futures-info-schema.json",
  "title": "marketData_FuturesInfo",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hitbtc-futures-info-api-openapi.yml#/components/schemas/marketData_FuturesInfo",
  "allOf": [
    {
      "type": "object"
    },
    {
      "title": "Futures info",
      "oneOf": [
        {
          "$ref": "#/$defs/marketData_PerpetualFuturesInfo"
        },
        {
          "$ref": "#/$defs/marketData_CashSettledFuturesInfo"
        }
      ]
    }
  ],
  "$defs": {
    "marketData_CashSettledFuturesInfo": {
      "title": "Cash settled",
      "allOf": [
        {
          "$ref": "#/$defs/marketData_FuturesInfoBase"
        },
        {
          "type": "object",
          "required": [
            "indicative_settlement_price",
            "expiry"
          ],
          "properties": {
            "indicative_settlement_price": {
              "type": "string",
              "default": "0",
              "description": "Expected price of closing position on a cash settled contract.\n\nℹ️ Calculated during the last 30 minutes prior to contract expiration—until that, equals to `index_price`.\n"
            },
            "expiry": {
              "type": "string",
              "description": "Contract expiration date."
            }
          }
        }
      ]
    },
    "marketData_FuturesInfoBase": {
      "title": "Futures info",
      "type": "object",
      "required": [
        "contract_type",
        "mark_price",
        "index_price",
        "open_interest",
        "timestamp"
      ],
      "properties": {
        "contract_type": {
          "type": "string",
          "enum": [
            "perpetual",
            "cash_settled"
          ],
          "description": "Contract type."
        },
        "mark_price": {
          "type": "string",
          "default": "0",
          "description": "Recent asset price adjusted by the value of fair basis."
        },
        "index_price": {
          "type": "string",
          "default": "0",
          "description": "Average underlying asset price."
        },
        "open_interest": {
          "type": "string",
          "default": "0",
          "description": "Total quantity of traded futures contracts."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Request timestamp."
        }
      }
    },
    "marketData_PerpetualFuturesInfo": {
      "title": "Perpetual",
      "allOf": [
        {
          "$ref": "#/$defs/marketData_FuturesInfoBase"
        },
        {
          "type": "object",
          "required": [
            "funding_rate",
            "next_funding_time",
            "indicative_funding_rate",
            "premium_index",
            "avg_premium_index",
            "interest_rate"
          ],
          "properties": {
            "funding_rate": {
              "type": "string",
              "default": "0",
              "description": "Percentage of contract mark value paid after the end of the current funding interval."
            },
            "next_funding_time": {
              "type": "string",
              "format": "date-time",
              "description": "Timestamp of the next funding."
            },
            "indicative_funding_rate": {
              "type": "string",
              "default": "0",
              "description": "Estimated value of `funding_rate` in the next funding period calculated at the moment."
            },
            "premium_index": {
              "type": "string",
              "default": "0",
              "description": "Time-weighted average over premium indexes from the previous funding to the current moment.\n\nℹ️ Used during calculation of `indicative_funding_rate`.\n"
            },
            "avg_premium_index": {
              "type": "string",
              "default": "0",
              "description": "Time-weighted average over premium indexes for **previous** funding period.\n\nℹ️ Used during calculation of `funding_rate` for adjusting it to the deviation of contract market price from the mark price.\n"
            },
            "interest_rate": {
              "type": "string",
              "default": "0",
              "description": "Contract interest rate for one funding period."
            }
          }
        }
      ]
    }
  }
}