{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coinmate/json-schema/coinmate-trade-history-request-schema.json",
  "title": "TradeHistoryRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coinmate-trading.yaml#/components/schemas/TradeHistoryRequest",
  "type": "object",
  "properties": {
    "clientId": {
      "type": "integer",
      "format": "int64",
      "description": "Client ID (account number)"
    },
    "currencyPair": {
      "type": "string",
      "description": "Currency pair identifier"
    },
    "lastId": {
      "type": "integer",
      "format": "int64",
      "description": "Only trades with ID lower/greater depending on sort"
    },
    "limit": {
      "type": "integer",
      "format": "int64",
      "description": "Maximum number of items to return; the server caps the value by a configurable limit"
    },
    "nonce": {
      "type": "integer",
      "format": "int64",
      "description": "Unique incrementing nonce"
    },
    "orderId": {
      "type": "integer",
      "format": "int64",
      "description": "Filter by order id"
    },
    "publicKey": {
      "type": "string",
      "description": "API public key"
    },
    "signature": {
      "type": "string",
      "description": "HMAC-SHA256 signature"
    },
    "sort": {
      "type": "string",
      "default": "DESC",
      "description": "Sort direction",
      "enum": [
        "ASC",
        "DESC"
      ]
    },
    "timestampFrom": {
      "type": "integer",
      "format": "int64",
      "description": "Lower bound timestamp (ms)"
    },
    "timestampTo": {
      "type": "integer",
      "format": "int64",
      "description": "Upper bound timestamp (ms)"
    }
  },
  "required": [
    "clientId",
    "nonce",
    "signature"
  ]
}