{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bloomberg-buyside-enterprise-solutions/json-schema/bloomberg-buyside-enterprise-solutions-order-schema.json",
  "title": "Order",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bloomberg-buyside-enterprise-solutions-orders-api-openapi.yml#/components/schemas/Order",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique order identifier"
    },
    "security": {
      "type": "string",
      "description": "Bloomberg security identifier"
    },
    "securityName": {
      "type": "string",
      "description": "Security name"
    },
    "side": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL",
        "SHORT_SELL",
        "BUY_TO_COVER"
      ],
      "description": "Order side"
    },
    "orderType": {
      "type": "string",
      "enum": [
        "MARKET",
        "LIMIT",
        "STOP",
        "STOP_LIMIT",
        "PEGGED",
        "VWAP",
        "TWAP"
      ],
      "description": "Order type"
    },
    "quantity": {
      "type": "number",
      "description": "Order quantity"
    },
    "filledQuantity": {
      "type": "number",
      "description": "Quantity filled so far"
    },
    "remainingQuantity": {
      "type": "number",
      "description": "Remaining quantity to fill"
    },
    "limitPrice": {
      "type": "number",
      "description": "Limit price (for limit and stop-limit orders)"
    },
    "stopPrice": {
      "type": "number",
      "description": "Stop price (for stop and stop-limit orders)"
    },
    "averageFillPrice": {
      "type": "number",
      "description": "Volume-weighted average fill price"
    },
    "status": {
      "type": "string",
      "enum": [
        "NEW",
        "PENDING",
        "PARTIALLY_FILLED",
        "FILLED",
        "CANCELLED",
        "REJECTED",
        "EXPIRED"
      ],
      "description": "Current order status"
    },
    "timeInForce": {
      "type": "string",
      "enum": [
        "DAY",
        "GTC",
        "IOC",
        "FOK",
        "GTD"
      ],
      "description": "Time in force instruction"
    },
    "expirationDate": {
      "type": "string",
      "format": "date",
      "description": "Expiration date for GTD orders"
    },
    "portfolioId": {
      "type": "string",
      "description": "Associated portfolio"
    },
    "brokerId": {
      "type": "string",
      "description": "Routing broker identifier"
    },
    "algorithm": {
      "type": "string",
      "description": "Algorithm name (for algorithmic orders)"
    },
    "currency": {
      "type": "string",
      "description": "Order currency (ISO 4217)"
    },
    "trader": {
      "type": "string",
      "description": "Trader who placed the order"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Order creation timestamp"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Last update timestamp"
    }
  }
}