@imbingox/acex 0.4.0-beta.13 → 0.4.0-beta.14

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 (2) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/package.json +6 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,176 @@
1
+ # @imbingox/acex
2
+
3
+ ## 0.4.0-beta.14
4
+
5
+ ### Patch Changes
6
+
7
+ - a57b1a0: Include `README.md` and `CHANGELOG.md` in the published npm package so downstream consumers can inspect package usage and release notes from the installed tarball.
8
+
9
+ ## 0.4.0-beta.13
10
+
11
+ ### Patch Changes
12
+
13
+ - 3581ced: Binance private user streams now recover from `listenKeyExpired`, listenKey keepalive failure, and private stream message watchdog timeout by rotating the listenKey and rebuilding the WebSocket, then triggering the existing account/order reconcile path. Added optional `account.binance.privateStreamStaleAfterMs` tuning and a live order smoke entry for listenKey invalidation recovery.
14
+
15
+ ## 0.4.0-beta.12
16
+
17
+ ### Patch Changes
18
+
19
+ - e98dba3: Fix Binance `cancelAllOrders` parsing of the PAPI `{code,msg}` response as an order array, which previously always threw against the live API after the venue had already canceled the orders. The adapter now pre-fetches symbol open orders and returns them as canceled snapshots after the cancel-all response succeeds.
20
+
21
+ ## 0.4.0-beta.11
22
+
23
+ ### Patch Changes
24
+
25
+ - acbdfd8: OrderManager 内部订单主键改为 SDK 生成的 `localOrderId`,并维护 venue `orderId` / `clientOrderId` 反向索引与下单 pending claim,避免 REST 返回前早到的 WS 更新双建订单。公开 API 与类型不变。
26
+
27
+ 行为变化:调用 `createOrder()` 未传 `clientOrderId` 时,SDK 现在会生成合规的 `acex-*` client id 并作为 Binance `newClientOrderId` 发送,返回的 `snapshot.clientOrderId` 也会是该生成值,而不再依赖 Binance 自动生成。
28
+
29
+ ## 0.4.0-beta.10
30
+
31
+ ### Patch Changes
32
+
33
+ - 89f846e: OrderManager 内部订单存储改为 open / closed 分层(按 symbol 嵌套)+ 复合身份索引,终态订单不再无界累积:closed 订单按 symbol 保留最近 N 个(新增可选 `CreateClientOptions.order.maxClosedOrdersPerSymbol`,默认 500,超限按 FIFO 批量裁剪),`getOpenOrders()` 查询不再随历史订单数量增长而变慢。`getOrder()` 对外行为保持不变(仍可只按 `orderId` 或 `clientOrderId` 查询、可省略 `symbol`),`clientOrderId` 多命中时返回最新一笔。
34
+
35
+ ## 0.4.0-beta.9
36
+
37
+ ### Patch Changes
38
+
39
+ - 153e2d8: Binance public market catalog now treats `TRADIFI_PERPETUAL` USDⓈ-M symbols as perpetual swaps, so TradFi Perps such as `AAPLUSDT` normalize to `AAPL/USDT:USDT` and support the existing L1 book and funding-rate public WebSocket subscriptions.
40
+
41
+ ## 0.4.0-beta.8
42
+
43
+ ### Minor Changes
44
+
45
+ - d874b29: 公开 `AcexError.details` 与 `AcexError.cause`,让调用方在捕获订单、市场目录、server time、market stream 首包超时、account/order bootstrap 等失败时,既能继续使用稳定的 `error.code` 分支,也能读取交易所结构化拒绝原因(`details.venueError.code/message`)和已脱敏的 transport 诊断信息(`details.transport`)。
46
+
47
+ ## 0.4.0-beta.7
48
+
49
+ ### Minor Changes
50
+
51
+ - dac87aa: Add `client.market.fetchServerTime(venue)` with Binance USDM server-time support, RTT measurement, estimated clock offset, venue capability reporting, and a structured failure code.
52
+
53
+ ## 0.4.0-beta.6
54
+
55
+ ### Minor Changes
56
+
57
+ - f65bab7: 新增 `client.market.reloadMarkets(venue?)` 主动刷新市场目录能力,并公开 `MarketCatalogReloadSummary` 返回每个 venue 的新增、移除、总数和失败摘要。刷新失败会保留旧目录并在对应 summary 中返回错误,方便长运行进程在交易所新增 symbol 后无需重启即可加载新目录。
58
+
59
+ ## 0.4.0-beta.5
60
+
61
+ ### Patch Changes
62
+
63
+ - e61f10f: private 编排层改为按 adapter capability 分派,移除残留的 venue 字面量:下单命令是否支持按 `orderCapabilities.supported`、订单订阅按 `orderCapabilities.updates`、private credentials 是否必需按 `accountCapabilities.credentialsRequired`、account stream 启动顺序按 `accountCapabilities.updates`(polling 先 bootstrap、websocket 先建流)、REST account refresh polling 按 adapter 是否实现可选的 `refreshAccount()` 判别。juplend 轮询间隔从内部 `PrivateStreamOptions` 收口进 adapter 构造。公开 API、公共类型与运行时行为均不变,为后续接入新交易所做准备。
64
+
65
+ ## 0.4.0-beta.4
66
+
67
+ ### Minor Changes
68
+
69
+ - 0d99377: Add a public `RateLimiter` seam via `CreateClientOptions.rateLimiter`. The default reactive limiter tracks venue-provided REST usage metadata and honors `Retry-After` after 429/418 responses without proactively throttling normal requests or replaying non-idempotent order commands.
70
+
71
+ ## 0.4.0-beta.3
72
+
73
+ ### Minor Changes
74
+
75
+ - c3c9460: Add an injectable request signing clock via `CreateClientOptions.clock` and the public `TimeProvider` type. The default remains the local system clock; this does not add server-time calibration.
76
+
77
+ ## 0.4.0-beta.2
78
+
79
+ ### Patch Changes
80
+
81
+ - d9bacb6: 对外错误信息不再泄漏签名与密钥。请求失败时,错误的 `message` 与 URL 会对 `signature`、API key、`listenKey`、`token`、`passphrase` 等敏感 query 参数及对应的 JSON body 字段做脱敏(替换为 `[REDACTED]`),私有订阅 bootstrap 失败路径同样会对透传的错误信息脱敏。此前这些敏感值可能随错误信息进入日志。属向后兼容的行为修复,不改变公共类型与 API 形状。
82
+
83
+ ## 0.4.0-beta.1
84
+
85
+ ### Minor Changes
86
+
87
+ - adc9274: 公共 snapshot / market 数值字段(包括 `L1Book`、`FundingRateSnapshot`、`OrderSnapshot`、`BalanceSnapshot`、`PositionSnapshot`、`RiskSnapshot`、`MarketDefinition` 及 lending facets)由 `BigNumber` 改为 canonical 十进制 string。
88
+
89
+ 这是破坏性 public contract 变更:`snapshot.bidPrice.minus(...)`、`.multipliedBy(...)` 等链式调用不再可用,消费者需要改为 `new BigNumber(field)` 自行解析后运算(SDK 仍保留 `export { BigNumber }`)。不要用 `parseFloat()` 解析这些字段,否则会退回 JS 浮点精度。输入侧 `DecimalInput` 不变,仍接受 string / number / `BigNumber`。
90
+
91
+ ## 0.3.1-beta.0
92
+
93
+ ### Patch Changes
94
+
95
+ - 19f60bc: Binance 行情订阅现在复用 WebSocket 连接:同一 connectionKey / base URL 下多个 symbol 复用物理连接(例如 USDM L1 与 funding 因 base URL 不同会分开),通过 JSON `SUBSCRIBE`/`UNSUBSCRIBE` 动态增删订阅,断线重连后自动重放,单连接订阅数达上限会自动开新连接。行情层改为按 venue 分派 adapter,为接入更多交易所打基础。公开 API 不变。
96
+
97
+ ## 0.3.0
98
+
99
+ ### Minor Changes
100
+
101
+ - 14d25cb: 重命名账户风险权益字段并拆分净值与风控口径。`RiskSnapshot.equity` 替换为 `netEquity` / `riskEquity`,`actualLeverage` 替换为 `riskLeverage`;Binance 使用 `actualEquity` / `accountEquity` 分别映射净权益和风控折算权益,Juplend 使用清算阈值折算权益填充 `riskEquity`。
102
+ - 50e4e09: 通过周期性 REST polling 刷新 Binance 账户风险和 mark-to-market 仓位字段。`RiskSnapshot` 现在暴露风控口径的 `riskLeverage`,Binance 账户运行时配置新增 `account.binance.riskPollIntervalMs`。
103
+ - 680e315: Add strict-symbol market data aggregation APIs for markets, L1 books, and funding rates. Also update Binance USDⓈ-M funding mark price streams to use the current market websocket endpoint and default 3s `markPrice` stream.
104
+ - 68356a0: Replace Juplend's portfolio-backed lending account implementation with native `@jup-ag/lend-read` reads. Juplend accounts no longer require credentials, can be loaded by `walletAddress` or direct `vaultId + positionId`, support optional RPC and Jup API enrichment via `SOL_HELIUS_RPC` / `account.juplend.rpcUrl` and `JUP_API` / `account.juplend.jupApiKey`, and now report more accurate lending balances, debt, collateral, and risk data from native vault sources.
105
+ - c411b69: Add venue-based account registration and Juplend read-only lending account support. `Exchange` is renamed to `Venue`, account risk now uses unified `riskRatio`, and `RegisterAccountInput` is venue-specific so Juplend requires `credentials.apiKey` plus `options.walletAddress` with optional `positionId` filtering. Juplend account polling exposes lending balance/risk facets, replaces full snapshots to clear closed positions, and includes live smoke coverage.
106
+ - 9dad2f0: Add post-only limit order support and market order input normalization. Binance PAPI UM limit orders now map `postOnly: true` to `timeInForce=GTX`, and callers can normalize price and amount strings with `market.normalizeOrderInput()` before placing orders.
107
+ - ea9a4a7: Add top-level venue capability queries for SDK runtime support by venue.
108
+
109
+ ### Patch Changes
110
+
111
+ - 46d1291: Include `docs/api.md` in the published npm package.
112
+
113
+ ## 0.3.0-beta.6
114
+
115
+ ### Minor Changes
116
+
117
+ - 68356a0: Replace Juplend's portfolio-backed lending account implementation with native `@jup-ag/lend-read` reads. Juplend accounts no longer require credentials, can be loaded by `walletAddress` or direct `vaultId + positionId`, support optional RPC and Jup API enrichment via `SOL_HELIUS_RPC` / `account.juplend.rpcUrl` and `JUP_API` / `account.juplend.jupApiKey`, and now report more accurate lending balances, debt, collateral, and risk data from native vault sources.
118
+
119
+ ## 0.3.0-beta.5
120
+
121
+ ### Minor Changes
122
+
123
+ - 14d25cb: 重命名账户风险权益字段并拆分净值与风控口径。`RiskSnapshot.equity` 替换为 `netEquity` / `riskEquity`,`actualLeverage` 替换为 `riskLeverage`;Binance 使用 `actualEquity` / `accountEquity` 分别映射净权益和风控折算权益,Juplend 使用清算阈值折算权益填充 `riskEquity`。
124
+
125
+ ## 0.3.0-beta.4
126
+
127
+ ### Minor Changes
128
+
129
+ - 50e4e09: 通过周期性 REST polling 刷新 Binance 账户风险和 mark-to-market 仓位字段。`RiskSnapshot` 现在暴露 `actualLeverage`,Binance 账户运行时配置新增 `account.binance.riskPollIntervalMs`。
130
+
131
+ ## 0.3.0-beta.3
132
+
133
+ ### Minor Changes
134
+
135
+ - ea9a4a7: Add top-level venue capability queries for SDK runtime support by venue.
136
+
137
+ ### Patch Changes
138
+
139
+ - 46d1291: Include `docs/api.md` in the published npm package.
140
+
141
+ ## 0.3.0-beta.2
142
+
143
+ ### Minor Changes
144
+
145
+ - c411b69: Add venue-based account registration and Juplend read-only lending account support. `Exchange` is renamed to `Venue`, account risk now uses unified `riskRatio`, and `RegisterAccountInput` is venue-specific so Juplend requires `credentials.apiKey` plus `options.walletAddress` with optional `positionId` filtering. Juplend account polling exposes lending balance/risk facets, replaces full snapshots to clear closed positions, and includes live smoke coverage.
146
+
147
+ ## 0.3.0-beta.1
148
+
149
+ ### Minor Changes
150
+
151
+ - 9dad2f0: Add post-only limit order support and market order input normalization. Binance PAPI UM limit orders now map `postOnly: true` to `timeInForce=GTX`, and callers can normalize price and amount strings with `market.normalizeOrderInput()` before placing orders.
152
+
153
+ ## 0.3.0-beta.0
154
+
155
+ ### Minor Changes
156
+
157
+ - 680e315: Add strict-symbol market data aggregation APIs for markets, L1 books, and funding rates. Also update Binance USDⓈ-M funding mark price streams to use the current market websocket endpoint and default 3s `markPrice` stream.
158
+
159
+ ## 0.2.0
160
+
161
+ ### Minor Changes
162
+
163
+ - 5dcc3c1: Add Binance funding rate market data stream with per-stream market data status.
164
+ - baeab15: Add Binance PAPI private account and order support, including the first `createOrder`, `cancelOrder`, and `cancelAllOrders` APIs.
165
+
166
+ ## 0.1.0-beta.4
167
+
168
+ ### Minor Changes
169
+
170
+ - 5dcc3c1: Add Binance funding rate market data stream with per-stream market data status.
171
+
172
+ ## 0.1.0-beta.3
173
+
174
+ ### Minor Changes
175
+
176
+ - baeab15: Add Binance PAPI private account and order support, including the first `createOrder`, `cancelOrder`, and `cancelAllOrders` APIs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imbingox/acex",
3
- "version": "0.4.0-beta.13",
3
+ "version": "0.4.0-beta.14",
4
4
  "description": "Multi-exchange trading SDK for market data, account, and order management",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,9 @@
17
17
  "files": [
18
18
  "index.ts",
19
19
  "src/",
20
- "docs/api.md"
20
+ "docs/api.md",
21
+ "README.md",
22
+ "CHANGELOG.md"
21
23
  ],
22
24
  "scripts": {
23
25
  "changeset": "changeset",
@@ -25,7 +27,9 @@
25
27
  "changeset:pre:exit": "changeset pre exit && if [ -f .changeset/pre.json ]; then biome check --write .changeset/pre.json; fi",
26
28
  "lint": "biome check .",
27
29
  "lint:fix": "biome check --write .",
30
+ "pack:check": "bun run scripts/check-npm-pack.ts",
28
31
  "release": "changeset publish",
32
+ "release:notes": "bun run scripts/extract-changelog-section.ts",
29
33
  "type-check": "tsc --noEmit",
30
34
  "test": "bun test --max-concurrency=1 tests/unit tests/integration",
31
35
  "test:live:account": "bun run scripts/live-account-smoke.ts",