-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
v5_enum.go
344 lines (286 loc) · 9.54 KB
/
v5_enum.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
package bybit
// MarginMode :
type MarginMode string
const (
// MarginModeRegular :
MarginModeRegular = MarginMode("REGULAR_MARGIN")
// MarginModePortfolio :
MarginModePortfolio = MarginMode("PORTFOLIO_MARGIN")
)
// CategoryV5 :
type CategoryV5 string
const (
// CategoryV5Spot :
CategoryV5Spot = CategoryV5("spot")
// CategoryV5Linear :
CategoryV5Linear = CategoryV5("linear")
// CategoryV5Inverse :
CategoryV5Inverse = CategoryV5("inverse")
// CategoryV5Option :
CategoryV5Option = CategoryV5("option")
)
// SymbolV5 :
type SymbolV5 string
// SymbolV5 :
const (
// USDT Perpetual:
SymbolV5BTCUSDT = SymbolV5("BTCUSDT")
SymbolV5ETHUSDT = SymbolV5("ETHUSDT")
// USDC Perpetual
SymbolV5BTCPERP = SymbolV5("BTCPERP")
SymbolV5ETHPERP = SymbolV5("ETHPERP")
// Inverse Perpetual
SymbolV5BTCUSD = SymbolV5("BTCUSD")
SymbolV5ETHUSD = SymbolV5("ETHUSD")
// Inverse Futures
SymbolV5BTCUSDH23 = SymbolV5("BTCUSDH23")
SymbolV5BTCUSDM23 = SymbolV5("BTCUSDM23")
SymbolV5BTCUSDU23 = SymbolV5("BTCUSDU23")
SymbolV5BTCUSDZ23 = SymbolV5("BTCUSDZ23")
// Spot
SymbolV5ETHUSDC = SymbolV5("ETHUSDC")
)
// TriggerDirection :
type TriggerDirection int
const (
// TriggerDirectionRise : triggered when market price rises
TriggerDirectionRise = TriggerDirection(1)
// TriggerDirectionFall : triggered when market price falls
TriggerDirectionFall = TriggerDirection(2)
)
// IsLeverage : Valid for spot only
type IsLeverage int
const (
// IsLeverageFalse : false then spot trading
IsLeverageFalse = IsLeverage(0)
// IsLeverageTrue : true then margin trading
IsLeverageTrue = IsLeverage(1)
)
// OrderFilter : Valid for spot only
type OrderFilter string
const (
// OrderFilterOrder :
OrderFilterOrder = OrderFilter("Order")
// OrderFilterStopOrder :
OrderFilterStopOrder = OrderFilter("StopOrder")
// OrderFilterTpSlOrder :
OrderFilterTpSlOrder = OrderFilter("tpslOrder")
)
// TriggerBy :
type TriggerBy string
const (
// TriggerByLastPrice :
TriggerByLastPrice = TriggerBy("LastPrice")
// TriggerByIndexPrice :
TriggerByIndexPrice = TriggerBy("IndexPrice")
// TriggerByMarkPrice :
TriggerByMarkPrice = TriggerBy("MarkPrice")
)
// PositionIdx :
type PositionIdx int
// PositionIdx :
const (
PositionIdxOneWay = PositionIdx(0)
PositionIdxHedgeBuy = PositionIdx(1)
PositionIdxHedgeSell = PositionIdx(2)
)
// ContractType :
type ContractType string
// ContractType :
const (
ContractTypeInversePerpetual = ContractType("InversePerpetual")
ContractTypeLinearPerpetual = ContractType("LinearPerpetual")
ContractTypeInverseFutures = ContractType("InverseFutures")
)
// InstrumentStatus :
type InstrumentStatus string
// InstrumentStatus :
const (
// linear & inverse:
InstrumentStatusPending = InstrumentStatus("Pending")
InstrumentStatusTrading = InstrumentStatus("Trading")
InstrumentStatusSettling = InstrumentStatus("Settling")
InstrumentStatusClosed = InstrumentStatus("Closed")
// option
InstrumentStatusWaitingOnline = InstrumentStatus("WAITING_ONLINE")
InstrumentStatusOnline = InstrumentStatus("ONLINE")
InstrumentStatusDelivering = InstrumentStatus("DELIVERING")
InstrumentStatusOffline = InstrumentStatus("OFFLINE")
// spot
InstrumentStatusAvailable = InstrumentStatus("1")
)
// OptionsType :
type OptionsType string
// OptionsType :
const (
OptionsTypeCall = OptionsType("Call")
OptionsTypePut = OptionsType("Put")
)
// Innovation :
type Innovation string
// Innovation :
const (
InnovationFalse = Innovation("0")
InnovationTrue = Innovation("1")
)
// PositionMode :
type PositionMode int
const (
// PositionModeMergedSingle :
PositionModeMergedSingle = PositionMode(0)
// PositionModeBothSides :
PositionModeBothSides = PositionMode(3)
)
// PositionMarginMode :
type PositionMarginMode int
const (
// PositionMarginCross :
PositionMarginCross = PositionMarginMode(0)
// PositionMarginIsolated :
PositionMarginIsolated = PositionMarginMode(1)
)
// ExecTypeV5 :
type ExecTypeV5 string
const (
// ExecTypeV5Trade :
ExecTypeV5Trade = ExecTypeV5("Trade")
// ExecTypeV5AdlTrade : Auto-Deleveraging
// https://www.bybit.com/en/help-center/article/Auto-Deleveraging-ADL
ExecTypeV5AdlTrade = ExecTypeV5("AdlTrade")
// ExecTypeV5Funding : Funding Fee
// https://www.bybit.com/en/help-center/article/Introduction-to-Funding-Rate
ExecTypeV5Funding = ExecTypeV5("Funding")
// ExecTypeV5BustTrade : Takeover liquidation
ExecTypeV5BustTrade = ExecTypeV5("BustTrade")
// ExecTypeV5Delivery : USDC futures delivery; Position closed by contract delisted
ExecTypeV5Delivery = ExecTypeV5("Delivery")
// ExecTypeV5SessionSettlePnL :
ExecTypeV5SessionSettlePnL = ExecTypeV5("SessionSettlePnL")
// ExecTypeV5Settle :
ExecTypeV5Settle = ExecTypeV5("Settle")
// ExecTypeV5BlockTrade :
ExecTypeV5BlockTrade = ExecTypeV5("BlockTrade")
// ExecTypeV5MovePosition :
ExecTypeV5MovePosition = ExecTypeV5("MovePosition")
// ExecTypeV5UNKNOWN : May be returned by a classic account. Cannot query by this type
ExecTypeV5UNKNOWN = ExecTypeV5("UNKNOWN")
)
// TransferStatusV5 :
type TransferStatusV5 string
const (
// TransferStatusV5SUCCESS :
TransferStatusV5SUCCESS = TransferStatusV5("SUCCESS")
// TransferStatusV5PENDING :
TransferStatusV5PENDING = TransferStatusV5("PENDING")
// TransferStatusV5FAILED :
TransferStatusV5FAILED = TransferStatusV5("FAILED")
)
// AccountTypeV5 :
type AccountTypeV5 string
const (
// AccountTypeV5CONTRACT
// Classic: Derivatives Account
// UTA: Inverse Derivatives Account
AccountTypeV5CONTRACT = AccountTypeV5("CONTRACT")
// AccountTypeV5SPOT
// Classic: Spot Account
AccountTypeV5SPOT = AccountTypeV5("SPOT")
// AccountTypeV5INVESTMENT
// Classic: ByFi Account
// Deprecated: this service is now offline
AccountTypeV5INVESTMENT = AccountTypeV5("INVESTMENT")
// AccountTypeV5OPTION
// Classic: USDC Derivatives
AccountTypeV5OPTION = AccountTypeV5("OPTION")
// AccountTypeV5UNIFIED
// UTA: Unified Trading Account
AccountTypeV5UNIFIED = AccountTypeV5("UNIFIED")
// AccountTypeV5FUND
// Classic: Funding Account
// UTA: Funding Account
AccountTypeV5FUND = AccountTypeV5("FUND")
)
// UnifiedMarginStatus :
type UnifiedMarginStatus int
const (
// UnifiedMarginStatusRegular : Regular account
UnifiedMarginStatusRegular = UnifiedMarginStatus(1)
// UnifiedMarginStatusUnifiedMargin : Unified margin account, it only trades linear perpetual and options.
// Deprecated: Is not used anymore - Please ignore
UnifiedMarginStatusUnifiedMargin = UnifiedMarginStatus(2)
// UnifiedMarginStatusUnifiedTrade : Unified trading account 1.0
UnifiedMarginStatusUnifiedTrade = UnifiedMarginStatus(3)
// UnifiedMarginStatusUTAPro : Unified trading account 1.0 (pro version)
UnifiedMarginStatusUTAPro = UnifiedMarginStatus(4)
// UnifiedMarginStatusUTAv2 : Unified trading account 2.0
UnifiedMarginStatusUTAv2 = UnifiedMarginStatus(5)
// UnifiedMarginStatusUTAv2Pro : Unified trading account 2.0 (pro version)
UnifiedMarginStatusUTAv2Pro = UnifiedMarginStatus(6)
)
// TransactionLogTypeV5 :
type TransactionLogTypeV5 string
const (
TransactionLogTypeV5TRANSFERIN = TransactionLogTypeV5("TRANSFER_IN")
TransactionLogTypeV5TRANSFEROUT = TransactionLogTypeV5("TRANSFER_OUT")
TransactionLogTypeV5TRADE = TransactionLogTypeV5("TRADE")
TransactionLogTypeV5SETTLEMENT = TransactionLogTypeV5("SETTLEMENT")
TransactionLogTypeV5DELIVERY = TransactionLogTypeV5("DELIVERY")
TransactionLogTypeV5LIQUIDATION = TransactionLogTypeV5("LIQUIDATION")
TransactionLogTypeV5BONUS = TransactionLogTypeV5("BONUS")
TransactionLogTypeV5FEEREFUND = TransactionLogTypeV5("FEE_REFUND")
TransactionLogTypeV5INTEREST = TransactionLogTypeV5("INTEREST")
TransactionLogTypeV5CURRENCYBUY = TransactionLogTypeV5("CURRENCY_BUY")
TransactionLogTypeV5CURRENCYSELL = TransactionLogTypeV5("CURRENCY_SELL")
)
// InternalDepositStatusV5 :
type InternalDepositStatusV5 int
const (
InternalDepositStatusV5Processing = InternalDepositStatusV5(1)
InternalDepositStatusV5Success = InternalDepositStatusV5(2)
InternalDepositStatusV5Failed = InternalDepositStatusV5(3)
)
// DepositStatusV5 :
type DepositStatusV5 int
const (
DepositStatusV5Unknown = DepositStatusV5(0)
DepositStatusV5ToBeConfirmed = DepositStatusV5(1)
DepositStatusV5Processing = DepositStatusV5(2)
DepositStatusV5Success = DepositStatusV5(3)
DepositStatusV5Failed = DepositStatusV5(4)
)
type WithdrawTypeV5 int
const (
WithdrawTypeOnChain = WithdrawTypeV5(0)
WithdrawTypeOffChain = WithdrawTypeV5(1)
WithdrawTypeAll = WithdrawTypeV5(2)
)
type WithdrawStatusV5 string
const (
WithdrawStatusV5SecurityCheck = WithdrawStatusV5("SecurityCheck")
WithdrawStatusV5Pending = WithdrawStatusV5("Pending")
WithdrawStatusV5Success = WithdrawStatusV5("success")
WithdrawStatusV5CancelByUser = WithdrawStatusV5("CancelByUser")
WithdrawStatusV5Reject = WithdrawStatusV5("Reject")
WithdrawStatusV5Fail = WithdrawStatusV5("Fail")
WithdrawStatusV5BlockchainConfirmed = WithdrawStatusV5("BlockchainConfirmed")
)
type IsLowestRisk int
const (
IsLowestRiskFalse = IsLowestRisk(0)
IsLowestRiskTrue = IsLowestRisk(1)
)
type CollateralSwitchV5 string
const (
CollateralSwitchV5On = CollateralSwitchV5("ON")
CollateralSwitchV5Off = CollateralSwitchV5("OFF")
)
// AdlRankIndicator : Auto-deleverage rank indicator
type AdlRankIndicator int
const (
AdlRankIndicator0 = AdlRankIndicator(0) // default value of empty position
AdlRankIndicator1 = AdlRankIndicator(1)
AdlRankIndicator2 = AdlRankIndicator(2)
AdlRankIndicator3 = AdlRankIndicator(3)
AdlRankIndicator4 = AdlRankIndicator(4)
AdlRankIndicator5 = AdlRankIndicator(5)
)