@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.
- package/dist/commands/cli.js +364 -71
- package/dist/index.js +365 -72
- package/dist/index.js.map +14 -13
- package/package.json +5 -28
- package/dist/commands/cex-canonical-orderbook-export.d.ts +0 -23
- package/dist/commands/cex-canonical-orderbook-export.js +0 -34275
- package/dist/commands/cex-canonical-orderbook-export.js.map +0 -266
- package/dist/commands/market-data-vendor-backfill.d.ts +0 -24
- package/dist/commands/market-data-vendor-backfill.js +0 -34930
- package/dist/commands/market-data-vendor-backfill.js.map +0 -268
- package/dist/handlers/execute-action/context.d.ts +0 -50
- package/dist/handlers/execute-action/deposit.d.ts +0 -2
- package/dist/handlers/execute-action/handler.d.ts +0 -19
- package/dist/handlers/execute-action/index.d.ts +0 -10
- package/dist/handlers/execute-action/internal-transfer.d.ts +0 -2
- package/dist/handlers/execute-action/order-book-call.d.ts +0 -3
- package/dist/handlers/execute-action/orders.d.ts +0 -2
- package/dist/handlers/execute-action/pass-through.d.ts +0 -2
- package/dist/handlers/execute-action/perp-config.d.ts +0 -2
- package/dist/handlers/execute-action/registry.d.ts +0 -5
- package/dist/handlers/execute-action/treasury-call.d.ts +0 -2
- package/dist/handlers/execute-action/withdraw.d.ts +0 -2
- package/dist/handlers/subscribe/broker-lifecycle.d.ts +0 -13
- package/dist/handlers/subscribe/handler.d.ts +0 -20
- package/dist/handlers/subscribe/index.d.ts +0 -2
- package/dist/handlers/types.d.ts +0 -23
- package/dist/helpers/account-balance-archive-poller.d.ts +0 -19
- package/dist/helpers/auth.d.ts +0 -5
- package/dist/helpers/balance-update-archive-consumer.d.ts +0 -16
- package/dist/helpers/binance-user-data-normalization.d.ts +0 -3
- package/dist/helpers/binance-user-data-stream.d.ts +0 -58
- package/dist/helpers/broker-execution-archive/capture.d.ts +0 -41
- package/dist/helpers/broker-execution-archive/index.d.ts +0 -7
- package/dist/helpers/broker-execution-archive/journal-export.d.ts +0 -20
- package/dist/helpers/broker-execution-archive/loss-journal.d.ts +0 -36
- package/dist/helpers/broker-execution-archive/redact.d.ts +0 -7
- package/dist/helpers/broker-execution-archive/rows.d.ts +0 -134
- package/dist/helpers/broker-execution-archive/types.d.ts +0 -26
- package/dist/helpers/broker-execution-archive/withdrawal-observation-tracker.d.ts +0 -23
- package/dist/helpers/broker-execution-archive/writer.d.ts +0 -105
- package/dist/helpers/broker.d.ts +0 -38
- package/dist/helpers/canonical-orderbook-export/exact-selection.d.ts +0 -21
- package/dist/helpers/canonical-orderbook-export/exporter.d.ts +0 -26
- package/dist/helpers/canonical-orderbook-export/parquet-projection.d.ts +0 -19
- package/dist/helpers/constants.d.ts +0 -36
- package/dist/helpers/deposit-archive-poller.d.ts +0 -66
- package/dist/helpers/deposit.d.ts +0 -5
- package/dist/helpers/exchange-credentials.d.ts +0 -10
- package/dist/helpers/fill-archive-poller.d.ts +0 -42
- package/dist/helpers/grpc/broker.d.ts +0 -5
- package/dist/helpers/grpc/callbacks.d.ts +0 -9
- package/dist/helpers/grpc/payload.d.ts +0 -9
- package/dist/helpers/grpc/status.d.ts +0 -8
- package/dist/helpers/index.d.ts +0 -44
- package/dist/helpers/logger.d.ts +0 -13
- package/dist/helpers/market-data-archive/canonical-orderbook.d.ts +0 -20
- package/dist/helpers/market-data-archive/capture-context.d.ts +0 -53
- package/dist/helpers/market-data-archive/capture-contract.d.ts +0 -30
- package/dist/helpers/market-data-archive/capture.d.ts +0 -22
- package/dist/helpers/market-data-archive/index.d.ts +0 -13
- package/dist/helpers/market-data-archive/legacy-migration.d.ts +0 -37
- package/dist/helpers/market-data-archive/ohlcv-bar-tracker.d.ts +0 -11
- package/dist/helpers/market-data-archive/ohlcv-bootstrap.d.ts +0 -1
- package/dist/helpers/market-data-archive/ohlcv-history.d.ts +0 -8
- package/dist/helpers/market-data-archive/orderbook-depth.d.ts +0 -5
- package/dist/helpers/market-data-archive/orderbook-sampler.d.ts +0 -12
- package/dist/helpers/market-data-archive/parse-stream.d.ts +0 -26
- package/dist/helpers/market-data-archive/rows.d.ts +0 -14
- package/dist/helpers/market-data-archive/types.d.ts +0 -83
- package/dist/helpers/market-data-preparation/conformance-fixtures.d.ts +0 -128
- package/dist/helpers/market-data-preparation/contracts.d.ts +0 -2970
- package/dist/helpers/market-data-preparation/file-job.d.ts +0 -38
- package/dist/helpers/market-data-preparation/required-clock-qualification.d.ts +0 -43
- package/dist/helpers/market-data-preparation/source-tape-dependencies.d.ts +0 -19
- package/dist/helpers/market-data-preparation/source-tape-operation.d.ts +0 -109
- package/dist/helpers/market-data-source-forensics.d.ts +0 -400
- package/dist/helpers/market-data-vendor-backfill/archive-reader.d.ts +0 -26
- package/dist/helpers/market-data-vendor-backfill/batching.d.ts +0 -10
- package/dist/helpers/market-data-vendor-backfill/conformance-fixtures.d.ts +0 -78
- package/dist/helpers/market-data-vendor-backfill/contracts.d.ts +0 -358
- package/dist/helpers/market-data-vendor-backfill/core.d.ts +0 -101
- package/dist/helpers/market-data-vendor-backfill/cryptohftdata.d.ts +0 -118
- package/dist/helpers/market-data-vendor-backfill/forwarder-client.d.ts +0 -25
- package/dist/helpers/market-data-vendor-backfill/identity.d.ts +0 -10
- package/dist/helpers/market-data-vendor-backfill/manifests.d.ts +0 -61
- package/dist/helpers/market-data-vendor-backfill/promotion.d.ts +0 -10
- package/dist/helpers/market-data-vendor-backfill/qualification.d.ts +0 -20
- package/dist/helpers/market-data-vendor-backfill/selection.d.ts +0 -30
- package/dist/helpers/market-data-vendor-backfill/semantic-verification.d.ts +0 -25
- package/dist/helpers/market-type.d.ts +0 -16
- package/dist/helpers/order-activity-tracker.d.ts +0 -22
- package/dist/helpers/order-book.d.ts +0 -79
- package/dist/helpers/order-telemetry.d.ts +0 -50
- package/dist/helpers/otel.d.ts +0 -83
- package/dist/helpers/passive-order.d.ts +0 -8
- package/dist/helpers/public-market-data-feed/identity.d.ts +0 -12
- package/dist/helpers/public-market-data-feed/index.d.ts +0 -5
- package/dist/helpers/public-market-data-feed/orderbook-coalescing-evidence.d.ts +0 -79
- package/dist/helpers/public-market-data-feed/orderbook-profile.d.ts +0 -54
- package/dist/helpers/public-market-data-feed/subscriber-buffer.d.ts +0 -31
- package/dist/helpers/public-market-data-feed/supervisor.d.ts +0 -82
- package/dist/helpers/shared/errors.d.ts +0 -14
- package/dist/helpers/shared/guards.d.ts +0 -2
- package/dist/helpers/source-tape-sandbox.d.ts +0 -82
- package/dist/helpers/source-tape.d.ts +0 -165
- package/dist/helpers/stream-health-publisher.d.ts +0 -41
- package/dist/helpers/trace-context.d.ts +0 -8
- package/dist/helpers/transfer-network.d.ts +0 -12
- package/dist/helpers/travel-rule-deposit-reconciler.d.ts +0 -159
- package/dist/helpers/travel-rule.d.ts +0 -75
- package/dist/helpers/treasury-discovery.d.ts +0 -17
- package/dist/helpers/user-asset-archive-poller.d.ts +0 -19
- package/dist/helpers/user-data-stream-supervisor.d.ts +0 -27
- package/dist/helpers/verity.d.ts +0 -5
- package/dist/index.d.ts +0 -56
- package/dist/market-data-preparation/fixtures/conformance-v3.json +0 -621
- package/dist/market-data-preparation/policies/capability-policy.json +0 -39
- package/dist/market-data-preparation/policies/resource-policy.json +0 -16
- package/dist/market-data-preparation/policies/source-tape-capability-v1.json +0 -35
- package/dist/market-data-preparation/schema-manifest.json +0 -66
- package/dist/market-data-preparation/schemas/archive-selection-v1.schema.json +0 -224
- package/dist/market-data-preparation/schemas/backfill-request-v1.schema.json +0 -166
- package/dist/market-data-preparation/schemas/backfill-result-v2.schema.json +0 -212
- package/dist/market-data-preparation/schemas/canonical-orderbook-export-request-v1.schema.json +0 -61
- package/dist/market-data-preparation/schemas/canonical-orderbook-export-result-v2.schema.json +0 -252
- package/dist/market-data-preparation/schemas/order-book-depth-summary-parquet-projection-v1.schema.json +0 -256
- package/dist/market-data-preparation/schemas/order-book-levels-parquet-projection-v1.schema.json +0 -220
- package/dist/market-data-preparation/schemas/preparation-product-pin-v2.schema.json +0 -176
- package/dist/market-data-preparation/schemas/promotion-receipt-v1.schema.json +0 -175
- package/dist/market-data-preparation/schemas/required-clock-v1.schema.json +0 -47
- package/dist/market-data-preparation/schemas/source-forensics-ledger-v1.schema.json +0 -463
- package/dist/market-data-preparation/schemas/source-qualification-record-v1.schema.json +0 -394
- package/dist/market-data-preparation.d.ts +0 -11
- package/dist/market-data-preparation.js +0 -37488
- package/dist/market-data-preparation.js.map +0 -277
- package/dist/market-data-vendor-backfill.d.ts +0 -21
- package/dist/market-data-vendor-backfill.js +0 -22463
- package/dist/market-data-vendor-backfill.js.map +0 -199
- package/dist/proto/node.descriptor.d.ts +0 -127
- package/dist/proto-loader-options.d.ts +0 -7
- package/dist/proto-package-definition.d.ts +0 -2
- package/dist/schemas/action-payloads.d.ts +0 -88
- package/dist/server.d.ts +0 -10
- package/dist/types.d.ts +0 -100
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.usher.so/market-data-vendor-backfill-promotion-receipt/v1",
|
|
4
|
-
"title": "Market data vendor backfill promotion receipt v1",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_id",
|
|
9
|
-
"receipt_id",
|
|
10
|
-
"promotion_identity_sha256",
|
|
11
|
-
"verified_at",
|
|
12
|
-
"request_id",
|
|
13
|
-
"idempotency_key",
|
|
14
|
-
"source",
|
|
15
|
-
"capture_origin",
|
|
16
|
-
"source_mode",
|
|
17
|
-
"provider",
|
|
18
|
-
"adapter_version",
|
|
19
|
-
"effective_policies",
|
|
20
|
-
"capture_bundle_id",
|
|
21
|
-
"scope",
|
|
22
|
-
"window",
|
|
23
|
-
"depth",
|
|
24
|
-
"construction_mode",
|
|
25
|
-
"canonical_schema",
|
|
26
|
-
"coverage_policy",
|
|
27
|
-
"selection_sha256",
|
|
28
|
-
"vendor_semantic_digest",
|
|
29
|
-
"canonical_semantic_digest",
|
|
30
|
-
"prefix_digest",
|
|
31
|
-
"suffix_digest",
|
|
32
|
-
"seam_verified",
|
|
33
|
-
"coverage_verified",
|
|
34
|
-
"dataset_objects"
|
|
35
|
-
],
|
|
36
|
-
"properties": {
|
|
37
|
-
"schema_id": {
|
|
38
|
-
"const": "https://schemas.usher.so/market-data-vendor-backfill-promotion-receipt/v1"
|
|
39
|
-
},
|
|
40
|
-
"receipt_id": { "$ref": "#/$defs/sha256" },
|
|
41
|
-
"promotion_identity_sha256": { "$ref": "#/$defs/sha256" },
|
|
42
|
-
"verified_at": { "$ref": "#/$defs/timestamp" },
|
|
43
|
-
"request_id": { "$ref": "#/$defs/uuid" },
|
|
44
|
-
"idempotency_key": { "$ref": "#/$defs/sha256" },
|
|
45
|
-
"source": { "const": "external_backfill" },
|
|
46
|
-
"capture_origin": { "const": "vendor_historical_backfill" },
|
|
47
|
-
"source_mode": { "const": "vendor_historical_backfill_v1" },
|
|
48
|
-
"provider": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
49
|
-
"adapter_version": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
50
|
-
"effective_policies": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"additionalProperties": false,
|
|
53
|
-
"required": [
|
|
54
|
-
"capability_policy",
|
|
55
|
-
"resource_policy",
|
|
56
|
-
"adapter_policy",
|
|
57
|
-
"acquisition_policy"
|
|
58
|
-
],
|
|
59
|
-
"properties": {
|
|
60
|
-
"capability_policy": { "$ref": "#/$defs/policyPin" },
|
|
61
|
-
"resource_policy": { "$ref": "#/$defs/policyPin" },
|
|
62
|
-
"adapter_policy": { "$ref": "#/$defs/policyPin" },
|
|
63
|
-
"acquisition_policy": { "$ref": "#/$defs/policyPin" }
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"capture_bundle_id": { "$ref": "#/$defs/sha256" },
|
|
67
|
-
"scope": { "$ref": "#/$defs/scope" },
|
|
68
|
-
"window": { "$ref": "#/$defs/interval" },
|
|
69
|
-
"depth": { "type": "integer", "minimum": 1, "maximum": 500 },
|
|
70
|
-
"construction_mode": {
|
|
71
|
-
"enum": [
|
|
72
|
-
"sampled_top_n_snapshot",
|
|
73
|
-
"exact_l2_reconstruction",
|
|
74
|
-
"policy_neutral_top_n_state_change_tape/v1"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"canonical_schema": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"additionalProperties": false,
|
|
80
|
-
"required": ["schema_id", "schema_sha256"],
|
|
81
|
-
"properties": {
|
|
82
|
-
"schema_id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
83
|
-
"schema_sha256": { "$ref": "#/$defs/sha256" }
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"coverage_policy": { "$ref": "#/$defs/coveragePolicy" },
|
|
87
|
-
"selection_sha256": { "$ref": "#/$defs/sha256" },
|
|
88
|
-
"vendor_semantic_digest": { "$ref": "#/$defs/sha256" },
|
|
89
|
-
"canonical_semantic_digest": { "$ref": "#/$defs/sha256" },
|
|
90
|
-
"prefix_digest": { "$ref": "#/$defs/sha256" },
|
|
91
|
-
"suffix_digest": { "$ref": "#/$defs/sha256" },
|
|
92
|
-
"seam_verified": { "const": true },
|
|
93
|
-
"coverage_verified": { "const": true },
|
|
94
|
-
"dataset_objects": {
|
|
95
|
-
"type": "array",
|
|
96
|
-
"minItems": 1,
|
|
97
|
-
"maxItems": 10000,
|
|
98
|
-
"items": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"additionalProperties": false,
|
|
101
|
-
"required": ["identity", "checksum", "bytes", "rows"],
|
|
102
|
-
"properties": {
|
|
103
|
-
"identity": { "type": "string", "minLength": 1, "maxLength": 2048 },
|
|
104
|
-
"checksum": { "$ref": "#/$defs/sha256" },
|
|
105
|
-
"bytes": { "$ref": "#/$defs/safeInteger" },
|
|
106
|
-
"rows": { "$ref": "#/$defs/safeInteger" }
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"$defs": {
|
|
112
|
-
"uuid": {
|
|
113
|
-
"type": "string",
|
|
114
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
115
|
-
},
|
|
116
|
-
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
117
|
-
"timestamp": {
|
|
118
|
-
"type": "string",
|
|
119
|
-
"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$"
|
|
120
|
-
},
|
|
121
|
-
"safeInteger": {
|
|
122
|
-
"type": "integer",
|
|
123
|
-
"minimum": 0,
|
|
124
|
-
"maximum": 9007199254740991
|
|
125
|
-
},
|
|
126
|
-
"scope": {
|
|
127
|
-
"type": "object",
|
|
128
|
-
"additionalProperties": false,
|
|
129
|
-
"required": ["exchange", "trading_pair", "market_type", "feed"],
|
|
130
|
-
"properties": {
|
|
131
|
-
"exchange": {
|
|
132
|
-
"type": "string",
|
|
133
|
-
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
|
|
134
|
-
},
|
|
135
|
-
"trading_pair": { "type": "string", "minLength": 3, "maxLength": 128 },
|
|
136
|
-
"market_type": { "enum": ["spot", "swap", "future"] },
|
|
137
|
-
"feed": { "const": "ORDERBOOK" }
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"interval": {
|
|
141
|
-
"type": "object",
|
|
142
|
-
"additionalProperties": false,
|
|
143
|
-
"required": ["start_at", "end_at"],
|
|
144
|
-
"properties": {
|
|
145
|
-
"start_at": { "$ref": "#/$defs/timestamp" },
|
|
146
|
-
"end_at": { "$ref": "#/$defs/timestamp" }
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"coveragePolicy": {
|
|
150
|
-
"type": "object",
|
|
151
|
-
"additionalProperties": false,
|
|
152
|
-
"required": [
|
|
153
|
-
"policy_id",
|
|
154
|
-
"max_asof_lag_ms",
|
|
155
|
-
"future_rows",
|
|
156
|
-
"missing_required_event"
|
|
157
|
-
],
|
|
158
|
-
"properties": {
|
|
159
|
-
"policy_id": { "const": "prior-asof-strict/v1" },
|
|
160
|
-
"max_asof_lag_ms": { "$ref": "#/$defs/safeInteger" },
|
|
161
|
-
"future_rows": { "const": "reject" },
|
|
162
|
-
"missing_required_event": { "const": "fail" }
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"policyPin": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"additionalProperties": false,
|
|
168
|
-
"required": ["policy_id", "policy_sha256"],
|
|
169
|
-
"properties": {
|
|
170
|
-
"policy_id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
171
|
-
"policy_sha256": { "$ref": "#/$defs/sha256" }
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.usher.so/market-data-vendor-backfill-required-clock/v1",
|
|
4
|
-
"title": "Market data vendor backfill required clock v1",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_id",
|
|
9
|
-
"clock_id",
|
|
10
|
-
"clock_sha256",
|
|
11
|
-
"created_at",
|
|
12
|
-
"targets"
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"schema_id": {
|
|
16
|
-
"const": "https://schemas.usher.so/market-data-vendor-backfill-required-clock/v1"
|
|
17
|
-
},
|
|
18
|
-
"clock_id": { "$ref": "#/$defs/uuid" },
|
|
19
|
-
"clock_sha256": { "$ref": "#/$defs/sha256" },
|
|
20
|
-
"created_at": { "$ref": "#/$defs/timestamp" },
|
|
21
|
-
"targets": {
|
|
22
|
-
"type": "array",
|
|
23
|
-
"minItems": 1,
|
|
24
|
-
"maxItems": 100000,
|
|
25
|
-
"items": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"additionalProperties": false,
|
|
28
|
-
"required": ["target_id", "target_at"],
|
|
29
|
-
"properties": {
|
|
30
|
-
"target_id": { "$ref": "#/$defs/uuid" },
|
|
31
|
-
"target_at": { "$ref": "#/$defs/timestamp" }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"$defs": {
|
|
37
|
-
"uuid": {
|
|
38
|
-
"type": "string",
|
|
39
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
40
|
-
},
|
|
41
|
-
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
42
|
-
"timestamp": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"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$"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.usher.so/market-data-source-forensics-ledger/v1",
|
|
4
|
-
"title": "CEX market-data source-forensics ledger v1",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_id",
|
|
9
|
-
"ledger_sha256",
|
|
10
|
-
"operation_kind",
|
|
11
|
-
"normalized_invocation_sha256",
|
|
12
|
-
"request_id",
|
|
13
|
-
"scope",
|
|
14
|
-
"window",
|
|
15
|
-
"effective_policies",
|
|
16
|
-
"provider_object_inventory",
|
|
17
|
-
"provider_objects",
|
|
18
|
-
"records",
|
|
19
|
-
"summary",
|
|
20
|
-
"limits",
|
|
21
|
-
"complete",
|
|
22
|
-
"incomplete_reason"
|
|
23
|
-
],
|
|
24
|
-
"properties": {
|
|
25
|
-
"schema_id": {
|
|
26
|
-
"const": "https://schemas.usher.so/market-data-source-forensics-ledger/v1"
|
|
27
|
-
},
|
|
28
|
-
"ledger_sha256": { "$ref": "#/$defs/sha256" },
|
|
29
|
-
"operation_kind": {
|
|
30
|
-
"enum": ["required_clock_qualification", "source_tape"]
|
|
31
|
-
},
|
|
32
|
-
"normalized_invocation_sha256": { "$ref": "#/$defs/sha256" },
|
|
33
|
-
"request_id": { "$ref": "#/$defs/uuid" },
|
|
34
|
-
"scope": { "$ref": "#/$defs/scope" },
|
|
35
|
-
"window": { "$ref": "#/$defs/interval" },
|
|
36
|
-
"required_clock": { "$ref": "#/$defs/clock" },
|
|
37
|
-
"source_tape": { "$ref": "#/$defs/sourceTape" },
|
|
38
|
-
"effective_policies": { "$ref": "#/$defs/policies" },
|
|
39
|
-
"provider_object_inventory": { "$ref": "#/$defs/inventory" },
|
|
40
|
-
"provider_objects": {
|
|
41
|
-
"type": "array",
|
|
42
|
-
"items": { "$ref": "#/$defs/object" }
|
|
43
|
-
},
|
|
44
|
-
"records": {
|
|
45
|
-
"type": "array",
|
|
46
|
-
"maxItems": 100000,
|
|
47
|
-
"items": { "$ref": "#/$defs/record" }
|
|
48
|
-
},
|
|
49
|
-
"target_dispositions": {
|
|
50
|
-
"type": "array",
|
|
51
|
-
"maxItems": 100000,
|
|
52
|
-
"items": { "$ref": "#/$defs/disposition" }
|
|
53
|
-
},
|
|
54
|
-
"summary": { "type": "object" },
|
|
55
|
-
"limits": {
|
|
56
|
-
"type": "object",
|
|
57
|
-
"additionalProperties": false,
|
|
58
|
-
"required": ["max_records", "max_canonical_json_bytes"],
|
|
59
|
-
"properties": {
|
|
60
|
-
"max_records": { "const": 100000 },
|
|
61
|
-
"max_canonical_json_bytes": { "const": 67108864 }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"complete": { "type": "boolean" },
|
|
65
|
-
"incomplete_reason": {
|
|
66
|
-
"oneOf": [
|
|
67
|
-
{ "type": "null" },
|
|
68
|
-
{ "const": "forensics_evidence_bound_exceeded" }
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"oneOf": [
|
|
73
|
-
{
|
|
74
|
-
"properties": {
|
|
75
|
-
"operation_kind": { "const": "required_clock_qualification" },
|
|
76
|
-
"summary": { "$ref": "#/$defs/clockSummary" },
|
|
77
|
-
"required_clock": { "$ref": "#/$defs/clock" },
|
|
78
|
-
"target_dispositions": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"maxItems": 100000,
|
|
81
|
-
"items": { "$ref": "#/$defs/disposition" }
|
|
82
|
-
},
|
|
83
|
-
"source_tape": {}
|
|
84
|
-
},
|
|
85
|
-
"required": ["required_clock", "target_dispositions"],
|
|
86
|
-
"not": {
|
|
87
|
-
"properties": { "source_tape": {} },
|
|
88
|
-
"required": ["source_tape"]
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"properties": {
|
|
93
|
-
"operation_kind": { "const": "source_tape" },
|
|
94
|
-
"summary": { "$ref": "#/$defs/recordSummary" },
|
|
95
|
-
"source_tape": { "$ref": "#/$defs/sourceTape" },
|
|
96
|
-
"required_clock": {},
|
|
97
|
-
"target_dispositions": {}
|
|
98
|
-
},
|
|
99
|
-
"required": ["source_tape"],
|
|
100
|
-
"not": {
|
|
101
|
-
"anyOf": [
|
|
102
|
-
{
|
|
103
|
-
"properties": { "required_clock": {} },
|
|
104
|
-
"required": ["required_clock"]
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"properties": { "target_dispositions": {} },
|
|
108
|
-
"required": ["target_dispositions"]
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"$defs": {
|
|
115
|
-
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
116
|
-
"uuid": {
|
|
117
|
-
"type": "string",
|
|
118
|
-
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
119
|
-
},
|
|
120
|
-
"uint": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
121
|
-
"pin": {
|
|
122
|
-
"type": "object",
|
|
123
|
-
"additionalProperties": false,
|
|
124
|
-
"required": ["policy_id", "policy_sha256"],
|
|
125
|
-
"properties": {
|
|
126
|
-
"policy_id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
127
|
-
"policy_sha256": { "$ref": "#/$defs/sha256" }
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"scope": {
|
|
131
|
-
"type": "object",
|
|
132
|
-
"additionalProperties": false,
|
|
133
|
-
"required": ["exchange", "trading_pair", "market_type", "feed"],
|
|
134
|
-
"properties": {
|
|
135
|
-
"exchange": { "type": "string", "pattern": "^[a-z0-9_-]+$" },
|
|
136
|
-
"trading_pair": {
|
|
137
|
-
"type": "string",
|
|
138
|
-
"pattern": "^[A-Z0-9]+-[A-Z0-9]+$"
|
|
139
|
-
},
|
|
140
|
-
"market_type": { "enum": ["spot", "swap", "future"] },
|
|
141
|
-
"feed": { "const": "ORDERBOOK" }
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"interval": {
|
|
145
|
-
"type": "object",
|
|
146
|
-
"additionalProperties": false,
|
|
147
|
-
"required": ["start_time_ms", "end_time_ms_exclusive"],
|
|
148
|
-
"properties": {
|
|
149
|
-
"start_time_ms": { "$ref": "#/$defs/uint" },
|
|
150
|
-
"end_time_ms_exclusive": { "$ref": "#/$defs/uint" }
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"clock": {
|
|
154
|
-
"type": "object",
|
|
155
|
-
"additionalProperties": false,
|
|
156
|
-
"required": ["clock_id", "clock_sha256", "event_count"],
|
|
157
|
-
"properties": {
|
|
158
|
-
"clock_id": { "$ref": "#/$defs/uuid" },
|
|
159
|
-
"clock_sha256": { "$ref": "#/$defs/sha256" },
|
|
160
|
-
"event_count": { "$ref": "#/$defs/uint" }
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"sourceTape": {
|
|
164
|
-
"type": "object",
|
|
165
|
-
"additionalProperties": false,
|
|
166
|
-
"required": ["product_id", "product_version", "state_count"],
|
|
167
|
-
"properties": {
|
|
168
|
-
"product_id": { "const": "market-data-source-tape" },
|
|
169
|
-
"product_version": { "const": "market-data-source-tape/v1" },
|
|
170
|
-
"state_count": { "$ref": "#/$defs/uint" }
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
"policies": {
|
|
174
|
-
"type": "object",
|
|
175
|
-
"additionalProperties": false,
|
|
176
|
-
"required": [
|
|
177
|
-
"capability_policy",
|
|
178
|
-
"resource_policy",
|
|
179
|
-
"adapter_policy",
|
|
180
|
-
"acquisition_policy"
|
|
181
|
-
],
|
|
182
|
-
"properties": {
|
|
183
|
-
"capability_policy": { "$ref": "#/$defs/pin" },
|
|
184
|
-
"resource_policy": { "$ref": "#/$defs/pin" },
|
|
185
|
-
"adapter_policy": { "$ref": "#/$defs/pin" },
|
|
186
|
-
"acquisition_policy": { "$ref": "#/$defs/pin" }
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
"inventory": {
|
|
190
|
-
"type": "object",
|
|
191
|
-
"additionalProperties": false,
|
|
192
|
-
"required": [
|
|
193
|
-
"expected_identities",
|
|
194
|
-
"observed_identities",
|
|
195
|
-
"expected_selected_intervals",
|
|
196
|
-
"observed_selected_intervals",
|
|
197
|
-
"complete"
|
|
198
|
-
],
|
|
199
|
-
"properties": {
|
|
200
|
-
"expected_identities": {
|
|
201
|
-
"type": "array",
|
|
202
|
-
"maxItems": 10000,
|
|
203
|
-
"uniqueItems": true,
|
|
204
|
-
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
|
|
205
|
-
},
|
|
206
|
-
"observed_identities": {
|
|
207
|
-
"type": "array",
|
|
208
|
-
"maxItems": 10000,
|
|
209
|
-
"uniqueItems": true,
|
|
210
|
-
"items": { "type": "string", "minLength": 1, "maxLength": 1024 }
|
|
211
|
-
},
|
|
212
|
-
"expected_selected_intervals": {
|
|
213
|
-
"type": "array",
|
|
214
|
-
"maxItems": 10000,
|
|
215
|
-
"uniqueItems": true,
|
|
216
|
-
"items": { "$ref": "#/$defs/interval" }
|
|
217
|
-
},
|
|
218
|
-
"observed_selected_intervals": {
|
|
219
|
-
"type": "array",
|
|
220
|
-
"maxItems": 10000,
|
|
221
|
-
"uniqueItems": true,
|
|
222
|
-
"items": { "$ref": "#/$defs/interval" }
|
|
223
|
-
},
|
|
224
|
-
"complete": { "type": "boolean" }
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"object": {
|
|
228
|
-
"type": "object",
|
|
229
|
-
"additionalProperties": false,
|
|
230
|
-
"required": ["identity", "checksums", "attempt_count", "quarantined"],
|
|
231
|
-
"properties": {
|
|
232
|
-
"identity": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
233
|
-
"checksums": {
|
|
234
|
-
"type": "array",
|
|
235
|
-
"minItems": 1,
|
|
236
|
-
"uniqueItems": true,
|
|
237
|
-
"items": { "$ref": "#/$defs/sha256" }
|
|
238
|
-
},
|
|
239
|
-
"attempt_count": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
240
|
-
"quarantined": { "type": "boolean" }
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
"anchor": {
|
|
244
|
-
"type": "object",
|
|
245
|
-
"additionalProperties": false,
|
|
246
|
-
"required": [
|
|
247
|
-
"event_time_ms",
|
|
248
|
-
"sequence",
|
|
249
|
-
"object_identity",
|
|
250
|
-
"object_checksum"
|
|
251
|
-
],
|
|
252
|
-
"properties": {
|
|
253
|
-
"event_time_ms": { "$ref": "#/$defs/uint" },
|
|
254
|
-
"sequence": { "type": "string", "pattern": "^[0-9]+$" },
|
|
255
|
-
"object_identity": {
|
|
256
|
-
"type": "string",
|
|
257
|
-
"minLength": 1,
|
|
258
|
-
"maxLength": 1024
|
|
259
|
-
},
|
|
260
|
-
"object_checksum": { "$ref": "#/$defs/sha256" }
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
"targetInterval": {
|
|
264
|
-
"type": "object",
|
|
265
|
-
"additionalProperties": false,
|
|
266
|
-
"required": [
|
|
267
|
-
"start_target_time_ms",
|
|
268
|
-
"end_target_time_ms_exclusive",
|
|
269
|
-
"target_count"
|
|
270
|
-
],
|
|
271
|
-
"properties": {
|
|
272
|
-
"start_target_time_ms": { "$ref": "#/$defs/uint" },
|
|
273
|
-
"end_target_time_ms_exclusive": { "$ref": "#/$defs/uint" },
|
|
274
|
-
"target_count": { "$ref": "#/$defs/uint" }
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
"lagDistribution": {
|
|
278
|
-
"type": "object",
|
|
279
|
-
"additionalProperties": false,
|
|
280
|
-
"required": [
|
|
281
|
-
"lag_1000_ms",
|
|
282
|
-
"lag_2000_ms",
|
|
283
|
-
"lag_5000_ms",
|
|
284
|
-
"lag_10000_ms",
|
|
285
|
-
"lag_30000_ms",
|
|
286
|
-
"lag_60000_ms"
|
|
287
|
-
],
|
|
288
|
-
"properties": {
|
|
289
|
-
"lag_1000_ms": { "$ref": "#/$defs/uint" },
|
|
290
|
-
"lag_2000_ms": { "$ref": "#/$defs/uint" },
|
|
291
|
-
"lag_5000_ms": { "$ref": "#/$defs/uint" },
|
|
292
|
-
"lag_10000_ms": { "$ref": "#/$defs/uint" },
|
|
293
|
-
"lag_30000_ms": { "$ref": "#/$defs/uint" },
|
|
294
|
-
"lag_60000_ms": { "$ref": "#/$defs/uint" }
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
"sequence": {
|
|
298
|
-
"type": "object",
|
|
299
|
-
"additionalProperties": false,
|
|
300
|
-
"required": [
|
|
301
|
-
"expected_previous",
|
|
302
|
-
"observed_previous",
|
|
303
|
-
"observed_final",
|
|
304
|
-
"event_time_ms"
|
|
305
|
-
],
|
|
306
|
-
"properties": {
|
|
307
|
-
"expected_previous": { "type": "string", "pattern": "^[0-9]+$" },
|
|
308
|
-
"observed_previous": { "type": "string", "pattern": "^[0-9]+$" },
|
|
309
|
-
"observed_final": { "type": "string", "pattern": "^[0-9]+$" },
|
|
310
|
-
"event_time_ms": { "$ref": "#/$defs/uint" }
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
"record": {
|
|
314
|
-
"type": "object",
|
|
315
|
-
"additionalProperties": false,
|
|
316
|
-
"required": [
|
|
317
|
-
"record_sha256",
|
|
318
|
-
"kind",
|
|
319
|
-
"scope",
|
|
320
|
-
"provider_objects",
|
|
321
|
-
"previous_anchor",
|
|
322
|
-
"next_anchor",
|
|
323
|
-
"target_interval",
|
|
324
|
-
"lag_distribution",
|
|
325
|
-
"sequence",
|
|
326
|
-
"classification",
|
|
327
|
-
"adapter_version"
|
|
328
|
-
],
|
|
329
|
-
"properties": {
|
|
330
|
-
"record_sha256": { "$ref": "#/$defs/sha256" },
|
|
331
|
-
"kind": {
|
|
332
|
-
"enum": [
|
|
333
|
-
"sequence_discontinuity",
|
|
334
|
-
"unanchored_target_interval",
|
|
335
|
-
"stale_target_interval",
|
|
336
|
-
"future_state_interval",
|
|
337
|
-
"provider_object_checksum_conflict"
|
|
338
|
-
]
|
|
339
|
-
},
|
|
340
|
-
"scope": { "$ref": "#/$defs/scope" },
|
|
341
|
-
"provider_objects": {
|
|
342
|
-
"type": "array",
|
|
343
|
-
"items": { "$ref": "#/$defs/object" }
|
|
344
|
-
},
|
|
345
|
-
"previous_anchor": {
|
|
346
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/anchor" }]
|
|
347
|
-
},
|
|
348
|
-
"next_anchor": {
|
|
349
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/anchor" }]
|
|
350
|
-
},
|
|
351
|
-
"target_interval": {
|
|
352
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/targetInterval" }]
|
|
353
|
-
},
|
|
354
|
-
"lag_distribution": {
|
|
355
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/lagDistribution" }]
|
|
356
|
-
},
|
|
357
|
-
"sequence": {
|
|
358
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/sequence" }]
|
|
359
|
-
},
|
|
360
|
-
"classification": {
|
|
361
|
-
"oneOf": [
|
|
362
|
-
{ "type": "null" },
|
|
363
|
-
{
|
|
364
|
-
"enum": [
|
|
365
|
-
"stable_object_corruption",
|
|
366
|
-
"mutable_provider_bytes",
|
|
367
|
-
"provider_row_loss",
|
|
368
|
-
"object_boundary_order_defect",
|
|
369
|
-
"valid_inactive_market_state",
|
|
370
|
-
"unresolved"
|
|
371
|
-
]
|
|
372
|
-
}
|
|
373
|
-
]
|
|
374
|
-
},
|
|
375
|
-
"adapter_version": {
|
|
376
|
-
"type": "string",
|
|
377
|
-
"minLength": 1,
|
|
378
|
-
"maxLength": 256
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
"disposition": {
|
|
383
|
-
"type": "object",
|
|
384
|
-
"additionalProperties": false,
|
|
385
|
-
"required": [
|
|
386
|
-
"target_id",
|
|
387
|
-
"target_time_ms",
|
|
388
|
-
"disposition",
|
|
389
|
-
"source_time_ms",
|
|
390
|
-
"asof_age_ms",
|
|
391
|
-
"record_sha256s"
|
|
392
|
-
],
|
|
393
|
-
"properties": {
|
|
394
|
-
"target_id": { "$ref": "#/$defs/uuid" },
|
|
395
|
-
"target_time_ms": { "$ref": "#/$defs/uint" },
|
|
396
|
-
"disposition": {
|
|
397
|
-
"enum": [
|
|
398
|
-
"fresh_within_bound",
|
|
399
|
-
"valid_inactive_market_state",
|
|
400
|
-
"disqualifying"
|
|
401
|
-
]
|
|
402
|
-
},
|
|
403
|
-
"source_time_ms": {
|
|
404
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/uint" }]
|
|
405
|
-
},
|
|
406
|
-
"asof_age_ms": {
|
|
407
|
-
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/uint" }]
|
|
408
|
-
},
|
|
409
|
-
"record_sha256s": {
|
|
410
|
-
"type": "array",
|
|
411
|
-
"uniqueItems": true,
|
|
412
|
-
"items": { "$ref": "#/$defs/sha256" }
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
"recordSummary": {
|
|
417
|
-
"type": "object",
|
|
418
|
-
"additionalProperties": false,
|
|
419
|
-
"required": [
|
|
420
|
-
"retained_record_count",
|
|
421
|
-
"total_record_count",
|
|
422
|
-
"omitted_record_count",
|
|
423
|
-
"affected_target_count",
|
|
424
|
-
"unresolved_record_count"
|
|
425
|
-
],
|
|
426
|
-
"properties": {
|
|
427
|
-
"retained_record_count": { "$ref": "#/$defs/uint" },
|
|
428
|
-
"total_record_count": { "$ref": "#/$defs/uint" },
|
|
429
|
-
"omitted_record_count": { "$ref": "#/$defs/uint" },
|
|
430
|
-
"affected_target_count": { "$ref": "#/$defs/uint" },
|
|
431
|
-
"unresolved_record_count": { "$ref": "#/$defs/uint" }
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
"clockSummary": {
|
|
435
|
-
"type": "object",
|
|
436
|
-
"additionalProperties": false,
|
|
437
|
-
"required": [
|
|
438
|
-
"retained_record_count",
|
|
439
|
-
"total_record_count",
|
|
440
|
-
"omitted_record_count",
|
|
441
|
-
"affected_target_count",
|
|
442
|
-
"unresolved_record_count",
|
|
443
|
-
"disposition_complete",
|
|
444
|
-
"fresh_target_count",
|
|
445
|
-
"inactive_target_count",
|
|
446
|
-
"disqualifying_target_count",
|
|
447
|
-
"omitted_target_disposition_count"
|
|
448
|
-
],
|
|
449
|
-
"properties": {
|
|
450
|
-
"retained_record_count": { "$ref": "#/$defs/uint" },
|
|
451
|
-
"total_record_count": { "$ref": "#/$defs/uint" },
|
|
452
|
-
"omitted_record_count": { "$ref": "#/$defs/uint" },
|
|
453
|
-
"affected_target_count": { "$ref": "#/$defs/uint" },
|
|
454
|
-
"unresolved_record_count": { "$ref": "#/$defs/uint" },
|
|
455
|
-
"disposition_complete": { "type": "boolean" },
|
|
456
|
-
"fresh_target_count": { "$ref": "#/$defs/uint" },
|
|
457
|
-
"inactive_target_count": { "$ref": "#/$defs/uint" },
|
|
458
|
-
"disqualifying_target_count": { "$ref": "#/$defs/uint" },
|
|
459
|
-
"omitted_target_disposition_count": { "$ref": "#/$defs/uint" }
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|