@usherlabs/cex-broker 0.2.52 → 0.3.0

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.
Files changed (144) hide show
  1. package/dist/commands/cli.js +364 -71
  2. package/dist/index.js +365 -72
  3. package/dist/index.js.map +14 -13
  4. package/package.json +5 -28
  5. package/dist/commands/cex-canonical-orderbook-export.d.ts +0 -23
  6. package/dist/commands/cex-canonical-orderbook-export.js +0 -34275
  7. package/dist/commands/cex-canonical-orderbook-export.js.map +0 -266
  8. package/dist/commands/market-data-vendor-backfill.d.ts +0 -24
  9. package/dist/commands/market-data-vendor-backfill.js +0 -34930
  10. package/dist/commands/market-data-vendor-backfill.js.map +0 -268
  11. package/dist/handlers/execute-action/context.d.ts +0 -50
  12. package/dist/handlers/execute-action/deposit.d.ts +0 -2
  13. package/dist/handlers/execute-action/handler.d.ts +0 -19
  14. package/dist/handlers/execute-action/index.d.ts +0 -10
  15. package/dist/handlers/execute-action/internal-transfer.d.ts +0 -2
  16. package/dist/handlers/execute-action/order-book-call.d.ts +0 -3
  17. package/dist/handlers/execute-action/orders.d.ts +0 -2
  18. package/dist/handlers/execute-action/pass-through.d.ts +0 -2
  19. package/dist/handlers/execute-action/perp-config.d.ts +0 -2
  20. package/dist/handlers/execute-action/registry.d.ts +0 -5
  21. package/dist/handlers/execute-action/treasury-call.d.ts +0 -2
  22. package/dist/handlers/execute-action/withdraw.d.ts +0 -2
  23. package/dist/handlers/subscribe/broker-lifecycle.d.ts +0 -13
  24. package/dist/handlers/subscribe/handler.d.ts +0 -20
  25. package/dist/handlers/subscribe/index.d.ts +0 -2
  26. package/dist/handlers/types.d.ts +0 -23
  27. package/dist/helpers/account-balance-archive-poller.d.ts +0 -19
  28. package/dist/helpers/auth.d.ts +0 -5
  29. package/dist/helpers/balance-update-archive-consumer.d.ts +0 -16
  30. package/dist/helpers/binance-user-data-normalization.d.ts +0 -3
  31. package/dist/helpers/binance-user-data-stream.d.ts +0 -58
  32. package/dist/helpers/broker-execution-archive/capture.d.ts +0 -41
  33. package/dist/helpers/broker-execution-archive/index.d.ts +0 -7
  34. package/dist/helpers/broker-execution-archive/journal-export.d.ts +0 -20
  35. package/dist/helpers/broker-execution-archive/loss-journal.d.ts +0 -36
  36. package/dist/helpers/broker-execution-archive/redact.d.ts +0 -7
  37. package/dist/helpers/broker-execution-archive/rows.d.ts +0 -134
  38. package/dist/helpers/broker-execution-archive/types.d.ts +0 -26
  39. package/dist/helpers/broker-execution-archive/withdrawal-observation-tracker.d.ts +0 -23
  40. package/dist/helpers/broker-execution-archive/writer.d.ts +0 -105
  41. package/dist/helpers/broker.d.ts +0 -38
  42. package/dist/helpers/canonical-orderbook-export/exact-selection.d.ts +0 -21
  43. package/dist/helpers/canonical-orderbook-export/exporter.d.ts +0 -26
  44. package/dist/helpers/canonical-orderbook-export/parquet-projection.d.ts +0 -19
  45. package/dist/helpers/constants.d.ts +0 -36
  46. package/dist/helpers/deposit-archive-poller.d.ts +0 -66
  47. package/dist/helpers/deposit.d.ts +0 -5
  48. package/dist/helpers/exchange-credentials.d.ts +0 -10
  49. package/dist/helpers/fill-archive-poller.d.ts +0 -42
  50. package/dist/helpers/grpc/broker.d.ts +0 -5
  51. package/dist/helpers/grpc/callbacks.d.ts +0 -9
  52. package/dist/helpers/grpc/payload.d.ts +0 -9
  53. package/dist/helpers/grpc/status.d.ts +0 -8
  54. package/dist/helpers/index.d.ts +0 -44
  55. package/dist/helpers/logger.d.ts +0 -13
  56. package/dist/helpers/market-data-archive/canonical-orderbook.d.ts +0 -20
  57. package/dist/helpers/market-data-archive/capture-context.d.ts +0 -53
  58. package/dist/helpers/market-data-archive/capture-contract.d.ts +0 -30
  59. package/dist/helpers/market-data-archive/capture.d.ts +0 -22
  60. package/dist/helpers/market-data-archive/index.d.ts +0 -13
  61. package/dist/helpers/market-data-archive/legacy-migration.d.ts +0 -37
  62. package/dist/helpers/market-data-archive/ohlcv-bar-tracker.d.ts +0 -11
  63. package/dist/helpers/market-data-archive/ohlcv-bootstrap.d.ts +0 -1
  64. package/dist/helpers/market-data-archive/ohlcv-history.d.ts +0 -8
  65. package/dist/helpers/market-data-archive/orderbook-depth.d.ts +0 -5
  66. package/dist/helpers/market-data-archive/orderbook-sampler.d.ts +0 -12
  67. package/dist/helpers/market-data-archive/parse-stream.d.ts +0 -26
  68. package/dist/helpers/market-data-archive/rows.d.ts +0 -14
  69. package/dist/helpers/market-data-archive/types.d.ts +0 -83
  70. package/dist/helpers/market-data-preparation/conformance-fixtures.d.ts +0 -128
  71. package/dist/helpers/market-data-preparation/contracts.d.ts +0 -2970
  72. package/dist/helpers/market-data-preparation/file-job.d.ts +0 -38
  73. package/dist/helpers/market-data-preparation/required-clock-qualification.d.ts +0 -43
  74. package/dist/helpers/market-data-preparation/source-tape-dependencies.d.ts +0 -19
  75. package/dist/helpers/market-data-preparation/source-tape-operation.d.ts +0 -109
  76. package/dist/helpers/market-data-source-forensics.d.ts +0 -400
  77. package/dist/helpers/market-data-vendor-backfill/archive-reader.d.ts +0 -26
  78. package/dist/helpers/market-data-vendor-backfill/batching.d.ts +0 -10
  79. package/dist/helpers/market-data-vendor-backfill/conformance-fixtures.d.ts +0 -78
  80. package/dist/helpers/market-data-vendor-backfill/contracts.d.ts +0 -358
  81. package/dist/helpers/market-data-vendor-backfill/core.d.ts +0 -101
  82. package/dist/helpers/market-data-vendor-backfill/cryptohftdata.d.ts +0 -118
  83. package/dist/helpers/market-data-vendor-backfill/forwarder-client.d.ts +0 -25
  84. package/dist/helpers/market-data-vendor-backfill/identity.d.ts +0 -10
  85. package/dist/helpers/market-data-vendor-backfill/manifests.d.ts +0 -61
  86. package/dist/helpers/market-data-vendor-backfill/promotion.d.ts +0 -10
  87. package/dist/helpers/market-data-vendor-backfill/qualification.d.ts +0 -20
  88. package/dist/helpers/market-data-vendor-backfill/selection.d.ts +0 -30
  89. package/dist/helpers/market-data-vendor-backfill/semantic-verification.d.ts +0 -25
  90. package/dist/helpers/market-type.d.ts +0 -16
  91. package/dist/helpers/order-activity-tracker.d.ts +0 -22
  92. package/dist/helpers/order-book.d.ts +0 -79
  93. package/dist/helpers/order-telemetry.d.ts +0 -50
  94. package/dist/helpers/otel.d.ts +0 -83
  95. package/dist/helpers/passive-order.d.ts +0 -8
  96. package/dist/helpers/public-market-data-feed/identity.d.ts +0 -12
  97. package/dist/helpers/public-market-data-feed/index.d.ts +0 -5
  98. package/dist/helpers/public-market-data-feed/orderbook-coalescing-evidence.d.ts +0 -79
  99. package/dist/helpers/public-market-data-feed/orderbook-profile.d.ts +0 -54
  100. package/dist/helpers/public-market-data-feed/subscriber-buffer.d.ts +0 -31
  101. package/dist/helpers/public-market-data-feed/supervisor.d.ts +0 -82
  102. package/dist/helpers/shared/errors.d.ts +0 -14
  103. package/dist/helpers/shared/guards.d.ts +0 -2
  104. package/dist/helpers/source-tape-sandbox.d.ts +0 -82
  105. package/dist/helpers/source-tape.d.ts +0 -165
  106. package/dist/helpers/stream-health-publisher.d.ts +0 -41
  107. package/dist/helpers/trace-context.d.ts +0 -8
  108. package/dist/helpers/transfer-network.d.ts +0 -12
  109. package/dist/helpers/travel-rule-deposit-reconciler.d.ts +0 -159
  110. package/dist/helpers/travel-rule.d.ts +0 -75
  111. package/dist/helpers/treasury-discovery.d.ts +0 -17
  112. package/dist/helpers/user-asset-archive-poller.d.ts +0 -19
  113. package/dist/helpers/user-data-stream-supervisor.d.ts +0 -27
  114. package/dist/helpers/verity.d.ts +0 -5
  115. package/dist/index.d.ts +0 -56
  116. package/dist/market-data-preparation/fixtures/conformance-v3.json +0 -621
  117. package/dist/market-data-preparation/policies/capability-policy.json +0 -39
  118. package/dist/market-data-preparation/policies/resource-policy.json +0 -16
  119. package/dist/market-data-preparation/policies/source-tape-capability-v1.json +0 -35
  120. package/dist/market-data-preparation/schema-manifest.json +0 -66
  121. package/dist/market-data-preparation/schemas/archive-selection-v1.schema.json +0 -224
  122. package/dist/market-data-preparation/schemas/backfill-request-v1.schema.json +0 -166
  123. package/dist/market-data-preparation/schemas/backfill-result-v2.schema.json +0 -212
  124. package/dist/market-data-preparation/schemas/canonical-orderbook-export-request-v1.schema.json +0 -61
  125. package/dist/market-data-preparation/schemas/canonical-orderbook-export-result-v2.schema.json +0 -252
  126. package/dist/market-data-preparation/schemas/order-book-depth-summary-parquet-projection-v1.schema.json +0 -256
  127. package/dist/market-data-preparation/schemas/order-book-levels-parquet-projection-v1.schema.json +0 -220
  128. package/dist/market-data-preparation/schemas/preparation-product-pin-v2.schema.json +0 -176
  129. package/dist/market-data-preparation/schemas/promotion-receipt-v1.schema.json +0 -175
  130. package/dist/market-data-preparation/schemas/required-clock-v1.schema.json +0 -47
  131. package/dist/market-data-preparation/schemas/source-forensics-ledger-v1.schema.json +0 -463
  132. package/dist/market-data-preparation/schemas/source-qualification-record-v1.schema.json +0 -394
  133. package/dist/market-data-preparation.d.ts +0 -11
  134. package/dist/market-data-preparation.js +0 -37488
  135. package/dist/market-data-preparation.js.map +0 -277
  136. package/dist/market-data-vendor-backfill.d.ts +0 -21
  137. package/dist/market-data-vendor-backfill.js +0 -22463
  138. package/dist/market-data-vendor-backfill.js.map +0 -199
  139. package/dist/proto/node.descriptor.d.ts +0 -127
  140. package/dist/proto-loader-options.d.ts +0 -7
  141. package/dist/proto-package-definition.d.ts +0 -2
  142. package/dist/schemas/action-payloads.d.ts +0 -88
  143. package/dist/server.d.ts +0 -10
  144. package/dist/types.d.ts +0 -100
@@ -1,256 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.usher.so/cex-order-book-depth-summary-parquet-projection/v1",
4
- "title": "CEX order-book depth-summary Parquet capture-core projection v1",
5
- "canonical_schema_id": "cex-order-book-canonical/v1",
6
- "file_name": "order_book_depth_summary.parquet",
7
- "parquet_metadata": {
8
- "key_value_metadata": []
9
- },
10
- "columns": [
11
- {
12
- "name": "source",
13
- "physical_type": "BYTE_ARRAY",
14
- "logical_type": "UTF8",
15
- "nullable": false
16
- },
17
- {
18
- "name": "deployment_id",
19
- "physical_type": "BYTE_ARRAY",
20
- "logical_type": "UTF8",
21
- "nullable": false
22
- },
23
- {
24
- "name": "capture_bundle_id",
25
- "physical_type": "BYTE_ARRAY",
26
- "logical_type": "UTF8",
27
- "nullable": true
28
- },
29
- {
30
- "name": "exchange",
31
- "physical_type": "BYTE_ARRAY",
32
- "logical_type": "UTF8",
33
- "nullable": false
34
- },
35
- {
36
- "name": "symbol",
37
- "physical_type": "BYTE_ARRAY",
38
- "logical_type": "UTF8",
39
- "nullable": false
40
- },
41
- {
42
- "name": "trading_pair",
43
- "physical_type": "BYTE_ARRAY",
44
- "logical_type": "UTF8",
45
- "nullable": false
46
- },
47
- {
48
- "name": "source_symbol",
49
- "physical_type": "BYTE_ARRAY",
50
- "logical_type": "UTF8",
51
- "nullable": false
52
- },
53
- {
54
- "name": "asset_type",
55
- "physical_type": "BYTE_ARRAY",
56
- "logical_type": "UTF8",
57
- "nullable": false
58
- },
59
- {
60
- "name": "feed",
61
- "physical_type": "BYTE_ARRAY",
62
- "logical_type": "UTF8",
63
- "nullable": false
64
- },
65
- {
66
- "name": "provider",
67
- "physical_type": "BYTE_ARRAY",
68
- "logical_type": "UTF8",
69
- "nullable": false
70
- },
71
- {
72
- "name": "source_mode",
73
- "physical_type": "BYTE_ARRAY",
74
- "logical_type": "UTF8",
75
- "nullable": false
76
- },
77
- {
78
- "name": "capture_origin",
79
- "physical_type": "BYTE_ARRAY",
80
- "logical_type": "UTF8",
81
- "nullable": false
82
- },
83
- {
84
- "name": "source_time_ms",
85
- "physical_type": "INT64",
86
- "logical_type": "UINT_64",
87
- "nullable": false
88
- },
89
- {
90
- "name": "received_time_ms",
91
- "physical_type": "INT64",
92
- "logical_type": "UINT_64",
93
- "nullable": false
94
- },
95
- {
96
- "name": "raw_capture_id",
97
- "physical_type": "BYTE_ARRAY",
98
- "logical_type": "UTF8",
99
- "nullable": true
100
- },
101
- {
102
- "name": "raw_capture_scope",
103
- "physical_type": "BYTE_ARRAY",
104
- "logical_type": "UTF8",
105
- "nullable": true
106
- },
107
- {
108
- "name": "schema_version",
109
- "physical_type": "BYTE_ARRAY",
110
- "logical_type": "UTF8",
111
- "nullable": false
112
- },
113
- {
114
- "name": "checksum_algorithm",
115
- "physical_type": "BYTE_ARRAY",
116
- "logical_type": "UTF8",
117
- "nullable": false
118
- },
119
- {
120
- "name": "raw_checksum",
121
- "physical_type": "BYTE_ARRAY",
122
- "logical_type": "UTF8",
123
- "nullable": true
124
- },
125
- {
126
- "name": "provenance_complete",
127
- "physical_type": "INT32",
128
- "logical_type": "UINT_8",
129
- "nullable": false
130
- },
131
- {
132
- "name": "snapshot_id",
133
- "physical_type": "BYTE_ARRAY",
134
- "logical_type": "UTF8",
135
- "nullable": false
136
- },
137
- {
138
- "name": "construction_mode",
139
- "physical_type": "BYTE_ARRAY",
140
- "logical_type": "UTF8",
141
- "nullable": false
142
- },
143
- {
144
- "name": "gap_policy",
145
- "physical_type": "BYTE_ARRAY",
146
- "logical_type": "UTF8",
147
- "nullable": false
148
- },
149
- {
150
- "name": "depth_limit",
151
- "physical_type": "INT32",
152
- "logical_type": "UINT_16",
153
- "nullable": false
154
- },
155
- {
156
- "name": "sequence",
157
- "physical_type": "INT64",
158
- "logical_type": "UINT_64",
159
- "nullable": true
160
- },
161
- {
162
- "name": "exact_l2_reconstruction_complete",
163
- "physical_type": "INT32",
164
- "logical_type": "UINT_8",
165
- "nullable": false
166
- },
167
- {
168
- "name": "best_bid",
169
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
170
- "logical_type": "DECIMAL(38,18)",
171
- "nullable": false
172
- },
173
- {
174
- "name": "best_ask",
175
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
176
- "logical_type": "DECIMAL(38,18)",
177
- "nullable": false
178
- },
179
- {
180
- "name": "best_bid_amount",
181
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
182
- "logical_type": "DECIMAL(38,18)",
183
- "nullable": false
184
- },
185
- {
186
- "name": "best_ask_amount",
187
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
188
- "logical_type": "DECIMAL(38,18)",
189
- "nullable": false
190
- },
191
- {
192
- "name": "mid_price",
193
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
194
- "logical_type": "DECIMAL(38,18)",
195
- "nullable": false
196
- },
197
- {
198
- "name": "spread",
199
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
200
- "logical_type": "DECIMAL(38,18)",
201
- "nullable": false
202
- },
203
- {
204
- "name": "spread_bps",
205
- "physical_type": "DOUBLE",
206
- "logical_type": null,
207
- "nullable": false
208
- },
209
- {
210
- "name": "staleness_ms",
211
- "physical_type": "INT64",
212
- "logical_type": "UINT_64",
213
- "nullable": false
214
- },
215
- {
216
- "name": "bid_level_count",
217
- "physical_type": "INT32",
218
- "logical_type": "UINT_16",
219
- "nullable": false
220
- },
221
- {
222
- "name": "ask_level_count",
223
- "physical_type": "INT32",
224
- "logical_type": "UINT_16",
225
- "nullable": false
226
- },
227
- {
228
- "name": "measurement_bands_bps",
229
- "physical_type": "LIST",
230
- "logical_type": "LIST<UINT_32>",
231
- "nullable": false
232
- },
233
- {
234
- "name": "bid_depth_by_band",
235
- "physical_type": "LIST",
236
- "logical_type": "LIST<DECIMAL(38,18)>",
237
- "nullable": false
238
- },
239
- {
240
- "name": "ask_depth_by_band",
241
- "physical_type": "LIST",
242
- "logical_type": "LIST<DECIMAL(38,18)>",
243
- "nullable": false
244
- },
245
- {
246
- "name": "normalized_row_checksum",
247
- "physical_type": "BYTE_ARRAY",
248
- "logical_type": "UTF8",
249
- "nullable": false
250
- }
251
- ],
252
- "metadata": {
253
- "cex.canonical_schema_id": "cex-order-book-canonical/v1",
254
- "cex.projection_schema_id": "https://schemas.usher.so/cex-order-book-depth-summary-parquet-projection/v1"
255
- }
256
- }
@@ -1,220 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://schemas.usher.so/cex-order-book-levels-parquet-projection/v1",
4
- "title": "CEX order-book levels Parquet capture-core projection v1",
5
- "canonical_schema_id": "cex-order-book-canonical/v1",
6
- "file_name": "order_book_levels.parquet",
7
- "parquet_metadata": {
8
- "key_value_metadata": []
9
- },
10
- "columns": [
11
- {
12
- "name": "source",
13
- "physical_type": "BYTE_ARRAY",
14
- "logical_type": "UTF8",
15
- "nullable": false
16
- },
17
- {
18
- "name": "deployment_id",
19
- "physical_type": "BYTE_ARRAY",
20
- "logical_type": "UTF8",
21
- "nullable": false
22
- },
23
- {
24
- "name": "capture_bundle_id",
25
- "physical_type": "BYTE_ARRAY",
26
- "logical_type": "UTF8",
27
- "nullable": true
28
- },
29
- {
30
- "name": "exchange",
31
- "physical_type": "BYTE_ARRAY",
32
- "logical_type": "UTF8",
33
- "nullable": false
34
- },
35
- {
36
- "name": "symbol",
37
- "physical_type": "BYTE_ARRAY",
38
- "logical_type": "UTF8",
39
- "nullable": false
40
- },
41
- {
42
- "name": "trading_pair",
43
- "physical_type": "BYTE_ARRAY",
44
- "logical_type": "UTF8",
45
- "nullable": false
46
- },
47
- {
48
- "name": "source_symbol",
49
- "physical_type": "BYTE_ARRAY",
50
- "logical_type": "UTF8",
51
- "nullable": false
52
- },
53
- {
54
- "name": "asset_type",
55
- "physical_type": "BYTE_ARRAY",
56
- "logical_type": "UTF8",
57
- "nullable": false
58
- },
59
- {
60
- "name": "feed",
61
- "physical_type": "BYTE_ARRAY",
62
- "logical_type": "UTF8",
63
- "nullable": false
64
- },
65
- {
66
- "name": "provider",
67
- "physical_type": "BYTE_ARRAY",
68
- "logical_type": "UTF8",
69
- "nullable": false
70
- },
71
- {
72
- "name": "source_mode",
73
- "physical_type": "BYTE_ARRAY",
74
- "logical_type": "UTF8",
75
- "nullable": false
76
- },
77
- {
78
- "name": "capture_origin",
79
- "physical_type": "BYTE_ARRAY",
80
- "logical_type": "UTF8",
81
- "nullable": false
82
- },
83
- {
84
- "name": "source_time_ms",
85
- "physical_type": "INT64",
86
- "logical_type": "UINT_64",
87
- "nullable": false
88
- },
89
- {
90
- "name": "received_time_ms",
91
- "physical_type": "INT64",
92
- "logical_type": "UINT_64",
93
- "nullable": false
94
- },
95
- {
96
- "name": "raw_capture_id",
97
- "physical_type": "BYTE_ARRAY",
98
- "logical_type": "UTF8",
99
- "nullable": true
100
- },
101
- {
102
- "name": "raw_capture_scope",
103
- "physical_type": "BYTE_ARRAY",
104
- "logical_type": "UTF8",
105
- "nullable": true
106
- },
107
- {
108
- "name": "schema_version",
109
- "physical_type": "BYTE_ARRAY",
110
- "logical_type": "UTF8",
111
- "nullable": false
112
- },
113
- {
114
- "name": "checksum_algorithm",
115
- "physical_type": "BYTE_ARRAY",
116
- "logical_type": "UTF8",
117
- "nullable": false
118
- },
119
- {
120
- "name": "raw_checksum",
121
- "physical_type": "BYTE_ARRAY",
122
- "logical_type": "UTF8",
123
- "nullable": true
124
- },
125
- {
126
- "name": "provenance_complete",
127
- "physical_type": "INT32",
128
- "logical_type": "UINT_8",
129
- "nullable": false
130
- },
131
- {
132
- "name": "snapshot_id",
133
- "physical_type": "BYTE_ARRAY",
134
- "logical_type": "UTF8",
135
- "nullable": false
136
- },
137
- {
138
- "name": "construction_mode",
139
- "physical_type": "BYTE_ARRAY",
140
- "logical_type": "UTF8",
141
- "nullable": false
142
- },
143
- {
144
- "name": "gap_policy",
145
- "physical_type": "BYTE_ARRAY",
146
- "logical_type": "UTF8",
147
- "nullable": false
148
- },
149
- {
150
- "name": "depth_limit",
151
- "physical_type": "INT32",
152
- "logical_type": "UINT_16",
153
- "nullable": false
154
- },
155
- {
156
- "name": "sequence",
157
- "physical_type": "INT64",
158
- "logical_type": "UINT_64",
159
- "nullable": true
160
- },
161
- {
162
- "name": "exact_l2_reconstruction_complete",
163
- "physical_type": "INT32",
164
- "logical_type": "UINT_8",
165
- "nullable": false
166
- },
167
- {
168
- "name": "side",
169
- "physical_type": "BYTE_ARRAY",
170
- "logical_type": "UTF8",
171
- "nullable": false
172
- },
173
- {
174
- "name": "level_index",
175
- "physical_type": "INT32",
176
- "logical_type": "UINT_16",
177
- "nullable": false
178
- },
179
- {
180
- "name": "price",
181
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
182
- "logical_type": "DECIMAL(38,18)",
183
- "nullable": false
184
- },
185
- {
186
- "name": "amount",
187
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
188
- "logical_type": "DECIMAL(38,18)",
189
- "nullable": false
190
- },
191
- {
192
- "name": "notional",
193
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
194
- "logical_type": "DECIMAL(38,18)",
195
- "nullable": false
196
- },
197
- {
198
- "name": "mid_price",
199
- "physical_type": "FIXED_LEN_BYTE_ARRAY",
200
- "logical_type": "DECIMAL(38,18)",
201
- "nullable": false
202
- },
203
- {
204
- "name": "spread_from_mid_bps",
205
- "physical_type": "DOUBLE",
206
- "logical_type": null,
207
- "nullable": false
208
- },
209
- {
210
- "name": "normalized_row_checksum",
211
- "physical_type": "BYTE_ARRAY",
212
- "logical_type": "UTF8",
213
- "nullable": false
214
- }
215
- ],
216
- "metadata": {
217
- "cex.canonical_schema_id": "cex-order-book-canonical/v1",
218
- "cex.projection_schema_id": "https://schemas.usher.so/cex-order-book-levels-parquet-projection/v1"
219
- }
220
- }
@@ -1,176 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "cex-market-data-preparation-product-pin/v2",
4
- "title": "CEX market-data preparation product pin v2",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": [
8
- "schema_id",
9
- "package",
10
- "executables",
11
- "schema_manifest",
12
- "schema_pins",
13
- "capability_policy",
14
- "source_tape_capability",
15
- "resource_policy",
16
- "preparation_library"
17
- ],
18
- "properties": {
19
- "schema_id": { "const": "cex-market-data-preparation-product-pin/v2" },
20
- "package": {
21
- "type": "object",
22
- "additionalProperties": false,
23
- "required": [
24
- "name",
25
- "version",
26
- "registry_tarball_url",
27
- "integrity",
28
- "tarball_sha256",
29
- "npm_git_head"
30
- ],
31
- "properties": {
32
- "name": { "const": "@usherlabs/cex-broker" },
33
- "version": { "$ref": "#/$defs/semver" },
34
- "registry_tarball_url": {
35
- "type": "string",
36
- "pattern": "^https://registry\\.npmjs\\.org/@usherlabs/cex-broker/-/cex-broker-[0-9A-Za-z.-]+\\.tgz$"
37
- },
38
- "integrity": {
39
- "type": "string",
40
- "pattern": "^sha512-[A-Za-z0-9+/]+={0,2}$"
41
- },
42
- "tarball_sha256": { "$ref": "#/$defs/sha256" },
43
- "npm_git_head": { "type": "string", "pattern": "^[0-9a-f]{40}$" }
44
- }
45
- },
46
- "executables": {
47
- "type": "array",
48
- "minItems": 2,
49
- "maxItems": 2,
50
- "items": {
51
- "type": "object",
52
- "additionalProperties": false,
53
- "required": [
54
- "product_id",
55
- "product_version",
56
- "relative_path",
57
- "executable_sha256"
58
- ],
59
- "properties": {
60
- "product_id": {
61
- "enum": [
62
- "market-data-vendor-backfill",
63
- "cex-canonical-orderbook-export"
64
- ]
65
- },
66
- "product_version": {
67
- "enum": [
68
- "market-data-vendor-backfill/v1",
69
- "cex-canonical-orderbook-export/v2"
70
- ]
71
- },
72
- "relative_path": {
73
- "type": "string",
74
- "pattern": "^dist/commands/[A-Za-z0-9._-]+\\.js$"
75
- },
76
- "executable_sha256": { "$ref": "#/$defs/sha256" }
77
- }
78
- }
79
- },
80
- "schema_manifest": {
81
- "type": "object",
82
- "additionalProperties": false,
83
- "required": ["schema_id", "manifest_sha256", "relative_path"],
84
- "properties": {
85
- "schema_id": {
86
- "const": "https://schemas.usher.so/market-data-vendor-backfill-schema-manifest/v3"
87
- },
88
- "manifest_sha256": { "$ref": "#/$defs/sha256" },
89
- "relative_path": {
90
- "const": "dist/market-data-preparation/schema-manifest.json"
91
- }
92
- }
93
- },
94
- "schema_pins": {
95
- "type": "array",
96
- "minItems": 12,
97
- "maxItems": 12,
98
- "uniqueItems": true,
99
- "items": {
100
- "type": "object",
101
- "additionalProperties": false,
102
- "required": ["schema_id", "schema_sha256"],
103
- "properties": {
104
- "schema_id": { "type": "string", "minLength": 1, "maxLength": 256 },
105
- "schema_sha256": { "$ref": "#/$defs/sha256" }
106
- }
107
- }
108
- },
109
- "capability_policy": { "$ref": "#/$defs/policyPin" },
110
- "source_tape_capability": { "$ref": "#/$defs/policyPin" },
111
- "resource_policy": { "$ref": "#/$defs/policyPin" },
112
- "preparation_library": {
113
- "type": "object",
114
- "additionalProperties": false,
115
- "required": [
116
- "exported_subpath",
117
- "runtime_entry_sha256",
118
- "declaration_sha256",
119
- "operations"
120
- ],
121
- "properties": {
122
- "exported_subpath": {
123
- "const": "@usherlabs/cex-broker/market-data-preparation"
124
- },
125
- "runtime_entry_sha256": { "$ref": "#/$defs/sha256" },
126
- "declaration_sha256": { "$ref": "#/$defs/sha256" },
127
- "operations": {
128
- "type": "array",
129
- "prefixItems": [
130
- {
131
- "type": "object",
132
- "additionalProperties": false,
133
- "required": ["symbol", "operation_id"],
134
- "properties": {
135
- "symbol": { "const": "runMarketDataSourceTape" },
136
- "operation_id": { "const": "market-data-source-tape/v1" }
137
- }
138
- },
139
- {
140
- "type": "object",
141
- "additionalProperties": false,
142
- "required": ["symbol", "operation_id"],
143
- "properties": {
144
- "symbol": {
145
- "const": "runMarketDataRequiredClockQualification"
146
- },
147
- "operation_id": {
148
- "const": "market-data-required-clock-qualification/v1"
149
- }
150
- }
151
- }
152
- ],
153
- "items": false,
154
- "minItems": 2,
155
- "maxItems": 2
156
- }
157
- }
158
- }
159
- },
160
- "$defs": {
161
- "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
162
- "semver": {
163
- "type": "string",
164
- "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$"
165
- },
166
- "policyPin": {
167
- "type": "object",
168
- "additionalProperties": false,
169
- "required": ["policy_id", "policy_sha256"],
170
- "properties": {
171
- "policy_id": { "type": "string", "minLength": 1, "maxLength": 256 },
172
- "policy_sha256": { "$ref": "#/$defs/sha256" }
173
- }
174
- }
175
- }
176
- }