add examples for placing orders with ws updates. Add some response types.

This commit is contained in:
Tiago Siebler
2022-10-10 20:01:16 +01:00
parent 117e1d5589
commit 5e57f3dd15
11 changed files with 290 additions and 13 deletions

View File

@@ -5,6 +5,8 @@ import {
Pagination,
APIResponse,
KlineInterval,
CoinBalance,
SymbolRules,
} from './types';
import { REST_CLIENT_TYPE_ENUM } from './util';
import BaseRestClient from './util/BaseRestClient';
@@ -39,7 +41,7 @@ export class SpotClient extends BaseRestClient {
}
/** Get Symbols : Get basic configuration information of all trading pairs (including rules) */
getSymbols(): Promise<APIResponse<any[]>> {
getSymbols(): Promise<APIResponse<SymbolRules[]>> {
return this.get('/api/spot/v1/public/products');
}
@@ -184,7 +186,7 @@ export class SpotClient extends BaseRestClient {
}
/** Get Account : get account assets */
getBalance(coin?: string): Promise<APIResponse<any>> {
getBalance(coin?: string): Promise<APIResponse<CoinBalance[]>> {
return this.getPrivate('/api/spot/v1/account/assets', { coin });
}