From 1314ca33cdbfed2c1fe134fce8dd344bcf674bb9 Mon Sep 17 00:00:00 2001 From: Brent de Jong Date: Wed, 27 Mar 2024 18:30:25 +0100 Subject: [PATCH 1/3] Updated V5 `InstrumentInfo` types Missing attributes have been added according to the documentation `postOnlyMaxOrderQty` should be removed from `LinearInverseInstrumentInfoV5` as this has been replaced by `maxOrderQty`. --- src/types/response/v5-market.ts | 11 +++++++++++ src/types/v5-shared.ts | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/types/response/v5-market.ts b/src/types/response/v5-market.ts index 0180638..31bf0ef 100644 --- a/src/types/response/v5-market.ts +++ b/src/types/response/v5-market.ts @@ -2,7 +2,9 @@ import { CategoryCursorListV5, CategoryV5, ContractTypeV5, + CopyTradingV5, InstrumentStatusV5, + MarginTradingV5, OptionTypeV5, OrderSideV5, } from '../v5-shared'; @@ -61,6 +63,7 @@ export interface LinearInverseInstrumentInfoV5 { }; lotSizeFilter: { maxOrderQty: string; + maxMktOrderQty: string; minOrderQty: string; qtyStep: string; postOnlyMaxOrderQty?: string; @@ -68,6 +71,9 @@ export interface LinearInverseInstrumentInfoV5 { unifiedMarginTrade: boolean; fundingInterval: number; settleCoin: string; + copyTrading: CopyTradingV5; + upperFundingRate: string; + lowerFundingRate: string; } export interface OptionInstrumentInfoV5 { @@ -98,6 +104,7 @@ export interface SpotInstrumentInfoV5 { quoteCoin: string; innovation: '0' | '1'; status: InstrumentStatusV5; + marginTrading: MarginTradingV5; lotSizeFilter: { basePrecision: string; quotePrecision: string; @@ -109,6 +116,10 @@ export interface SpotInstrumentInfoV5 { priceFilter: { tickSize: string; }; + riskParameters: { + limitParameter: string; + marketParameter: string; + } } type InstrumentInfoV5Mapping = { diff --git a/src/types/v5-shared.ts b/src/types/v5-shared.ts index 0759370..7714548 100644 --- a/src/types/v5-shared.ts +++ b/src/types/v5-shared.ts @@ -3,6 +3,7 @@ export type ContractTypeV5 = | 'InversePerpetual' | 'LinearPerpetual' | 'InverseFutures'; +export type CopyTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalOnly'; export type InstrumentStatusV5 = | 'PreLaunch' @@ -11,6 +12,8 @@ export type InstrumentStatusV5 = | 'Delivering' | 'Closed'; +export type MarginTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalSpotOnly'; + export type OrderFilterV5 = 'Order' | 'tpslOrder' | 'StopOrder'; export type OrderSideV5 = 'Buy' | 'Sell'; export type OrderTypeV5 = 'Market' | 'Limit'; From 9319ed642e4f1501ee328277bea2b6b35272a1a6 Mon Sep 17 00:00:00 2001 From: Brent de Jong Date: Fri, 29 Mar 2024 11:54:09 +0100 Subject: [PATCH 2/3] Incremented version number to 3.9.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b841ecd..fc56c34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.9.7", + "version": "3.9.8", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", From 4825512eaebbedd2e6528e3fd747bed2cac2f754 Mon Sep 17 00:00:00 2001 From: Brent de Jong Date: Fri, 29 Mar 2024 11:59:47 +0100 Subject: [PATCH 3/3] Added minNotionalValue `LinearInverseInstrumentInfoV5` --- src/types/response/v5-market.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/response/v5-market.ts b/src/types/response/v5-market.ts index 31bf0ef..b121e29 100644 --- a/src/types/response/v5-market.ts +++ b/src/types/response/v5-market.ts @@ -67,6 +67,7 @@ export interface LinearInverseInstrumentInfoV5 { minOrderQty: string; qtyStep: string; postOnlyMaxOrderQty?: string; + minNotionalValue?: string; }; unifiedMarginTrade: boolean; fundingInterval: number;