feat: 接入 USDT-M 合约数据 — type 字段方案
- PairType 定义移至 types/kline.ts (spot/um/cm) - Kline 接口新增 type 字段,全链路透传 - klines 5列复合主键 (exchange, symbol, type, interval, time) - 拆出 BinanceFuturesRestClient (USDMClient) - exchanges/index.ts 注册 binance_futures - trading_pairs 唯一约束加 type,种子数据加合约对 - 12个连续聚合视图 SELECT/GROUP BY/INDEX 加 type - 清理 bnkline.ts 废弃代码和 pair.ts 空函数
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { BaseRestClient } from "./base";
|
||||
import { BinanceRestClient } from "./binance/rest";
|
||||
import { BinanceRestClient, BinanceFuturesRestClient } from "./binance/rest";
|
||||
|
||||
/** 交易所 ID 到 RestClient 构造器的注册表 */
|
||||
const registry: Record<string, () => BaseRestClient> = {
|
||||
binance: () => new BinanceRestClient(),
|
||||
binance_futures: () => new BinanceFuturesRestClient(),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -28,5 +29,5 @@ export function createRestClient(exchangeId: string): BaseRestClient {
|
||||
}
|
||||
|
||||
export { BaseRestClient } from "./base";
|
||||
export { BinanceRestClient } from "./binance/rest";
|
||||
export { BinanceRestClient, BinanceFuturesRestClient } from "./binance/rest";
|
||||
export { KLINE_INTERVAL_MS } from "./constants";
|
||||
|
||||
Reference in New Issue
Block a user