ccxt 4.1.44 → 4.1.46
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 +3 -3
- package/dist/ccxt.browser.js +2132 -768
- package/dist/ccxt.browser.min.js +9 -9
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +1 -3
- package/dist/cjs/src/ascendex.js +1 -3
- package/dist/cjs/src/base/Exchange.js +11 -3
- package/dist/cjs/src/base/ws/Cache.js +50 -0
- package/dist/cjs/src/bigone.js +2 -6
- package/dist/cjs/src/binance.js +16 -12
- package/dist/cjs/src/bit2c.js +2 -4
- package/dist/cjs/src/bitbns.js +5 -15
- package/dist/cjs/src/bitfinex.js +1 -3
- package/dist/cjs/src/bitfinex2.js +1 -3
- package/dist/cjs/src/bitflyer.js +4 -12
- package/dist/cjs/src/bitforex.js +4 -8
- package/dist/cjs/src/bithumb.js +4 -10
- package/dist/cjs/src/bitmart.js +64 -59
- package/dist/cjs/src/bitmex.js +2 -6
- package/dist/cjs/src/bitopro.js +6 -16
- package/dist/cjs/src/bitrue.js +6 -14
- package/dist/cjs/src/bitvavo.js +9 -14
- package/dist/cjs/src/btctradeua.js +2 -4
- package/dist/cjs/src/bybit.js +88 -132
- package/dist/cjs/src/cex.js +2 -4
- package/dist/cjs/src/coinbasepro.js +2 -2
- package/dist/cjs/src/coinex.js +7 -24
- package/dist/cjs/src/coinfalcon.js +1 -3
- package/dist/cjs/src/coinmate.js +2 -4
- package/dist/cjs/src/coinone.js +2 -6
- package/dist/cjs/src/coinsph.js +5 -13
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/currencycom.js +2 -6
- package/dist/cjs/src/gate.js +5 -7
- package/dist/cjs/src/gemini.js +1 -3
- package/dist/cjs/src/hitbtc.js +290 -100
- package/dist/cjs/src/hollaex.js +1 -3
- package/dist/cjs/src/huobi.js +4 -14
- package/dist/cjs/src/huobijp.js +1 -3
- package/dist/cjs/src/indodax.js +4 -10
- package/dist/cjs/src/kucoinfutures.js +2 -7
- package/dist/cjs/src/kuna.js +1 -0
- package/dist/cjs/src/luno.js +1 -3
- package/dist/cjs/src/mercado.js +7 -17
- package/dist/cjs/src/mexc.js +5 -15
- package/dist/cjs/src/oceanex.js +2 -4
- package/dist/cjs/src/okx.js +33 -21
- package/dist/cjs/src/phemex.js +12 -33
- package/dist/cjs/src/poloniexfutures.js +2 -6
- package/dist/cjs/src/pro/binance.js +203 -1
- package/dist/cjs/src/pro/bitget.js +181 -0
- package/dist/cjs/src/pro/bitmart.js +2 -4
- package/dist/cjs/src/pro/bitrue.js +0 -4
- package/dist/cjs/src/pro/bitstamp.js +2 -4
- package/dist/cjs/src/pro/bitvavo.js +3 -7
- package/dist/cjs/src/pro/bybit.js +154 -10
- package/dist/cjs/src/pro/cex.js +2 -6
- package/dist/cjs/src/pro/cryptocom.js +131 -1
- package/dist/cjs/src/pro/gate.js +161 -0
- package/dist/cjs/src/pro/huobi.js +128 -4
- package/dist/cjs/src/pro/krakenfutures.js +129 -0
- package/dist/cjs/src/pro/kucoinfutures.js +182 -0
- package/dist/cjs/src/pro/okx.js +121 -0
- package/dist/cjs/src/pro/whitebit.js +3 -7
- package/dist/cjs/src/probit.js +2 -6
- package/dist/cjs/src/tokocrypto.js +3 -7
- package/dist/cjs/src/wavesexchange.js +2 -4
- package/dist/cjs/src/wazirx.js +4 -10
- package/dist/cjs/src/whitebit.js +3 -7
- package/dist/cjs/src/woo.js +0 -3
- package/dist/cjs/src/yobit.js +3 -7
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bequant.d.ts +37 -7
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bitcoincom.d.ts +37 -7
- package/js/src/abstract/bybit.d.ts +3 -0
- package/js/src/abstract/fmfwio.d.ts +37 -7
- package/js/src/abstract/hitbtc.d.ts +37 -7
- package/js/src/abstract/hitbtc3.d.ts +37 -7
- package/js/src/abstract/okex.d.ts +6 -1
- package/js/src/abstract/okex5.d.ts +6 -1
- package/js/src/abstract/okx.d.ts +6 -1
- package/js/src/ace.d.ts +2 -2
- package/js/src/ace.js +2 -4
- package/js/src/alpaca.d.ts +2 -2
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +1 -3
- package/js/src/base/Exchange.d.ts +4 -1
- package/js/src/base/Exchange.js +11 -3
- package/js/src/base/ws/Cache.d.ts +5 -1
- package/js/src/base/ws/Cache.js +50 -1
- package/js/src/bigone.d.ts +2 -2
- package/js/src/bigone.js +3 -7
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +16 -12
- package/js/src/bingx.d.ts +2 -2
- package/js/src/bit2c.d.ts +2 -2
- package/js/src/bit2c.js +3 -5
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitbns.d.ts +2 -2
- package/js/src/bitbns.js +5 -15
- package/js/src/bitfinex.d.ts +2 -2
- package/js/src/bitfinex.js +1 -3
- package/js/src/bitfinex2.js +1 -3
- package/js/src/bitflyer.d.ts +2 -2
- package/js/src/bitflyer.js +4 -12
- package/js/src/bitforex.d.ts +2 -2
- package/js/src/bitforex.js +5 -9
- package/js/src/bitget.d.ts +2 -2
- package/js/src/bithumb.d.ts +2 -2
- package/js/src/bithumb.js +4 -10
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitmart.js +64 -59
- package/js/src/bitmex.js +2 -6
- package/js/src/bitopro.d.ts +2 -2
- package/js/src/bitopro.js +6 -16
- package/js/src/bitpanda.d.ts +2 -2
- package/js/src/bitrue.d.ts +2 -2
- package/js/src/bitrue.js +6 -14
- package/js/src/bitso.d.ts +2 -2
- package/js/src/bitstamp.d.ts +2 -2
- package/js/src/bitstamp1.d.ts +2 -2
- package/js/src/bittrex.d.ts +2 -2
- package/js/src/bitvavo.d.ts +2 -2
- package/js/src/bitvavo.js +9 -14
- package/js/src/bl3p.d.ts +2 -2
- package/js/src/blockchaincom.d.ts +4 -4
- package/js/src/btcalpha.d.ts +2 -2
- package/js/src/btcbox.d.ts +2 -2
- package/js/src/btcmarkets.d.ts +2 -2
- package/js/src/btctradeua.d.ts +2 -2
- package/js/src/btctradeua.js +3 -5
- package/js/src/btcturk.d.ts +2 -2
- package/js/src/bybit.d.ts +2 -4
- package/js/src/bybit.js +88 -132
- package/js/src/cex.d.ts +2 -2
- package/js/src/cex.js +2 -4
- package/js/src/coinbase.d.ts +2 -2
- package/js/src/coinbasepro.d.ts +2 -2
- package/js/src/coinbasepro.js +2 -2
- package/js/src/coincheck.d.ts +2 -2
- package/js/src/coinex.js +7 -24
- package/js/src/coinfalcon.d.ts +2 -2
- package/js/src/coinfalcon.js +2 -4
- package/js/src/coinlist.d.ts +12 -12
- package/js/src/coinmate.d.ts +3 -3
- package/js/src/coinmate.js +3 -5
- package/js/src/coinone.d.ts +2 -2
- package/js/src/coinone.js +2 -6
- package/js/src/coinsph.d.ts +2 -2
- package/js/src/coinsph.js +5 -13
- package/js/src/coinspot.d.ts +2 -2
- package/js/src/cryptocom.d.ts +2 -2
- package/js/src/cryptocom.js +1 -1
- package/js/src/currencycom.d.ts +2 -2
- package/js/src/currencycom.js +2 -6
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +3 -3
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/gate.d.ts +2 -2
- package/js/src/gate.js +5 -7
- package/js/src/gemini.d.ts +3 -3
- package/js/src/gemini.js +1 -3
- package/js/src/hitbtc.d.ts +3 -0
- package/js/src/hitbtc.js +291 -101
- package/js/src/hollaex.js +1 -3
- package/js/src/huobi.d.ts +2 -2
- package/js/src/huobi.js +4 -14
- package/js/src/huobijp.d.ts +2 -2
- package/js/src/huobijp.js +2 -4
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/indodax.d.ts +2 -2
- package/js/src/indodax.js +4 -10
- package/js/src/kraken.d.ts +2 -2
- package/js/src/krakenfutures.d.ts +2 -2
- package/js/src/kucoin.d.ts +2 -2
- package/js/src/kucoinfutures.d.ts +2 -2
- package/js/src/kucoinfutures.js +2 -7
- package/js/src/kuna.d.ts +3 -3
- package/js/src/kuna.js +1 -0
- package/js/src/latoken.d.ts +2 -2
- package/js/src/lbank2.d.ts +2 -2
- package/js/src/luno.d.ts +2 -2
- package/js/src/luno.js +1 -3
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mercado.d.ts +2 -2
- package/js/src/mercado.js +7 -17
- package/js/src/mexc.js +5 -15
- package/js/src/novadax.d.ts +2 -2
- package/js/src/oceanex.d.ts +4 -4
- package/js/src/oceanex.js +2 -4
- package/js/src/okcoin.d.ts +2 -2
- package/js/src/okx.d.ts +2 -2
- package/js/src/okx.js +33 -21
- package/js/src/paymium.d.ts +2 -2
- package/js/src/phemex.js +12 -33
- package/js/src/poloniexfutures.d.ts +2 -2
- package/js/src/poloniexfutures.js +2 -6
- package/js/src/pro/binance.d.ts +6 -0
- package/js/src/pro/binance.js +204 -2
- package/js/src/pro/bitget.d.ts +3 -0
- package/js/src/pro/bitget.js +182 -1
- package/js/src/pro/bitmart.js +2 -4
- package/js/src/pro/bitrue.js +0 -4
- package/js/src/pro/bitstamp.js +3 -5
- package/js/src/pro/bitvavo.js +4 -8
- package/js/src/pro/bybit.d.ts +5 -1
- package/js/src/pro/bybit.js +156 -12
- package/js/src/pro/cex.js +3 -7
- package/js/src/pro/cryptocom.d.ts +4 -0
- package/js/src/pro/cryptocom.js +132 -2
- package/js/src/pro/gate.d.ts +5 -0
- package/js/src/pro/gate.js +162 -1
- package/js/src/pro/huobi.d.ts +2 -0
- package/js/src/pro/huobi.js +129 -5
- package/js/src/pro/krakenfutures.d.ts +3 -0
- package/js/src/pro/krakenfutures.js +129 -0
- package/js/src/pro/kucoinfutures.d.ts +5 -0
- package/js/src/pro/kucoinfutures.js +182 -0
- package/js/src/pro/okx.d.ts +2 -0
- package/js/src/pro/okx.js +123 -2
- package/js/src/pro/whitebit.js +4 -8
- package/js/src/probit.d.ts +2 -2
- package/js/src/probit.js +3 -7
- package/js/src/timex.d.ts +2 -2
- package/js/src/tokocrypto.d.ts +2 -2
- package/js/src/tokocrypto.js +4 -8
- package/js/src/wavesexchange.js +3 -5
- package/js/src/wazirx.d.ts +2 -2
- package/js/src/wazirx.js +5 -11
- package/js/src/whitebit.d.ts +2 -2
- package/js/src/whitebit.js +3 -7
- package/js/src/woo.d.ts +2 -2
- package/js/src/woo.js +1 -4
- package/js/src/yobit.js +3 -7
- package/js/src/zaif.d.ts +2 -2
- package/package.json +1 -1
- package/skip-tests.json +3 -1
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -39,6 +39,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
39
39
|
'createStopMarketOrder': true,
|
|
40
40
|
'createStopOrder': true,
|
|
41
41
|
'editOrder': true,
|
|
42
|
+
'fetchAccounts': false,
|
|
42
43
|
'fetchBalance': true,
|
|
43
44
|
'fetchBorrowRate': undefined,
|
|
44
45
|
'fetchBorrowRateHistories': undefined,
|
|
@@ -54,15 +55,20 @@ class hitbtc extends hitbtc$1 {
|
|
|
54
55
|
'fetchFundingHistory': undefined,
|
|
55
56
|
'fetchFundingRate': true,
|
|
56
57
|
'fetchFundingRateHistory': true,
|
|
57
|
-
'fetchFundingRates':
|
|
58
|
+
'fetchFundingRates': true,
|
|
58
59
|
'fetchIndexOHLCV': true,
|
|
59
60
|
'fetchLeverage': true,
|
|
60
61
|
'fetchLeverageTiers': undefined,
|
|
61
|
-
'
|
|
62
|
+
'fetchLiquidations': false,
|
|
63
|
+
'fetchMarginMode': false,
|
|
64
|
+
'fetchMarketLeverageTiers': false,
|
|
62
65
|
'fetchMarkets': true,
|
|
63
66
|
'fetchMarkOHLCV': true,
|
|
67
|
+
'fetchMyLiquidations': false,
|
|
64
68
|
'fetchMyTrades': true,
|
|
65
69
|
'fetchOHLCV': true,
|
|
70
|
+
'fetchOpenInterest': true,
|
|
71
|
+
'fetchOpenInterestHistory': false,
|
|
66
72
|
'fetchOpenOrder': true,
|
|
67
73
|
'fetchOpenOrders': true,
|
|
68
74
|
'fetchOrder': true,
|
|
@@ -82,6 +88,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
82
88
|
'fetchWithdrawals': true,
|
|
83
89
|
'reduceMargin': true,
|
|
84
90
|
'setLeverage': true,
|
|
91
|
+
'setMargin': false,
|
|
85
92
|
'setMarginMode': false,
|
|
86
93
|
'setPositionMode': false,
|
|
87
94
|
'transfer': true,
|
|
@@ -113,56 +120,79 @@ class hitbtc extends hitbtc$1 {
|
|
|
113
120
|
'public': {
|
|
114
121
|
'get': {
|
|
115
122
|
'public/currency': 10,
|
|
123
|
+
'public/currency/{currency}': 10,
|
|
116
124
|
'public/symbol': 10,
|
|
125
|
+
'public/symbol/{symbol}': 10,
|
|
117
126
|
'public/ticker': 10,
|
|
127
|
+
'public/ticker/{symbol}': 10,
|
|
118
128
|
'public/price/rate': 10,
|
|
129
|
+
'public/price/history': 10,
|
|
130
|
+
'public/price/ticker': 10,
|
|
131
|
+
'public/price/ticker/{symbol}': 10,
|
|
119
132
|
'public/trades': 10,
|
|
133
|
+
'public/trades/{symbol}': 10,
|
|
120
134
|
'public/orderbook': 10,
|
|
135
|
+
'public/orderbook/{symbol}': 10,
|
|
121
136
|
'public/candles': 10,
|
|
137
|
+
'public/candles/{symbol}': 10,
|
|
122
138
|
'public/futures/info': 10,
|
|
139
|
+
'public/futures/info/{symbol}': 10,
|
|
123
140
|
'public/futures/history/funding': 10,
|
|
141
|
+
'public/futures/history/funding/{symbol}': 10,
|
|
124
142
|
'public/futures/candles/index_price': 10,
|
|
143
|
+
'public/futures/candles/index_price/{symbol}': 10,
|
|
125
144
|
'public/futures/candles/mark_price': 10,
|
|
145
|
+
'public/futures/candles/mark_price/{symbol}': 10,
|
|
126
146
|
'public/futures/candles/premium_index': 10,
|
|
147
|
+
'public/futures/candles/premium_index/{symbol}': 10,
|
|
127
148
|
'public/futures/candles/open_interest': 10,
|
|
149
|
+
'public/futures/candles/open_interest/{symbol}': 10,
|
|
128
150
|
},
|
|
129
151
|
},
|
|
130
152
|
'private': {
|
|
131
153
|
'get': {
|
|
132
154
|
'spot/balance': 15,
|
|
133
|
-
'spot/
|
|
134
|
-
'spot/order
|
|
155
|
+
'spot/balance/{currency}': 15,
|
|
156
|
+
'spot/order': 1,
|
|
157
|
+
'spot/order/{client_order_id}': 1,
|
|
135
158
|
'spot/fee': 15,
|
|
136
159
|
'spot/fee/{symbol}': 15,
|
|
137
160
|
'spot/history/order': 15,
|
|
138
161
|
'spot/history/trade': 15,
|
|
139
|
-
'margin/account':
|
|
140
|
-
'margin/account/isolated/{symbol}':
|
|
141
|
-
'margin/
|
|
142
|
-
'margin/order
|
|
143
|
-
'margin/
|
|
162
|
+
'margin/account': 1,
|
|
163
|
+
'margin/account/isolated/{symbol}': 1,
|
|
164
|
+
'margin/account/cross/{currency}': 1,
|
|
165
|
+
'margin/order': 1,
|
|
166
|
+
'margin/order/{client_order_id}': 1,
|
|
167
|
+
'margin/config': 15,
|
|
144
168
|
'margin/history/order': 15,
|
|
145
|
-
'margin/history/positions': 15,
|
|
146
169
|
'margin/history/trade': 15,
|
|
170
|
+
'margin/history/positions': 15,
|
|
171
|
+
'margin/history/clearing': 15,
|
|
147
172
|
'futures/balance': 15,
|
|
148
|
-
'futures/
|
|
149
|
-
'futures/account
|
|
150
|
-
'futures/
|
|
151
|
-
'futures/order
|
|
173
|
+
'futures/balance/{currency}': 15,
|
|
174
|
+
'futures/account': 1,
|
|
175
|
+
'futures/account/isolated/{symbol}': 1,
|
|
176
|
+
'futures/order': 1,
|
|
177
|
+
'futures/order/{client_order_id}': 1,
|
|
178
|
+
'futures/config': 15,
|
|
152
179
|
'futures/fee': 15,
|
|
153
180
|
'futures/fee/{symbol}': 15,
|
|
154
|
-
'futures/history/clearing': 15,
|
|
155
181
|
'futures/history/order': 15,
|
|
156
|
-
'futures/history/positions': 15,
|
|
157
182
|
'futures/history/trade': 15,
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'wallet/
|
|
161
|
-
'wallet/
|
|
162
|
-
'wallet/crypto/address
|
|
163
|
-
'wallet/
|
|
164
|
-
'wallet/crypto/
|
|
165
|
-
'wallet/crypto/
|
|
183
|
+
'futures/history/positions': 15,
|
|
184
|
+
'futures/history/clearing': 15,
|
|
185
|
+
'wallet/balance': 30,
|
|
186
|
+
'wallet/balance/{currency}': 30,
|
|
187
|
+
'wallet/crypto/address': 30,
|
|
188
|
+
'wallet/crypto/address/recent-deposit': 30,
|
|
189
|
+
'wallet/crypto/address/recent-withdraw': 30,
|
|
190
|
+
'wallet/crypto/address/check-mine': 30,
|
|
191
|
+
'wallet/transactions': 30,
|
|
192
|
+
'wallet/transactions/{tx_id}': 30,
|
|
193
|
+
'wallet/crypto/fee/estimate': 30,
|
|
194
|
+
'wallet/airdrops': 30,
|
|
195
|
+
'wallet/amount-locks': 30,
|
|
166
196
|
'sub-account': 15,
|
|
167
197
|
'sub-account/acl': 15,
|
|
168
198
|
'sub-account/balance/{subAccID}': 15,
|
|
@@ -170,12 +200,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
170
200
|
},
|
|
171
201
|
'post': {
|
|
172
202
|
'spot/order': 1,
|
|
203
|
+
'spot/order/list': 1,
|
|
173
204
|
'margin/order': 1,
|
|
205
|
+
'margin/order/list': 1,
|
|
174
206
|
'futures/order': 1,
|
|
175
|
-
'
|
|
176
|
-
'wallet/crypto/address':
|
|
177
|
-
'wallet/crypto/withdraw':
|
|
178
|
-
'wallet/
|
|
207
|
+
'futures/order/list': 1,
|
|
208
|
+
'wallet/crypto/address': 30,
|
|
209
|
+
'wallet/crypto/withdraw': 30,
|
|
210
|
+
'wallet/convert': 30,
|
|
211
|
+
'wallet/transfer': 30,
|
|
212
|
+
'wallet/internal/withdraw': 30,
|
|
213
|
+
'wallet/crypto/check-offchain-available': 30,
|
|
214
|
+
'wallet/crypto/fees/estimate': 30,
|
|
215
|
+
'wallet/airdrops/{id}/claim': 30,
|
|
179
216
|
'sub-account/freeze': 15,
|
|
180
217
|
'sub-account/activate': 15,
|
|
181
218
|
'sub-account/transfer': 15,
|
|
@@ -194,15 +231,15 @@ class hitbtc extends hitbtc$1 {
|
|
|
194
231
|
'margin/order': 1,
|
|
195
232
|
'margin/order/{client_order_id}': 1,
|
|
196
233
|
'futures/position': 1,
|
|
197
|
-
'futures/position/
|
|
234
|
+
'futures/position/{margin_mode}/{symbol}': 1,
|
|
198
235
|
'futures/order': 1,
|
|
199
236
|
'futures/order/{client_order_id}': 1,
|
|
200
|
-
'wallet/crypto/withdraw/{id}':
|
|
237
|
+
'wallet/crypto/withdraw/{id}': 30,
|
|
201
238
|
},
|
|
202
239
|
'put': {
|
|
203
240
|
'margin/account/isolated/{symbol}': 1,
|
|
204
241
|
'futures/account/isolated/{symbol}': 1,
|
|
205
|
-
'wallet/crypto/withdraw/{id}':
|
|
242
|
+
'wallet/crypto/withdraw/{id}': 30,
|
|
206
243
|
},
|
|
207
244
|
},
|
|
208
245
|
},
|
|
@@ -995,18 +1032,38 @@ class hitbtc extends hitbtc$1 {
|
|
|
995
1032
|
* @method
|
|
996
1033
|
* @name hitbtc#fetchTicker
|
|
997
1034
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1035
|
+
* @see https://api.hitbtc.com/#tickers
|
|
998
1036
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
999
1037
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
1000
1038
|
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1001
1039
|
*/
|
|
1002
|
-
|
|
1003
|
-
|
|
1040
|
+
await this.loadMarkets();
|
|
1041
|
+
const market = this.market(symbol);
|
|
1042
|
+
const request = {
|
|
1043
|
+
'symbol': market['id'],
|
|
1044
|
+
};
|
|
1045
|
+
const response = await this.publicGetPublicTickerSymbol(this.extend(request, params));
|
|
1046
|
+
//
|
|
1047
|
+
// {
|
|
1048
|
+
// "ask": "0.020572",
|
|
1049
|
+
// "bid": "0.020566",
|
|
1050
|
+
// "last": "0.020574",
|
|
1051
|
+
// "low": "0.020388",
|
|
1052
|
+
// "high": "0.021084",
|
|
1053
|
+
// "open": "0.020913",
|
|
1054
|
+
// "volume": "138444.3666",
|
|
1055
|
+
// "volume_quote": "2853.6874972480",
|
|
1056
|
+
// "timestamp": "2021-06-02T17:52:36.731Z"
|
|
1057
|
+
// }
|
|
1058
|
+
//
|
|
1059
|
+
return this.parseTicker(response, market);
|
|
1004
1060
|
}
|
|
1005
1061
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1006
1062
|
/**
|
|
1007
1063
|
* @method
|
|
1008
1064
|
* @name hitbtc#fetchTickers
|
|
1009
1065
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1066
|
+
* @see https://api.hitbtc.com/#tickers
|
|
1010
1067
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1011
1068
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
1012
1069
|
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
@@ -1094,6 +1151,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
1094
1151
|
* @method
|
|
1095
1152
|
* @name hitbtc#fetchTrades
|
|
1096
1153
|
* @description get the list of most recent trades for a particular symbol
|
|
1154
|
+
* @see https://api.hitbtc.com/#trades
|
|
1097
1155
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1098
1156
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1099
1157
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -1103,20 +1161,26 @@ class hitbtc extends hitbtc$1 {
|
|
|
1103
1161
|
await this.loadMarkets();
|
|
1104
1162
|
let market = undefined;
|
|
1105
1163
|
const request = {};
|
|
1106
|
-
if (symbol !== undefined) {
|
|
1107
|
-
market = this.market(symbol);
|
|
1108
|
-
// symbol is optional for hitbtc fetchTrades
|
|
1109
|
-
request['symbols'] = market['id'];
|
|
1110
|
-
}
|
|
1111
1164
|
if (limit !== undefined) {
|
|
1112
1165
|
request['limit'] = Math.min(limit, 1000);
|
|
1113
1166
|
}
|
|
1114
1167
|
if (since !== undefined) {
|
|
1115
1168
|
request['from'] = since;
|
|
1116
1169
|
}
|
|
1117
|
-
|
|
1118
|
-
|
|
1170
|
+
let response = undefined;
|
|
1171
|
+
if (symbol !== undefined) {
|
|
1172
|
+
market = this.market(symbol);
|
|
1173
|
+
request['symbol'] = market['id'];
|
|
1174
|
+
response = await this.publicGetPublicTradesSymbol(this.extend(request, params));
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
response = await this.publicGetPublicTrades(this.extend(request, params));
|
|
1178
|
+
}
|
|
1179
|
+
if (symbol !== undefined) {
|
|
1180
|
+
return this.parseTrades(response, market);
|
|
1181
|
+
}
|
|
1119
1182
|
let trades = [];
|
|
1183
|
+
const marketIds = Object.keys(response);
|
|
1120
1184
|
for (let i = 0; i < marketIds.length; i++) {
|
|
1121
1185
|
const marketId = marketIds[i];
|
|
1122
1186
|
const marketInner = this.market(marketId);
|
|
@@ -1452,6 +1516,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
1452
1516
|
* @method
|
|
1453
1517
|
* @name hitbtc#fetchOrderBooks
|
|
1454
1518
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
1519
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1455
1520
|
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1456
1521
|
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1457
1522
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
@@ -1483,13 +1548,23 @@ class hitbtc extends hitbtc$1 {
|
|
|
1483
1548
|
* @method
|
|
1484
1549
|
* @name hitbtc#fetchOrderBook
|
|
1485
1550
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1551
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1486
1552
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1487
1553
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1488
1554
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
1489
1555
|
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
1490
1556
|
*/
|
|
1491
|
-
|
|
1492
|
-
|
|
1557
|
+
await this.loadMarkets();
|
|
1558
|
+
const market = this.market(symbol);
|
|
1559
|
+
const request = {
|
|
1560
|
+
'symbol': market['id'],
|
|
1561
|
+
};
|
|
1562
|
+
if (limit !== undefined) {
|
|
1563
|
+
request['depth'] = limit;
|
|
1564
|
+
}
|
|
1565
|
+
const response = await this.publicGetPublicOrderbookSymbol(this.extend(request, params));
|
|
1566
|
+
const timestamp = this.parse8601(this.safeString(response, 'timestamp'));
|
|
1567
|
+
return this.parseOrderBook(response, symbol, timestamp, 'bid', 'ask');
|
|
1493
1568
|
}
|
|
1494
1569
|
parseTradingFee(fee, market = undefined) {
|
|
1495
1570
|
//
|
|
@@ -1575,6 +1650,9 @@ class hitbtc extends hitbtc$1 {
|
|
|
1575
1650
|
* @name hitbtc#fetchOHLCV
|
|
1576
1651
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1577
1652
|
* @see https://api.hitbtc.com/#candles
|
|
1653
|
+
* @see https://api.hitbtc.com/#futures-index-price-candles
|
|
1654
|
+
* @see https://api.hitbtc.com/#futures-mark-price-candles
|
|
1655
|
+
* @see https://api.hitbtc.com/#futures-premium-index-candles
|
|
1578
1656
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1579
1657
|
* @param {string} timeframe the length of time each candle represents
|
|
1580
1658
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -1592,7 +1670,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
1592
1670
|
}
|
|
1593
1671
|
const market = this.market(symbol);
|
|
1594
1672
|
let request = {
|
|
1595
|
-
'
|
|
1673
|
+
'symbol': market['id'],
|
|
1596
1674
|
'period': this.safeString(this.timeframes, timeframe, timeframe),
|
|
1597
1675
|
};
|
|
1598
1676
|
[request, params] = this.handleUntilOption('till', request, params);
|
|
@@ -1604,50 +1682,47 @@ class hitbtc extends hitbtc$1 {
|
|
|
1604
1682
|
}
|
|
1605
1683
|
const price = this.safeString(params, 'price');
|
|
1606
1684
|
params = this.omit(params, 'price');
|
|
1607
|
-
let
|
|
1685
|
+
let response = undefined;
|
|
1608
1686
|
if (price === 'mark') {
|
|
1609
|
-
|
|
1687
|
+
response = await this.publicGetPublicFuturesCandlesMarkPriceSymbol(this.extend(request, params));
|
|
1610
1688
|
}
|
|
1611
1689
|
else if (price === 'index') {
|
|
1612
|
-
|
|
1690
|
+
response = await this.publicGetPublicFuturesCandlesIndexPriceSymbol(this.extend(request, params));
|
|
1613
1691
|
}
|
|
1614
1692
|
else if (price === 'premiumIndex') {
|
|
1615
|
-
|
|
1693
|
+
response = await this.publicGetPublicFuturesCandlesPremiumIndexSymbol(this.extend(request, params));
|
|
1694
|
+
}
|
|
1695
|
+
else {
|
|
1696
|
+
response = await this.publicGetPublicCandlesSymbol(this.extend(request, params));
|
|
1616
1697
|
}
|
|
1617
|
-
const response = await this[method](this.extend(request, params));
|
|
1618
1698
|
//
|
|
1619
1699
|
// Spot and Swap
|
|
1620
1700
|
//
|
|
1621
|
-
//
|
|
1622
|
-
//
|
|
1623
|
-
//
|
|
1624
|
-
//
|
|
1625
|
-
//
|
|
1626
|
-
//
|
|
1627
|
-
//
|
|
1628
|
-
//
|
|
1629
|
-
//
|
|
1630
|
-
//
|
|
1631
|
-
//
|
|
1632
|
-
// ]
|
|
1633
|
-
// }
|
|
1701
|
+
// [
|
|
1702
|
+
// {
|
|
1703
|
+
// "timestamp": "2021-10-25T07:38:00.000Z",
|
|
1704
|
+
// "open": "4173.391",
|
|
1705
|
+
// "close": "4170.923",
|
|
1706
|
+
// "min": "4170.923",
|
|
1707
|
+
// "max": "4173.986",
|
|
1708
|
+
// "volume": "0.1879",
|
|
1709
|
+
// "volume_quote": "784.2517846"
|
|
1710
|
+
// }
|
|
1711
|
+
// ]
|
|
1634
1712
|
//
|
|
1635
1713
|
// Mark, Index and Premium Index
|
|
1636
1714
|
//
|
|
1637
|
-
//
|
|
1638
|
-
//
|
|
1639
|
-
//
|
|
1640
|
-
//
|
|
1641
|
-
//
|
|
1642
|
-
//
|
|
1643
|
-
//
|
|
1644
|
-
//
|
|
1645
|
-
//
|
|
1646
|
-
// ]
|
|
1647
|
-
// }
|
|
1715
|
+
// [
|
|
1716
|
+
// {
|
|
1717
|
+
// "timestamp": "2022-04-01T01:28:00.000Z",
|
|
1718
|
+
// "open": "45146.39",
|
|
1719
|
+
// "close": "45219.43",
|
|
1720
|
+
// "min": "45146.39",
|
|
1721
|
+
// "max": "45219.43"
|
|
1722
|
+
// },
|
|
1723
|
+
// ]
|
|
1648
1724
|
//
|
|
1649
|
-
|
|
1650
|
-
return this.parseOHLCVs(ohlcvs, market, timeframe, since, limit);
|
|
1725
|
+
return this.parseOHLCVs(response, market, timeframe, since, limit);
|
|
1651
1726
|
}
|
|
1652
1727
|
parseOHLCV(ohlcv, market = undefined) {
|
|
1653
1728
|
//
|
|
@@ -2047,7 +2122,7 @@ class hitbtc extends hitbtc$1 {
|
|
|
2047
2122
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2048
2123
|
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
2049
2124
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
2050
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both
|
|
2125
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
|
|
2051
2126
|
* @param {bool} [params.margin] true for creating a margin order
|
|
2052
2127
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2053
2128
|
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
@@ -2121,7 +2196,11 @@ class hitbtc extends hitbtc$1 {
|
|
|
2121
2196
|
throw new errors.ExchangeError(this.id + ' createOrder() requires a stopPrice parameter for stop-loss and take-profit orders');
|
|
2122
2197
|
}
|
|
2123
2198
|
params = this.omit(params, ['triggerPrice', 'timeInForce', 'stopPrice', 'stop_price', 'reduceOnly', 'postOnly']);
|
|
2124
|
-
if (
|
|
2199
|
+
if (marketType === 'swap') {
|
|
2200
|
+
// set default margin mode to cross
|
|
2201
|
+
if (marginMode === undefined) {
|
|
2202
|
+
marginMode = 'cross';
|
|
2203
|
+
}
|
|
2125
2204
|
request['margin_mode'] = marginMode;
|
|
2126
2205
|
}
|
|
2127
2206
|
let response = undefined;
|
|
@@ -2400,6 +2479,60 @@ class hitbtc extends hitbtc$1 {
|
|
|
2400
2479
|
//
|
|
2401
2480
|
return this.parseTransaction(response, currency);
|
|
2402
2481
|
}
|
|
2482
|
+
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
2483
|
+
/**
|
|
2484
|
+
* @method
|
|
2485
|
+
* @name hitbtc#fetchFundingRates
|
|
2486
|
+
* @description fetches funding rates for multiple markets
|
|
2487
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
2488
|
+
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2489
|
+
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
2490
|
+
* @returns {object} an array of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
2491
|
+
*/
|
|
2492
|
+
await this.loadMarkets();
|
|
2493
|
+
let market = undefined;
|
|
2494
|
+
const request = {};
|
|
2495
|
+
if (symbols !== undefined) {
|
|
2496
|
+
symbols = this.marketSymbols(symbols);
|
|
2497
|
+
market = this.market(symbols[0]);
|
|
2498
|
+
const queryMarketIds = this.marketIds(symbols);
|
|
2499
|
+
request['symbols'] = queryMarketIds.join(',');
|
|
2500
|
+
}
|
|
2501
|
+
let type = undefined;
|
|
2502
|
+
[type, params] = this.handleMarketTypeAndParams('fetchFundingRates', market, params);
|
|
2503
|
+
if (type !== 'swap') {
|
|
2504
|
+
throw new errors.NotSupported(this.id + ' fetchFundingRates() does not support ' + type + ' markets');
|
|
2505
|
+
}
|
|
2506
|
+
const response = await this.publicGetPublicFuturesInfo(this.extend(request, params));
|
|
2507
|
+
//
|
|
2508
|
+
// {
|
|
2509
|
+
// "BTCUSDT_PERP": {
|
|
2510
|
+
// "contract_type": "perpetual",
|
|
2511
|
+
// "mark_price": "30897.68",
|
|
2512
|
+
// "index_price": "30895.29",
|
|
2513
|
+
// "funding_rate": "0.0001",
|
|
2514
|
+
// "open_interest": "93.7128",
|
|
2515
|
+
// "next_funding_time": "2021-07-21T16:00:00.000Z",
|
|
2516
|
+
// "indicative_funding_rate": "0.0001",
|
|
2517
|
+
// "premium_index": "0.000047541807127312",
|
|
2518
|
+
// "avg_premium_index": "0.000087063368020112",
|
|
2519
|
+
// "interest_rate": "0.0001",
|
|
2520
|
+
// "timestamp": "2021-07-21T09:48:37.235Z"
|
|
2521
|
+
// }
|
|
2522
|
+
// }
|
|
2523
|
+
//
|
|
2524
|
+
const marketIds = Object.keys(response);
|
|
2525
|
+
const fundingRates = {};
|
|
2526
|
+
for (let i = 0; i < marketIds.length; i++) {
|
|
2527
|
+
const marketId = this.safeString(marketIds, i);
|
|
2528
|
+
const rawFundingRate = this.safeValue(response, marketId);
|
|
2529
|
+
const marketInner = this.market(marketId);
|
|
2530
|
+
const symbol = marketInner['symbol'];
|
|
2531
|
+
const fundingRate = this.parseFundingRate(rawFundingRate, marketInner);
|
|
2532
|
+
fundingRates[symbol] = fundingRate;
|
|
2533
|
+
}
|
|
2534
|
+
return this.filterByArray(fundingRates, 'symbol', symbols);
|
|
2535
|
+
}
|
|
2403
2536
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2404
2537
|
/**
|
|
2405
2538
|
* @method
|
|
@@ -2690,11 +2823,75 @@ class hitbtc extends hitbtc$1 {
|
|
|
2690
2823
|
'takeProfitPrice': undefined,
|
|
2691
2824
|
});
|
|
2692
2825
|
}
|
|
2826
|
+
parseOpenInterest(interest, market = undefined) {
|
|
2827
|
+
//
|
|
2828
|
+
// {
|
|
2829
|
+
// "contract_type": "perpetual",
|
|
2830
|
+
// "mark_price": "42307.43",
|
|
2831
|
+
// "index_price": "42303.27",
|
|
2832
|
+
// "funding_rate": "0.0001",
|
|
2833
|
+
// "open_interest": "30.9826",
|
|
2834
|
+
// "next_funding_time": "2022-03-22T16:00:00.000Z",
|
|
2835
|
+
// "indicative_funding_rate": "0.0001",
|
|
2836
|
+
// "premium_index": "0",
|
|
2837
|
+
// "avg_premium_index": "0.000029587712038098",
|
|
2838
|
+
// "interest_rate": "0.0001",
|
|
2839
|
+
// "timestamp": "2022-03-22T08:08:26.687Z"
|
|
2840
|
+
// }
|
|
2841
|
+
//
|
|
2842
|
+
const datetime = this.safeString(interest, 'timestamp');
|
|
2843
|
+
const value = this.safeNumber(interest, 'open_interest');
|
|
2844
|
+
return this.safeOpenInterest({
|
|
2845
|
+
'symbol': market['symbol'],
|
|
2846
|
+
'openInterestAmount': undefined,
|
|
2847
|
+
'openInterestValue': value,
|
|
2848
|
+
'timestamp': this.parse8601(datetime),
|
|
2849
|
+
'datetime': datetime,
|
|
2850
|
+
'info': interest,
|
|
2851
|
+
}, market);
|
|
2852
|
+
}
|
|
2853
|
+
async fetchOpenInterest(symbol, params = {}) {
|
|
2854
|
+
/**
|
|
2855
|
+
* @method
|
|
2856
|
+
* @name hitbtc#fetchOpenInterest
|
|
2857
|
+
* @description Retrieves the open interest of a derivative trading pair
|
|
2858
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
2859
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
2860
|
+
* @param {object} [params] exchange specific parameters
|
|
2861
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
2862
|
+
*/
|
|
2863
|
+
await this.loadMarkets();
|
|
2864
|
+
const market = this.market(symbol);
|
|
2865
|
+
if (!market['swap']) {
|
|
2866
|
+
throw new errors.BadSymbol(this.id + ' fetchOpenInterest() supports swap contracts only');
|
|
2867
|
+
}
|
|
2868
|
+
const request = {
|
|
2869
|
+
'symbol': market['id'],
|
|
2870
|
+
};
|
|
2871
|
+
const response = await this.publicGetPublicFuturesInfoSymbol(this.extend(request, params));
|
|
2872
|
+
//
|
|
2873
|
+
// {
|
|
2874
|
+
// "contract_type": "perpetual",
|
|
2875
|
+
// "mark_price": "42307.43",
|
|
2876
|
+
// "index_price": "42303.27",
|
|
2877
|
+
// "funding_rate": "0.0001",
|
|
2878
|
+
// "open_interest": "30.9826",
|
|
2879
|
+
// "next_funding_time": "2022-03-22T16:00:00.000Z",
|
|
2880
|
+
// "indicative_funding_rate": "0.0001",
|
|
2881
|
+
// "premium_index": "0",
|
|
2882
|
+
// "avg_premium_index": "0.000029587712038098",
|
|
2883
|
+
// "interest_rate": "0.0001",
|
|
2884
|
+
// "timestamp": "2022-03-22T08:08:26.687Z"
|
|
2885
|
+
// }
|
|
2886
|
+
//
|
|
2887
|
+
return this.parseOpenInterest(response, market);
|
|
2888
|
+
}
|
|
2693
2889
|
async fetchFundingRate(symbol, params = {}) {
|
|
2694
2890
|
/**
|
|
2695
2891
|
* @method
|
|
2696
2892
|
* @name hitbtc#fetchFundingRate
|
|
2697
2893
|
* @description fetch the current funding rate
|
|
2894
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
2698
2895
|
* @param {string} symbol unified market symbol
|
|
2699
2896
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
2700
2897
|
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
@@ -2704,31 +2901,26 @@ class hitbtc extends hitbtc$1 {
|
|
|
2704
2901
|
if (!market['swap']) {
|
|
2705
2902
|
throw new errors.BadSymbol(this.id + ' fetchFundingRate() supports swap contracts only');
|
|
2706
2903
|
}
|
|
2707
|
-
const request = {
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
}
|
|
2712
|
-
const response = await this.publicGetPublicFuturesInfo(this.extend(request, params));
|
|
2904
|
+
const request = {
|
|
2905
|
+
'symbol': market['id'],
|
|
2906
|
+
};
|
|
2907
|
+
const response = await this.publicGetPublicFuturesInfoSymbol(this.extend(request, params));
|
|
2713
2908
|
//
|
|
2714
2909
|
// {
|
|
2715
|
-
// "
|
|
2716
|
-
//
|
|
2717
|
-
//
|
|
2718
|
-
//
|
|
2719
|
-
//
|
|
2720
|
-
//
|
|
2721
|
-
//
|
|
2722
|
-
//
|
|
2723
|
-
//
|
|
2724
|
-
//
|
|
2725
|
-
//
|
|
2726
|
-
// "timestamp": "2022-03-22T08:08:26.687Z"
|
|
2727
|
-
// }
|
|
2910
|
+
// "contract_type": "perpetual",
|
|
2911
|
+
// "mark_price": "42307.43",
|
|
2912
|
+
// "index_price": "42303.27",
|
|
2913
|
+
// "funding_rate": "0.0001",
|
|
2914
|
+
// "open_interest": "30.9826",
|
|
2915
|
+
// "next_funding_time": "2022-03-22T16:00:00.000Z",
|
|
2916
|
+
// "indicative_funding_rate": "0.0001",
|
|
2917
|
+
// "premium_index": "0",
|
|
2918
|
+
// "avg_premium_index": "0.000029587712038098",
|
|
2919
|
+
// "interest_rate": "0.0001",
|
|
2920
|
+
// "timestamp": "2022-03-22T08:08:26.687Z"
|
|
2728
2921
|
// }
|
|
2729
2922
|
//
|
|
2730
|
-
|
|
2731
|
-
return this.parseFundingRate(data, market);
|
|
2923
|
+
return this.parseFundingRate(response, market);
|
|
2732
2924
|
}
|
|
2733
2925
|
parseFundingRate(contract, market = undefined) {
|
|
2734
2926
|
//
|
|
@@ -2932,10 +3124,8 @@ class hitbtc extends hitbtc$1 {
|
|
|
2932
3124
|
* @param {object} [params] extra parameters specific to the hitbtc api endpoint
|
|
2933
3125
|
* @returns {object} response from the exchange
|
|
2934
3126
|
*/
|
|
3127
|
+
this.checkRequiredSymbol('setLeverage', symbol);
|
|
2935
3128
|
await this.loadMarkets();
|
|
2936
|
-
if (symbol === undefined) {
|
|
2937
|
-
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
2938
|
-
}
|
|
2939
3129
|
if (params['margin_balance'] === undefined) {
|
|
2940
3130
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a margin_balance parameter that will transfer margin to the specified trading pair');
|
|
2941
3131
|
}
|
package/dist/cjs/src/hollaex.js
CHANGED
|
@@ -1223,9 +1223,7 @@ class hollaex extends hollaex$1 {
|
|
|
1223
1223
|
* @param {object} [params] extra parameters specific to the hollaex api endpoint
|
|
1224
1224
|
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1225
1225
|
*/
|
|
1226
|
-
|
|
1227
|
-
throw new errors.ArgumentsRequired(this.id + " cancelAllOrders() requires a 'symbol' argument");
|
|
1228
|
-
}
|
|
1226
|
+
this.checkRequiredSymbol('cancelAllOrders', symbol);
|
|
1229
1227
|
await this.loadMarkets();
|
|
1230
1228
|
const request = {};
|
|
1231
1229
|
let market = undefined;
|