bybit-api 4.6.2 → 4.6.4

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.
Files changed (36) hide show
  1. package/README.md +1 -0
  2. package/lib/rest-client-v5.d.ts +167 -6
  3. package/lib/rest-client-v5.js +225 -2
  4. package/lib/rest-client-v5.js.map +1 -1
  5. package/lib/types/request/index.d.ts +2 -0
  6. package/lib/types/request/index.js +2 -0
  7. package/lib/types/request/index.js.map +1 -1
  8. package/lib/types/request/v5-account.d.ts +3 -5
  9. package/lib/types/request/v5-crypto-loan.d.ts +8 -0
  10. package/lib/types/request/v5-earn-pwm.d.ts +167 -0
  11. package/lib/types/request/v5-earn-pwm.js +3 -0
  12. package/lib/types/request/v5-earn-pwm.js.map +1 -0
  13. package/lib/types/request/v5-earn.d.ts +11 -0
  14. package/lib/types/request/v5-market.d.ts +3 -5
  15. package/lib/types/request/v5-strategy.d.ts +80 -0
  16. package/lib/types/request/v5-strategy.js +3 -0
  17. package/lib/types/request/v5-strategy.js.map +1 -0
  18. package/lib/types/request/v5-user.d.ts +22 -0
  19. package/lib/types/response/index.d.ts +2 -0
  20. package/lib/types/response/index.js +2 -0
  21. package/lib/types/response/index.js.map +1 -1
  22. package/lib/types/response/v5-asset.d.ts +3 -0
  23. package/lib/types/response/v5-earn-pwm.d.ts +425 -0
  24. package/lib/types/response/v5-earn-pwm.js +3 -0
  25. package/lib/types/response/v5-earn-pwm.js.map +1 -0
  26. package/lib/types/response/v5-earn.d.ts +38 -0
  27. package/lib/types/response/v5-market.d.ts +11 -13
  28. package/lib/types/response/v5-position.d.ts +2 -4
  29. package/lib/types/response/v5-strategy.d.ts +96 -0
  30. package/lib/types/response/v5-strategy.js +3 -0
  31. package/lib/types/response/v5-strategy.js.map +1 -0
  32. package/lib/types/response/v5-user.d.ts +19 -5
  33. package/lib/types/shared-v5.d.ts +11 -2
  34. package/lib/types/websockets/ws-events.d.ts +2 -4
  35. package/llms.txt +8587 -5935
  36. package/package.json +4 -6
@@ -36,8 +36,6 @@ export interface ApiKeyPermissionsV5 {
36
36
  Affiliate: string[];
37
37
  Earn?: string[];
38
38
  FiatP2P?: string[];
39
- /** @deprecated use FiatBitPay */
40
- FiatBybitPay?: string[];
41
39
  FiatBitPay?: string[];
42
40
  FiatConvertBroker?: string[];
43
41
  /** @deprecated */
@@ -154,11 +152,27 @@ export interface AffiliateUserInfoV5 {
154
152
  /** tradfi commissions in past year. Coin -> amount */
155
153
  commissions365Day?: Record<string, string>;
156
154
  /** Payment amount in the last 30 days */
157
- paySendAmount30Day?: string;
155
+ paySendAmount30Day: string;
158
156
  /** Pay first transaction amount */
159
- payFtt?: string;
157
+ payFtt: string;
160
158
  /** Card first-time transaction amount */
161
- cardFtt?: string;
159
+ cardFtt: string;
160
+ }
161
+ export interface AffiliateSubAffiliateListItemV5 {
162
+ subAffId: string;
163
+ userId: string;
164
+ name: string;
165
+ email: string;
166
+ /** Commission per currency (BTC, ETH, MNT, USDC, USDT) for the queried date range */
167
+ commissionsVol: Record<string, string>;
168
+ commissionsForUsdt: string;
169
+ becameAffTime: string;
170
+ startDate: string;
171
+ endDate: string;
172
+ }
173
+ export interface AffiliateSubAffiliateListResultV5 {
174
+ list: AffiliateSubAffiliateListItemV5[];
175
+ nextPageCursor: string;
162
176
  }
163
177
  export interface FriendReferralRecordV5 {
164
178
  id: string;
@@ -2,7 +2,18 @@ export type CategoryV5 = 'spot' | 'linear' | 'inverse' | 'option';
2
2
  export type ContractTypeV5 = 'InversePerpetual' | 'LinearPerpetual' | 'InverseFutures';
3
3
  export type CopyTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalOnly';
4
4
  export type InstrumentStatusV5 = 'PreLaunch' | 'Trading' | 'Settling' | 'Delivering' | 'Closed';
5
+ /**
6
+ * Region / product class returned as `symbolType` on instruments-info (and account instruments-info).
7
+ * For `category=linear`, includes e.g. `stock`, `forex`, `commodity`, `xstocks`. Spot may return `''`.
8
+ */
9
+ export type InstrumentSymbolTypeV5 = '' | 'stock' | 'forex' | 'commodity' | 'xstocks';
5
10
  export type MarginTradingV5 = 'none' | 'both' | 'utaOnly' | 'normalSpotOnly';
11
+ /** Product type for strategy APIs (create / list). */
12
+ export type StrategyCategoryV5 = 'UTA_USDT' | 'UTA_USDC' | 'UTA_USDC_FUTURE' | 'UTA_SPOT' | 'UTA_INVERSE' | 'UTA_INVERSE_FUTURE' | 'UTA_USDT_FUTURE';
13
+ export type StrategyTypeV5 = 'twap' | 'chaseOrder' | 'iceberg' | 'pov';
14
+ export type StrategyPreferV5 = 'limit' | 'priceSpeedBalance' | 'fastestExecution' | 'quickExecution';
15
+ /** POV strategy execution mode */
16
+ export type PovModeV5 = 'TradedVolume' | 'OppositeSideLiquidity' | 'SameSideLiquidity';
6
17
  export type OrderFilterV5 = 'Order' | 'tpslOrder' | 'StopOrder';
7
18
  export type OrderSideV5 = 'Buy' | 'Sell';
8
19
  export type OrderTypeV5 = 'Market' | 'Limit';
@@ -139,8 +150,6 @@ export interface PermissionsV5 {
139
150
  Earn?: string[];
140
151
  Affiliate?: string[];
141
152
  FiatP2P?: string[];
142
- /** @deprecated use FiatBitPay */
143
- FiatBybitPay?: string[];
144
153
  /** Bybit Pay (FaitPayOrder) */
145
154
  FiatBitPay?: string[];
146
155
  FiatConvertBroker?: string[];
@@ -199,10 +199,8 @@ export interface WSPositionV5 {
199
199
  leverageSysUpdatedTime: string;
200
200
  createdTime: string;
201
201
  updatedTime: string;
202
- /**
203
- * Position open timestamp (ms), default 0. Documented as testnet-only in some API versions.
204
- */
205
- openTime?: number;
202
+ /** Position open timestamp (ms). Default `0` when not set. */
203
+ openTime: number;
206
204
  seq: number;
207
205
  }
208
206
  export type WSPositionEventV5 = WSPrivateTopicEventV5<'position', WSPositionV5[]>;