@usherlabs/cex-broker 0.2.49 → 0.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/cex-canonical-orderbook-export.js +7747 -883
- package/dist/commands/cex-canonical-orderbook-export.js.map +41 -10
- package/dist/commands/cli.js +127 -34
- package/dist/commands/market-data-vendor-backfill.js +8284 -6391
- package/dist/commands/market-data-vendor-backfill.js.map +16 -15
- package/dist/helpers/canonical-orderbook-export/parquet-projection.d.ts +19 -0
- package/dist/helpers/market-data-archive/canonical-orderbook.d.ts +1 -1
- package/dist/helpers/market-data-preparation/conformance-fixtures.d.ts +114 -2
- package/dist/helpers/market-data-preparation/contracts.d.ts +1298 -18
- package/dist/helpers/market-data-preparation/required-clock-qualification.d.ts +43 -0
- package/dist/helpers/market-data-preparation/source-tape-dependencies.d.ts +19 -0
- package/dist/helpers/market-data-preparation/source-tape-operation.d.ts +109 -0
- package/dist/helpers/market-data-source-forensics.d.ts +400 -0
- package/dist/helpers/market-data-vendor-backfill/conformance-fixtures.d.ts +3 -5
- package/dist/helpers/market-data-vendor-backfill/contracts.d.ts +21 -56
- package/dist/helpers/market-data-vendor-backfill/core.d.ts +1 -0
- package/dist/helpers/market-data-vendor-backfill/cryptohftdata.d.ts +45 -5
- package/dist/helpers/market-data-vendor-backfill/manifests.d.ts +31 -1083
- package/dist/helpers/market-data-vendor-backfill/promotion.d.ts +1 -0
- package/dist/helpers/source-tape-sandbox.d.ts +82 -0
- package/dist/helpers/source-tape.d.ts +165 -0
- package/dist/helpers/trace-context.d.ts +8 -0
- package/dist/index.js +128 -35
- package/dist/index.js.map +7 -6
- package/dist/market-data-preparation/fixtures/{conformance-v2.json → conformance-v3.json} +257 -60
- package/dist/market-data-preparation/policies/capability-policy.json +15 -4
- package/dist/market-data-preparation/policies/resource-policy.json +3 -3
- package/dist/market-data-preparation/policies/source-tape-capability-v1.json +35 -0
- package/dist/market-data-preparation/schema-manifest.json +30 -10
- package/dist/market-data-preparation/schemas/canonical-orderbook-export-request-v1.schema.json +5 -1
- package/dist/market-data-preparation/schemas/{canonical-orderbook-export-result-v1.schema.json → canonical-orderbook-export-result-v2.schema.json} +20 -6
- package/dist/market-data-preparation/schemas/order-book-depth-summary-parquet-projection-v1.schema.json +256 -0
- package/dist/market-data-preparation/schemas/order-book-levels-parquet-projection-v1.schema.json +220 -0
- package/dist/market-data-preparation/schemas/{preparation-product-pin-v1.schema.json → preparation-product-pin-v2.schema.json} +59 -9
- package/dist/market-data-preparation/schemas/promotion-receipt-v1.schema.json +5 -1
- package/dist/market-data-preparation/schemas/source-forensics-ledger-v1.schema.json +463 -0
- package/dist/market-data-preparation/schemas/source-qualification-record-v1.schema.json +394 -0
- package/dist/market-data-preparation.d.ts +7 -0
- package/dist/market-data-preparation.js +35443 -25203
- package/dist/market-data-preparation.js.map +118 -78
- package/dist/market-data-vendor-backfill.d.ts +8 -5
- package/dist/market-data-vendor-backfill.js +19444 -15553
- package/dist/market-data-vendor-backfill.js.map +65 -60
- package/package.json +1 -5
- package/dist/market-data-preparation/policies/capability-policy-v1.json +0 -28
- package/dist/market-data-vendor-backfill/fixtures/conformance-v1.json +0 -448
- package/dist/market-data-vendor-backfill/policies/capability-policy-v2.json +0 -28
- package/dist/market-data-vendor-backfill/policies/capability-policy.json +0 -28
- package/dist/market-data-vendor-backfill/policies/resource-policy.json +0 -16
- package/dist/market-data-vendor-backfill/schema-manifest.json +0 -31
- package/dist/market-data-vendor-backfill/schemas/archive-selection.schema.json +0 -224
- package/dist/market-data-vendor-backfill/schemas/promotion-receipt.schema.json +0 -171
- package/dist/market-data-vendor-backfill/schemas/request.schema.json +0 -166
- package/dist/market-data-vendor-backfill/schemas/required-clock.schema.json +0 -47
- package/dist/market-data-vendor-backfill/schemas/result.schema.json +0 -198
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.usher.so/market-data-vendor-backfill-result/v1",
|
|
4
|
-
"title": "Fiet TEE market data vendor backfill file-job result v1",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_id",
|
|
9
|
-
"result_sha256",
|
|
10
|
-
"job_id",
|
|
11
|
-
"request_file_sha256",
|
|
12
|
-
"executable_sha256",
|
|
13
|
-
"schema_manifest_sha256",
|
|
14
|
-
"cex_package",
|
|
15
|
-
"capability_policy",
|
|
16
|
-
"resource_policy",
|
|
17
|
-
"build",
|
|
18
|
-
"started_at",
|
|
19
|
-
"completed_at",
|
|
20
|
-
"outcome"
|
|
21
|
-
],
|
|
22
|
-
"properties": {
|
|
23
|
-
"schema_id": {
|
|
24
|
-
"const": "https://schemas.usher.so/market-data-vendor-backfill-result/v1"
|
|
25
|
-
},
|
|
26
|
-
"result_sha256": { "$ref": "#/$defs/sha256" },
|
|
27
|
-
"job_id": { "$ref": "#/$defs/uuid" },
|
|
28
|
-
"request_file_sha256": {
|
|
29
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/sha256" }]
|
|
30
|
-
},
|
|
31
|
-
"executable_sha256": { "$ref": "#/$defs/sha256" },
|
|
32
|
-
"schema_manifest_sha256": { "$ref": "#/$defs/sha256" },
|
|
33
|
-
"cex_package": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"additionalProperties": false,
|
|
36
|
-
"required": ["name", "version", "package_sha256"],
|
|
37
|
-
"properties": {
|
|
38
|
-
"name": { "const": "@usherlabs/cex-broker" },
|
|
39
|
-
"version": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$"
|
|
42
|
-
},
|
|
43
|
-
"package_sha256": { "$ref": "#/$defs/sha256" }
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"capability_policy": { "$ref": "#/$defs/policyPin" },
|
|
47
|
-
"resource_policy": { "$ref": "#/$defs/policyPin" },
|
|
48
|
-
"build": {
|
|
49
|
-
"type": "object",
|
|
50
|
-
"additionalProperties": false,
|
|
51
|
-
"required": ["fiet_tee_commit", "created_at"],
|
|
52
|
-
"properties": {
|
|
53
|
-
"fiet_tee_commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
54
|
-
"created_at": { "$ref": "#/$defs/timestamp" }
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"started_at": { "$ref": "#/$defs/timestamp" },
|
|
58
|
-
"completed_at": { "$ref": "#/$defs/timestamp" },
|
|
59
|
-
"outcome": {
|
|
60
|
-
"type": "object",
|
|
61
|
-
"additionalProperties": false,
|
|
62
|
-
"required": [
|
|
63
|
-
"status",
|
|
64
|
-
"reason_code",
|
|
65
|
-
"reason_subcode",
|
|
66
|
-
"request_id",
|
|
67
|
-
"idempotency_key",
|
|
68
|
-
"target",
|
|
69
|
-
"selection",
|
|
70
|
-
"receipt",
|
|
71
|
-
"diagnostics"
|
|
72
|
-
],
|
|
73
|
-
"properties": {
|
|
74
|
-
"status": {
|
|
75
|
-
"enum": [
|
|
76
|
-
"request_invalid",
|
|
77
|
-
"archive_preflight_failed",
|
|
78
|
-
"already_covered",
|
|
79
|
-
"promoted",
|
|
80
|
-
"capability_unsupported",
|
|
81
|
-
"credentials_missing",
|
|
82
|
-
"vendor_fetch_failed",
|
|
83
|
-
"archive_ingest_failed",
|
|
84
|
-
"promotion_verification_failed"
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
"reason_code": {
|
|
88
|
-
"type": "string",
|
|
89
|
-
"pattern": "^[a-z][a-z0-9_]{0,127}$"
|
|
90
|
-
},
|
|
91
|
-
"reason_subcode": {
|
|
92
|
-
"oneOf": [
|
|
93
|
-
{ "type": "null" },
|
|
94
|
-
{ "type": "string", "pattern": "^[a-z][a-z0-9_]{0,127}$" }
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
"request_id": {
|
|
98
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/uuid" }]
|
|
99
|
-
},
|
|
100
|
-
"idempotency_key": {
|
|
101
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/sha256" }]
|
|
102
|
-
},
|
|
103
|
-
"target": {
|
|
104
|
-
"oneOf": [
|
|
105
|
-
{ "type": "null" },
|
|
106
|
-
{
|
|
107
|
-
"type": "object",
|
|
108
|
-
"additionalProperties": false,
|
|
109
|
-
"required": ["environment", "cluster"],
|
|
110
|
-
"properties": {
|
|
111
|
-
"environment": {
|
|
112
|
-
"type": "string",
|
|
113
|
-
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
|
|
114
|
-
},
|
|
115
|
-
"cluster": {
|
|
116
|
-
"type": "string",
|
|
117
|
-
"pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
"selection": {
|
|
124
|
-
"oneOf": [
|
|
125
|
-
{ "type": "null" },
|
|
126
|
-
{
|
|
127
|
-
"$ref": "https://schemas.usher.so/market-data-vendor-backfill-archive-selection/v1"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"receipt": {
|
|
132
|
-
"oneOf": [
|
|
133
|
-
{ "type": "null" },
|
|
134
|
-
{
|
|
135
|
-
"$ref": "https://schemas.usher.so/market-data-vendor-backfill-promotion-receipt/v1"
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
"diagnostics": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"maxProperties": 64,
|
|
142
|
-
"additionalProperties": {
|
|
143
|
-
"oneOf": [
|
|
144
|
-
{ "type": "string", "maxLength": 1024 },
|
|
145
|
-
{ "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
146
|
-
{ "type": "boolean" }
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"allOf": [
|
|
154
|
-
{
|
|
155
|
-
"if": {
|
|
156
|
-
"properties": {
|
|
157
|
-
"outcome": {
|
|
158
|
-
"type": "object",
|
|
159
|
-
"properties": {
|
|
160
|
-
"status": { "const": "request_invalid" },
|
|
161
|
-
"reason_subcode": { "const": "request_file_unreadable" }
|
|
162
|
-
},
|
|
163
|
-
"required": ["status", "reason_subcode"]
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"required": ["outcome"]
|
|
167
|
-
},
|
|
168
|
-
"then": {
|
|
169
|
-
"type": "object",
|
|
170
|
-
"properties": { "request_file_sha256": { "type": "null" } }
|
|
171
|
-
},
|
|
172
|
-
"else": {
|
|
173
|
-
"type": "object",
|
|
174
|
-
"properties": { "request_file_sha256": { "$ref": "#/$defs/sha256" } }
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"$defs": {
|
|
179
|
-
"uuid": {
|
|
180
|
-
"type": "string",
|
|
181
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
182
|
-
},
|
|
183
|
-
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
184
|
-
"timestamp": {
|
|
185
|
-
"type": "string",
|
|
186
|
-
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-([0-2][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}Z$"
|
|
187
|
-
},
|
|
188
|
-
"policyPin": {
|
|
189
|
-
"type": "object",
|
|
190
|
-
"additionalProperties": false,
|
|
191
|
-
"required": ["policy_id", "policy_sha256"],
|
|
192
|
-
"properties": {
|
|
193
|
-
"policy_id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
194
|
-
"policy_sha256": { "$ref": "#/$defs/sha256" }
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|