ccxt 4.1.56 → 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 (316) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/README.md +3 -3
  3. package/build.sh +30 -18
  4. package/dist/ccxt.browser.js +3872 -3202
  5. package/dist/ccxt.browser.min.js +10 -10
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/ace.js +17 -13
  8. package/dist/cjs/src/alpaca.js +6 -6
  9. package/dist/cjs/src/ascendex.js +35 -29
  10. package/dist/cjs/src/base/Exchange.js +39 -26
  11. package/dist/cjs/src/base/Precise.js +1 -3
  12. package/dist/cjs/src/bigone.js +24 -20
  13. package/dist/cjs/src/binance.js +97 -76
  14. package/dist/cjs/src/bingx.js +63 -44
  15. package/dist/cjs/src/bit2c.js +18 -15
  16. package/dist/cjs/src/bitbank.js +16 -15
  17. package/dist/cjs/src/bitbns.js +28 -18
  18. package/dist/cjs/src/bitfinex.js +23 -21
  19. package/dist/cjs/src/bitfinex2.js +32 -28
  20. package/dist/cjs/src/bitflyer.js +28 -20
  21. package/dist/cjs/src/bitforex.js +25 -18
  22. package/dist/cjs/src/bitget.js +184 -147
  23. package/dist/cjs/src/bithumb.js +23 -16
  24. package/dist/cjs/src/bitmart.js +106 -85
  25. package/dist/cjs/src/bitmex.js +104 -64
  26. package/dist/cjs/src/bitopro.js +38 -26
  27. package/dist/cjs/src/bitpanda.js +24 -23
  28. package/dist/cjs/src/bitrue.js +33 -24
  29. package/dist/cjs/src/bitso.js +24 -23
  30. package/dist/cjs/src/bitstamp.js +24 -23
  31. package/dist/cjs/src/bittrex.js +30 -29
  32. package/dist/cjs/src/bitvavo.js +38 -30
  33. package/dist/cjs/src/bl3p.js +11 -10
  34. package/dist/cjs/src/blockchaincom.js +20 -20
  35. package/dist/cjs/src/btcalpha.js +18 -17
  36. package/dist/cjs/src/btcbox.js +13 -12
  37. package/dist/cjs/src/btcmarkets.js +20 -19
  38. package/dist/cjs/src/btcturk.js +14 -13
  39. package/dist/cjs/src/bybit.js +84 -54
  40. package/dist/cjs/src/cex.js +16 -14
  41. package/dist/cjs/src/coinbase.js +29 -27
  42. package/dist/cjs/src/coinbasepro.js +27 -25
  43. package/dist/cjs/src/coincheck.js +15 -14
  44. package/dist/cjs/src/coinex.js +100 -77
  45. package/dist/cjs/src/coinlist.js +28 -27
  46. package/dist/cjs/src/coinmate.js +20 -17
  47. package/dist/cjs/src/coinone.js +21 -16
  48. package/dist/cjs/src/coinsph.js +37 -28
  49. package/dist/cjs/src/coinspot.js +12 -11
  50. package/dist/cjs/src/cryptocom.js +40 -202
  51. package/dist/cjs/src/currencycom.js +32 -25
  52. package/dist/cjs/src/delta.js +34 -28
  53. package/dist/cjs/src/deribit.js +39 -36
  54. package/dist/cjs/src/digifinex.js +64 -44
  55. package/dist/cjs/src/exmo.js +29 -27
  56. package/dist/cjs/src/gate.js +67 -53
  57. package/dist/cjs/src/gemini.js +23 -20
  58. package/dist/cjs/src/hitbtc.js +65 -56
  59. package/dist/cjs/src/hollaex.js +30 -27
  60. package/dist/cjs/src/htx.js +132 -143
  61. package/dist/cjs/src/huobijp.js +22 -20
  62. package/dist/cjs/src/idex.js +22 -21
  63. package/dist/cjs/src/independentreserve.js +15 -14
  64. package/dist/cjs/src/indodax.js +30 -26
  65. package/dist/cjs/src/kraken.js +29 -27
  66. package/dist/cjs/src/krakenfutures.js +29 -22
  67. package/dist/cjs/src/kucoin.js +48 -43
  68. package/dist/cjs/src/kucoinfutures.js +33 -28
  69. package/dist/cjs/src/kuna.js +25 -24
  70. package/dist/cjs/src/latoken.js +24 -22
  71. package/dist/cjs/src/lbank.js +45 -30
  72. package/dist/cjs/src/luno.js +22 -19
  73. package/dist/cjs/src/lykke.js +19 -17
  74. package/dist/cjs/src/mercado.js +30 -19
  75. package/dist/cjs/src/mexc.js +60 -49
  76. package/dist/cjs/src/ndax.js +23 -22
  77. package/dist/cjs/src/novadax.js +23 -22
  78. package/dist/cjs/src/oceanex.js +22 -19
  79. package/dist/cjs/src/okcoin.js +29 -23
  80. package/dist/cjs/src/okx.js +87 -82
  81. package/dist/cjs/src/p2b.js +79 -82
  82. package/dist/cjs/src/paymium.js +10 -10
  83. package/dist/cjs/src/phemex.js +63 -40
  84. package/dist/cjs/src/poloniex.js +22 -22
  85. package/dist/cjs/src/poloniexfutures.js +23 -19
  86. package/dist/cjs/src/pro/alpaca.js +5 -5
  87. package/dist/cjs/src/pro/ascendex.js +4 -4
  88. package/dist/cjs/src/pro/binance.js +16 -16
  89. package/dist/cjs/src/pro/bingx.js +1 -1
  90. package/dist/cjs/src/pro/bitfinex.js +4 -4
  91. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  92. package/dist/cjs/src/pro/bitget.js +7 -7
  93. package/dist/cjs/src/pro/bitmart.js +7 -5
  94. package/dist/cjs/src/pro/bitmex.js +6 -6
  95. package/dist/cjs/src/pro/bitopro.js +4 -4
  96. package/dist/cjs/src/pro/bitpanda.js +6 -6
  97. package/dist/cjs/src/pro/bitrue.js +2 -2
  98. package/dist/cjs/src/pro/bitstamp.js +6 -4
  99. package/dist/cjs/src/pro/bittrex.js +6 -6
  100. package/dist/cjs/src/pro/bitvavo.js +11 -7
  101. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  102. package/dist/cjs/src/pro/bybit.js +7 -7
  103. package/dist/cjs/src/pro/cex.js +13 -9
  104. package/dist/cjs/src/pro/coinbase.js +5 -5
  105. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  106. package/dist/cjs/src/pro/coinex.js +7 -9
  107. package/dist/cjs/src/pro/cryptocom.js +9 -9
  108. package/dist/cjs/src/pro/currencycom.js +4 -4
  109. package/dist/cjs/src/pro/deribit.js +6 -6
  110. package/dist/cjs/src/pro/exmo.js +12 -14
  111. package/dist/cjs/src/pro/gate.js +7 -7
  112. package/dist/cjs/src/pro/gemini.js +3 -3
  113. package/dist/cjs/src/pro/hitbtc.js +263 -4
  114. package/dist/cjs/src/pro/hollaex.js +5 -5
  115. package/dist/cjs/src/pro/htx.js +6 -6
  116. package/dist/cjs/src/pro/huobijp.js +3 -3
  117. package/dist/cjs/src/pro/idex.js +4 -4
  118. package/dist/cjs/src/pro/independentreserve.js +2 -2
  119. package/dist/cjs/src/pro/kraken.js +10 -10
  120. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  121. package/dist/cjs/src/pro/kucoin.js +7 -7
  122. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  123. package/dist/cjs/src/pro/luno.js +2 -2
  124. package/dist/cjs/src/pro/mexc.js +6 -6
  125. package/dist/cjs/src/pro/ndax.js +3 -3
  126. package/dist/cjs/src/pro/okcoin.js +5 -5
  127. package/dist/cjs/src/pro/okx.js +12 -12
  128. package/dist/cjs/src/pro/phemex.js +6 -6
  129. package/dist/cjs/src/pro/poloniex.js +7 -7
  130. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  131. package/dist/cjs/src/pro/probit.js +6 -6
  132. package/dist/cjs/src/pro/upbit.js +3 -3
  133. package/dist/cjs/src/pro/wazirx.js +8 -8
  134. package/dist/cjs/src/pro/whitebit.js +12 -8
  135. package/dist/cjs/src/pro/woo.js +1 -1
  136. package/dist/cjs/src/probit.js +28 -23
  137. package/dist/cjs/src/tidex.js +16 -15
  138. package/dist/cjs/src/timex.js +19 -18
  139. package/dist/cjs/src/tokocrypto.js +27 -22
  140. package/dist/cjs/src/upbit.js +19 -19
  141. package/dist/cjs/src/wavesexchange.js +22 -19
  142. package/dist/cjs/src/wazirx.js +24 -17
  143. package/dist/cjs/src/whitebit.js +33 -27
  144. package/dist/cjs/src/woo.js +44 -34
  145. package/dist/cjs/src/yobit.js +25 -20
  146. package/dist/cjs/src/zaif.js +9 -9
  147. package/dist/cjs/src/zonda.js +18 -17
  148. package/js/ccxt.d.ts +1 -1
  149. package/js/ccxt.js +1 -1
  150. package/js/src/abstract/bybit.d.ts +1 -0
  151. package/js/src/abstract/cryptocom.d.ts +0 -20
  152. package/js/src/ace.js +18 -14
  153. package/js/src/alpaca.js +6 -6
  154. package/js/src/ascendex.js +35 -29
  155. package/js/src/base/Exchange.d.ts +37 -34
  156. package/js/src/base/Exchange.js +39 -26
  157. package/js/src/base/Precise.d.ts +4 -4
  158. package/js/src/base/Precise.js +1 -3
  159. package/js/src/base/functions/type.d.ts +25 -25
  160. package/js/src/base/types.d.ts +21 -14
  161. package/js/src/bigone.js +25 -21
  162. package/js/src/binance.d.ts +2 -2
  163. package/js/src/binance.js +97 -76
  164. package/js/src/bingx.js +63 -44
  165. package/js/src/bit2c.js +19 -16
  166. package/js/src/bitbank.js +16 -15
  167. package/js/src/bitbns.js +28 -18
  168. package/js/src/bitfinex.js +23 -21
  169. package/js/src/bitfinex2.js +32 -28
  170. package/js/src/bitflyer.js +28 -20
  171. package/js/src/bitforex.js +26 -19
  172. package/js/src/bitget.d.ts +25 -3
  173. package/js/src/bitget.js +184 -147
  174. package/js/src/bithumb.js +23 -16
  175. package/js/src/bitmart.d.ts +1 -1
  176. package/js/src/bitmart.js +106 -85
  177. package/js/src/bitmex.d.ts +2 -2
  178. package/js/src/bitmex.js +104 -64
  179. package/js/src/bitopro.js +38 -26
  180. package/js/src/bitpanda.js +24 -23
  181. package/js/src/bitrue.js +33 -24
  182. package/js/src/bitso.js +24 -23
  183. package/js/src/bitstamp.d.ts +2 -2
  184. package/js/src/bitstamp.js +24 -23
  185. package/js/src/bittrex.js +30 -29
  186. package/js/src/bitvavo.js +38 -30
  187. package/js/src/bl3p.js +11 -10
  188. package/js/src/blockchaincom.js +20 -20
  189. package/js/src/btcalpha.js +18 -17
  190. package/js/src/btcbox.js +13 -12
  191. package/js/src/btcmarkets.js +20 -19
  192. package/js/src/btcturk.js +14 -13
  193. package/js/src/bybit.d.ts +1 -1
  194. package/js/src/bybit.js +84 -54
  195. package/js/src/cex.js +16 -14
  196. package/js/src/coinbase.js +29 -27
  197. package/js/src/coinbasepro.js +27 -25
  198. package/js/src/coincheck.js +15 -14
  199. package/js/src/coinex.d.ts +1 -1
  200. package/js/src/coinex.js +100 -77
  201. package/js/src/coinlist.js +28 -27
  202. package/js/src/coinmate.js +21 -18
  203. package/js/src/coinone.js +21 -16
  204. package/js/src/coinsph.js +37 -28
  205. package/js/src/coinspot.js +12 -11
  206. package/js/src/cryptocom.d.ts +0 -23
  207. package/js/src/cryptocom.js +40 -202
  208. package/js/src/currencycom.js +32 -25
  209. package/js/src/delta.js +35 -29
  210. package/js/src/deribit.js +39 -36
  211. package/js/src/digifinex.d.ts +2 -2
  212. package/js/src/digifinex.js +65 -45
  213. package/js/src/exmo.js +29 -27
  214. package/js/src/gate.d.ts +1 -1
  215. package/js/src/gate.js +67 -53
  216. package/js/src/gemini.js +23 -20
  217. package/js/src/hitbtc.d.ts +1 -0
  218. package/js/src/hitbtc.js +65 -56
  219. package/js/src/hollaex.js +30 -27
  220. package/js/src/htx.d.ts +11 -3
  221. package/js/src/htx.js +132 -143
  222. package/js/src/huobijp.js +23 -21
  223. package/js/src/idex.js +22 -21
  224. package/js/src/independentreserve.js +15 -14
  225. package/js/src/indodax.js +30 -26
  226. package/js/src/kraken.js +29 -27
  227. package/js/src/krakenfutures.js +29 -22
  228. package/js/src/kucoin.d.ts +1 -1
  229. package/js/src/kucoin.js +48 -43
  230. package/js/src/kucoinfutures.js +33 -28
  231. package/js/src/kuna.js +25 -24
  232. package/js/src/latoken.js +25 -23
  233. package/js/src/lbank.js +46 -31
  234. package/js/src/luno.js +22 -19
  235. package/js/src/lykke.js +19 -17
  236. package/js/src/mercado.js +30 -19
  237. package/js/src/mexc.d.ts +1 -1
  238. package/js/src/mexc.js +60 -49
  239. package/js/src/ndax.js +23 -22
  240. package/js/src/novadax.js +23 -22
  241. package/js/src/oceanex.js +22 -19
  242. package/js/src/okcoin.js +29 -23
  243. package/js/src/okx.d.ts +2 -2
  244. package/js/src/okx.js +87 -82
  245. package/js/src/p2b.d.ts +8 -7
  246. package/js/src/p2b.js +79 -81
  247. package/js/src/paymium.js +10 -10
  248. package/js/src/phemex.js +63 -40
  249. package/js/src/poloniex.js +22 -22
  250. package/js/src/poloniexfutures.js +23 -19
  251. package/js/src/pro/alpaca.js +5 -5
  252. package/js/src/pro/ascendex.js +4 -4
  253. package/js/src/pro/binance.js +16 -16
  254. package/js/src/pro/bingx.js +1 -1
  255. package/js/src/pro/bitfinex.js +4 -4
  256. package/js/src/pro/bitfinex2.d.ts +1 -1
  257. package/js/src/pro/bitfinex2.js +6 -6
  258. package/js/src/pro/bitget.js +7 -7
  259. package/js/src/pro/bitmart.js +7 -5
  260. package/js/src/pro/bitmex.js +6 -6
  261. package/js/src/pro/bitopro.js +4 -4
  262. package/js/src/pro/bitpanda.js +6 -6
  263. package/js/src/pro/bitrue.js +2 -2
  264. package/js/src/pro/bitstamp.js +7 -5
  265. package/js/src/pro/bittrex.js +6 -6
  266. package/js/src/pro/bitvavo.js +12 -8
  267. package/js/src/pro/blockchaincom.js +8 -8
  268. package/js/src/pro/bybit.js +7 -7
  269. package/js/src/pro/cex.js +14 -10
  270. package/js/src/pro/coinbase.js +5 -5
  271. package/js/src/pro/coinbasepro.js +12 -11
  272. package/js/src/pro/coinex.js +7 -9
  273. package/js/src/pro/cryptocom.js +9 -9
  274. package/js/src/pro/currencycom.js +4 -4
  275. package/js/src/pro/deribit.js +6 -6
  276. package/js/src/pro/exmo.js +12 -14
  277. package/js/src/pro/gate.js +7 -7
  278. package/js/src/pro/gemini.js +3 -3
  279. package/js/src/pro/hitbtc.d.ts +8 -1
  280. package/js/src/pro/hitbtc.js +264 -5
  281. package/js/src/pro/hollaex.js +5 -5
  282. package/js/src/pro/htx.js +6 -6
  283. package/js/src/pro/huobijp.js +3 -3
  284. package/js/src/pro/idex.js +4 -4
  285. package/js/src/pro/independentreserve.js +2 -2
  286. package/js/src/pro/kraken.js +10 -10
  287. package/js/src/pro/krakenfutures.d.ts +1 -0
  288. package/js/src/pro/krakenfutures.js +42 -18
  289. package/js/src/pro/kucoin.js +7 -7
  290. package/js/src/pro/kucoinfutures.js +8 -6
  291. package/js/src/pro/luno.js +2 -2
  292. package/js/src/pro/mexc.js +6 -6
  293. package/js/src/pro/ndax.js +3 -3
  294. package/js/src/pro/okcoin.js +5 -5
  295. package/js/src/pro/okx.js +12 -12
  296. package/js/src/pro/phemex.js +6 -6
  297. package/js/src/pro/poloniex.js +7 -7
  298. package/js/src/pro/poloniexfutures.js +5 -5
  299. package/js/src/pro/probit.js +6 -6
  300. package/js/src/pro/upbit.js +3 -3
  301. package/js/src/pro/wazirx.js +8 -8
  302. package/js/src/pro/whitebit.js +13 -9
  303. package/js/src/pro/woo.js +1 -1
  304. package/js/src/probit.js +29 -24
  305. package/js/src/tidex.js +16 -15
  306. package/js/src/timex.js +19 -18
  307. package/js/src/tokocrypto.js +28 -23
  308. package/js/src/upbit.js +19 -19
  309. package/js/src/wavesexchange.js +23 -20
  310. package/js/src/wazirx.js +25 -18
  311. package/js/src/whitebit.js +33 -27
  312. package/js/src/woo.js +45 -35
  313. package/js/src/yobit.js +25 -20
  314. package/js/src/zaif.js +9 -9
  315. package/js/src/zonda.js +18 -17
  316. package/package.json +1 -1
@@ -364,13 +364,12 @@ export default class Exchange {
364
364
  'fetchBalance': true,
365
365
  'fetchBidsAsks': undefined,
366
366
  'fetchBorrowInterest': undefined,
367
- 'fetchBorrowRate': undefined,
368
367
  'fetchBorrowRateHistory': undefined,
369
- 'fetchBorrowRatesPerSymbol': undefined,
370
- 'fetchBorrowRates': undefined,
371
368
  'fetchCanceledOrders': undefined,
372
369
  'fetchClosedOrder': undefined,
373
370
  'fetchClosedOrders': undefined,
371
+ 'fetchCrossBorrowRate': undefined,
372
+ 'fetchCrossBorrowRates': undefined,
374
373
  'fetchCurrencies': 'emulated',
375
374
  'fetchDeposit': undefined,
376
375
  'fetchDepositAddress': undefined,
@@ -385,6 +384,8 @@ export default class Exchange {
385
384
  'fetchFundingRateHistory': undefined,
386
385
  'fetchFundingRates': undefined,
387
386
  'fetchIndexOHLCV': undefined,
387
+ 'fetchIsolatedBorrowRate': undefined,
388
+ 'fetchIsolatedBorrowRates': undefined,
388
389
  'fetchL2OrderBook': true,
389
390
  'fetchLastPrices': undefined,
390
391
  'fetchLedger': undefined,
@@ -1406,8 +1407,11 @@ export default class Exchange {
1406
1407
  parseOrder(order, market = undefined) {
1407
1408
  throw new NotSupported(this.id + ' parseOrder() is not supported yet');
1408
1409
  }
1409
- async fetchBorrowRates(params = {}) {
1410
- throw new NotSupported(this.id + ' fetchBorrowRates() is not supported yet');
1410
+ async fetchCrossBorrowRates(params = {}) {
1411
+ throw new NotSupported(this.id + ' fetchCrossBorrowRates() is not supported yet');
1412
+ }
1413
+ async fetchIsolatedBorrowRates(params = {}) {
1414
+ throw new NotSupported(this.id + ' fetchIsolatedBorrowRates() is not supported yet');
1411
1415
  }
1412
1416
  parseMarketLeverageTiers(info, market = undefined) {
1413
1417
  throw new NotSupported(this.id + ' parseMarketLeverageTiers() is not supported yet');
@@ -1461,14 +1465,20 @@ export default class Exchange {
1461
1465
  parseToNumeric(number) {
1462
1466
  const stringVersion = this.numberToString(number); // this will convert 1.0 and 1 to "1" and 1.1 to "1.1"
1463
1467
  // keep this in mind:
1464
- // in JS: 1 == 1.0 is true
1468
+ // in JS: 1 == 1.0 is true; 1 === 1.0 is true
1465
1469
  // in Python: 1 == 1.0 is true
1466
- // in PHP 1 == 1.0 is false
1467
- if (stringVersion.indexOf('.') > 0) {
1470
+ // in PHP 1 == 1.0 is true, but 1 === 1.0 is false
1471
+ if (stringVersion.indexOf('.') >= 0) {
1468
1472
  return parseFloat(stringVersion);
1469
1473
  }
1470
1474
  return parseInt(stringVersion);
1471
1475
  }
1476
+ isRoundNumber(value) {
1477
+ // this method is similar to isInteger, but this is more loyal and does not check for types.
1478
+ // i.e. isRoundNumber(1.000) returns true, while isInteger(1.000) returns false
1479
+ const res = this.parseToNumeric((value % 1));
1480
+ return res === 0;
1481
+ }
1472
1482
  afterConstruct() {
1473
1483
  this.createNetworksByIdObject();
1474
1484
  }
@@ -2994,7 +3004,7 @@ export default class Exchange {
2994
3004
  * @description specifically fetches positions for specific symbol, unlike fetchPositions (which can work with multiple symbols, but because of that, it might be slower & more rate-limit consuming)
2995
3005
  * @param {string} symbol unified market symbol of the market the position is held in
2996
3006
  * @param {object} params extra parameters specific to the endpoint
2997
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure} with maximum 3 items - one position for "one-way" mode, and two positions (long & short) for "two-way" (a.k.a. hedge) mode
3007
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - one position for "one-way" mode, and two positions (long & short) for "two-way" (a.k.a. hedge) mode
2998
3008
  */
2999
3009
  throw new NotSupported(this.id + ' fetchPositionsBySymbol() is not supported yet');
3000
3010
  }
@@ -3171,15 +3181,27 @@ export default class Exchange {
3171
3181
  throw new NotSupported(this.id + ' ' + key + ' does not have a value in mapping');
3172
3182
  }
3173
3183
  }
3174
- async fetchBorrowRate(code, params = {}) {
3184
+ async fetchCrossBorrowRate(code, params = {}) {
3175
3185
  await this.loadMarkets();
3176
3186
  if (!this.has['fetchBorrowRates']) {
3177
- throw new NotSupported(this.id + ' fetchBorrowRate() is not supported yet');
3187
+ throw new NotSupported(this.id + ' fetchCrossBorrowRate() is not supported yet');
3178
3188
  }
3179
- const borrowRates = await this.fetchBorrowRates(params);
3189
+ const borrowRates = await this.fetchCrossBorrowRates(params);
3180
3190
  const rate = this.safeValue(borrowRates, code);
3181
3191
  if (rate === undefined) {
3182
- throw new ExchangeError(this.id + ' fetchBorrowRate() could not find the borrow rate for currency code ' + code);
3192
+ throw new ExchangeError(this.id + ' fetchCrossBorrowRate() could not find the borrow rate for currency code ' + code);
3193
+ }
3194
+ return rate;
3195
+ }
3196
+ async fetchIsolatedBorrowRate(symbol, params = {}) {
3197
+ await this.loadMarkets();
3198
+ if (!this.has['fetchBorrowRates']) {
3199
+ throw new NotSupported(this.id + ' fetchIsolatedBorrowRate() is not supported yet');
3200
+ }
3201
+ const borrowRates = await this.fetchIsolatedBorrowRates(params);
3202
+ const rate = this.safeValue(borrowRates, symbol);
3203
+ if (rate === undefined) {
3204
+ throw new ExchangeError(this.id + ' fetchIsolatedBorrowRate() could not find the borrow rate for market symbol ' + symbol);
3183
3205
  }
3184
3206
  return rate;
3185
3207
  }
@@ -3417,7 +3439,7 @@ export default class Exchange {
3417
3439
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
3418
3440
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
3419
3441
  * @param {object} [params] extra parameters specific to the exchange api endpoint
3420
- * @returns {object} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3442
+ * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3421
3443
  */
3422
3444
  throw new NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
3423
3445
  }
@@ -4071,15 +4093,6 @@ export default class Exchange {
4071
4093
  throw new ArgumentsRequired(this.id + ' ' + methodName + '() cannot have a symbol argument for cross margin');
4072
4094
  }
4073
4095
  }
4074
- checkRequiredSymbol(methodName, symbol) {
4075
- /**
4076
- * @ignore
4077
- * @method
4078
- * @param {string} symbol unified symbol of the market
4079
- * @param {string} methodName name of the method that requires a symbol
4080
- */
4081
- this.checkRequiredArgument(methodName, symbol, 'symbol');
4082
- }
4083
4096
  parseDepositWithdrawFees(response, codes = undefined, currencyIdKey = undefined) {
4084
4097
  /**
4085
4098
  * @ignore
@@ -4163,7 +4176,7 @@ export default class Exchange {
4163
4176
  * @param {object} market ccxt market
4164
4177
  * @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
4165
4178
  * @param {int} [limit] limits the number of items in the response
4166
- * @returns {object[]} an array of [funding history structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
4179
+ * @returns {object[]} an array of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
4167
4180
  */
4168
4181
  const result = [];
4169
4182
  for (let i = 0; i < incomes.length; i++) {
@@ -4199,7 +4212,7 @@ export default class Exchange {
4199
4212
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
4200
4213
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
4201
4214
  * @param {object} [params] extra parameters specific to the exchange api endpoint
4202
- * @returns {object} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4215
+ * @returns {object} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4203
4216
  */
4204
4217
  if (this.has['fetchDepositsWithdrawals']) {
4205
4218
  return await this.fetchDepositsWithdrawals(code, since, limit, params);
@@ -4554,7 +4567,7 @@ export default class Exchange {
4554
4567
  * @param {object} market ccxt market
4555
4568
  * @param {int} [since] when defined, the response items are filtered to only include items after this timestamp
4556
4569
  * @param {int} [limit] limits the number of items in the response
4557
- * @returns {object[]} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
4570
+ * @returns {object[]} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
4558
4571
  */
4559
4572
  const result = [];
4560
4573
  for (let i = 0; i < liquidations.length; i++) {
@@ -1,9 +1,9 @@
1
- import { Str } from "./types";
1
+ import { Str, Int } from './types';
2
2
  declare class Precise {
3
- decimals: any;
4
- integer: any;
3
+ decimals: number;
4
+ integer: bigint;
5
5
  base: any;
6
- constructor(number: any, decimals?: any);
6
+ constructor(number: any, decimals?: Int);
7
7
  mul(other: any): Precise;
8
8
  div(other: any, precision?: number): Precise;
9
9
  add(other: any): Precise;
@@ -9,8 +9,6 @@ const minusOne = BigInt(-1);
9
9
  const base = BigInt(10);
10
10
  class Precise {
11
11
  constructor(number, decimals = undefined) {
12
- this.decimals = undefined;
13
- this.integer = undefined;
14
12
  this.base = undefined;
15
13
  if (decimals === undefined) {
16
14
  let modifier = 0;
@@ -37,7 +35,7 @@ class Precise {
37
35
  }
38
36
  div(other, precision = 18) {
39
37
  const distance = precision - this.decimals + other.decimals;
40
- let numerator = undefined;
38
+ let numerator;
41
39
  if (distance === 0) {
42
40
  numerator = this.integer;
43
41
  }
@@ -1,4 +1,4 @@
1
- import { implicitReturnType, Int, Str } from '../types.js';
1
+ import { implicitReturnType, Int, Str, IndexType } from '../types.js';
2
2
  declare const isNumber: (number: unknown) => boolean;
3
3
  declare const isInteger: (number: unknown) => boolean;
4
4
  declare const isArray: (arg: any) => arg is any[];
@@ -10,28 +10,28 @@ declare const isStringCoercible: (x: any) => any;
10
10
  declare const prop: (o: any, k: any) => any;
11
11
  declare const asFloat: (x: any) => number;
12
12
  declare const asInteger: (x: any) => number;
13
- declare const safeFloat: (o: implicitReturnType, k: string | number, $default?: number) => number;
14
- declare const safeInteger: (o: implicitReturnType, k: string | number, $default?: number) => Int;
15
- declare const safeIntegerProduct: (o: implicitReturnType, k: string | number, $factor: number, $default?: number) => Int;
16
- declare const safeTimestamp: (o: implicitReturnType, k: string | number, $default?: number) => number;
17
- declare const safeValue: (o: implicitReturnType, k: string | number, $default?: any) => any;
18
- declare const safeString: (o: implicitReturnType, k: string | number, $default?: string) => Str;
19
- declare const safeStringLower: (o: implicitReturnType, k: string | number, $default?: string) => Str;
20
- declare const safeStringUpper: (o: implicitReturnType, k: string | number, $default?: string) => Str;
21
- declare const safeFloat2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: number) => number;
22
- declare const safeInteger2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: number) => Int;
23
- declare const safeIntegerProduct2: (o: implicitReturnType, k1: string | number, k2: string | number, $factor: number, $default?: number) => Int;
24
- declare const safeTimestamp2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: any) => Int;
25
- declare const safeValue2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: any) => any;
26
- declare const safeString2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: string) => Str;
27
- declare const safeStringLower2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: string) => Str;
28
- declare const safeStringUpper2: (o: implicitReturnType, k1: string | number, k2: string | number, $default?: string) => Str;
29
- declare const safeFloatN: (o: implicitReturnType, k: (string | number)[], $default?: number) => number;
30
- declare const safeIntegerN: (o: implicitReturnType, k: (string | number)[], $default?: number) => Int;
31
- declare const safeIntegerProductN: (o: implicitReturnType, k: (string | number)[], $factor: number, $default?: number) => Int;
32
- declare const safeTimestampN: (o: implicitReturnType, k: (string | number)[], $default?: number) => Int;
33
- declare const safeValueN: (o: implicitReturnType, k: (string | number)[], $default?: any) => any;
34
- declare const safeStringN: (o: implicitReturnType, k: (string | number)[], $default?: string) => Str;
35
- declare const safeStringLowerN: (o: implicitReturnType, k: (string | number)[], $default?: string) => Str;
36
- declare const safeStringUpperN: (o: implicitReturnType, k: (string | number)[], $default?: string) => Str;
13
+ declare const safeFloat: (o: implicitReturnType, k: IndexType, $default?: number) => number;
14
+ declare const safeInteger: (o: implicitReturnType, k: IndexType, $default?: number) => Int;
15
+ declare const safeIntegerProduct: (o: implicitReturnType, k: IndexType, $factor: number, $default?: number) => Int;
16
+ declare const safeTimestamp: (o: implicitReturnType, k: IndexType, $default?: number) => number;
17
+ declare const safeValue: (o: implicitReturnType, k: IndexType, $default?: any) => any;
18
+ declare const safeString: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
19
+ declare const safeStringLower: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
20
+ declare const safeStringUpper: (o: implicitReturnType, k: IndexType, $default?: string) => Str;
21
+ declare const safeFloat2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => number;
22
+ declare const safeInteger2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: number) => Int;
23
+ declare const safeIntegerProduct2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $factor: number, $default?: number) => Int;
24
+ declare const safeTimestamp2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: any) => Int;
25
+ declare const safeValue2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: any) => any;
26
+ declare const safeString2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
27
+ declare const safeStringLower2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
28
+ declare const safeStringUpper2: (o: implicitReturnType, k1: IndexType, k2: IndexType, $default?: string) => Str;
29
+ declare const safeFloatN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => number;
30
+ declare const safeIntegerN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
31
+ declare const safeIntegerProductN: (o: implicitReturnType, k: (IndexType)[], $factor: number, $default?: number) => Int;
32
+ declare const safeTimestampN: (o: implicitReturnType, k: (IndexType)[], $default?: number) => Int;
33
+ declare const safeValueN: (o: implicitReturnType, k: (IndexType)[], $default?: any) => any;
34
+ declare const safeStringN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
35
+ declare const safeStringLowerN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
36
+ declare const safeStringUpperN: (o: implicitReturnType, k: (IndexType)[], $default?: string) => Str;
37
37
  export { isNumber, isInteger, isArray, isObject, isString, isStringCoercible, isDictionary, hasProps, prop, asFloat, asInteger, safeFloat, safeInteger, safeIntegerProduct, safeTimestamp, safeValue, safeString, safeStringLower, safeStringUpper, safeFloat2, safeInteger2, safeIntegerProduct2, safeTimestamp2, safeValue2, safeString2, safeStringLower2, safeStringUpper2, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, };
@@ -3,8 +3,10 @@ export declare type Str = string | undefined;
3
3
  export declare type Strings = string[] | undefined;
4
4
  export declare type Num = number | undefined;
5
5
  export declare type Bool = boolean | undefined;
6
- export declare type Market = MarketInterface | undefined;
7
- export declare type Currency = CurrencyInterface | undefined;
6
+ export declare type IndexType = number | string;
7
+ export declare type OrderSide = 'buy' | 'sell' | string;
8
+ export declare type OrderType = 'limit' | 'market' | string;
9
+ export declare type MarketType = 'spot' | 'margin' | 'swap' | 'future' | 'option';
8
10
  export interface Dictionary<T> {
9
11
  [key: string]: T;
10
12
  }
@@ -13,12 +15,12 @@ export interface MinMax {
13
15
  min: Num;
14
16
  max: Num;
15
17
  }
16
- export interface Fee {
17
- type?: 'taker' | 'maker' | string;
18
- currency: string;
19
- rate?: number;
20
- cost: number;
18
+ export interface FeeInterface {
19
+ currency: Str;
20
+ cost: Num;
21
+ rate?: Num;
21
22
  }
23
+ export declare type Fee = FeeInterface | undefined;
22
24
  export interface MarketInterface {
23
25
  id: string;
24
26
  uppercaseId?: string;
@@ -29,7 +31,7 @@ export interface MarketInterface {
29
31
  baseId: string;
30
32
  quoteId: string;
31
33
  active: Bool;
32
- type: string;
34
+ type: MarketType;
33
35
  spot: boolean;
34
36
  margin: boolean;
35
37
  swap: boolean;
@@ -164,9 +166,15 @@ export interface CurrencyInterface {
164
166
  precision: number;
165
167
  }
166
168
  export interface Balance {
167
- free: number | string;
168
- used: number | string;
169
- total: number | string;
169
+ free: Num;
170
+ used: Num;
171
+ total: Num;
172
+ debt?: Num;
173
+ }
174
+ export interface Account {
175
+ free: Str;
176
+ used: Str;
177
+ total: Str;
170
178
  }
171
179
  export interface PartialBalances extends Dictionary<number> {
172
180
  }
@@ -295,6 +303,5 @@ export declare type OHLCV = [Num, Num, Num, Num, Num, Num];
295
303
  /** [ timestamp, open, high, low, close, volume, count ] */
296
304
  export declare type OHLCVC = [Num, Num, Num, Num, Num, Num, Num];
297
305
  export declare type implicitReturnType = any;
298
- export declare type IndexType = number | string;
299
- export declare type OrderSide = 'buy' | 'sell' | string;
300
- export declare type OrderType = 'limit' | 'market' | string;
306
+ export declare type Market = MarketInterface | undefined;
307
+ export declare type Currency = CurrencyInterface | undefined;
package/js/src/bigone.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import Exchange from './abstract/bigone.js';
9
- import { ExchangeError, AuthenticationError, InsufficientFunds, PermissionDenied, BadRequest, BadSymbol, RateLimitExceeded, InvalidOrder } from './base/errors.js';
9
+ import { ExchangeError, AuthenticationError, InsufficientFunds, PermissionDenied, BadRequest, BadSymbol, RateLimitExceeded, InvalidOrder, ArgumentsRequired } from './base/errors.js';
10
10
  import { TICK_SIZE } from './base/functions/number.js';
11
11
  import { jwt } from './base/functions/rsa.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
@@ -622,7 +622,7 @@ export default class bigone extends Exchange {
622
622
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
623
623
  * @param {string} symbol unified symbol of the market to fetch the ticker for
624
624
  * @param {object} [params] extra parameters specific to the bigone api endpoint
625
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
625
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
626
626
  */
627
627
  await this.loadMarkets();
628
628
  const market = this.market(symbol);
@@ -656,7 +656,7 @@ export default class bigone extends Exchange {
656
656
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
657
657
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
658
658
  * @param {object} [params] extra parameters specific to the bigone api endpoint
659
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
659
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
660
660
  */
661
661
  await this.loadMarkets();
662
662
  const request = {};
@@ -732,7 +732,7 @@ export default class bigone extends Exchange {
732
732
  * @param {string} symbol unified symbol of the market to fetch the order book for
733
733
  * @param {int} [limit] the maximum amount of order book entries to return
734
734
  * @param {object} [params] extra parameters specific to the bigone api endpoint
735
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
735
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
736
736
  */
737
737
  await this.loadMarkets();
738
738
  const market = this.market(symbol);
@@ -914,7 +914,7 @@ export default class bigone extends Exchange {
914
914
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
915
915
  * @param {int} [limit] the maximum amount of trades to fetch
916
916
  * @param {object} [params] extra parameters specific to the bigone api endpoint
917
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
917
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
918
918
  */
919
919
  await this.loadMarkets();
920
920
  const market = this.market(symbol);
@@ -1045,7 +1045,7 @@ export default class bigone extends Exchange {
1045
1045
  * @name bigone#fetchBalance
1046
1046
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1047
1047
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1048
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1048
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1049
1049
  */
1050
1050
  await this.loadMarkets();
1051
1051
  const type = this.safeString(params, 'type', '');
@@ -1174,7 +1174,7 @@ export default class bigone extends Exchange {
1174
1174
  * EXCHANGE SPECIFIC PARAMETERS
1175
1175
  * @param {string} operator *stop order only* GTE or LTE (default)
1176
1176
  * @param {string} client_order_id must match ^[a-zA-Z0-9-_]{1,36}$ this regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
1177
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1177
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1178
1178
  */
1179
1179
  await this.loadMarkets();
1180
1180
  const market = this.market(symbol);
@@ -1259,7 +1259,7 @@ export default class bigone extends Exchange {
1259
1259
  * @param {string} id order id
1260
1260
  * @param {string} symbol Not used by bigone cancelOrder ()
1261
1261
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1262
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1262
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1263
1263
  */
1264
1264
  await this.loadMarkets();
1265
1265
  const request = { 'id': id };
@@ -1286,7 +1286,7 @@ export default class bigone extends Exchange {
1286
1286
  * @description cancel all open orders
1287
1287
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1288
1288
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1289
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1289
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1290
1290
  */
1291
1291
  await this.loadMarkets();
1292
1292
  const market = this.market(symbol);
@@ -1315,7 +1315,7 @@ export default class bigone extends Exchange {
1315
1315
  * @description fetches information on an order made by the user
1316
1316
  * @param {string} symbol not used by bigone fetchOrder
1317
1317
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1318
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1318
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1319
1319
  */
1320
1320
  await this.loadMarkets();
1321
1321
  const request = { 'id': id };
@@ -1332,9 +1332,11 @@ export default class bigone extends Exchange {
1332
1332
  * @param {int} [since] the earliest time in ms to fetch orders for
1333
1333
  * @param {int} [limit] the maximum number of orde structures to retrieve
1334
1334
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1335
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1335
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1336
1336
  */
1337
- this.checkRequiredSymbol('fetchOrders', symbol);
1337
+ if (symbol === undefined) {
1338
+ throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
1339
+ }
1338
1340
  await this.loadMarkets();
1339
1341
  const market = this.market(symbol);
1340
1342
  const request = {
@@ -1380,9 +1382,11 @@ export default class bigone extends Exchange {
1380
1382
  * @param {int} [since] the earliest time in ms to fetch trades for
1381
1383
  * @param {int} [limit] the maximum number of trades structures to retrieve
1382
1384
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1383
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1385
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1384
1386
  */
1385
- this.checkRequiredSymbol('fetchMyTrades', symbol);
1387
+ if (symbol === undefined) {
1388
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
1389
+ }
1386
1390
  await this.loadMarkets();
1387
1391
  const market = this.market(symbol);
1388
1392
  const request = {
@@ -1447,7 +1451,7 @@ export default class bigone extends Exchange {
1447
1451
  * @param {int} [since] the earliest time in ms to fetch open orders for
1448
1452
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1449
1453
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1450
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1454
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1451
1455
  */
1452
1456
  const request = {
1453
1457
  'state': 'PENDING',
@@ -1463,7 +1467,7 @@ export default class bigone extends Exchange {
1463
1467
  * @param {int} [since] the earliest time in ms to fetch orders for
1464
1468
  * @param {int} [limit] the maximum number of orde structures to retrieve
1465
1469
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1466
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1470
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1467
1471
  */
1468
1472
  const request = {
1469
1473
  'state': 'FILLED',
@@ -1515,7 +1519,7 @@ export default class bigone extends Exchange {
1515
1519
  * @description fetch the deposit address for a currency associated with this account
1516
1520
  * @param {string} code unified currency code
1517
1521
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1518
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1522
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1519
1523
  */
1520
1524
  await this.loadMarkets();
1521
1525
  const currency = this.currency(code);
@@ -1667,7 +1671,7 @@ export default class bigone extends Exchange {
1667
1671
  * @param {int} [since] the earliest time in ms to fetch deposits for
1668
1672
  * @param {int} [limit] the maximum number of deposits structures to retrieve
1669
1673
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1670
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1674
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1671
1675
  */
1672
1676
  await this.loadMarkets();
1673
1677
  const request = {
@@ -1718,7 +1722,7 @@ export default class bigone extends Exchange {
1718
1722
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
1719
1723
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1720
1724
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1721
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1725
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1722
1726
  */
1723
1727
  await this.loadMarkets();
1724
1728
  const request = {
@@ -1771,7 +1775,7 @@ export default class bigone extends Exchange {
1771
1775
  * @param {string} fromAccount 'SPOT', 'FUND', or 'CONTRACT'
1772
1776
  * @param {string} toAccount 'SPOT', 'FUND', or 'CONTRACT'
1773
1777
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1774
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
1778
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1775
1779
  */
1776
1780
  await this.loadMarkets();
1777
1781
  const currency = this.currency(code);
@@ -1842,7 +1846,7 @@ export default class bigone extends Exchange {
1842
1846
  * @param {string} address the address to withdraw to
1843
1847
  * @param {string} tag
1844
1848
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1845
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1849
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1846
1850
  */
1847
1851
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1848
1852
  await this.loadMarkets();
@@ -20,7 +20,7 @@ export default class binance extends Exchange {
20
20
  fetchCurrencies(params?: {}): Promise<{}>;
21
21
  fetchMarkets(params?: {}): Promise<any[]>;
22
22
  parseMarket(market: any): Market;
23
- parseBalanceHelper(entry: any): import("./base/types.js").Balance;
23
+ parseBalanceHelper(entry: any): import("./base/types.js").Account;
24
24
  parseBalance(response: any, type?: any, marginMode?: any): Balances;
25
25
  fetchBalance(params?: {}): Promise<Balances>;
26
26
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
@@ -318,7 +318,7 @@ export default class binance extends Exchange {
318
318
  };
319
319
  reduceMargin(symbol: string, amount: any, params?: {}): Promise<any>;
320
320
  addMargin(symbol: string, amount: any, params?: {}): Promise<any>;
321
- fetchBorrowRate(code: string, params?: {}): Promise<{
321
+ fetchCrossBorrowRate(code: string, params?: {}): Promise<{
322
322
  currency: string;
323
323
  rate: number;
324
324
  period: number;