add USDC perp client with tests
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export * from './account-asset';
|
||||
export * from './usdt-perp';
|
||||
export * from './usdc-perp';
|
||||
|
||||
19
src/types/request/usdc-perp.ts
Normal file
19
src/types/request/usdc-perp.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export interface USDCKlineRequest {
|
||||
symbol: string;
|
||||
period: string;
|
||||
startTime: number;
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface USDCOpenInterestRequest {
|
||||
symbol: string;
|
||||
period: string;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface USDCLast500TradesRequest {
|
||||
category: string;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
limit?: string;
|
||||
}
|
||||
@@ -25,6 +25,12 @@ export interface APIResponse<T> {
|
||||
result: T;
|
||||
}
|
||||
|
||||
export interface USDCAPIResponse<T> {
|
||||
retCode: number;
|
||||
retMsg: 'OK' | string;
|
||||
result: T;
|
||||
}
|
||||
|
||||
export interface APIResponseWithTime<T = {}> extends APIResponse<T> {
|
||||
/** UTC timestamp */
|
||||
time_now: numberInString;
|
||||
@@ -37,15 +43,15 @@ export interface SymbolParam {
|
||||
symbol: string;
|
||||
}
|
||||
|
||||
export interface SymbolLimitParam {
|
||||
export interface SymbolLimitParam<TLimit = number> {
|
||||
symbol: string;
|
||||
limit?: number;
|
||||
limit?: TLimit;
|
||||
}
|
||||
|
||||
export interface SymbolPeriodLimitParam {
|
||||
export interface SymbolPeriodLimitParam<TLimit = number> {
|
||||
symbol: string;
|
||||
period: string;
|
||||
limit?: number;
|
||||
limit?: TLimit;
|
||||
}
|
||||
|
||||
export interface SymbolFromLimitParam {
|
||||
|
||||
Reference in New Issue
Block a user