UNPKG

@huangapple/okx-api

Version:

Complete & robust Node.js SDK for OKX's REST APIs and WebSockets, with TypeScript & end-to-end tests.

41 lines (40 loc) 1.41 kB
export declare type numberInString<T = string> = T; export interface APIResponse<T> { code: '0'; msg: ''; data: T; } export declare type AlgoOrderType = 'conditional' | 'oco' | 'trigger' | 'move_order_stop' | 'iceberg' | 'twap'; export declare type AlgoState = 'effective' | 'canceled' | 'order_failed'; export declare type ContractGridDirection = 'long' | 'short' | 'neutral'; export declare type GridAlgoSubOrderType = 'live' | 'filled'; export declare type InstrumentType = 'SPOT' | 'MARGIN' | 'SWAP' | 'FUTURES' | 'OPTION'; export declare type MarginMode = 'cross' | 'isolated'; export declare type OrderSide = 'buy' | 'sell'; export declare type OrderType = 'market' | 'limit' | 'post_only' | 'fok' | 'ioc' | 'optimal_limit_ioc'; export declare type PositionSide = 'net' | 'long' | 'short'; export declare type PriceTriggerType = 'last' | 'index' | 'mark'; export interface RFQLeg { instId: string; sz: string; side: OrderSide; tgtCcy?: string; } export interface RFQQuoteLegExtended { px: string; sz: string; instId: string; side: string; fee: string; feeCcy: string; tradeId: string; } export declare type TradeMode = 'cross' | 'isolated' | 'cash'; export interface TimestampObject { ts: numberInString; } export interface Pagination { after?: string; before?: string; limit?: string; }