-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquotes.schema.json
More file actions
28 lines (28 loc) · 945 Bytes
/
quotes.schema.json
File metadata and controls
28 lines (28 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "quotes.schema.json",
"type": "object",
"required": [
"event_id",
"event_ts",
"source",
"quote_id",
"instrument",
"bid",
"ask"
],
"properties": {
"event_id": { "type": "string" },
"event_ts": { "type": "string", "format": "date-time" },
"ingest_ts": { "type": "string", "format": "date-time" },
"source": { "enum": ["pricing"] },
"quote_id": { "type": "string" },
"instrument": { "type": "string", "pattern": "^[A-Z]{3}/[A-Z]{3}$" },
"bid": { "type": "number", "exclusiveMinimum": 0 },
"ask": { "type": "number", "exclusiveMinimum": 0 },
"liquidity_provider": { "type": "string" },
"trace_id": { "type": "string" }
},
"additionalProperties": false,
"description": "Note: enforce bid < ask in pipeline/business rules; JSON Schema cannot compare two fields without non-standard extensions."
}