crypto-client
Version:
An unified client for all cryptocurrency exchanges.
28 lines (27 loc) • 901 B
TypeScript
export declare type Params = {
[key: string]: string | number | boolean;
};
export declare function getKeys(): {
privateKey: string;
publicKey: string;
APIKey: string;
};
export interface SymbolObj {
baseToken: string;
quoteToken: string;
basePrecision: number;
quotePrecision: number;
baseContract: string;
quoteContract: string;
}
export interface WhaleExOrder {
orderId: string;
amount: string;
price: string;
symbol: string;
type: 'buy-limit' | 'sell-limit' | 'buy-market' | 'sell-market';
}
export declare function signOrder(post: WhaleExOrder, timestamp: number, symbolObj: SymbolObj): string;
export declare function sort(params: Params): string;
export declare function signData(method: 'GET' | 'POST', path: string, params?: Params): string;
export declare function signDataOrder(order: WhaleExOrder, symbolObj: SymbolObj): string;