Merge pull request #316 from tiagosiebler/obtype

v3.9.2: fix(#315) orderbook level type
This commit is contained in:
Tiago
2024-02-13 10:27:48 +00:00
committed by GitHub
2 changed files with 11 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "bybit-api", "name": "bybit-api",
"version": "3.9.1", "version": "3.9.2",
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@@ -112,18 +112,19 @@ export interface SpotInstrumentInfoV5 {
} }
type InstrumentInfoV5Mapping = { type InstrumentInfoV5Mapping = {
linear: LinearInverseInstrumentInfoV5[], linear: LinearInverseInstrumentInfoV5[];
inverse: LinearInverseInstrumentInfoV5[], inverse: LinearInverseInstrumentInfoV5[];
option: OptionInstrumentInfoV5[], option: OptionInstrumentInfoV5[];
spot: SpotInstrumentInfoV5[] spot: SpotInstrumentInfoV5[];
}; };
export type InstrumentInfoResponseV5<C extends CategoryV5> = CategoryCursorListV5<InstrumentInfoV5Mapping[C], C>; export type InstrumentInfoResponseV5<C extends CategoryV5> =
CategoryCursorListV5<InstrumentInfoV5Mapping[C], C>;
export default interface OrderbookLevelV5 { /**
price: string; * [price, size]
size: string; */
} export type OrderbookLevelV5 = [string, string];
export interface OrderbookResponseV5 { export interface OrderbookResponseV5 {
s: string; s: string;