add USDC perp client with tests

This commit is contained in:
tiagosiebler
2022-09-08 16:48:33 +01:00
parent 666720b27d
commit 5187350878
13 changed files with 583 additions and 37 deletions

View File

@@ -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 {