{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/btcmarkets/main/json-schema/btcmarkets-order-schema.json",
  "title": "Order",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/btcmarkets-openapi.yml#/components/schemas/Order",
  "type": "object",
  "properties": {
    "orderId": {
      "type": "string"
    },
    "marketId": {
      "type": "string"
    },
    "side": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "creationTime": {
      "type": "string"
    },
    "price": {
      "type": "string"
    },
    "amount": {
      "type": "string"
    },
    "openAmount": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "triggerPrice": {
      "type": "string"
    },
    "targetAmount": {
      "type": "string"
    },
    "timeInForce": {
      "type": "string"
    },
    "postOnly": {
      "type": "boolean"
    },
    "selfTrade": {
      "type": "string"
    },
    "errorMessage": {
      "type": "string",
      "description": "Indicates why the order failed after it was accepted. This attribute is null in most situations except for rare cases where the order is accepted at the point of entry but then rejected by the matching engine (e.g., due to insufficient funds)."
    },
    "clientOrderId": {
      "type": "string"
    }
  }
}