bybit-api 4.4.1 → 4.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,3 +22,27 @@ export interface GetVIPMarginDataParamsV5 {
22
22
  vipLevel?: string;
23
23
  currency?: string;
24
24
  }
25
+ export interface ManualBorrowParamsV5 {
26
+ coin: string;
27
+ amount: string;
28
+ }
29
+ export interface GetMaxBorrowableAmountParamsV5 {
30
+ currency: string;
31
+ }
32
+ export interface GetPositionTiersParamsV5 {
33
+ currency?: string;
34
+ }
35
+ export interface GetCoinStateParamsV5 {
36
+ currency?: string;
37
+ }
38
+ export interface GetAvailableAmountToRepayParamsV5 {
39
+ currency: string;
40
+ }
41
+ export interface SetSpotMarginLeverageParamsV5 {
42
+ leverage: string;
43
+ currency?: string;
44
+ }
45
+ export interface ManualRepayWithoutConversionParamsV5 {
46
+ coin: string;
47
+ amount?: string;
48
+ }
@@ -31,6 +31,8 @@ export interface OrderParamsV5 {
31
31
  slLimitPrice?: string;
32
32
  tpOrderType?: OrderTypeV5;
33
33
  slOrderType?: OrderTypeV5;
34
+ bboSideType?: 'Queue' | 'Counterparty';
35
+ bboLevel?: '1' | '2' | '3' | '4' | '5';
34
36
  }
35
37
  export interface AmendOrderParamsV5 {
36
38
  category: CategoryV5;
@@ -39,3 +39,12 @@ export interface GetSubAccountAllApiKeysParamsV5 {
39
39
  limit?: number;
40
40
  cursor?: string;
41
41
  }
42
+ export interface GetAffiliateUserListParamsV5 {
43
+ size?: number;
44
+ cursor?: string;
45
+ needDeposit?: boolean;
46
+ need30?: boolean;
47
+ need365?: boolean;
48
+ startDate?: string;
49
+ endDate?: string;
50
+ }
@@ -131,3 +131,6 @@ export interface DCPInfoV5 {
131
131
  dcpStatus: 'ON';
132
132
  timeWindow: string;
133
133
  }
134
+ export interface ManualRepayResultV5 {
135
+ resultStatus: 'P' | 'SU' | 'FA';
136
+ }
@@ -164,6 +164,17 @@ export interface WithdrawalRecordV5 {
164
164
  createTime: string;
165
165
  updateTime: string;
166
166
  }
167
+ export interface WithdrawalAddressV5 {
168
+ coin: string;
169
+ chain: string;
170
+ address: string;
171
+ tag: string;
172
+ remark: string;
173
+ status: number;
174
+ addressType: number;
175
+ verified: number;
176
+ createdAt: string;
177
+ }
167
178
  export interface WithdrawableAmountV5 {
168
179
  limitAmountUsd: string;
169
180
  withdrawableAmount: {
@@ -167,6 +167,8 @@ export interface OngoingFlexibleLoanV5 {
167
167
  hourlyInterestRate: string;
168
168
  loanCurrency: string;
169
169
  totalDebt: string;
170
+ unpaidAmount: string;
171
+ unpaidInterest: string;
170
172
  }
171
173
  export interface BorrowHistoryFlexibleV5 {
172
174
  borrowTime: number;
@@ -267,3 +269,17 @@ export interface RepaymentHistoryFixedV5 {
267
269
  repayTime: number;
268
270
  repayType: number;
269
271
  }
272
+ export interface RenewBorrowOrderFixedV5 {
273
+ orderId: string;
274
+ }
275
+ export interface RenewOrderInfoFixedV5 {
276
+ amount: string;
277
+ autoRepay: number;
278
+ borrowCurrency: string;
279
+ contractNo: string;
280
+ dueTime: string;
281
+ loanId: string;
282
+ orderId: number;
283
+ renewLoanNo: string;
284
+ time: string;
285
+ }
@@ -18,6 +18,9 @@ export interface EarnOrderHistoryV5 {
18
18
  createdAt: string;
19
19
  productId: string;
20
20
  updatedAt: string;
21
+ swapOrderValue: string;
22
+ estimateRedeemTime: string;
23
+ estimateStakeTime: string;
21
24
  }
22
25
  export interface EarnPositionV5 {
23
26
  coin: string;
@@ -26,3 +29,25 @@ export interface EarnPositionV5 {
26
29
  totalPnl: string;
27
30
  claimableYield: string;
28
31
  }
32
+ export interface EarnYieldHistoryV5 {
33
+ productId: string;
34
+ coin: string;
35
+ id: string;
36
+ amount: string;
37
+ yieldType: string;
38
+ distributionMode: string;
39
+ effectiveStakingAmount: string;
40
+ orderId: string;
41
+ status: 'Pending' | 'Success' | 'Fail';
42
+ createdAt: string;
43
+ }
44
+ export interface EarnHourlyYieldHistoryV5 {
45
+ productId: string;
46
+ coin: string;
47
+ id: string;
48
+ amount: string;
49
+ effectiveStakingAmount: string;
50
+ status: 'Pending' | 'Success' | 'Fail';
51
+ hourlyDate: string;
52
+ createdAt: string;
53
+ }
@@ -82,6 +82,7 @@ export interface LinearInverseInstrumentInfoV5 {
82
82
  makerFeeRate: string;
83
83
  };
84
84
  } | null;
85
+ skipCallAuction?: boolean;
85
86
  displayName: string;
86
87
  }
87
88
  export interface OptionInstrumentInfoV5 {
@@ -123,6 +124,9 @@ export interface SpotInstrumentInfoV5 {
123
124
  maxOrderQty: string;
124
125
  minOrderAmt: string;
125
126
  maxOrderAmt: string;
127
+ maxLimitOrderQty: string;
128
+ maxMarketOrderQty: string;
129
+ postOnlyMaxLimitOrderSize: string;
126
130
  };
127
131
  priceFilter: {
128
132
  tickSize: string;
@@ -131,6 +135,7 @@ export interface SpotInstrumentInfoV5 {
131
135
  priceLimitRatioX: string;
132
136
  priceLimitRatioY: string;
133
137
  };
138
+ forbidUplWithdrawal: boolean;
134
139
  }
135
140
  type InstrumentInfoV5Mapping = {
136
141
  linear: LinearInverseInstrumentInfoV5[];
@@ -139,6 +144,20 @@ type InstrumentInfoV5Mapping = {
139
144
  spot: SpotInstrumentInfoV5[];
140
145
  };
141
146
  export type InstrumentInfoResponseV5<C extends CategoryV5> = CategoryCursorListV5<InstrumentInfoV5Mapping[C], C>;
147
+ export interface AccountSpotInstrumentInfoV5 extends SpotInstrumentInfoV5 {
148
+ isPublicRpi: boolean;
149
+ myRpiPermission: boolean;
150
+ }
151
+ export interface AccountLinearInverseInstrumentInfoV5 extends LinearInverseInstrumentInfoV5 {
152
+ isPublicRpi: boolean;
153
+ myRpiPermission: boolean;
154
+ }
155
+ type AccountInstrumentInfoV5Mapping = {
156
+ linear: AccountLinearInverseInstrumentInfoV5[];
157
+ inverse: AccountLinearInverseInstrumentInfoV5[];
158
+ spot: AccountSpotInstrumentInfoV5[];
159
+ };
160
+ export type AccountInstrumentInfoResponseV5<C extends 'spot' | 'linear' | 'inverse'> = CategoryCursorListV5<AccountInstrumentInfoV5Mapping[C], C>;
142
161
  /**
143
162
  * [price, size]
144
163
  */
@@ -183,6 +202,9 @@ export interface TickerLinearInverseV5 {
183
202
  nextFundingTime: string;
184
203
  predictedDeliveryPrice: string;
185
204
  basisRate: string;
205
+ basisRateYear: string;
206
+ fundingIntervalHour: string;
207
+ fundingCap: string;
186
208
  deliveryFeeRate: string;
187
209
  deliveryTime: string;
188
210
  ask1Size: string;
@@ -79,3 +79,39 @@ export interface SpotMarginStateV5 {
79
79
  spotMarginMode: '1' | '0';
80
80
  effectiveLeverage: string;
81
81
  }
82
+ export interface ManualBorrowResultV5 {
83
+ coin: string;
84
+ amount: string;
85
+ }
86
+ export interface MaxBorrowableAmountV5 {
87
+ currency: string;
88
+ maxLoan: string;
89
+ }
90
+ export interface PositionTierV5 {
91
+ tier: string;
92
+ borrowLimit: string;
93
+ positionMMR: string;
94
+ positionIMR: string;
95
+ maxLeverage: string;
96
+ }
97
+ export interface CurrencyPositionTiersV5 {
98
+ currency: string;
99
+ positionTiersRatioList: PositionTierV5[];
100
+ }
101
+ export interface CoinStateV5 {
102
+ currency: string;
103
+ spotLeverage: string;
104
+ }
105
+ export interface AvailableAmountToRepayV5 {
106
+ currency: string;
107
+ lossLessRepaymentAmount: string;
108
+ }
109
+ export interface ManualRepayWithoutConversionResultV5 {
110
+ /**
111
+ * Result status:
112
+ * - P: Processing
113
+ * - SU: Success
114
+ * - FA: Failed
115
+ */
116
+ resultStatus: 'P' | 'SU' | 'FA';
117
+ }
@@ -94,6 +94,19 @@ export interface AffiliateUserListItemV5 {
94
94
  source: string;
95
95
  remarks: string;
96
96
  isKyc: boolean;
97
+ takerVol30Day: string;
98
+ makerVol30Day: string;
99
+ tradeVol30Day: string;
100
+ depositAmount30Day: string;
101
+ takerVol365Day: string;
102
+ makerVol365Day: string;
103
+ tradeVol365Day: string;
104
+ depositAmount365Day: string;
105
+ takerVol: string;
106
+ makerVol: string;
107
+ tradeVol: string;
108
+ startDate: string;
109
+ endDate: string;
97
110
  }
98
111
  export interface AffiliateUserInfoV5 {
99
112
  uid: string;
@@ -65,7 +65,9 @@ export type OrderCreateTypeV5 =
65
65
  /** Order created by arbitrage - web/app. */
66
66
  | 'CreateByArbitrage'
67
67
  /** Option dynamic delta hedge order - web/app */
68
- | 'CreateByDdh';
68
+ | 'CreateByDdh'
69
+ /** BBO Order - Best Bid/Offer order */
70
+ | 'CreateByBboOrder';
69
71
  export type OrderCancelTypeV5 = 'CancelByUser' | 'CancelByReduceOnly' | 'CancelByPrepareLiq' | 'CancelAllBeforeLiq' | 'CancelByPrepareAdl' | 'CancelAllBeforeAdl' | 'CancelByAdmin' | 'CancelByTpSlTsClear' | 'CancelByPzSideCh' | 'UNKNOWN';
70
72
  export type OrderRejectReasonV5 = 'EC_NoError' | 'EC_Others' | 'EC_UnknownMessageType' | 'EC_MissingClOrdID' | 'EC_MissingOrigClOrdID' | 'EC_ClOrdIDOrigClOrdIDAreTheSame' | 'EC_DuplicatedClOrdID' | 'EC_OrigClOrdIDDoesNotExist' | 'EC_TooLateToCancel' | 'EC_UnknownOrderType' | 'EC_UnknownSide' | 'EC_UnknownTimeInForce' | 'EC_WronglyRouted' | 'EC_MarketOrderPriceIsNotZero' | 'EC_LimitOrderInvalidPrice' | 'EC_NoEnoughQtyToFill' | 'EC_NoImmediateQtyToFill' | 'EC_PerCancelRequest' | 'EC_MarketOrderCannotBePostOnly' | 'EC_PostOnlyWillTakeLiquidity' | 'EC_CancelReplaceOrder' | 'EC_InvalidSymbolStatus';
71
73
  export type StopOrderTypeV5 = 'TakeProfit' | 'StopLoss' | 'TrailingStop' | 'Stop' | 'PartialTakeProfit' | 'PartialStopLoss' | 'tpslOrder' | 'OcoOrder' | 'MmRateClose' | 'BidirectionalTpslOrder';