From 27192d23e693a74810e1d5722c8427423f531736 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Mon, 30 Oct 2023 13:48:01 +0000 Subject: [PATCH] feat(): improve dynamic types for getTickers --- src/rest-client-v5.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index 14f12c7..646cfee 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -136,6 +136,7 @@ import { WithdrawParamsV5, WithdrawalRecordV5, } from './types'; + import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -248,6 +249,22 @@ export class RestClientV5 extends BaseRestClient { return this.get('/v5/market/orderbook', params); } + getTickers( + params: GetTickersParamsV5<'linear' | 'inverse'>, + ): Promise< + APIResponseV3WithTime< + CategoryListV5 + > + >; + + getTickers( + params: GetTickersParamsV5<'option'>, + ): Promise>>; + + getTickers( + params: GetTickersParamsV5<'spot'>, + ): Promise>>; + /** * Query the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours. *