Merge pull request #211 from tiagosiebler/typefix
v3.3.7: fix nesting in contract list result type
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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<APIResponseV3<ContractSymbolTicker[]>> {
|
||||
): Promise<APIResponseV3<ContractListResult<ContractSymbolTicker[]>>> {
|
||||
return this.get('/derivatives/v3/public/tickers', { category, symbol });
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@ export interface PaginatedResult<TList = any> {
|
||||
nextPageCursor: string;
|
||||
list: TList[];
|
||||
}
|
||||
export interface ContractListResult<TList = any> {
|
||||
category: string;
|
||||
list: TList[];
|
||||
}
|
||||
|
||||
export interface ContractHistoricOrder {
|
||||
symbol: string;
|
||||
|
||||
Reference in New Issue
Block a user