ccxt 4.1.55 → 4.1.57

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 (328) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +6 -6
  4. package/build.sh +30 -8
  5. package/dist/ccxt.browser.js +5592 -4907
  6. package/dist/ccxt.browser.min.js +13 -13
  7. package/dist/cjs/ccxt.js +1 -1
  8. package/dist/cjs/src/ace.js +17 -13
  9. package/dist/cjs/src/alpaca.js +6 -6
  10. package/dist/cjs/src/ascendex.js +35 -29
  11. package/dist/cjs/src/base/Exchange.js +39 -26
  12. package/dist/cjs/src/base/Precise.js +1 -3
  13. package/dist/cjs/src/bigone.js +24 -20
  14. package/dist/cjs/src/binance.js +97 -76
  15. package/dist/cjs/src/bingx.js +63 -44
  16. package/dist/cjs/src/bit2c.js +18 -15
  17. package/dist/cjs/src/bitbank.js +17 -15
  18. package/dist/cjs/src/bitbns.js +28 -18
  19. package/dist/cjs/src/bitfinex.js +23 -21
  20. package/dist/cjs/src/bitfinex2.js +32 -28
  21. package/dist/cjs/src/bitflyer.js +28 -20
  22. package/dist/cjs/src/bitforex.js +25 -18
  23. package/dist/cjs/src/bitget.js +184 -147
  24. package/dist/cjs/src/bithumb.js +23 -16
  25. package/dist/cjs/src/bitmart.js +129 -94
  26. package/dist/cjs/src/bitmex.js +104 -64
  27. package/dist/cjs/src/bitopro.js +38 -26
  28. package/dist/cjs/src/bitpanda.js +24 -23
  29. package/dist/cjs/src/bitrue.js +33 -24
  30. package/dist/cjs/src/bitso.js +24 -23
  31. package/dist/cjs/src/bitstamp.js +24 -23
  32. package/dist/cjs/src/bittrex.js +30 -29
  33. package/dist/cjs/src/bitvavo.js +38 -30
  34. package/dist/cjs/src/bl3p.js +11 -10
  35. package/dist/cjs/src/blockchaincom.js +20 -20
  36. package/dist/cjs/src/btcalpha.js +18 -17
  37. package/dist/cjs/src/btcbox.js +13 -12
  38. package/dist/cjs/src/btcmarkets.js +20 -19
  39. package/dist/cjs/src/btcturk.js +14 -13
  40. package/dist/cjs/src/bybit.js +84 -54
  41. package/dist/cjs/src/cex.js +16 -14
  42. package/dist/cjs/src/coinbase.js +29 -27
  43. package/dist/cjs/src/coinbasepro.js +27 -25
  44. package/dist/cjs/src/coincheck.js +15 -14
  45. package/dist/cjs/src/coinex.js +101 -78
  46. package/dist/cjs/src/coinlist.js +28 -27
  47. package/dist/cjs/src/coinmate.js +20 -17
  48. package/dist/cjs/src/coinone.js +21 -16
  49. package/dist/cjs/src/coinsph.js +37 -28
  50. package/dist/cjs/src/coinspot.js +12 -11
  51. package/dist/cjs/src/cryptocom.js +40 -202
  52. package/dist/cjs/src/currencycom.js +32 -25
  53. package/dist/cjs/src/delta.js +34 -28
  54. package/dist/cjs/src/deribit.js +39 -36
  55. package/dist/cjs/src/digifinex.js +64 -44
  56. package/dist/cjs/src/exmo.js +29 -27
  57. package/dist/cjs/src/gate.js +67 -53
  58. package/dist/cjs/src/gemini.js +23 -20
  59. package/dist/cjs/src/hitbtc.js +65 -56
  60. package/dist/cjs/src/hollaex.js +30 -27
  61. package/dist/cjs/src/htx.js +135 -143
  62. package/dist/cjs/src/huobijp.js +22 -20
  63. package/dist/cjs/src/idex.js +22 -21
  64. package/dist/cjs/src/independentreserve.js +15 -14
  65. package/dist/cjs/src/indodax.js +30 -26
  66. package/dist/cjs/src/kraken.js +29 -27
  67. package/dist/cjs/src/krakenfutures.js +29 -22
  68. package/dist/cjs/src/kucoin.js +48 -43
  69. package/dist/cjs/src/kucoinfutures.js +33 -28
  70. package/dist/cjs/src/kuna.js +25 -24
  71. package/dist/cjs/src/latoken.js +24 -22
  72. package/dist/cjs/src/lbank.js +45 -30
  73. package/dist/cjs/src/luno.js +22 -19
  74. package/dist/cjs/src/lykke.js +19 -17
  75. package/dist/cjs/src/mercado.js +30 -19
  76. package/dist/cjs/src/mexc.js +60 -49
  77. package/dist/cjs/src/ndax.js +23 -22
  78. package/dist/cjs/src/novadax.js +23 -22
  79. package/dist/cjs/src/oceanex.js +22 -19
  80. package/dist/cjs/src/okcoin.js +29 -23
  81. package/dist/cjs/src/okx.js +92 -84
  82. package/dist/cjs/src/p2b.js +80 -83
  83. package/dist/cjs/src/paymium.js +10 -10
  84. package/dist/cjs/src/phemex.js +63 -40
  85. package/dist/cjs/src/poloniex.js +22 -22
  86. package/dist/cjs/src/poloniexfutures.js +23 -19
  87. package/dist/cjs/src/pro/alpaca.js +5 -5
  88. package/dist/cjs/src/pro/ascendex.js +4 -4
  89. package/dist/cjs/src/pro/binance.js +16 -16
  90. package/dist/cjs/src/pro/bingx.js +1 -1
  91. package/dist/cjs/src/pro/bitfinex.js +4 -4
  92. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  93. package/dist/cjs/src/pro/bitget.js +7 -7
  94. package/dist/cjs/src/pro/bitmart.js +7 -5
  95. package/dist/cjs/src/pro/bitmex.js +6 -6
  96. package/dist/cjs/src/pro/bitopro.js +4 -4
  97. package/dist/cjs/src/pro/bitpanda.js +6 -6
  98. package/dist/cjs/src/pro/bitrue.js +2 -2
  99. package/dist/cjs/src/pro/bitstamp.js +6 -4
  100. package/dist/cjs/src/pro/bittrex.js +6 -6
  101. package/dist/cjs/src/pro/bitvavo.js +11 -7
  102. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  103. package/dist/cjs/src/pro/bybit.js +7 -7
  104. package/dist/cjs/src/pro/cex.js +13 -9
  105. package/dist/cjs/src/pro/coinbase.js +5 -5
  106. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  107. package/dist/cjs/src/pro/coinex.js +7 -9
  108. package/dist/cjs/src/pro/cryptocom.js +9 -9
  109. package/dist/cjs/src/pro/currencycom.js +4 -4
  110. package/dist/cjs/src/pro/deribit.js +6 -6
  111. package/dist/cjs/src/pro/exmo.js +12 -14
  112. package/dist/cjs/src/pro/gate.js +7 -7
  113. package/dist/cjs/src/pro/gemini.js +3 -3
  114. package/dist/cjs/src/pro/hitbtc.js +263 -4
  115. package/dist/cjs/src/pro/hollaex.js +5 -5
  116. package/dist/cjs/src/pro/htx.js +6 -6
  117. package/dist/cjs/src/pro/huobijp.js +3 -3
  118. package/dist/cjs/src/pro/idex.js +4 -4
  119. package/dist/cjs/src/pro/independentreserve.js +2 -2
  120. package/dist/cjs/src/pro/kraken.js +10 -10
  121. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  122. package/dist/cjs/src/pro/kucoin.js +7 -7
  123. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  124. package/dist/cjs/src/pro/luno.js +2 -2
  125. package/dist/cjs/src/pro/mexc.js +6 -6
  126. package/dist/cjs/src/pro/ndax.js +3 -3
  127. package/dist/cjs/src/pro/okcoin.js +5 -5
  128. package/dist/cjs/src/pro/okx.js +12 -12
  129. package/dist/cjs/src/pro/phemex.js +6 -6
  130. package/dist/cjs/src/pro/poloniex.js +7 -7
  131. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  132. package/dist/cjs/src/pro/probit.js +6 -6
  133. package/dist/cjs/src/pro/upbit.js +3 -3
  134. package/dist/cjs/src/pro/wazirx.js +8 -8
  135. package/dist/cjs/src/pro/whitebit.js +12 -8
  136. package/dist/cjs/src/pro/woo.js +1 -1
  137. package/dist/cjs/src/probit.js +28 -23
  138. package/dist/cjs/src/tidex.js +16 -15
  139. package/dist/cjs/src/timex.js +19 -18
  140. package/dist/cjs/src/tokocrypto.js +27 -22
  141. package/dist/cjs/src/upbit.js +19 -19
  142. package/dist/cjs/src/wavesexchange.js +22 -19
  143. package/dist/cjs/src/wazirx.js +24 -17
  144. package/dist/cjs/src/whitebit.js +33 -27
  145. package/dist/cjs/src/woo.js +44 -34
  146. package/dist/cjs/src/yobit.js +25 -20
  147. package/dist/cjs/src/zaif.js +9 -9
  148. package/dist/cjs/src/zonda.js +18 -17
  149. package/js/ccxt.d.ts +1 -1
  150. package/js/ccxt.js +1 -1
  151. package/js/src/abstract/bitbank.d.ts +1 -0
  152. package/js/src/abstract/bybit.d.ts +1 -0
  153. package/js/src/abstract/cryptocom.d.ts +0 -20
  154. package/js/src/abstract/htx.d.ts +3 -0
  155. package/js/src/abstract/huobi.d.ts +3 -0
  156. package/js/src/abstract/huobipro.d.ts +3 -0
  157. package/js/src/abstract/okex.d.ts +3 -1
  158. package/js/src/abstract/okex5.d.ts +3 -1
  159. package/js/src/abstract/okx.d.ts +3 -1
  160. package/js/src/ace.js +18 -14
  161. package/js/src/alpaca.js +6 -6
  162. package/js/src/ascendex.js +35 -29
  163. package/js/src/base/Exchange.d.ts +37 -34
  164. package/js/src/base/Exchange.js +39 -26
  165. package/js/src/base/Precise.d.ts +4 -4
  166. package/js/src/base/Precise.js +1 -3
  167. package/js/src/base/functions/type.d.ts +25 -25
  168. package/js/src/base/types.d.ts +21 -14
  169. package/js/src/bigone.js +25 -21
  170. package/js/src/binance.d.ts +2 -2
  171. package/js/src/binance.js +97 -76
  172. package/js/src/bingx.js +63 -44
  173. package/js/src/bit2c.js +19 -16
  174. package/js/src/bitbank.js +17 -15
  175. package/js/src/bitbns.js +28 -18
  176. package/js/src/bitfinex.js +23 -21
  177. package/js/src/bitfinex2.js +32 -28
  178. package/js/src/bitflyer.js +28 -20
  179. package/js/src/bitforex.js +26 -19
  180. package/js/src/bitget.d.ts +25 -3
  181. package/js/src/bitget.js +184 -147
  182. package/js/src/bithumb.js +23 -16
  183. package/js/src/bitmart.d.ts +1 -1
  184. package/js/src/bitmart.js +129 -94
  185. package/js/src/bitmex.d.ts +2 -2
  186. package/js/src/bitmex.js +104 -64
  187. package/js/src/bitopro.js +38 -26
  188. package/js/src/bitpanda.js +24 -23
  189. package/js/src/bitrue.js +33 -24
  190. package/js/src/bitso.js +24 -23
  191. package/js/src/bitstamp.d.ts +2 -2
  192. package/js/src/bitstamp.js +24 -23
  193. package/js/src/bittrex.js +30 -29
  194. package/js/src/bitvavo.js +38 -30
  195. package/js/src/bl3p.js +11 -10
  196. package/js/src/blockchaincom.js +20 -20
  197. package/js/src/btcalpha.js +18 -17
  198. package/js/src/btcbox.js +13 -12
  199. package/js/src/btcmarkets.js +20 -19
  200. package/js/src/btcturk.js +14 -13
  201. package/js/src/bybit.d.ts +1 -1
  202. package/js/src/bybit.js +84 -54
  203. package/js/src/cex.js +16 -14
  204. package/js/src/coinbase.js +29 -27
  205. package/js/src/coinbasepro.js +27 -25
  206. package/js/src/coincheck.js +15 -14
  207. package/js/src/coinex.d.ts +1 -1
  208. package/js/src/coinex.js +101 -78
  209. package/js/src/coinlist.js +28 -27
  210. package/js/src/coinmate.js +21 -18
  211. package/js/src/coinone.js +21 -16
  212. package/js/src/coinsph.js +37 -28
  213. package/js/src/coinspot.js +12 -11
  214. package/js/src/cryptocom.d.ts +0 -23
  215. package/js/src/cryptocom.js +40 -202
  216. package/js/src/currencycom.js +32 -25
  217. package/js/src/delta.js +35 -29
  218. package/js/src/deribit.js +39 -36
  219. package/js/src/digifinex.d.ts +2 -2
  220. package/js/src/digifinex.js +65 -45
  221. package/js/src/exmo.js +29 -27
  222. package/js/src/gate.d.ts +1 -1
  223. package/js/src/gate.js +67 -53
  224. package/js/src/gemini.js +23 -20
  225. package/js/src/hitbtc.d.ts +1 -0
  226. package/js/src/hitbtc.js +65 -56
  227. package/js/src/hollaex.js +30 -27
  228. package/js/src/htx.d.ts +11 -3
  229. package/js/src/htx.js +135 -143
  230. package/js/src/huobijp.js +23 -21
  231. package/js/src/idex.js +22 -21
  232. package/js/src/independentreserve.js +15 -14
  233. package/js/src/indodax.js +30 -26
  234. package/js/src/kraken.js +29 -27
  235. package/js/src/krakenfutures.js +29 -22
  236. package/js/src/kucoin.d.ts +1 -1
  237. package/js/src/kucoin.js +48 -43
  238. package/js/src/kucoinfutures.js +33 -28
  239. package/js/src/kuna.js +25 -24
  240. package/js/src/latoken.js +25 -23
  241. package/js/src/lbank.js +46 -31
  242. package/js/src/luno.js +22 -19
  243. package/js/src/lykke.js +19 -17
  244. package/js/src/mercado.js +30 -19
  245. package/js/src/mexc.d.ts +1 -1
  246. package/js/src/mexc.js +60 -49
  247. package/js/src/ndax.js +23 -22
  248. package/js/src/novadax.js +23 -22
  249. package/js/src/oceanex.js +22 -19
  250. package/js/src/okcoin.js +29 -23
  251. package/js/src/okx.d.ts +2 -2
  252. package/js/src/okx.js +92 -84
  253. package/js/src/p2b.d.ts +8 -7
  254. package/js/src/p2b.js +80 -82
  255. package/js/src/paymium.js +10 -10
  256. package/js/src/phemex.js +63 -40
  257. package/js/src/poloniex.js +22 -22
  258. package/js/src/poloniexfutures.js +23 -19
  259. package/js/src/pro/alpaca.js +5 -5
  260. package/js/src/pro/ascendex.js +4 -4
  261. package/js/src/pro/binance.js +16 -16
  262. package/js/src/pro/bingx.js +1 -1
  263. package/js/src/pro/bitfinex.js +4 -4
  264. package/js/src/pro/bitfinex2.d.ts +1 -1
  265. package/js/src/pro/bitfinex2.js +6 -6
  266. package/js/src/pro/bitget.js +7 -7
  267. package/js/src/pro/bitmart.js +7 -5
  268. package/js/src/pro/bitmex.js +6 -6
  269. package/js/src/pro/bitopro.js +4 -4
  270. package/js/src/pro/bitpanda.js +6 -6
  271. package/js/src/pro/bitrue.js +2 -2
  272. package/js/src/pro/bitstamp.js +7 -5
  273. package/js/src/pro/bittrex.js +6 -6
  274. package/js/src/pro/bitvavo.js +12 -8
  275. package/js/src/pro/blockchaincom.js +8 -8
  276. package/js/src/pro/bybit.js +7 -7
  277. package/js/src/pro/cex.js +14 -10
  278. package/js/src/pro/coinbase.js +5 -5
  279. package/js/src/pro/coinbasepro.js +12 -11
  280. package/js/src/pro/coinex.js +7 -9
  281. package/js/src/pro/cryptocom.js +9 -9
  282. package/js/src/pro/currencycom.js +4 -4
  283. package/js/src/pro/deribit.js +6 -6
  284. package/js/src/pro/exmo.js +12 -14
  285. package/js/src/pro/gate.js +7 -7
  286. package/js/src/pro/gemini.js +3 -3
  287. package/js/src/pro/hitbtc.d.ts +8 -1
  288. package/js/src/pro/hitbtc.js +264 -5
  289. package/js/src/pro/hollaex.js +5 -5
  290. package/js/src/pro/htx.js +6 -6
  291. package/js/src/pro/huobijp.js +3 -3
  292. package/js/src/pro/idex.js +4 -4
  293. package/js/src/pro/independentreserve.js +2 -2
  294. package/js/src/pro/kraken.js +10 -10
  295. package/js/src/pro/krakenfutures.d.ts +1 -0
  296. package/js/src/pro/krakenfutures.js +42 -18
  297. package/js/src/pro/kucoin.js +7 -7
  298. package/js/src/pro/kucoinfutures.js +8 -6
  299. package/js/src/pro/luno.js +2 -2
  300. package/js/src/pro/mexc.js +6 -6
  301. package/js/src/pro/ndax.js +3 -3
  302. package/js/src/pro/okcoin.js +5 -5
  303. package/js/src/pro/okx.js +12 -12
  304. package/js/src/pro/phemex.js +6 -6
  305. package/js/src/pro/poloniex.js +7 -7
  306. package/js/src/pro/poloniexfutures.js +5 -5
  307. package/js/src/pro/probit.js +6 -6
  308. package/js/src/pro/upbit.js +3 -3
  309. package/js/src/pro/wazirx.js +8 -8
  310. package/js/src/pro/whitebit.js +13 -9
  311. package/js/src/pro/woo.js +1 -1
  312. package/js/src/probit.js +29 -24
  313. package/js/src/tidex.js +16 -15
  314. package/js/src/timex.js +19 -18
  315. package/js/src/tokocrypto.js +28 -23
  316. package/js/src/upbit.js +19 -19
  317. package/js/src/wavesexchange.js +23 -20
  318. package/js/src/wazirx.js +25 -18
  319. package/js/src/whitebit.js +33 -27
  320. package/js/src/woo.js +45 -35
  321. package/js/src/yobit.js +25 -20
  322. package/js/src/zaif.js +9 -9
  323. package/js/src/zonda.js +18 -17
  324. package/package.json +2 -2
  325. package/js/src/bitstamp1.d.ts +0 -28
  326. package/js/src/bitstamp1.js +0 -430
  327. package/js/src/lbank2.d.ts +0 -90
  328. package/js/src/lbank2.js +0 -2779
@@ -66,6 +66,7 @@ export default class hitbtc extends Exchange {
66
66
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
67
67
  editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
68
68
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
69
+ createOrderRequest(market: object, marketType: string, type: OrderType, side: OrderSide, amount: any, price?: any, marginMode?: Str, params?: {}): {}[];
69
70
  parseOrderStatus(status: any): string;
70
71
  parseOrder(order: any, market?: Market): Order;
71
72
  fetchMarginMode(symbol?: Str, params?: {}): Promise<MarginMode>;
package/js/src/hitbtc.js CHANGED
@@ -44,11 +44,11 @@ export default class hitbtc extends Exchange {
44
44
  'editOrder': true,
45
45
  'fetchAccounts': false,
46
46
  'fetchBalance': true,
47
- 'fetchBorrowRate': undefined,
48
47
  'fetchBorrowRateHistories': undefined,
49
48
  'fetchBorrowRateHistory': undefined,
50
- 'fetchBorrowRates': undefined,
51
49
  'fetchClosedOrders': true,
50
+ 'fetchCrossBorrowRate': false,
51
+ 'fetchCrossBorrowRates': false,
52
52
  'fetchCurrencies': true,
53
53
  'fetchDepositAddress': true,
54
54
  'fetchDeposits': true,
@@ -60,6 +60,8 @@ export default class hitbtc extends Exchange {
60
60
  'fetchFundingRateHistory': true,
61
61
  'fetchFundingRates': true,
62
62
  'fetchIndexOHLCV': true,
63
+ 'fetchIsolatedBorrowRate': false,
64
+ 'fetchIsolatedBorrowRates': false,
63
65
  'fetchLeverage': true,
64
66
  'fetchLeverageTiers': undefined,
65
67
  'fetchLiquidations': false,
@@ -908,7 +910,7 @@ export default class hitbtc extends Exchange {
908
910
  * @description create a currency deposit address
909
911
  * @param {string} code unified currency code of the currency for the deposit address
910
912
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
911
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
913
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
912
914
  */
913
915
  await this.loadMarkets();
914
916
  const currency = this.currency(code);
@@ -944,7 +946,7 @@ export default class hitbtc extends Exchange {
944
946
  * @description fetch the deposit address for a currency associated with this account
945
947
  * @param {string} code unified currency code
946
948
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
947
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
949
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
948
950
  */
949
951
  await this.loadMarkets();
950
952
  const currency = this.currency(code);
@@ -997,7 +999,7 @@ export default class hitbtc extends Exchange {
997
999
  * @name hitbtc#fetchBalance
998
1000
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
999
1001
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1000
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1002
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1001
1003
  */
1002
1004
  const type = this.safeStringLower(params, 'type', 'spot');
1003
1005
  params = this.omit(params, ['type']);
@@ -1038,7 +1040,7 @@ export default class hitbtc extends Exchange {
1038
1040
  * @see https://api.hitbtc.com/#tickers
1039
1041
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1040
1042
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1041
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1043
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1042
1044
  */
1043
1045
  await this.loadMarkets();
1044
1046
  const market = this.market(symbol);
@@ -1069,7 +1071,7 @@ export default class hitbtc extends Exchange {
1069
1071
  * @see https://api.hitbtc.com/#tickers
1070
1072
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1071
1073
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1072
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1074
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1073
1075
  */
1074
1076
  await this.loadMarkets();
1075
1077
  symbols = this.marketSymbols(symbols);
@@ -1159,7 +1161,7 @@ export default class hitbtc extends Exchange {
1159
1161
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1160
1162
  * @param {int} [limit] the maximum amount of trades to fetch
1161
1163
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1162
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
1164
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1163
1165
  */
1164
1166
  await this.loadMarkets();
1165
1167
  let market = undefined;
@@ -1204,7 +1206,7 @@ export default class hitbtc extends Exchange {
1204
1206
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1205
1207
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1206
1208
  * @param {bool} [params.margin] true for fetching margin trades
1207
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1209
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1208
1210
  */
1209
1211
  await this.loadMarkets();
1210
1212
  let market = undefined;
@@ -1488,7 +1490,7 @@ export default class hitbtc extends Exchange {
1488
1490
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
1489
1491
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
1490
1492
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1491
- * @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1493
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1492
1494
  */
1493
1495
  return await this.fetchTransactionsHelper('DEPOSIT,WITHDRAW', code, since, limit, params);
1494
1496
  }
@@ -1501,7 +1503,7 @@ export default class hitbtc extends Exchange {
1501
1503
  * @param {int} [since] the earliest time in ms to fetch deposits for
1502
1504
  * @param {int} [limit] the maximum number of deposits structures to retrieve
1503
1505
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1504
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1506
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1505
1507
  */
1506
1508
  return await this.fetchTransactionsHelper('DEPOSIT', code, since, limit, params);
1507
1509
  }
@@ -1514,7 +1516,7 @@ export default class hitbtc extends Exchange {
1514
1516
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
1515
1517
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1516
1518
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1517
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1519
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1518
1520
  */
1519
1521
  return await this.fetchTransactionsHelper('WITHDRAW', code, since, limit, params);
1520
1522
  }
@@ -1527,7 +1529,7 @@ export default class hitbtc extends Exchange {
1527
1529
  * @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
1528
1530
  * @param {int} [limit] max number of entries per orderbook to return, default is undefined
1529
1531
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1530
- * @returns {object} a dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbol
1532
+ * @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
1531
1533
  */
1532
1534
  await this.loadMarkets();
1533
1535
  const request = {};
@@ -1559,7 +1561,7 @@ export default class hitbtc extends Exchange {
1559
1561
  * @param {string} symbol unified symbol of the market to fetch the order book for
1560
1562
  * @param {int} [limit] the maximum amount of order book entries to return
1561
1563
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1562
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
1564
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1563
1565
  */
1564
1566
  await this.loadMarkets();
1565
1567
  const market = this.market(symbol);
@@ -1599,7 +1601,7 @@ export default class hitbtc extends Exchange {
1599
1601
  * @description fetch the trading fees for a market
1600
1602
  * @param {string} symbol unified market symbol
1601
1603
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1602
- * @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
1604
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1603
1605
  */
1604
1606
  await this.loadMarkets();
1605
1607
  const market = this.market(symbol);
@@ -1625,7 +1627,7 @@ export default class hitbtc extends Exchange {
1625
1627
  * @name hitbtc#fetchTradingFees
1626
1628
  * @description fetch the trading fees for multiple markets
1627
1629
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1628
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
1630
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
1629
1631
  */
1630
1632
  await this.loadMarkets();
1631
1633
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
@@ -1775,7 +1777,7 @@ export default class hitbtc extends Exchange {
1775
1777
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1776
1778
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1777
1779
  * @param {bool} [params.margin] true for fetching margin orders
1778
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1780
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1779
1781
  */
1780
1782
  await this.loadMarkets();
1781
1783
  let market = undefined;
@@ -1814,7 +1816,7 @@ export default class hitbtc extends Exchange {
1814
1816
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1815
1817
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1816
1818
  * @param {bool} [params.margin] true for fetching a margin order
1817
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1819
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1818
1820
  */
1819
1821
  await this.loadMarkets();
1820
1822
  let market = undefined;
@@ -1870,7 +1872,7 @@ export default class hitbtc extends Exchange {
1870
1872
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1871
1873
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1872
1874
  * @param {bool} [params.margin] true for fetching margin trades
1873
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1875
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1874
1876
  */
1875
1877
  await this.loadMarkets();
1876
1878
  let market = undefined;
@@ -1943,7 +1945,7 @@ export default class hitbtc extends Exchange {
1943
1945
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1944
1946
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1945
1947
  * @param {bool} [params.margin] true for fetching open margin orders
1946
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1948
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1947
1949
  */
1948
1950
  await this.loadMarkets();
1949
1951
  let market = undefined;
@@ -1995,7 +1997,7 @@ export default class hitbtc extends Exchange {
1995
1997
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
1996
1998
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
1997
1999
  * @param {bool} [params.margin] true for fetching an open margin order
1998
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2000
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1999
2001
  */
2000
2002
  await this.loadMarkets();
2001
2003
  let market = undefined;
@@ -2028,7 +2030,7 @@ export default class hitbtc extends Exchange {
2028
2030
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2029
2031
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
2030
2032
  * @param {bool} [params.margin] true for canceling margin orders
2031
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2033
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2032
2034
  */
2033
2035
  await this.loadMarkets();
2034
2036
  let market = undefined;
@@ -2061,7 +2063,7 @@ export default class hitbtc extends Exchange {
2061
2063
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2062
2064
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
2063
2065
  * @param {bool} [params.margin] true for canceling a margin order
2064
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2066
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2065
2067
  */
2066
2068
  await this.loadMarkets();
2067
2069
  let market = undefined;
@@ -2134,23 +2136,38 @@ export default class hitbtc extends Exchange {
2134
2136
  * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2135
2137
  * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2136
2138
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", "Day", "GTD"
2137
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2139
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2138
2140
  */
2139
2141
  await this.loadMarkets();
2140
2142
  const market = this.market(symbol);
2141
- const isLimit = (type === 'limit');
2142
- const reduceOnly = this.safeValue(params, 'reduceOnly');
2143
- const timeInForce = this.safeString(params, 'timeInForce');
2144
- const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
2143
+ let request = undefined;
2145
2144
  let marketType = undefined;
2146
2145
  [marketType, params] = this.handleMarketTypeAndParams('createOrder', market, params);
2147
2146
  let marginMode = undefined;
2148
2147
  [marginMode, params] = this.handleMarginModeAndParams('createOrder', params);
2148
+ [request, params] = this.createOrderRequest(market, marketType, type, side, amount, price, marginMode, params);
2149
+ let response = undefined;
2150
+ if (marketType === 'swap') {
2151
+ response = await this.privatePostFuturesOrder(this.extend(request, params));
2152
+ }
2153
+ else if ((marketType === 'margin') || (marginMode !== undefined)) {
2154
+ response = await this.privatePostMarginOrder(this.extend(request, params));
2155
+ }
2156
+ else {
2157
+ response = await this.privatePostSpotOrder(this.extend(request, params));
2158
+ }
2159
+ return this.parseOrder(response, market);
2160
+ }
2161
+ createOrderRequest(market, marketType, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
2162
+ const isLimit = (type === 'limit');
2163
+ const reduceOnly = this.safeValue(params, 'reduceOnly');
2164
+ const timeInForce = this.safeString(params, 'timeInForce');
2165
+ const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
2149
2166
  const isPostOnly = this.isPostOnly(type === 'market', undefined, params);
2150
2167
  const request = {
2151
2168
  'type': type,
2152
2169
  'side': side,
2153
- 'quantity': this.amountToPrecision(symbol, amount),
2170
+ 'quantity': this.amountToPrecision(market['symbol'], amount),
2154
2171
  'symbol': market['id'],
2155
2172
  // 'client_order_id': 'r42gdPjNMZN-H_xs8RKl2wljg_dfgdg4', // Optional
2156
2173
  // 'time_in_force': 'GTC', // Optional GTC, IOC, FOK, Day, GTD
@@ -2182,7 +2199,7 @@ export default class hitbtc extends Exchange {
2182
2199
  if (price === undefined) {
2183
2200
  throw new ExchangeError(this.id + ' createOrder() requires a price argument for limit orders');
2184
2201
  }
2185
- request['price'] = this.priceToPrecision(symbol, price);
2202
+ request['price'] = this.priceToPrecision(market['symbol'], price);
2186
2203
  }
2187
2204
  if ((timeInForce === 'GTD')) {
2188
2205
  const expireTime = this.safeString(params, 'expire_time');
@@ -2191,7 +2208,7 @@ export default class hitbtc extends Exchange {
2191
2208
  }
2192
2209
  }
2193
2210
  if (triggerPrice !== undefined) {
2194
- request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
2211
+ request['stop_price'] = this.priceToPrecision(market['symbol'], triggerPrice);
2195
2212
  if (isLimit) {
2196
2213
  request['type'] = 'stopLimit';
2197
2214
  }
@@ -2210,17 +2227,7 @@ export default class hitbtc extends Exchange {
2210
2227
  }
2211
2228
  request['margin_mode'] = marginMode;
2212
2229
  }
2213
- let response = undefined;
2214
- if (marketType === 'swap') {
2215
- response = await this.privatePostFuturesOrder(this.extend(request, params));
2216
- }
2217
- else if ((marketType === 'margin') || (marginMode !== undefined)) {
2218
- response = await this.privatePostMarginOrder(this.extend(request, params));
2219
- }
2220
- else {
2221
- response = await this.privatePostSpotOrder(this.extend(request, params));
2222
- }
2223
- return this.parseOrder(response, market);
2230
+ return [request, params];
2224
2231
  }
2225
2232
  parseOrderStatus(status) {
2226
2233
  const statuses = {
@@ -2441,7 +2448,7 @@ export default class hitbtc extends Exchange {
2441
2448
  * @param {string} fromAccount account to transfer from
2442
2449
  * @param {string} toAccount account to transfer to
2443
2450
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2444
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
2451
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
2445
2452
  */
2446
2453
  // account can be "spot", "wallet", or "derivatives"
2447
2454
  await this.loadMarkets();
@@ -2528,7 +2535,7 @@ export default class hitbtc extends Exchange {
2528
2535
  * @param {string} address the address to withdraw to
2529
2536
  * @param {string} tag
2530
2537
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2531
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
2538
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2532
2539
  */
2533
2540
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
2534
2541
  await this.loadMarkets();
@@ -2572,7 +2579,7 @@ export default class hitbtc extends Exchange {
2572
2579
  * @see https://api.hitbtc.com/#futures-info
2573
2580
  * @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
2574
2581
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2575
- * @returns {object} an array of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
2582
+ * @returns {object} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2576
2583
  */
2577
2584
  await this.loadMarkets();
2578
2585
  let market = undefined;
@@ -2626,11 +2633,11 @@ export default class hitbtc extends Exchange {
2626
2633
  * @description fetches historical funding rate prices
2627
2634
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
2628
2635
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
2629
- * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
2636
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
2630
2637
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2631
2638
  * @param {int} [params.until] timestamp in ms of the latest funding rate
2632
2639
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2633
- * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
2640
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
2634
2641
  */
2635
2642
  await this.loadMarkets();
2636
2643
  let paginate = false;
@@ -2708,7 +2715,7 @@ export default class hitbtc extends Exchange {
2708
2715
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2709
2716
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
2710
2717
  * @param {bool} [params.margin] true for fetching spot-margin positions
2711
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
2718
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2712
2719
  */
2713
2720
  await this.loadMarkets();
2714
2721
  const request = {};
@@ -2770,7 +2777,7 @@ export default class hitbtc extends Exchange {
2770
2777
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2771
2778
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
2772
2779
  * @param {bool} [params.margin] true for fetching a spot-margin position
2773
- * @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
2780
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2774
2781
  */
2775
2782
  await this.loadMarkets();
2776
2783
  let marketType = undefined;
@@ -2943,7 +2950,7 @@ export default class hitbtc extends Exchange {
2943
2950
  * @see https://api.hitbtc.com/#futures-info
2944
2951
  * @param {string} symbol Unified CCXT market symbol
2945
2952
  * @param {object} [params] exchange specific parameters
2946
- * @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
2953
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=interest-history-structure}
2947
2954
  */
2948
2955
  await this.loadMarkets();
2949
2956
  const market = this.market(symbol);
@@ -2979,7 +2986,7 @@ export default class hitbtc extends Exchange {
2979
2986
  * @see https://api.hitbtc.com/#futures-info
2980
2987
  * @param {string} symbol unified market symbol
2981
2988
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
2982
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
2989
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2983
2990
  */
2984
2991
  await this.loadMarkets();
2985
2992
  const market = this.market(symbol);
@@ -3120,7 +3127,7 @@ export default class hitbtc extends Exchange {
3120
3127
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
3121
3128
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
3122
3129
  * @param {bool} [params.margin] true for reducing spot-margin
3123
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#reduce-margin-structure}
3130
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
3124
3131
  */
3125
3132
  if (amount !== 0) {
3126
3133
  throw new BadRequest(this.id + ' reduceMargin() on hitbtc requires the amount to be 0 and that will remove the entire margin amount');
@@ -3137,7 +3144,7 @@ export default class hitbtc extends Exchange {
3137
3144
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
3138
3145
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
3139
3146
  * @param {bool} [params.margin] true for adding spot-margin
3140
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
3147
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
3141
3148
  */
3142
3149
  return await this.modifyMarginHelper(symbol, amount, 'add', params);
3143
3150
  }
@@ -3150,7 +3157,7 @@ export default class hitbtc extends Exchange {
3150
3157
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
3151
3158
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
3152
3159
  * @param {bool} [params.margin] true for fetching spot-margin leverage
3153
- * @returns {object} a [leverage structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-structure}
3160
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
3154
3161
  */
3155
3162
  await this.loadMarkets();
3156
3163
  const market = this.market(symbol);
@@ -3209,7 +3216,9 @@ export default class hitbtc extends Exchange {
3209
3216
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
3210
3217
  * @returns {object} response from the exchange
3211
3218
  */
3212
- this.checkRequiredSymbol('setLeverage', symbol);
3219
+ if (symbol === undefined) {
3220
+ throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
3221
+ }
3213
3222
  await this.loadMarkets();
3214
3223
  if (params['margin_balance'] === undefined) {
3215
3224
  throw new ArgumentsRequired(this.id + ' setLeverage() requires a margin_balance parameter that will transfer margin to the specified trading pair');
@@ -3239,7 +3248,7 @@ export default class hitbtc extends Exchange {
3239
3248
  * @see https://api.hitbtc.com/#currencies
3240
3249
  * @param {string[]|undefined} codes list of unified currency codes
3241
3250
  * @param {object} [params] extra parameters specific to the hitbtc api endpoint
3242
- * @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
3251
+ * @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
3243
3252
  */
3244
3253
  await this.loadMarkets();
3245
3254
  const response = await this.publicGetPublicCurrency(params);