@usherlabs/cex-broker 0.2.36 → 0.2.37
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/README.md +11 -0
- package/dist/commands/cli.js +2480 -2009
- package/dist/helpers/broker-execution-archive/index.d.ts +2 -2
- package/dist/helpers/broker-execution-archive/rows.d.ts +4 -1
- package/dist/helpers/broker-execution-archive/types.d.ts +4 -2
- package/dist/helpers/broker-execution-archive/writer.d.ts +6 -1
- package/dist/helpers/market-data-archive/canonical-orderbook.d.ts +20 -0
- package/dist/helpers/market-data-archive/capture-context.d.ts +32 -0
- package/dist/helpers/market-data-archive/capture-contract.d.ts +29 -0
- package/dist/helpers/market-data-archive/capture.d.ts +2 -0
- package/dist/helpers/market-data-archive/index.d.ts +6 -2
- package/dist/helpers/market-data-archive/legacy-migration.d.ts +37 -0
- package/dist/helpers/market-data-archive/rows.d.ts +7 -11
- package/dist/helpers/market-data-archive/types.d.ts +26 -2
- package/dist/index.js +2481 -2010
- package/dist/index.js.map +22 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,10 @@ A high-performance gRPC-based cryptocurrency exchange broker service that provid
|
|
|
24
24
|
- API keys for supported exchanges (e.g., Binance, Bybit, etc.)
|
|
25
25
|
- Optional: Verity prover URL for zero-knowledge proof integration
|
|
26
26
|
|
|
27
|
+
## Service architecture
|
|
28
|
+
|
|
29
|
+
See [SERVICES_ARCHITECTURE.md](SERVICES_ARCHITECTURE.md) for the authoritative boundaries between the full broker, operator market-data collector, archive-forwarder, research viewer, offline tools, and externally owned systems.
|
|
30
|
+
|
|
27
31
|
## 🛠️ Installation
|
|
28
32
|
|
|
29
33
|
1. **Clone the repository:**
|
|
@@ -97,8 +101,15 @@ CLICKHOUSE_PORT=8123 bun run start-candle-viewer # http://localhost:8091
|
|
|
97
101
|
|
|
98
102
|
Dev watchers: `dev:candle-viewer`, `dev:archive-forwarder`, `dev:archive-watch` (see [research/README.md](research/README.md)).
|
|
99
103
|
|
|
104
|
+
Maker `hb_runtime` delivery uses the forwarder's durable strategy-only SQLite
|
|
105
|
+
acceptance boundary. See [docs/archive-forwarder-durable-acceptance.md](docs/archive-forwarder-durable-acceptance.md)
|
|
106
|
+
for the wire versions, fixed quota/retention, retry ownership, health semantics,
|
|
107
|
+
and required production volume.
|
|
108
|
+
|
|
100
109
|
Key env vars: `CEX_BROKER_ARCHIVE_ENABLED=true`, `CEX_BROKER_ARCHIVE_FORWARDER_URL`, `CEX_BROKER_ARCHIVE_DEAD_LETTER_PATH`, and `CEX_BROKER_DEPLOYMENT_ID`. The archive is disabled for every enable value except the exact string `true`. Production durability requires the dead-letter file to reside on persistent writable storage or a mounted volume; a container-local ephemeral path is not durable.
|
|
101
110
|
|
|
111
|
+
Canonical replay capture for FIET-901/FIET-903 adds deployment-owned archive roles, capture bundles, four-feed collector configuration, deterministic checksums, conflict-blocking replay views, and mandatory legacy-to-canonical table migration before canonical-only deployment. Credential resolution remains environment-loaded broker first, request metadata second, and supported public fallback last. See [docs/canonical-market-data-replay.md](docs/canonical-market-data-replay.md) for the complete deployment and cutover contract.
|
|
112
|
+
|
|
102
113
|
#### Wallet-authenticated exchanges
|
|
103
114
|
|
|
104
115
|
Some exchanges (for example Hyperliquid, Vertex, Paradex, and Derive) authenticate with an on-chain wallet instead of exchange-issued API keys. The broker keeps the same `API_KEY` / `API_SECRET` interface and maps credentials internally based on each exchange's CCXT `requiredCredentials`:
|