{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hitbtc/json-schema/hitbtc-trading-exchange-balance-schema.json",
  "title": "Exchange balance",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hitbtc-exchange-balances-api-openapi.yml#/components/schemas/trading_ExchangeBalance",
  "allOf": [
    {
      "$ref": "#/$defs/trading_SpotBalance"
    },
    {
      "$ref": "#/$defs/trading_MarginBalanceFields"
    }
  ],
  "$defs": {
    "trading_MarginBalanceFields": {
      "title": "Margin balance",
      "required": [
        "reserved_margin",
        "cross_margin_reserved"
      ],
      "type": "object",
      "properties": {
        "reserved_margin": {
          "type": "string",
          "description": "Amount reserved for margin trading with funds backed by an isolated margin account."
        },
        "cross_margin_reserved": {
          "type": "string",
          "description": "Amount reserved for margin trading with funds backed by a cross-margin account."
        }
      }
    },
    "trading_SpotBalance": {
      "title": "Spot Balance",
      "required": [
        "available",
        "reserved"
      ],
      "type": "object",
      "properties": {
        "available": {
          "type": "string",
          "description": "Amount available for trading or transferring to a wallet."
        },
        "reserved": {
          "type": "string",
          "description": "Total amount reserved for active orders and incomplete transfers to a wallet."
        }
      }
    }
  }
}