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",
|
"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.",
|
"description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import {
|
|||||||
PaginatedResult,
|
PaginatedResult,
|
||||||
ContractHistoricOrder,
|
ContractHistoricOrder,
|
||||||
ContractSymbolTicker,
|
ContractSymbolTicker,
|
||||||
|
ContractListResult,
|
||||||
} from './types';
|
} from './types';
|
||||||
import { REST_CLIENT_TYPE_ENUM } from './util';
|
import { REST_CLIENT_TYPE_ENUM } from './util';
|
||||||
import BaseRestClient from './util/BaseRestClient';
|
import BaseRestClient from './util/BaseRestClient';
|
||||||
@@ -70,7 +71,7 @@ export class ContractClient extends BaseRestClient {
|
|||||||
getSymbolTicker(
|
getSymbolTicker(
|
||||||
category: UMCategory | '',
|
category: UMCategory | '',
|
||||||
symbol?: string
|
symbol?: string
|
||||||
): Promise<APIResponseV3<ContractSymbolTicker[]>> {
|
): Promise<APIResponseV3<ContractListResult<ContractSymbolTicker[]>>> {
|
||||||
return this.get('/derivatives/v3/public/tickers', { category, symbol });
|
return this.get('/derivatives/v3/public/tickers', { category, symbol });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ export interface PaginatedResult<TList = any> {
|
|||||||
nextPageCursor: string;
|
nextPageCursor: string;
|
||||||
list: TList[];
|
list: TList[];
|
||||||
}
|
}
|
||||||
|
export interface ContractListResult<TList = any> {
|
||||||
|
category: string;
|
||||||
|
list: TList[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface ContractHistoricOrder {
|
export interface ContractHistoricOrder {
|
||||||
symbol: string;
|
symbol: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user