{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blofin/json-schema/blofin-get-api-v1-spot-trade-orders-history-response-schema.json",
  "title": "GetApiV1SpotTradeOrdersHistoryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blofin-spot-api-openapi.yml#/components/schemas/GetApiV1SpotTradeOrdersHistoryResponse",
  "type": "object",
  "properties": {
    "orderId": {
      "type": "string",
      "description": "Order ID"
    },
    "clientOrderId": {
      "type": "string",
      "description": "Client Order ID as assigned by the client"
    },
    "instId": {
      "type": "string",
      "description": "Instrument ID"
    },
    "marginMode": {
      "type": "string",
      "description": "Margin mode"
    },
    "positionSide": {
      "type": "string",
      "description": "Position side"
    },
    "side": {
      "type": "string",
      "description": "Order side"
    },
    "orderType": {
      "type": "string",
      "description": "Order type"
    },
    "price": {
      "type": "string",
      "description": "Price"
    },
    "size": {
      "type": "string",
      "description": "Quantity to buy or sell"
    },
    "reduceOnly": {
      "type": "string",
      "description": "Whether orders can only reduce in position size"
    },
    "leverage": {
      "type": "string",
      "description": "Leverage"
    },
    "state": {
      "type": "string",
      "description": "State"
    },
    "filledSize": {
      "type": "string",
      "description": "Accumulated fill quantity"
    },
    "pnl": {
      "type": "string",
      "description": "Profit and loss"
    },
    "averagePrice": {
      "type": "string",
      "description": "Average filled price"
    },
    "fee": {
      "type": "string",
      "description": "Fee and rebate"
    },
    "feeCurrency": {
      "type": "string",
      "description": "Fee currency"
    },
    "createTime": {
      "type": "string",
      "description": "Creation time"
    },
    "updateTime": {
      "type": "string",
      "description": "Update time"
    },
    "orderCategory": {
      "type": "string",
      "description": "Order category"
    },
    "tpTriggerPrice": {
      "type": "string",
      "description": "Take-profit trigger price"
    },
    "tpOrderPrice": {
      "type": "string",
      "description": "Take-profit order price"
    },
    "slTriggerPrice": {
      "type": "string",
      "description": "Stop-loss trigger price"
    },
    "slOrderPrice": {
      "type": "string",
      "description": "Stop-loss order price"
    },
    "cancelSource": {
      "type": "string",
      "description": "Cancel source"
    },
    "cancelSourceReason": {
      "type": "string",
      "description": "Cancel source reason"
    },
    "algoClientOrderId": {
      "type": "string",
      "description": "Algo client order ID"
    },
    "algoId": {
      "type": "string",
      "description": "Algo ID"
    },
    "brokerId": {
      "type": "string",
      "description": "Broker ID"
    }
  }
}