{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://vetrade.vet/schemas/limit-order-status-response.schema.json",
  "title": "Limit Order Status Response",
  "type": "object",
  "additionalProperties": false,
  "required": ["apiVersion", "requestId", "source", "order", "warnings"],
  "properties": {
    "apiVersion": {
      "type": "string",
      "const": "v2"
    },
    "requestId": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "const": "on_chain"
    },
    "order": {
      "allOf": [
        {
          "$ref": "https://vetrade.vet/schemas/limit-order-list-response.schema.json#/$defs/orderSummary"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": ["fillCount", "fillRecords"],
          "properties": {
            "fillCount": { "type": "integer" },
            "fillRecords": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": ["orderId", "amount", "price", "timestamp", "outputAmount"],
                "properties": {
                  "orderId": { "type": "string" },
                  "amount": { "type": "string" },
                  "price": { "type": "string" },
                  "timestamp": { "type": "integer" },
                  "outputAmount": { "type": "string" }
                }
              }
            }
          }
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["code", "message"],
        "properties": {
          "code": {
            "type": "string",
            "enum": ["ON_CHAIN_LIST_FALLBACK"]
          },
          "message": { "type": "string" }
        }
      }
    }
  }
}
