bybit-api 4.6.0 → 4.6.2

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 (77) hide show
  1. package/README.md +3 -2
  2. package/lib/constants/enum.d.ts +1 -0
  3. package/lib/constants/enum.js +1 -0
  4. package/lib/constants/enum.js.map +1 -1
  5. package/lib/rest-client-v5.d.ts +419 -14
  6. package/lib/rest-client-v5.js +492 -4
  7. package/lib/rest-client-v5.js.map +1 -1
  8. package/lib/types/request/index.d.ts +6 -0
  9. package/lib/types/request/index.js +6 -0
  10. package/lib/types/request/index.js.map +1 -1
  11. package/lib/types/request/v5-account.d.ts +26 -0
  12. package/lib/types/request/v5-alpha-trade.d.ts +52 -0
  13. package/lib/types/request/v5-alpha-trade.js +6 -0
  14. package/lib/types/request/v5-alpha-trade.js.map +1 -0
  15. package/lib/types/request/v5-asset.d.ts +37 -2
  16. package/lib/types/request/v5-broker.d.ts +14 -0
  17. package/lib/types/request/v5-card.d.ts +51 -0
  18. package/lib/types/request/v5-card.js +7 -0
  19. package/lib/types/request/v5-card.js.map +1 -0
  20. package/lib/types/request/v5-earn-advance-discount.d.ts +75 -0
  21. package/lib/types/request/v5-earn-advance-discount.js +3 -0
  22. package/lib/types/request/v5-earn-advance-discount.js.map +1 -0
  23. package/lib/types/request/v5-earn-fixed-term.d.ts +42 -0
  24. package/lib/types/request/v5-earn-fixed-term.js +3 -0
  25. package/lib/types/request/v5-earn-fixed-term.js.map +1 -0
  26. package/lib/types/request/v5-earn-liquidity-mining.d.ts +7 -0
  27. package/lib/types/request/v5-earn-liquidity-mining.js +3 -0
  28. package/lib/types/request/v5-earn-liquidity-mining.js.map +1 -0
  29. package/lib/types/request/v5-earn-token.d.ts +49 -0
  30. package/lib/types/request/v5-earn-token.js +6 -0
  31. package/lib/types/request/v5-earn-token.js.map +1 -0
  32. package/lib/types/request/v5-earn.d.ts +24 -0
  33. package/lib/types/request/v5-market.d.ts +10 -1
  34. package/lib/types/request/v5-spot-leverage-token.d.ts +46 -0
  35. package/lib/types/request/v5-spreadtrading.d.ts +7 -0
  36. package/lib/types/request/v5-user.d.ts +15 -1
  37. package/lib/types/response/index.d.ts +6 -0
  38. package/lib/types/response/index.js +6 -0
  39. package/lib/types/response/index.js.map +1 -1
  40. package/lib/types/response/v5-account.d.ts +76 -0
  41. package/lib/types/response/v5-alpha-trade.d.ts +170 -0
  42. package/lib/types/response/v5-alpha-trade.js +6 -0
  43. package/lib/types/response/v5-alpha-trade.js.map +1 -0
  44. package/lib/types/response/v5-asset.d.ts +158 -10
  45. package/lib/types/response/v5-broker.d.ts +18 -0
  46. package/lib/types/response/v5-card.d.ts +118 -0
  47. package/lib/types/response/v5-card.js +3 -0
  48. package/lib/types/response/v5-card.js.map +1 -0
  49. package/lib/types/response/v5-earn-advance-discount.d.ts +143 -0
  50. package/lib/types/response/v5-earn-advance-discount.js +3 -0
  51. package/lib/types/response/v5-earn-advance-discount.js.map +1 -0
  52. package/lib/types/response/v5-earn-fixed-term.d.ts +102 -0
  53. package/lib/types/response/v5-earn-fixed-term.js +3 -0
  54. package/lib/types/response/v5-earn-fixed-term.js.map +1 -0
  55. package/lib/types/response/v5-earn-liquidity-mining.d.ts +31 -0
  56. package/lib/types/response/v5-earn-liquidity-mining.js +3 -0
  57. package/lib/types/response/v5-earn-liquidity-mining.js.map +1 -0
  58. package/lib/types/response/v5-earn-token.d.ts +62 -0
  59. package/lib/types/response/v5-earn-token.js +6 -0
  60. package/lib/types/response/v5-earn-token.js.map +1 -0
  61. package/lib/types/response/v5-earn.d.ts +103 -0
  62. package/lib/types/response/v5-market.d.ts +14 -0
  63. package/lib/types/response/v5-position.d.ts +4 -0
  64. package/lib/types/response/v5-spot-leverage-token.d.ts +56 -0
  65. package/lib/types/response/v5-spreadtrading.d.ts +5 -0
  66. package/lib/types/response/v5-user.d.ts +43 -0
  67. package/lib/types/shared-v5.d.ts +11 -1
  68. package/lib/types/websockets/ws-events.d.ts +4 -0
  69. package/lib/util/BaseWSClient.js +1 -0
  70. package/lib/util/BaseWSClient.js.map +1 -1
  71. package/lib/util/webCryptoAPI.d.ts +1 -1
  72. package/lib/util/webCryptoAPI.js +1 -1
  73. package/lib/util/webCryptoAPI.js.map +1 -1
  74. package/lib/util/websockets/websocket-util.js +1 -0
  75. package/lib/util/websockets/websocket-util.js.map +1 -1
  76. package/llms.txt +8037 -5345
  77. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ export interface CardAssetRecordV5 {
2
+ pan4: string;
3
+ pan6: string;
4
+ tradeStatus: string;
5
+ side: string;
6
+ basicAmount: string;
7
+ basicCurrency: string;
8
+ transactionAmount: string;
9
+ transactionCurrency: string;
10
+ txnCreate: number;
11
+ merchCountry: string;
12
+ merchCity: string;
13
+ merchName: string;
14
+ txnId: string;
15
+ declinedReason: string;
16
+ totalFees: string;
17
+ uid: number;
18
+ transactionCurrencyAmount: string;
19
+ fxPad: string;
20
+ interchangeFee: string;
21
+ billAmount: string;
22
+ paidAmount: string;
23
+ paidCurrency: string;
24
+ bonusAmount: string;
25
+ foreignTransactionFee: string;
26
+ totalTax: string;
27
+ paidFiat: string;
28
+ withdrawalFee: string;
29
+ status: string;
30
+ orderNo: string;
31
+ mccCode: string;
32
+ merchCategoryDesc: string;
33
+ }
34
+ export interface CardAssetRecordsResultV5 {
35
+ pageSize: number;
36
+ pageNo: number;
37
+ totalCount: number;
38
+ data: CardAssetRecordV5[];
39
+ }
40
+ export interface CardPointBalanceV5 {
41
+ accountId: string;
42
+ availablePoint: string | number;
43
+ pendingPoint: string | number;
44
+ status: string;
45
+ updateTime: string | number;
46
+ settlementPeriod: number;
47
+ }
48
+ export interface CardPointRecordV5 {
49
+ outOrderId: string;
50
+ point: number;
51
+ side: string;
52
+ type: string;
53
+ subType: string;
54
+ createTime: number;
55
+ updateTime: number;
56
+ bizId: string;
57
+ bizTxnId: string;
58
+ transactionDate: string;
59
+ transactionId: string;
60
+ transactionAmount: string;
61
+ basicCurrency: string;
62
+ merchCategoryDesc: string;
63
+ merchName: string;
64
+ merchCountry: string;
65
+ merchCity: string;
66
+ pan4: string;
67
+ payFiatAmount: string;
68
+ transactionCurrencyAmount: string;
69
+ }
70
+ export interface CardPointRecordsResultV5 {
71
+ pageSize: number;
72
+ pageNo: number;
73
+ totalCount: number;
74
+ data: CardPointRecordV5[];
75
+ }
76
+ export interface CardPointTierInfoV5 {
77
+ usedLimit: string;
78
+ limit: string;
79
+ unit: string;
80
+ tier: string;
81
+ autoCashback: boolean;
82
+ }
83
+ export interface CardMallItemV5 {
84
+ itemId: string;
85
+ itemName: string;
86
+ priority: number;
87
+ onTime: string;
88
+ offTime: string;
89
+ price: string;
90
+ discountPrice: string;
91
+ totalNum: number;
92
+ redeemNum: number;
93
+ picPath: string;
94
+ currency: string;
95
+ currencyType: number;
96
+ itemType: number;
97
+ itemBizType: number;
98
+ }
99
+ export interface CardMallItemListResultV5 {
100
+ pageNo: number;
101
+ pageSize: number;
102
+ totalCount: number;
103
+ data: CardMallItemV5[];
104
+ }
105
+ export interface CardPointCashbackDetailV5 {
106
+ points: string;
107
+ amt: string;
108
+ ccy: string;
109
+ ccyType: string;
110
+ createTime: string;
111
+ bizTxnId: string;
112
+ sourceId: number;
113
+ sourceCode: string;
114
+ orderStatus: number;
115
+ orderSubStatus: number;
116
+ orderShowStatus: string;
117
+ failedBizCode: string;
118
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-card.js","sourceRoot":"","sources":["../../../src/types/response/v5-card.ts"],"names":[],"mappings":""}
@@ -0,0 +1,143 @@
1
+ export interface AdvanceEarnDiscountBuyOfferV5 {
2
+ productId: string;
3
+ currentPrice: string;
4
+ purchasePrice: string;
5
+ knockoutPrice: string;
6
+ knockoutCouponE8: string;
7
+ maxInvestmentAmount: string;
8
+ instUid: string;
9
+ expiredAt: string;
10
+ category: string;
11
+ }
12
+ /** GET /v5/earn/advance/product-extra-info?category=DiscountBuy */
13
+ export interface AdvanceEarnProductExtraInfoDiscountBuyV5 {
14
+ offers: AdvanceEarnDiscountBuyOfferV5[];
15
+ }
16
+ export interface AdvanceEarnDualAssetQuoteLevelV5 {
17
+ selectPrice: string;
18
+ apyE8: string;
19
+ maxInvestmentAmount: string;
20
+ expiredAt: string;
21
+ }
22
+ export interface AdvanceEarnDualAssetQuoteProductV5 {
23
+ productId: string;
24
+ currentPrice: string;
25
+ buyLowPrice: AdvanceEarnDualAssetQuoteLevelV5[];
26
+ sellHighPrice: AdvanceEarnDualAssetQuoteLevelV5[];
27
+ }
28
+ /** GET /v5/earn/advance/product-extra-info?category=DualAssets&productId= */
29
+ export interface AdvanceEarnProductExtraInfoDualAssetsV5 {
30
+ category: 'DualAssets';
31
+ list: AdvanceEarnDualAssetQuoteProductV5[];
32
+ }
33
+ export type AdvanceEarnProductExtraInfoV5 = AdvanceEarnProductExtraInfoDiscountBuyV5 | AdvanceEarnProductExtraInfoDualAssetsV5;
34
+ export interface AdvanceEarnPlaceOrderResultV5 {
35
+ orderId: string;
36
+ orderLinkId: string;
37
+ }
38
+ export interface AdvanceEarnDiscountBuyPositionV5 {
39
+ positionId: string;
40
+ productId: string;
41
+ category: string;
42
+ coin: string;
43
+ underlyingAsset: string;
44
+ amount: string;
45
+ purchasePrice: string;
46
+ knockoutPrice: string;
47
+ knockoutCouponE8: string;
48
+ status: string;
49
+ orderId: string;
50
+ duration: string;
51
+ settlementTime: string;
52
+ accountType: string;
53
+ toAccountType: string;
54
+ settleType: string;
55
+ expectReceiveAt: string;
56
+ }
57
+ export interface AdvanceEarnDualAssetsPositionV5 {
58
+ positionId: string;
59
+ productId: string;
60
+ category: string;
61
+ baseCoin: string;
62
+ quoteCoin: string;
63
+ investCoin: string;
64
+ amount: string;
65
+ apyE8: string;
66
+ direction: 'BuyLow' | 'SellHigh' | string;
67
+ targetPrice: string;
68
+ settlementTime: string;
69
+ status: string;
70
+ orderId: string;
71
+ duration: string;
72
+ expectReturnCoin: string;
73
+ expectReturnAmount: string;
74
+ accountType: string;
75
+ toAccountType: string;
76
+ yieldStartAt: string | number;
77
+ yieldEndAt: string | number;
78
+ }
79
+ export interface AdvanceEarnPositionListV5 {
80
+ category: string;
81
+ list: (AdvanceEarnDiscountBuyPositionV5 | AdvanceEarnDualAssetsPositionV5)[];
82
+ nextPageCursor: string;
83
+ }
84
+ export interface AdvanceEarnDiscountBuyOrderV5 {
85
+ orderId: string;
86
+ orderLinkId: string;
87
+ productId: string;
88
+ category: string;
89
+ orderType: string;
90
+ amount: string;
91
+ coin: string;
92
+ underlyingAsset: string;
93
+ status: string;
94
+ createdTime: string;
95
+ purchasePrice: string;
96
+ knockoutPrice: string;
97
+ knockoutCouponE8: string;
98
+ duration: string;
99
+ settlementTime: string;
100
+ accountType: string;
101
+ toAccountType: string;
102
+ settleType: string;
103
+ settlementPrice: string;
104
+ settlementCoin: string;
105
+ settlementAmount: string;
106
+ isVip: boolean;
107
+ refundStatus: string;
108
+ }
109
+ export interface AdvanceEarnDualAssetsOrderV5 {
110
+ orderId: string;
111
+ orderLinkId: string;
112
+ productId: string;
113
+ category: string;
114
+ orderType: string;
115
+ amount: string;
116
+ coin: string;
117
+ baseCoin: string;
118
+ quoteCoin: string;
119
+ status: string;
120
+ createdTime: string;
121
+ updatedTime: string;
122
+ direction: 'BuyLow' | 'SellHigh' | string;
123
+ targetPrice: string;
124
+ settlementTime: string | number;
125
+ estimateApyE8: string | number;
126
+ duration: string;
127
+ accountType: string;
128
+ toAccountType: string;
129
+ selectApyE8: string | number;
130
+ isVip: boolean;
131
+ settlementCoin: string;
132
+ settlementAmount: string;
133
+ orderMode: string;
134
+ settlementPrice: string;
135
+ refundStatus: string;
136
+ trialBonusAmount: string;
137
+ trialBonusPnl: string;
138
+ }
139
+ export interface AdvanceEarnOrderListV5 {
140
+ category: string;
141
+ list: (AdvanceEarnDiscountBuyOrderV5 | AdvanceEarnDualAssetsOrderV5)[];
142
+ nextPageCursor: string;
143
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-earn-advance-discount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-earn-advance-discount.js","sourceRoot":"","sources":["../../../src/types/response/v5-earn-advance-discount.ts"],"names":[],"mappings":""}
@@ -0,0 +1,102 @@
1
+ export interface FixedTermEarnTieredApyV5 {
2
+ min: string;
3
+ max: string;
4
+ apy: string;
5
+ }
6
+ export interface FixedTermEarnInterestCoinApyV5 {
7
+ coin: string;
8
+ apy: string;
9
+ expectUnitEarning: string;
10
+ currentPrice: string;
11
+ }
12
+ export interface FixedTermEarnProductV5 {
13
+ productId: string;
14
+ category: 'FixedTermSaving' | 'FundPool' | 'FundPoolPremium' | string;
15
+ coin: string;
16
+ duration: string;
17
+ status: 'Available' | 'SoldOut' | 'NotStarted' | string;
18
+ tieredApyList: FixedTermEarnTieredApyV5[];
19
+ minStakeAmount: string;
20
+ maxStakeAmount: string;
21
+ precision: number;
22
+ subscribeStartAt: string;
23
+ subscribeEndAt: string;
24
+ allowEarlyRedemption: boolean;
25
+ earlyRedemptionApy: string;
26
+ redemptionLimitDuration: string;
27
+ allowAutoReinvest: boolean;
28
+ interestCoinApyList: FixedTermEarnInterestCoinApyV5[];
29
+ isVip: boolean;
30
+ creditTime: string;
31
+ specialUserGroupRequired: boolean;
32
+ specialUserGroupInfo: string;
33
+ }
34
+ export interface FixedTermEarnProductListV5 {
35
+ list: FixedTermEarnProductV5[];
36
+ }
37
+ export interface FixedTermEarnPlaceOrderResultV5 {
38
+ orderId: string;
39
+ orderLinkId: string;
40
+ }
41
+ export interface RedeemFixedTermEarnResultV5 {
42
+ redeemAmount: string;
43
+ estEarnings: string;
44
+ }
45
+ export interface FixedTermEarnEarlyRedeemInfoV5 {
46
+ allowEarlyRedeem: boolean;
47
+ earlyRedeemEarning: string;
48
+ returnCoin: string;
49
+ redemptionLimitDuration: string;
50
+ }
51
+ export interface FixedTermEarnPositionInterestV5 {
52
+ coin: string;
53
+ apy: string;
54
+ expectReturnEarning: string;
55
+ price: string;
56
+ }
57
+ export interface FixedTermEarnPositionV5 {
58
+ positionId: string;
59
+ productId: string;
60
+ category: string;
61
+ coin: string;
62
+ amount: string;
63
+ effectiveAmount: string;
64
+ duration: string;
65
+ status: string;
66
+ settlementTime: string;
67
+ createdAt: string;
68
+ orderId: string;
69
+ earlyRedeemInfo: FixedTermEarnEarlyRedeemInfoV5 | null;
70
+ allowAutoReinvest: boolean;
71
+ autoReinvest: string;
72
+ interestCoinApyList: FixedTermEarnPositionInterestV5[];
73
+ }
74
+ export interface FixedTermEarnPositionListV5 {
75
+ list: FixedTermEarnPositionV5[];
76
+ }
77
+ export interface FixedTermEarnOrderYieldInfoV5 {
78
+ coin: string;
79
+ amount: string;
80
+ status: string;
81
+ createdAt: string;
82
+ apy: string;
83
+ }
84
+ export interface FixedTermEarnOrderV5 {
85
+ orderId: string;
86
+ orderLinkId: string;
87
+ orderType: string;
88
+ status: string;
89
+ productId: string;
90
+ category: string;
91
+ coin: string;
92
+ amount: string;
93
+ duration: string;
94
+ accountType: string;
95
+ settlementTime: string;
96
+ createdAt: string;
97
+ yieldInfoList: FixedTermEarnOrderYieldInfoV5[];
98
+ }
99
+ export interface FixedTermEarnOrderListV5 {
100
+ list: FixedTermEarnOrderV5[];
101
+ nextPageCursor: string;
102
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-earn-fixed-term.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-earn-fixed-term.js","sourceRoot":"","sources":["../../../src/types/response/v5-earn-fixed-term.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ export interface LiquidityMiningApyBreakdownV5 {
2
+ coin: string;
3
+ apy: string;
4
+ }
5
+ export interface LiquidityMiningProductV5 {
6
+ productId: string;
7
+ baseCoin: string;
8
+ quoteCoin: string;
9
+ status: 'Available' | 'NotAvailable' | string;
10
+ maxLeverage: number;
11
+ minInvestmentQuote: string;
12
+ minInvestmentBase: string;
13
+ maxInvestmentQuote: string;
14
+ maxInvestmentBase: string;
15
+ minWithdrawalAmount: string;
16
+ minReinvestAmount: string;
17
+ baseCoinPrecision: number;
18
+ quoteCoinPrecision: number;
19
+ yieldCoins: string[];
20
+ apyE8: string;
21
+ apy7dE8: string;
22
+ poolLiquidityValue: string;
23
+ dailyYield: string;
24
+ slippageRateE8List: string[];
25
+ apyBreakdown: LiquidityMiningApyBreakdownV5[];
26
+ apy7dBreakdown: LiquidityMiningApyBreakdownV5[];
27
+ slippage_levels?: string[];
28
+ }
29
+ export interface LiquidityMiningProductResultV5 {
30
+ products: LiquidityMiningProductV5[];
31
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-earn-liquidity-mining.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-earn-liquidity-mining.js","sourceRoot":"","sources":["../../../src/types/response/v5-earn-liquidity-mining.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Earn token product (e.g. BYUSDT) — /v5/earn/token/*
3
+ */
4
+ export interface EarnTokenProductV5 {
5
+ productId: string;
6
+ coin: string;
7
+ mintFeeRateE8: string;
8
+ redeemFeeRateE8: string;
9
+ minInvestment: string;
10
+ userHolding: string;
11
+ leftQuota: string;
12
+ canMint: boolean;
13
+ savingsBalance: string;
14
+ aprE8: string;
15
+ bonusAprE8: string;
16
+ bonusMaxAmount: string;
17
+ baseCoinPrecision: number;
18
+ tokenPrecision: number;
19
+ }
20
+ export interface PlaceEarnTokenOrderResultV5 {
21
+ orderId: string;
22
+ orderLinkId: string;
23
+ }
24
+ export interface EarnTokenOrderV5 {
25
+ orderId: string;
26
+ orderLinkId: string;
27
+ orderType: 'Mint' | 'Redeem';
28
+ fromCoin: string;
29
+ toCoin: string;
30
+ fromAmount: string;
31
+ toAmount: string;
32
+ serviceFee: string;
33
+ status: 'Success' | 'Processing' | 'Fail';
34
+ createdTime: string;
35
+ }
36
+ export interface EarnTokenPositionV5 {
37
+ totalAmount: string;
38
+ totalYield: string;
39
+ yesterdayYield: string;
40
+ aprE8: number;
41
+ bonusAprE8: number;
42
+ bonusMaxAmount: string;
43
+ hasQuota: boolean;
44
+ }
45
+ export interface EarnTokenDailyYieldRecordV5 {
46
+ yield: string;
47
+ bonusYield: string;
48
+ status: 'Success' | 'Processing';
49
+ createdTime: string;
50
+ }
51
+ export interface EarnTokenHourlyYieldRecordV5 {
52
+ effectiveAmount: string;
53
+ yield: string;
54
+ rewardType: 0 | 1;
55
+ aprE8: string;
56
+ hourlyDate: string;
57
+ createdTime: string;
58
+ }
59
+ export interface EarnTokenHistoryAprPointV5 {
60
+ timestamp: string;
61
+ aprE8: string;
62
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Earn token product (e.g. BYUSDT) — /v5/earn/token/*
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=v5-earn-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-earn-token.js","sourceRoot":"","sources":["../../../src/types/response/v5-earn-token.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -28,6 +28,14 @@ export interface EarnPositionV5 {
28
28
  amount: string;
29
29
  totalPnl: string;
30
30
  claimableYield: string;
31
+ id?: string;
32
+ status?: string;
33
+ orderId?: string;
34
+ estimateRedeemTime?: string;
35
+ estimateStakeTime?: string;
36
+ estimateInterestCalculationTime?: string;
37
+ settlementTime?: string;
38
+ autoReinvest?: string;
31
39
  }
32
40
  export interface EarnYieldHistoryV5 {
33
41
  productId: string;
@@ -51,3 +59,98 @@ export interface EarnHourlyYieldHistoryV5 {
51
59
  hourlyDate: string;
52
60
  createdAt: string;
53
61
  }
62
+ export interface EarnAprHistoryPointV5 {
63
+ timestamp: string;
64
+ apr: string;
65
+ }
66
+ /**
67
+ * Advanced Earn — Dual Asset product (GET /v5/earn/advance/product).
68
+ */
69
+ export interface AdvanceEarnDualAssetProductV5 {
70
+ category: string;
71
+ productId: string;
72
+ baseCoin: string;
73
+ quoteCoin: string;
74
+ expectReceiveAt: string;
75
+ duration: string;
76
+ status: 'Available' | 'NotAvailable';
77
+ isVipProduct: boolean;
78
+ subscribeStartAt: string;
79
+ subscribeEndAt: string;
80
+ applyStartAt: string;
81
+ settlementTime: string;
82
+ minPurchaseQuoteAmount: string;
83
+ minPurchaseBaseAmount: string;
84
+ remainingAmountQuote: string;
85
+ remainingAmountBase: string;
86
+ orderPrecisionDigitalQuote: number;
87
+ orderPrecisionDigitalBase: number;
88
+ }
89
+ export interface AdvanceEarnDualAssetProductInfoV5 {
90
+ category: string;
91
+ list: AdvanceEarnDualAssetProductV5[];
92
+ }
93
+ /**
94
+ * Advanced Earn — Double Win (GET /v5/earn/advance/product?category=DoubleWin).
95
+ */
96
+ export interface AdvanceEarnDoubleWinProductV5 {
97
+ category: string;
98
+ productId: string;
99
+ investCoin: string;
100
+ underlyingAsset: string;
101
+ duration: string;
102
+ subscribeStartAt: string;
103
+ subscribeEndAt: string;
104
+ settlementTime: string;
105
+ expectReceiveAt: string;
106
+ minPurchaseAmount: string;
107
+ orderPrecisionDigital: number;
108
+ isRfqProduct: boolean;
109
+ lowerPriceBuffer: string;
110
+ upperPriceBuffer: string;
111
+ minDeviationRatio: string;
112
+ maxDeviationRatio: string;
113
+ priceTickSize: string;
114
+ }
115
+ /**
116
+ * Advanced Earn — Smart Leverage (GET /v5/earn/advance/product?category=SmartLeverage).
117
+ */
118
+ export interface AdvanceEarnSmartLeverageProductV5 {
119
+ category: string;
120
+ productId: string;
121
+ investCoin: string;
122
+ underlyingAsset: string;
123
+ direction: 'Long' | 'Short';
124
+ leverage: string;
125
+ duration: string;
126
+ subscribeStartAt: string;
127
+ subscribeEndAt: string;
128
+ settlementTime: string;
129
+ expectReceiveAt: string;
130
+ minPurchaseAmount: string;
131
+ remainingAmount: string;
132
+ orderPrecisionDigital: number;
133
+ }
134
+ /**
135
+ * Advanced Earn — Discount Buy (GET /v5/earn/advance/product?category=DiscountBuy).
136
+ */
137
+ export interface AdvanceEarnDiscountBuyProductV5 {
138
+ category: string;
139
+ productId: string;
140
+ coin: string;
141
+ underlyingAsset: string;
142
+ settlementTime: string;
143
+ duration: string;
144
+ isVipProduct: boolean;
145
+ subscribeStartAt: string;
146
+ subscribeEndAt: string;
147
+ minPurchaseAmount: string;
148
+ remainingAmount: string;
149
+ orderPrecisionDigital: number;
150
+ expectReceiveAt: string;
151
+ }
152
+ export type AdvanceEarnAdvanceProductListItemV5 = AdvanceEarnDualAssetProductV5 | AdvanceEarnDoubleWinProductV5 | AdvanceEarnSmartLeverageProductV5 | AdvanceEarnDiscountBuyProductV5;
153
+ export interface AdvanceEarnAdvanceProductInfoV5 {
154
+ category: string;
155
+ list: AdvanceEarnAdvanceProductListItemV5[];
156
+ }
@@ -35,6 +35,9 @@ export interface LinearInverseInstrumentInfoV5 {
35
35
  status: InstrumentStatusV5;
36
36
  baseCoin: string;
37
37
  quoteCoin: string;
38
+ /**
39
+ * Region / product class for the pair. For `category=linear`, includes e.g. `stock`, `forex`, `commodity`, `xstocks` (per Bybit; new values may be added).
40
+ */
38
41
  symbolType: string;
39
42
  launchTime: string;
40
43
  deliveryTime?: string;
@@ -92,6 +95,9 @@ export interface OptionInstrumentInfoV5 {
92
95
  baseCoin: string;
93
96
  quoteCoin: string;
94
97
  settleCoin: string;
98
+ /**
99
+ * Region / product class for the pair (see Bybit instruments docs; new values may be added).
100
+ */
95
101
  symbolType: string;
96
102
  launchTime: string;
97
103
  deliveryTime: string;
@@ -112,6 +118,14 @@ export interface SpotInstrumentInfoV5 {
112
118
  symbol: string;
113
119
  baseCoin: string;
114
120
  quoteCoin: string;
121
+ /**
122
+ * Xstock multiplier for `symbolType` = xstocks pairs. `stock_price = token_price / multiplier`,
123
+ * `stock_qty = token_qty * multiplier`. Default `"1"`.
124
+ */
125
+ xstockMultiplier?: string;
126
+ /**
127
+ * Region / product class (see Bybit instruments docs; linear category also uses values such as `stock`, `forex`).
128
+ */
115
129
  symbolType: string;
116
130
  innovation: '0' | '1';
117
131
  status: InstrumentStatusV5;
@@ -37,6 +37,10 @@ export interface PositionV5 {
37
37
  leverageSysUpdatedTime: string | '';
38
38
  createdTime: string;
39
39
  updatedTime: string;
40
+ /**
41
+ * Position open timestamp (ms), default 0. Documented as testnet-only in some API versions.
42
+ */
43
+ openTime?: number;
40
44
  positionIMByMp: string;
41
45
  positionMMByMp: string;
42
46
  seq: number;