@imbingox/acex 0.4.0-beta.1 → 0.4.0-beta.11

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  `acex` 是一个面向交易场景的 **状态型** 多交易所 SDK。调用方持有一个 `AcexClient`,通过统一的 `market` / `account` / `order` manager 读取最新快照、消费增量事件、执行下单撤单命令;SDK 内部负责本地缓存、ready barrier、websocket 生命周期和自动重连,调用方不需要自己处理。
4
4
 
5
- 当前 MVP 落地 Binance(Spot + USDⓈ-M + COIN-M 行情,PAPI UM 私有链路)以及 Juplend(Jupiter Lend 只读借贷账户视图)。
5
+ 当前 MVP 落地 Binance(Spot + USDⓈ-M + COIN-M 行情,含 Binance TradFi Perps public market data;PAPI UM 私有链路)以及 Juplend(Jupiter Lend 只读借贷账户视图)。
6
6
 
7
7
  ## 安装
8
8
 
@@ -60,13 +60,14 @@ await client.stop();
60
60
 
61
61
  ### 同一个 client 同时使用 Binance + Juplend
62
62
 
63
- `createClient({ account: { binance: { riskPollIntervalMs }, juplend: { pollIntervalMs, rpcUrl, jupApiKey } } })` 只是分别配置 Binance 风险/仓位校准间隔和 Juplend 账户 polling / RPC / Jup API,不代表这个 client 只能注册某个 venue。一个 `AcexClient` 可以同时注册 Binance 交易账户和 Juplend 借贷只读账户,用同一个 `AccountManager` 对比风险值。
63
+ `createClient({ account: { binance: { riskPollIntervalMs, privateReconcileIntervalMs }, juplend: { pollIntervalMs, rpcUrl, jupApiKey } } })` 只是分别配置 Binance 风险/仓位校准、Binance private REST 对账和 Juplend 账户 polling / RPC / Jup API,不代表这个 client 只能注册某个 venue。一个 `AcexClient` 可以同时注册 Binance 交易账户和 Juplend 借贷只读账户,用同一个 `AccountManager` 对比风险值。`account.binance.privateReconcileIntervalMs` 省略时默认 60s,显式传 `0` 可关闭 private reconcile(详细行为见 [API 文档](docs/api.md#41-createclientoptions))。
64
64
 
65
65
  ```ts
66
66
  const client = createClient({
67
67
  account: {
68
68
  binance: {
69
69
  riskPollIntervalMs: 5_000,
70
+ privateReconcileIntervalMs: 60_000, // 默认值;传 0 可关闭 private reconcile
70
71
  },
71
72
  juplend: {
72
73
  pollIntervalMs: 30_000,
@@ -160,7 +161,7 @@ const capabilities = client.listVenueCapabilities();
160
161
  - 运行时 market/order 能力只支持 `binance`;`okx` / `bybit` / `gate` 仅类型定义
161
162
  - 账户视图支持 Binance PAPI UM 与 Juplend 只读借贷账户
162
163
  - Juplend 只读,不支持订单和链上写操作;仓位数量来自 `@jup-ag/lend-read` 原生 position 数据
163
- - Funding Rate 仅支持 Binance 永续合约,来自 mark price websocket;不支持现货和交割合约
164
+ - Funding Rate 仅支持 Binance 永续合约,来自 mark price websocket;支持 Binance TradFi Perps,不支持现货和交割合约
164
165
  - `createOrder()` 只支持 `limit` / `market`;条件单、改单、账户级全撤不支持
165
166
  - 双向持仓账户下单时必须显式传 `positionSide`
166
167
  - `CreateClientOptions` 中 `sandbox` / `logger` / `logLevel` 是预留位