chore(): remove decommissioned REST and WS clients
This commit is contained in:
@@ -3,7 +3,6 @@ export * from './copy-trading';
|
||||
export * from './contract';
|
||||
export * from './linear';
|
||||
export * from './inverse';
|
||||
export * from './spot';
|
||||
export * from './usdc-perp';
|
||||
export * from './usdc-options';
|
||||
export * from './usdc-shared';
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
import { OrderSide, numberInString } from '../shared';
|
||||
|
||||
export type OrderTypeSpot = 'LIMIT' | 'MARKET' | 'LIMIT_MAKER';
|
||||
export type OrderTimeInForce = 'GTC' | 'FOK' | 'IOC';
|
||||
|
||||
export interface NewSpotOrder {
|
||||
symbol: string;
|
||||
qty: number;
|
||||
side: OrderSide;
|
||||
type: OrderTypeSpot;
|
||||
timeInForce?: OrderTimeInForce;
|
||||
price?: number;
|
||||
orderLinkId?: string;
|
||||
}
|
||||
|
||||
export interface NewSpotOrderV3 {
|
||||
symbol: string;
|
||||
orderQty: string;
|
||||
side: OrderSide;
|
||||
orderType: OrderTypeSpot;
|
||||
timeInForce?: OrderTimeInForce;
|
||||
orderPrice?: string;
|
||||
orderLinkId?: string;
|
||||
orderCategory?: 0 | 1;
|
||||
triggerPrice?: string;
|
||||
}
|
||||
|
||||
export interface SpotCancelOrderBatchRequest {
|
||||
symbol: string;
|
||||
side?: OrderSide;
|
||||
orderTypes: OrderTypeSpot[];
|
||||
orderCategory?: 0 | 1;
|
||||
}
|
||||
|
||||
export interface SpotOrderQueryById {
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderCategory?: 0 | 1;
|
||||
}
|
||||
|
||||
export interface SpotSymbolInfo {
|
||||
name: string;
|
||||
alias: string;
|
||||
baseCurrency: string;
|
||||
quoteCurrency: string;
|
||||
basePrecision: numberInString;
|
||||
quotePrecision: numberInString;
|
||||
minTradeQuantity: numberInString;
|
||||
minTradeAmount: numberInString;
|
||||
minPricePrecision: numberInString;
|
||||
maxTradeQuantity: numberInString;
|
||||
maxTradeAmount: numberInString;
|
||||
category: numberInString;
|
||||
}
|
||||
|
||||
export interface SpotMyTradesRequest {
|
||||
symbol?: string;
|
||||
orderId?: string;
|
||||
limit?: string;
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
fromTradeId?: string;
|
||||
toTradeId?: string;
|
||||
}
|
||||
|
||||
export interface SpotLeveragedTokenPRHistoryRequest {
|
||||
ltCode?: string;
|
||||
orderId?: string;
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
limit?: number;
|
||||
orderType?: 1 | 2;
|
||||
serialNo?: string;
|
||||
}
|
||||
|
||||
export interface SpotCrossMarginBorrowingInfoRequest {
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
coin?: string;
|
||||
status?: 0 | 1 | 2;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface SpotCrossMarginRepaymentHistoryRequest {
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
coin?: string;
|
||||
limit?: number;
|
||||
}
|
||||
@@ -1,23 +1,7 @@
|
||||
import { ContractClient } from '../contract-client';
|
||||
import { InverseClient } from '../inverse-client';
|
||||
import { LinearClient } from '../linear-client';
|
||||
import { RestClientV5 } from '../rest-client-v5';
|
||||
import { SpotClient } from '../spot-client';
|
||||
import { SpotClientV3 } from '../spot-client-v3';
|
||||
import { UnifiedMarginClient } from '../unified-margin-client';
|
||||
import { USDCOptionClient } from '../usdc-option-client';
|
||||
import { USDCPerpetualClient } from '../usdc-perpetual-client';
|
||||
|
||||
export type RESTClient =
|
||||
| InverseClient
|
||||
| LinearClient
|
||||
| SpotClient
|
||||
| SpotClientV3
|
||||
| USDCOptionClient
|
||||
| USDCPerpetualClient
|
||||
| UnifiedMarginClient
|
||||
| ContractClient
|
||||
| RestClientV5;
|
||||
export type RESTClient = SpotClientV3 | RestClientV5;
|
||||
|
||||
export type numberInString = string;
|
||||
|
||||
@@ -53,14 +37,6 @@ export type KlineIntervalV3 =
|
||||
| 'W'
|
||||
| 'M';
|
||||
|
||||
export interface APIResponse<T> {
|
||||
ret_code: number;
|
||||
ret_msg: 'OK' | string;
|
||||
ext_code: string | null;
|
||||
ext_info: string | null;
|
||||
result: T;
|
||||
}
|
||||
|
||||
export interface APIRateLimit {
|
||||
/** Remaining requests to this endpoint before the next reset */
|
||||
remainingRequests: number;
|
||||
@@ -88,12 +64,6 @@ export interface APIResponseV3<T> {
|
||||
}
|
||||
|
||||
export type APIResponseV3WithTime<T> = APIResponseV3<T> & { time: number };
|
||||
|
||||
export interface APIResponseWithTime<T = {}> extends APIResponse<T> {
|
||||
/** UTC timestamp */
|
||||
time_now: numberInString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Parameter Types
|
||||
*/
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
import { RestClientOptions, WS_KEY_MAP } from '../../util';
|
||||
|
||||
/** For spot markets, spotV3 is recommended */
|
||||
export type APIMarket =
|
||||
| 'inverse'
|
||||
| 'linear'
|
||||
| 'spot'
|
||||
| 'spotv3'
|
||||
| 'usdcOption'
|
||||
| 'usdcPerp'
|
||||
| 'unifiedPerp'
|
||||
| 'unifiedOption'
|
||||
| 'contractUSDT'
|
||||
| 'contractInverse'
|
||||
| 'v5';
|
||||
export type APIMarket = 'v5';
|
||||
|
||||
// Same as inverse futures
|
||||
export type WsPublicInverseTopic =
|
||||
@@ -111,7 +100,7 @@ export interface WSClientConfigurableOptions {
|
||||
/**
|
||||
* The API group this client should connect to. The V5 market is currently used by default.
|
||||
*
|
||||
* For the V3 APIs use `v3` as the market (spot/unified margin/usdc/account asset/copy trading)
|
||||
* Only the "V5" "market" is supported here.
|
||||
*/
|
||||
market?: APIMarket;
|
||||
|
||||
@@ -128,6 +117,7 @@ export interface WSClientConfigurableOptions {
|
||||
reconnectTimeout?: number;
|
||||
|
||||
restOptions?: RestClientOptions;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
requestOptions?: any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user