From ae47d77f155276e4ed219b8ced8b8b68c5953c95 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Wed, 28 Dec 2022 14:44:33 +0000 Subject: [PATCH] v3.3.7: fix nesting in contract list result type --- package.json | 2 +- src/contract-client.ts | 3 ++- src/types/response/contract.ts | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 145614b..a1d6afa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.3.6", + "version": "3.3.7", "description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/contract-client.ts b/src/contract-client.ts index eb227d3..1dda836 100644 --- a/src/contract-client.ts +++ b/src/contract-client.ts @@ -24,6 +24,7 @@ import { PaginatedResult, ContractHistoricOrder, ContractSymbolTicker, + ContractListResult, } from './types'; import { REST_CLIENT_TYPE_ENUM } from './util'; import BaseRestClient from './util/BaseRestClient'; @@ -70,7 +71,7 @@ export class ContractClient extends BaseRestClient { getSymbolTicker( category: UMCategory | '', symbol?: string - ): Promise> { + ): Promise>> { return this.get('/derivatives/v3/public/tickers', { category, symbol }); } diff --git a/src/types/response/contract.ts b/src/types/response/contract.ts index 249e3d4..1e4683a 100644 --- a/src/types/response/contract.ts +++ b/src/types/response/contract.ts @@ -2,6 +2,10 @@ export interface PaginatedResult { nextPageCursor: string; list: TList[]; } +export interface ContractListResult { + category: string; + list: TList[]; +} export interface ContractHistoricOrder { symbol: string;