{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immix/json-schema/immix-executions-get-executions-response-schema.json",
  "title": "GetExecutionsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immix-executions-api-openapi.yml#/components/schemas/executions_GetExecutionsResponse",
  "type": "object",
  "properties": {
    "executionId": {
      "type": "string",
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "orderId": {
      "type": "string",
      "pattern": "^-?[0-9]+$",
      "description": "0 = unattributed (discovered); set otherwise. int64 as a decimal JSON string"
    },
    "orgId": {
      "type": "integer"
    },
    "accountId": {
      "type": "integer"
    },
    "credentialId": {
      "type": "integer"
    },
    "instrumentId": {
      "type": "string",
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "bookId": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "Denormalized from the order at recording (0 = none / discovered); re-stamped by attribution. int64 as a decimal JSON string"
    },
    "side": {
      "$ref": "#/$defs/ExecutionRecordedSide",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "kind": {
      "$ref": "#/$defs/ExecutionRecordedKind",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "liquidity": {
      "$ref": "#/$defs/ExecutionRecordedLiquidity",
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict"
    },
    "fillQty": {
      "type": "string",
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "Always positive; kind gives the sign of its effect (BUST reverses). money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw"
    },
    "fillPx": {
      "type": "string",
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw"
    },
    "fee": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset"
    },
    "feeAssetId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "fillTsNs": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "venueTsNs": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "venueTradeId": {
      "type": "string",
      "description": "The venue execution id — the dedup key's third component."
    },
    "externalRef": {
      "type": "string",
      "description": "The venue order id as carried by the fill event; the auto-attribution join key for discovered rows (both facts carry it)."
    },
    "globalSequence": {
      "$ref": "#/$defs/GlobalSequenceValue"
    },
    "unscaled": {
      "type": "boolean",
      "description": "Never present since 0.3.3: every money value on this API states its own scale on the wire — a policy amount or cap since 0.3.3, an order's and an execution's since 0.3.2, a balance's since 0.3.1 — so a row is never served raw, whether or not this member holds the asset or instrument it references. Kept, deprecated, so a client generated from 0.3.2 still compiles; it goes at the next major.",
      "deprecated": true
    }
  },
  "required": [
    "executionId",
    "orderId",
    "orgId",
    "accountId",
    "credentialId",
    "instrumentId",
    "side",
    "kind",
    "liquidity",
    "fillQty",
    "fillPx",
    "venueTradeId",
    "externalRef",
    "globalSequence"
  ],
  "$defs": {
    "ExecutionRecordedKind": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "FILL",
        "BUST",
        "CORRECTION"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "ExecutionRecordedKind"
    },
    "ExecutionRecordedLiquidity": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "MAKER",
        "TAKER"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "ExecutionRecordedLiquidity"
    },
    "ExecutionRecordedSide": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "BUY",
        "SELL"
      ],
      "description": "UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict",
      "title": "ExecutionRecordedSide"
    },
    "GlobalSequenceValue": {
      "type": "string",
      "pattern": "^[0-9]+$",
      "description": "The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.",
      "title": "GlobalSequenceValue"
    }
  }
}