bybit-api 4.6.1 → 4.6.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.
- package/README.md +1 -0
- package/lib/constants/enum.d.ts +1 -0
- package/lib/constants/enum.js +1 -0
- package/lib/constants/enum.js.map +1 -1
- package/lib/rest-client-v5.d.ts +503 -18
- package/lib/rest-client-v5.js +634 -5
- package/lib/rest-client-v5.js.map +1 -1
- package/lib/types/request/index.d.ts +8 -0
- package/lib/types/request/index.js +8 -0
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/v5-account.d.ts +25 -1
- package/lib/types/request/v5-alpha-trade.d.ts +52 -0
- package/lib/types/request/v5-alpha-trade.js +6 -0
- package/lib/types/request/v5-alpha-trade.js.map +1 -0
- package/lib/types/request/v5-asset.d.ts +26 -2
- package/lib/types/request/v5-card.d.ts +51 -0
- package/lib/types/request/v5-card.js +7 -0
- package/lib/types/request/v5-card.js.map +1 -0
- package/lib/types/request/v5-crypto-loan.d.ts +8 -0
- package/lib/types/request/v5-earn-advance-discount.d.ts +75 -0
- package/lib/types/request/v5-earn-advance-discount.js +3 -0
- package/lib/types/request/v5-earn-advance-discount.js.map +1 -0
- package/lib/types/request/v5-earn-fixed-term.d.ts +42 -0
- package/lib/types/request/v5-earn-fixed-term.js +3 -0
- package/lib/types/request/v5-earn-fixed-term.js.map +1 -0
- package/lib/types/request/v5-earn-liquidity-mining.d.ts +7 -0
- package/lib/types/request/v5-earn-liquidity-mining.js +3 -0
- package/lib/types/request/v5-earn-liquidity-mining.js.map +1 -0
- package/lib/types/request/v5-earn-pwm.d.ts +167 -0
- package/lib/types/request/v5-earn-pwm.js +3 -0
- package/lib/types/request/v5-earn-pwm.js.map +1 -0
- package/lib/types/request/v5-earn-token.d.ts +49 -0
- package/lib/types/request/v5-earn-token.js +6 -0
- package/lib/types/request/v5-earn-token.js.map +1 -0
- package/lib/types/request/v5-earn.d.ts +35 -0
- package/lib/types/request/v5-market.d.ts +10 -3
- package/lib/types/request/v5-spot-leverage-token.d.ts +46 -0
- package/lib/types/request/v5-spreadtrading.d.ts +7 -0
- package/lib/types/request/v5-strategy.d.ts +80 -0
- package/lib/types/request/v5-strategy.js +3 -0
- package/lib/types/request/v5-strategy.js.map +1 -0
- package/lib/types/request/v5-user.d.ts +29 -3
- package/lib/types/response/index.d.ts +8 -0
- package/lib/types/response/index.js +8 -0
- package/lib/types/response/index.js.map +1 -1
- package/lib/types/response/v5-account.d.ts +76 -0
- package/lib/types/response/v5-alpha-trade.d.ts +170 -0
- package/lib/types/response/v5-alpha-trade.js +6 -0
- package/lib/types/response/v5-alpha-trade.js.map +1 -0
- package/lib/types/response/v5-asset.d.ts +128 -10
- package/lib/types/response/v5-card.d.ts +118 -0
- package/lib/types/response/v5-card.js +3 -0
- package/lib/types/response/v5-card.js.map +1 -0
- package/lib/types/response/v5-earn-advance-discount.d.ts +143 -0
- package/lib/types/response/v5-earn-advance-discount.js +3 -0
- package/lib/types/response/v5-earn-advance-discount.js.map +1 -0
- package/lib/types/response/v5-earn-fixed-term.d.ts +102 -0
- package/lib/types/response/v5-earn-fixed-term.js +3 -0
- package/lib/types/response/v5-earn-fixed-term.js.map +1 -0
- package/lib/types/response/v5-earn-liquidity-mining.d.ts +31 -0
- package/lib/types/response/v5-earn-liquidity-mining.js +3 -0
- package/lib/types/response/v5-earn-liquidity-mining.js.map +1 -0
- package/lib/types/response/v5-earn-pwm.d.ts +425 -0
- package/lib/types/response/v5-earn-pwm.js +3 -0
- package/lib/types/response/v5-earn-pwm.js.map +1 -0
- package/lib/types/response/v5-earn-token.d.ts +62 -0
- package/lib/types/response/v5-earn-token.js +6 -0
- package/lib/types/response/v5-earn-token.js.map +1 -0
- package/lib/types/response/v5-earn.d.ts +141 -0
- package/lib/types/response/v5-market.d.ts +16 -4
- package/lib/types/response/v5-position.d.ts +2 -0
- package/lib/types/response/v5-spot-leverage-token.d.ts +56 -0
- package/lib/types/response/v5-spreadtrading.d.ts +5 -0
- package/lib/types/response/v5-strategy.d.ts +96 -0
- package/lib/types/response/v5-strategy.js +3 -0
- package/lib/types/response/v5-strategy.js.map +1 -0
- package/lib/types/response/v5-user.d.ts +30 -0
- package/lib/types/shared-v5.d.ts +20 -1
- package/lib/types/websockets/ws-events.d.ts +2 -0
- package/lib/util/webCryptoAPI.d.ts +1 -1
- package/lib/util/webCryptoAPI.js +1 -1
- package/lib/util/webCryptoAPI.js.map +1 -1
- package/lib/util/websockets/websocket-util.js +1 -0
- package/lib/util/websockets/websocket-util.js.map +1 -1
- package/llms.txt +12585 -7241
- package/package.json +1 -1
|
@@ -22,12 +22,27 @@ export interface EarnOrderHistoryV5 {
|
|
|
22
22
|
estimateRedeemTime: string;
|
|
23
23
|
estimateStakeTime: string;
|
|
24
24
|
}
|
|
25
|
+
export interface EarnPositionFreezeDetailV5 {
|
|
26
|
+
amount: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}
|
|
25
29
|
export interface EarnPositionV5 {
|
|
26
30
|
coin: string;
|
|
27
31
|
productId: string;
|
|
28
32
|
amount: string;
|
|
29
33
|
totalPnl: string;
|
|
30
34
|
claimableYield: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
status?: string;
|
|
37
|
+
orderId?: string;
|
|
38
|
+
estimateRedeemTime?: string;
|
|
39
|
+
estimateStakeTime?: string;
|
|
40
|
+
estimateInterestCalculationTime?: string;
|
|
41
|
+
settlementTime?: string;
|
|
42
|
+
autoReinvest?: string;
|
|
43
|
+
/** Redeemable amount */
|
|
44
|
+
availableAmount: string;
|
|
45
|
+
freezeDetails: EarnPositionFreezeDetailV5[];
|
|
31
46
|
}
|
|
32
47
|
export interface EarnYieldHistoryV5 {
|
|
33
48
|
productId: string;
|
|
@@ -51,3 +66,129 @@ export interface EarnHourlyYieldHistoryV5 {
|
|
|
51
66
|
hourlyDate: string;
|
|
52
67
|
createdAt: string;
|
|
53
68
|
}
|
|
69
|
+
export interface EarnAprHistoryPointV5 {
|
|
70
|
+
timestamp: string;
|
|
71
|
+
apr: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Advanced Earn — Dual Asset product (GET /v5/earn/advance/product).
|
|
75
|
+
*/
|
|
76
|
+
export interface AdvanceEarnDualAssetProductV5 {
|
|
77
|
+
category: string;
|
|
78
|
+
productId: string;
|
|
79
|
+
baseCoin: string;
|
|
80
|
+
quoteCoin: string;
|
|
81
|
+
expectReceiveAt: string;
|
|
82
|
+
duration: string;
|
|
83
|
+
status: 'Available' | 'NotAvailable';
|
|
84
|
+
isVipProduct: boolean;
|
|
85
|
+
subscribeStartAt: string;
|
|
86
|
+
subscribeEndAt: string;
|
|
87
|
+
applyStartAt: string;
|
|
88
|
+
settlementTime: string;
|
|
89
|
+
minPurchaseQuoteAmount: string;
|
|
90
|
+
minPurchaseBaseAmount: string;
|
|
91
|
+
remainingAmountQuote: string;
|
|
92
|
+
remainingAmountBase: string;
|
|
93
|
+
orderPrecisionDigitalQuote: number;
|
|
94
|
+
orderPrecisionDigitalBase: number;
|
|
95
|
+
}
|
|
96
|
+
export interface AdvanceEarnDualAssetProductInfoV5 {
|
|
97
|
+
category: string;
|
|
98
|
+
list: AdvanceEarnDualAssetProductV5[];
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Advanced Earn — Double Win (GET /v5/earn/advance/product?category=DoubleWin).
|
|
102
|
+
*/
|
|
103
|
+
export interface AdvanceEarnDoubleWinProductV5 {
|
|
104
|
+
category: string;
|
|
105
|
+
productId: string;
|
|
106
|
+
investCoin: string;
|
|
107
|
+
underlyingAsset: string;
|
|
108
|
+
duration: string;
|
|
109
|
+
subscribeStartAt: string;
|
|
110
|
+
subscribeEndAt: string;
|
|
111
|
+
settlementTime: string;
|
|
112
|
+
expectReceiveAt: string;
|
|
113
|
+
minPurchaseAmount: string;
|
|
114
|
+
orderPrecisionDigital: number;
|
|
115
|
+
isRfqProduct: boolean;
|
|
116
|
+
lowerPriceBuffer: string;
|
|
117
|
+
upperPriceBuffer: string;
|
|
118
|
+
minDeviationRatio: string;
|
|
119
|
+
maxDeviationRatio: string;
|
|
120
|
+
priceTickSize: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Advanced Earn — Smart Leverage (GET /v5/earn/advance/product?category=SmartLeverage).
|
|
124
|
+
*/
|
|
125
|
+
export interface AdvanceEarnSmartLeverageProductV5 {
|
|
126
|
+
category: string;
|
|
127
|
+
productId: string;
|
|
128
|
+
investCoin: string;
|
|
129
|
+
underlyingAsset: string;
|
|
130
|
+
direction: 'Long' | 'Short';
|
|
131
|
+
leverage: string;
|
|
132
|
+
duration: string;
|
|
133
|
+
subscribeStartAt: string;
|
|
134
|
+
subscribeEndAt: string;
|
|
135
|
+
settlementTime: string;
|
|
136
|
+
expectReceiveAt: string;
|
|
137
|
+
minPurchaseAmount: string;
|
|
138
|
+
remainingAmount: string;
|
|
139
|
+
orderPrecisionDigital: number;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Advanced Earn — Discount Buy (GET /v5/earn/advance/product?category=DiscountBuy).
|
|
143
|
+
*/
|
|
144
|
+
export interface AdvanceEarnDiscountBuyProductV5 {
|
|
145
|
+
category: string;
|
|
146
|
+
productId: string;
|
|
147
|
+
coin: string;
|
|
148
|
+
underlyingAsset: string;
|
|
149
|
+
settlementTime: string;
|
|
150
|
+
duration: string;
|
|
151
|
+
isVipProduct: boolean;
|
|
152
|
+
subscribeStartAt: string;
|
|
153
|
+
subscribeEndAt: string;
|
|
154
|
+
minPurchaseAmount: string;
|
|
155
|
+
remainingAmount: string;
|
|
156
|
+
orderPrecisionDigital: number;
|
|
157
|
+
expectReceiveAt: string;
|
|
158
|
+
}
|
|
159
|
+
export type AdvanceEarnAdvanceProductListItemV5 = AdvanceEarnDualAssetProductV5 | AdvanceEarnDoubleWinProductV5 | AdvanceEarnSmartLeverageProductV5 | AdvanceEarnDiscountBuyProductV5;
|
|
160
|
+
export interface AdvanceEarnAdvanceProductInfoV5 {
|
|
161
|
+
category: string;
|
|
162
|
+
list: AdvanceEarnAdvanceProductListItemV5[];
|
|
163
|
+
}
|
|
164
|
+
/** GET /v5/earn/hold-to-earn/product — Hold to Earn airdrop products */
|
|
165
|
+
export type HoldToEarnAirdropProductStatusV5 = 'NotStarted' | 'Online' | 'Ended';
|
|
166
|
+
export interface HoldToEarnAirdropProductYieldV5 {
|
|
167
|
+
coinName: string;
|
|
168
|
+
/** Yesterday's APR for display, e.g. "10%", "0%" */
|
|
169
|
+
apy: string;
|
|
170
|
+
}
|
|
171
|
+
export interface HoldToEarnAirdropProductV5 {
|
|
172
|
+
coinName: string;
|
|
173
|
+
yields: HoldToEarnAirdropProductYieldV5[];
|
|
174
|
+
status: HoldToEarnAirdropProductStatusV5;
|
|
175
|
+
announcementUrl: string;
|
|
176
|
+
/** Yesterday's avg APR across yield coins */
|
|
177
|
+
apy: string;
|
|
178
|
+
}
|
|
179
|
+
export interface HoldToEarnAirdropProductsResultV5 {
|
|
180
|
+
products: HoldToEarnAirdropProductV5[];
|
|
181
|
+
}
|
|
182
|
+
/** GET /v5/earn/hold-to-earn/yield-history */
|
|
183
|
+
export interface HoldToEarnAirdropDailyPnlV5 {
|
|
184
|
+
coinName: string;
|
|
185
|
+
yieldCoinName: string;
|
|
186
|
+
effectiveAmount: string;
|
|
187
|
+
pnl: string;
|
|
188
|
+
apy: string;
|
|
189
|
+
createdAt: number;
|
|
190
|
+
}
|
|
191
|
+
export interface HoldToEarnAirdropYieldHistoryResultV5 {
|
|
192
|
+
nextCursor: string;
|
|
193
|
+
airdropDailyPnls: HoldToEarnAirdropDailyPnlV5[];
|
|
194
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../shared-v5';
|
|
1
|
+
import { CategoryCursorListV5, CategoryV5, ContractTypeV5, CopyTradingV5, InstrumentStatusV5, InstrumentSymbolTypeV5, MarginTradingV5, OptionTypeV5, OrderSideV5 } from '../shared-v5';
|
|
2
2
|
/**
|
|
3
3
|
* OHLCVT candle used by v5 APIs
|
|
4
4
|
*
|
|
@@ -30,12 +30,15 @@ export type OHLCVKlineV5 = [
|
|
|
30
30
|
*/
|
|
31
31
|
export type OHLCKlineV5 = [string, string, string, string, string];
|
|
32
32
|
export interface LinearInverseInstrumentInfoV5 {
|
|
33
|
+
/** The ID of the symbol name. */
|
|
34
|
+
symbolId: number;
|
|
33
35
|
symbol: string;
|
|
34
36
|
contractType: ContractTypeV5;
|
|
35
37
|
status: InstrumentStatusV5;
|
|
36
38
|
baseCoin: string;
|
|
37
39
|
quoteCoin: string;
|
|
38
|
-
|
|
40
|
+
/** Region / product class for the pair (`stock`, `forex`, `commodity`, `xstocks`, etc.). */
|
|
41
|
+
symbolType: InstrumentSymbolTypeV5;
|
|
39
42
|
launchTime: string;
|
|
40
43
|
deliveryTime?: string;
|
|
41
44
|
deliveryFeeRate?: string;
|
|
@@ -86,13 +89,15 @@ export interface LinearInverseInstrumentInfoV5 {
|
|
|
86
89
|
displayName: string;
|
|
87
90
|
}
|
|
88
91
|
export interface OptionInstrumentInfoV5 {
|
|
92
|
+
/** The ID of the symbol name. */
|
|
93
|
+
symbolId: number;
|
|
89
94
|
symbol: string;
|
|
90
95
|
optionsType: OptionTypeV5;
|
|
91
96
|
status: InstrumentStatusV5;
|
|
92
97
|
baseCoin: string;
|
|
93
98
|
quoteCoin: string;
|
|
94
99
|
settleCoin: string;
|
|
95
|
-
symbolType:
|
|
100
|
+
symbolType: InstrumentSymbolTypeV5;
|
|
96
101
|
launchTime: string;
|
|
97
102
|
deliveryTime: string;
|
|
98
103
|
deliveryFeeRate: string;
|
|
@@ -109,10 +114,17 @@ export interface OptionInstrumentInfoV5 {
|
|
|
109
114
|
displayName: string;
|
|
110
115
|
}
|
|
111
116
|
export interface SpotInstrumentInfoV5 {
|
|
117
|
+
/** The ID of the symbol name. */
|
|
118
|
+
symbolId: number;
|
|
112
119
|
symbol: string;
|
|
113
120
|
baseCoin: string;
|
|
114
121
|
quoteCoin: string;
|
|
115
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Xstock multiplier for `symbolType` = xstocks pairs. `stock_price = token_price / multiplier`,
|
|
124
|
+
* `stock_qty = token_qty * multiplier`. Default `"1"`.
|
|
125
|
+
*/
|
|
126
|
+
xstockMultiplier?: string;
|
|
127
|
+
symbolType: InstrumentSymbolTypeV5;
|
|
116
128
|
innovation: '0' | '1';
|
|
117
129
|
status: InstrumentStatusV5;
|
|
118
130
|
marginTrading: MarginTradingV5;
|
|
@@ -37,6 +37,8 @@ export interface PositionV5 {
|
|
|
37
37
|
leverageSysUpdatedTime: string | '';
|
|
38
38
|
createdTime: string;
|
|
39
39
|
updatedTime: string;
|
|
40
|
+
/** Position open timestamp (ms). Default `0` when not set. */
|
|
41
|
+
openTime: number;
|
|
40
42
|
positionIMByMp: string;
|
|
41
43
|
positionMMByMp: string;
|
|
42
44
|
seq: number;
|
|
@@ -74,6 +74,18 @@ export interface VIPMarginDataV5 {
|
|
|
74
74
|
vipLevel: string;
|
|
75
75
|
}[];
|
|
76
76
|
}
|
|
77
|
+
export interface SpotMarginCurrencyDataV5 {
|
|
78
|
+
currency: string;
|
|
79
|
+
flexibleManualBorrowable: boolean;
|
|
80
|
+
minFlexibleManualBorrowQty: string;
|
|
81
|
+
flexibleManualBorrowAccuracy: string;
|
|
82
|
+
fixedManualBorrowable: boolean;
|
|
83
|
+
minFixedManualBorrowQty: string;
|
|
84
|
+
fixedManualBorrowAccuracy: string;
|
|
85
|
+
fixedInterestRateAccuracy: string;
|
|
86
|
+
minFixedInterestRate: string;
|
|
87
|
+
maxFixedInterestRate: string;
|
|
88
|
+
}
|
|
77
89
|
export interface SpotMarginStateV5 {
|
|
78
90
|
spotLeverage: string;
|
|
79
91
|
spotMarginMode: '1' | '0';
|
|
@@ -122,3 +134,47 @@ export interface AutoRepayModeItemV5 {
|
|
|
122
134
|
export interface AutoRepayModeResultV5 {
|
|
123
135
|
data: AutoRepayModeItemV5[];
|
|
124
136
|
}
|
|
137
|
+
export interface SpotMarginLiabilityInfoV5 {
|
|
138
|
+
currency: string;
|
|
139
|
+
totalBorrowAmount: string;
|
|
140
|
+
fixedBorrowAmount: string;
|
|
141
|
+
flexibleBorrowAmount: string;
|
|
142
|
+
spotTotalBorrow: string;
|
|
143
|
+
derivativesBorrow: string;
|
|
144
|
+
}
|
|
145
|
+
export interface FixedRateBorrowResultV5 {
|
|
146
|
+
orderId: string;
|
|
147
|
+
}
|
|
148
|
+
export interface FixedRateBorrowOrderInfoV5 {
|
|
149
|
+
annualRate: string;
|
|
150
|
+
orderId: string;
|
|
151
|
+
orderTime: string;
|
|
152
|
+
filledQty: string;
|
|
153
|
+
orderQty: string;
|
|
154
|
+
orderCurrency: string;
|
|
155
|
+
state: number;
|
|
156
|
+
term: number;
|
|
157
|
+
repayType: string;
|
|
158
|
+
strategyType: 'PARTIAL' | 'FULL';
|
|
159
|
+
}
|
|
160
|
+
export interface FixedRateBorrowContractInfoV5 {
|
|
161
|
+
annualRate: string;
|
|
162
|
+
borrowCurrency: string;
|
|
163
|
+
borrowTime: string;
|
|
164
|
+
interestPaid: string;
|
|
165
|
+
loanId: string;
|
|
166
|
+
orderId: string;
|
|
167
|
+
repaymentTime: string;
|
|
168
|
+
residualPenaltyInterest: string;
|
|
169
|
+
residualPrincipal: string;
|
|
170
|
+
status: number;
|
|
171
|
+
term: string;
|
|
172
|
+
repayType: string;
|
|
173
|
+
strategyType: 'PARTIAL' | 'FULL';
|
|
174
|
+
}
|
|
175
|
+
export interface FixedRateBorrowQuoteV5 {
|
|
176
|
+
orderCurrency: string;
|
|
177
|
+
term: number;
|
|
178
|
+
annualRate: string;
|
|
179
|
+
qty: string;
|
|
180
|
+
}
|
|
@@ -119,3 +119,8 @@ export interface SpreadTradeV5 {
|
|
|
119
119
|
legs: SpreadTradeLegV5[];
|
|
120
120
|
extraFees: string;
|
|
121
121
|
}
|
|
122
|
+
/** GET /v5/spread/max-qty */
|
|
123
|
+
export interface SpreadMaxQtyResultV5 {
|
|
124
|
+
/** Maximum order quantity (available balance for the spread order). */
|
|
125
|
+
ab: string;
|
|
126
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { OrderSideV5, PositionIdx, PovModeV5, StrategyCategoryV5, StrategyPreferV5, StrategyTypeV5 } from '../shared-v5';
|
|
2
|
+
export interface CreateStrategyOrderResultV5 {
|
|
3
|
+
strategyId: string;
|
|
4
|
+
/** null when creation succeeded */
|
|
5
|
+
result: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface StopStrategyResultV5 {
|
|
8
|
+
strategyId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface StrategyListItemV5 {
|
|
11
|
+
strategyId: string;
|
|
12
|
+
category: StrategyCategoryV5;
|
|
13
|
+
symbol: string;
|
|
14
|
+
side: OrderSideV5;
|
|
15
|
+
size: string;
|
|
16
|
+
strategyType: StrategyTypeV5;
|
|
17
|
+
/** 2: running, 3: terminated, 4: terminated unfilled, 5: paused, 6: untriggered */
|
|
18
|
+
status: 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
executedSize: string;
|
|
20
|
+
executedAvgPrice: string;
|
|
21
|
+
executedStartTimeE3: string;
|
|
22
|
+
executedEndTimeE3: string;
|
|
23
|
+
createdTimeE3: string;
|
|
24
|
+
updatedTimeE3: string;
|
|
25
|
+
reduceOnly: boolean;
|
|
26
|
+
triggerPrice: string;
|
|
27
|
+
isTriggered: boolean;
|
|
28
|
+
leverageType: 0 | 1;
|
|
29
|
+
terminateType: number;
|
|
30
|
+
terminateRemark: string;
|
|
31
|
+
triggerCount: string;
|
|
32
|
+
tradingCount: string;
|
|
33
|
+
realizedPnl: string;
|
|
34
|
+
strategyName: string;
|
|
35
|
+
strategyPrefer: StrategyPreferV5 | string;
|
|
36
|
+
duration: number;
|
|
37
|
+
executedDuration: number;
|
|
38
|
+
isRandom: boolean;
|
|
39
|
+
interval: number;
|
|
40
|
+
limitPrice: string;
|
|
41
|
+
chasePercentE4: string;
|
|
42
|
+
chaseDistance: string;
|
|
43
|
+
maxChasePrice: string;
|
|
44
|
+
chaseOrderPrice: string;
|
|
45
|
+
chasePrice: string;
|
|
46
|
+
postOnly: number;
|
|
47
|
+
isRebalance: boolean;
|
|
48
|
+
orderType: string;
|
|
49
|
+
orderPriceOffset: string;
|
|
50
|
+
strategySl: string;
|
|
51
|
+
strategyTp: string;
|
|
52
|
+
arbitrageOrders: unknown[];
|
|
53
|
+
positionValue: string;
|
|
54
|
+
filledPositionValue: string;
|
|
55
|
+
/** POV only */
|
|
56
|
+
mode?: PovModeV5 | string;
|
|
57
|
+
participationRate?: string;
|
|
58
|
+
referenceWindow?: string;
|
|
59
|
+
depthReference?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface StrategyListResultV5 {
|
|
62
|
+
list: StrategyListItemV5[];
|
|
63
|
+
nextCursor: string;
|
|
64
|
+
prevCursor: string;
|
|
65
|
+
}
|
|
66
|
+
export interface StrategyOrderListItemV5 {
|
|
67
|
+
strategyId: string;
|
|
68
|
+
orderId: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
side: OrderSideV5;
|
|
71
|
+
size: string;
|
|
72
|
+
price: string;
|
|
73
|
+
/** 2: created, 3: create failed, 4: partially filled, 5: fully filled, 6: rejected, 7: canceled */
|
|
74
|
+
status: string;
|
|
75
|
+
executedSize: string;
|
|
76
|
+
dealTimeE3: string;
|
|
77
|
+
parentOrderId: string;
|
|
78
|
+
createdTimeE3: string;
|
|
79
|
+
updatedTimeE3: string;
|
|
80
|
+
code: number;
|
|
81
|
+
msg: string;
|
|
82
|
+
category: StrategyCategoryV5;
|
|
83
|
+
positionIdx: PositionIdx;
|
|
84
|
+
leverageType: 0 | 1;
|
|
85
|
+
tpPrice: string;
|
|
86
|
+
slPrice: string;
|
|
87
|
+
orderType: string;
|
|
88
|
+
orderPriceOffset: string;
|
|
89
|
+
positionValue: string;
|
|
90
|
+
filledPositionValue: string;
|
|
91
|
+
}
|
|
92
|
+
export interface StrategyOrderListResultV5 {
|
|
93
|
+
list: StrategyOrderListItemV5[];
|
|
94
|
+
nextCursor: string;
|
|
95
|
+
prevCursor: string;
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v5-strategy.js","sourceRoot":"","sources":["../../../src/types/response/v5-strategy.ts"],"names":[],"mappings":""}
|
|
@@ -34,6 +34,14 @@ export interface ApiKeyPermissionsV5 {
|
|
|
34
34
|
Exchange: string[];
|
|
35
35
|
NFT: string[];
|
|
36
36
|
Affiliate: string[];
|
|
37
|
+
Earn?: string[];
|
|
38
|
+
FiatP2P?: string[];
|
|
39
|
+
FiatBitPay?: string[];
|
|
40
|
+
FiatConvertBroker?: string[];
|
|
41
|
+
/** @deprecated */
|
|
42
|
+
FiatGlobalPay?: string[];
|
|
43
|
+
BitCard?: string[];
|
|
44
|
+
ByXPost?: string[];
|
|
37
45
|
}
|
|
38
46
|
export interface ApiKeyInfoV5 {
|
|
39
47
|
id: string;
|
|
@@ -143,6 +151,28 @@ export interface AffiliateUserInfoV5 {
|
|
|
143
151
|
commissions30Day?: Record<string, string>;
|
|
144
152
|
/** tradfi commissions in past year. Coin -> amount */
|
|
145
153
|
commissions365Day?: Record<string, string>;
|
|
154
|
+
/** Payment amount in the last 30 days */
|
|
155
|
+
paySendAmount30Day: string;
|
|
156
|
+
/** Pay first transaction amount */
|
|
157
|
+
payFtt: string;
|
|
158
|
+
/** Card first-time transaction amount */
|
|
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;
|
|
146
176
|
}
|
|
147
177
|
export interface FriendReferralRecordV5 {
|
|
148
178
|
id: string;
|
package/lib/types/shared-v5.d.ts
CHANGED
|
@@ -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';
|
|
@@ -99,7 +110,7 @@ export type TradeModeV5 = 0 | 1;
|
|
|
99
110
|
export type TPSLModeV5 = 'Full' | 'Partial';
|
|
100
111
|
export type AccountMarginModeV5 = 'ISOLATED_MARGIN' | 'REGULAR_MARGIN' | 'PORTFOLIO_MARGIN';
|
|
101
112
|
export type UnifiedUpdateStatusV5 = 'FAIL' | 'PROCESS' | 'SUCCESS';
|
|
102
|
-
export type AccountTypeV5 = 'CONTRACT' | 'SPOT' | 'INVESTMENT' | 'OPTION' | 'UNIFIED' | 'FUND';
|
|
113
|
+
export type AccountTypeV5 = 'CONTRACT' | 'SPOT' | 'INVESTMENT' | 'OPTION' | 'UNIFIED' | 'FUND' | 'EARN';
|
|
103
114
|
export type TransactionTypeV5 = 'TRANSFER_IN' | 'TRANSFER_OUT' | 'TRADE' | 'SETTLEMENT' | 'DELIVERY' | 'LIQUIDATION' | 'ADL' | 'AIRDROP' | 'BONUS_RECOLLECT' | 'BONUS_RECOLLECT' | 'FEE_REFUND' | 'INTEREST' | 'CURRENCY_BUY' | 'CURRENCY_SELL' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'BORROWED_AMOUNT_INS_LOAN' | 'PRINCIPLE_REPAYMENT_INS_LOAN' | 'INTEREST_REPAYMENT_INS_LOAN' | 'AUTO_SOLD_COLLATERAL_INS_LOAN' | 'AUTO_BUY_LIABILITY_INS_LOAN' | 'AUTO_PRINCIPLE_REPAYMENT_INS_LOAN' | 'AUTO_INTEREST_REPAYMENT_INS_LOAN' | 'TRANSFER_IN_INS_LOAN' | 'TRANSFER_OUT_INS_LOAN' | 'SPOT_REPAYMENT_SELL' | 'SPOT_REPAYMENT_BUY' | 'TOKENS_SUBSCRIPTION' | 'TOKENS_REDEMPTION' | 'AUTO_DEDUCTION' | 'FLEXIBLE_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REDEMPTION' | 'FIXED_STAKING_SUBSCRIPTION' | 'FLEXIBLE_STAKING_REFUND' | 'FIXED_STAKING_REFUND' | 'PREMARKET_TRANSFER_OUT' | 'PREMARKET_DELIVERY_SELL_NEW_COIN' | 'PREMARKET_DELIVERY_BUY_NEW_COIN' | 'PREMARKET_DELIVERY_PLEDGE_PAY_SELLER' | 'PREMARKET_DELIVERY_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_BACK' | 'PREMARKET_ROLLBACK_PLEDGE_PENALTY_TO_BUYER' | 'CUSTODY_NETWORK_FEE' | 'CUSTODY_SETTLE_FEE' | 'CUSTODY_LOCK' | 'CUSTODY_UNLOCK' | 'CUSTODY_UNLOCK_REFUND' | 'LOANS_BORROW_FUNDS' | 'LOANS_PLEDGE_ASSET' | 'BONUS_TRANSFER_IN' | 'BONUS_TRANSFER_OUT' | 'PEF_TRANSFER_IN' | 'PEF_TRANSFER_OUT' | 'PEF_PROFIT_SHARE' | 'ONCHAINEARN_SUBSCRIPTION' | 'ONCHAINEARN_REDEMPTION' | 'ONCHAINEARN_REFUND' | 'STRUCTURE_PRODUCT_SUBSCRIPTION' | 'STRUCTURE_PRODUCT_REFUND' | 'CLASSIC_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_SUBSCRIPTION' | 'PREMIMUM_WEALTH_MANAGEMENT_REFUND' | 'LIQUIDITY_MINING_SUBSCRIPTION' | 'LIQUIDITY_MINING_REFUND' | 'PWM_SUBSCRIPTION' | 'PWM_REFUND' | 'DEFI_INVESTMENT_SUBSCRIPTION' | 'DEFI_INVESTMENT_REFUND' | 'DEFI_INVESTMENT_REDEMPTION' | 'INSTITUTION_LOAN_IN' | 'INSTITUTION_PAYBACK_PRINCIPAL_OUT' | 'INSTITUTION_PAYBACK_INTEREST_OUT' | 'INSTITUTION_EXCHANGE_SELL' | 'INSTITUTION_EXCHANGE_BUY' | 'INSTITUTION_LIQ_PRINCIPAL_OUT' | 'INSTITUTION_LIQ_INTEREST_OUT' | 'INSTITUTION_LOAN_TRANSFER_IN' | 'INSTITUTION_LOAN_TRANSFER_OUT' | 'INSTITUTION_LOAN_WITHOUT_WITHDRAW' | 'INSTITUTION_LOAN_RESERVE_IN' | 'INSTITUTION_LOAN_RESERVE_OUT' | 'PLATFORM_TOKEN_MNT_LIQRECALLEDMMNT' | 'PLATFORM_TOKEN_MNT_LIQRETURNEDMNT';
|
|
104
115
|
export type PermissionTypeV5 = 'ContractTrade' | 'Spot' | 'Wallet' | 'Options' | 'Derivatives' | 'Exchange' | 'NFT';
|
|
105
116
|
/**
|
|
@@ -136,6 +147,14 @@ export interface PermissionsV5 {
|
|
|
136
147
|
Exchange?: string[];
|
|
137
148
|
/** @deprecated , always returns []*/
|
|
138
149
|
NFT?: string[];
|
|
150
|
+
Earn?: string[];
|
|
151
|
+
Affiliate?: string[];
|
|
152
|
+
FiatP2P?: string[];
|
|
153
|
+
/** Bybit Pay (FaitPayOrder) */
|
|
154
|
+
FiatBitPay?: string[];
|
|
155
|
+
FiatConvertBroker?: string[];
|
|
156
|
+
BitCard?: string[];
|
|
157
|
+
ByXPost?: string[];
|
|
139
158
|
}
|
|
140
159
|
export interface CategoryCursorListV5<T extends unknown[], TCategory extends CategoryV5 = CategoryV5> {
|
|
141
160
|
category: TCategory;
|
|
@@ -199,6 +199,8 @@ export interface WSPositionV5 {
|
|
|
199
199
|
leverageSysUpdatedTime: string;
|
|
200
200
|
createdTime: string;
|
|
201
201
|
updatedTime: string;
|
|
202
|
+
/** Position open timestamp (ms). Default `0` when not set. */
|
|
203
|
+
openTime: number;
|
|
202
204
|
seq: number;
|
|
203
205
|
}
|
|
204
206
|
export type WSPositionEventV5 = WSPrivateTopicEventV5<'position', WSPositionV5[]>;
|
|
@@ -6,7 +6,7 @@ type KeyType = 'HMAC' | 'RSASSA-PKCS1-v1_5';
|
|
|
6
6
|
* RSA keys contain "-----BEGIN PRIVATE KEY-----" or "-----BEGIN RSA PRIVATE KEY-----"
|
|
7
7
|
* HMAC keys are plain strings
|
|
8
8
|
*/
|
|
9
|
-
export declare function getSignKeyType(secret
|
|
9
|
+
export declare function getSignKeyType(secret?: string): KeyType;
|
|
10
10
|
/**
|
|
11
11
|
* Similar to node crypto's `createHash()` function
|
|
12
12
|
*/
|
package/lib/util/webCryptoAPI.js
CHANGED
|
@@ -30,7 +30,7 @@ function bufferToB64(buffer) {
|
|
|
30
30
|
* HMAC keys are plain strings
|
|
31
31
|
*/
|
|
32
32
|
function getSignKeyType(secret) {
|
|
33
|
-
if (secret.includes('PRIVATE KEY')) {
|
|
33
|
+
if (secret === null || secret === void 0 ? void 0 : secret.includes('PRIVATE KEY')) {
|
|
34
34
|
return 'RSASSA-PKCS1-v1_5';
|
|
35
35
|
}
|
|
36
36
|
return 'HMAC';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webCryptoAPI.js","sourceRoot":"","sources":["../../src/util/webCryptoAPI.ts"],"names":[],"mappings":";;;;;;;;;;;AAsBA,wCAKC;AAiDD,kCAyBC;AAOD,kCAsCC;AAUD,wCA2C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AAC,IAAI,CAChD,EAAE,IAAI,EAAE,WAAW,EAAE,EACrB,GAAG,EACH,SAAS,CACV,CAAC;QAEF,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;qBACtC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;qBACjD,IAAI,CAAC,EAAE,CAAC,CAAC;YACd,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,IAAA,uBAAU,EACd,YAAY,EACZ,2BAA2B,YAAY,GAAG,CAC3C,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CAAA;AAED,SAAgB,0BAA0B;IACxC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb;;;;;;CAML,CACI,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-util.js","sourceRoot":"","sources":["../../../src/util/websockets/websocket-util.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"websocket-util.js","sourceRoot":"","sources":["../../../src/util/websockets/websocket-util.ts"],"names":[],"mappings":";;;AA6LA,4CAEC;AAED,4CAyCC;AAED,4BAkDC;AAED,sEAgBC;AAcD,0CAgBC;AAMD,oEAKC;AAOD,gEAoBC;AASD,8CAgCC;AAlZD,8CAA2C;AAE9B,QAAA,UAAU,GAAG;IACxB,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAA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