ccxt 4.2.31 → 4.2.34

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 (298) hide show
  1. package/.gitattributes +1 -0
  2. package/CONTRIBUTING.md +20 -1
  3. package/README.md +8 -7
  4. package/build.sh +9 -2
  5. package/cleanup.sh +3 -0
  6. package/dist/ccxt.browser.js +639 -483
  7. package/dist/ccxt.browser.min.js +3 -3
  8. package/dist/cjs/ccxt.js +1 -1
  9. package/dist/cjs/src/ace.js +3 -2
  10. package/dist/cjs/src/ascendex.js +1 -1
  11. package/dist/cjs/src/base/Exchange.js +54 -20
  12. package/dist/cjs/src/bigone.js +21 -1
  13. package/dist/cjs/src/binance.js +5 -4
  14. package/dist/cjs/src/bingx.js +4 -3
  15. package/dist/cjs/src/bit2c.js +12 -0
  16. package/dist/cjs/src/bitget.js +3 -3
  17. package/dist/cjs/src/bitmart.js +1 -1
  18. package/dist/cjs/src/bitrue.js +3 -3
  19. package/dist/cjs/src/blockchaincom.js +1 -1
  20. package/dist/cjs/src/bybit.js +1 -1
  21. package/dist/cjs/src/coinbase.js +2 -2
  22. package/dist/cjs/src/coinex.js +1 -1
  23. package/dist/cjs/src/cryptocom.js +10 -10
  24. package/dist/cjs/src/gate.js +34 -29
  25. package/dist/cjs/src/kraken.js +39 -0
  26. package/dist/cjs/src/kucoin.js +1 -1
  27. package/dist/cjs/src/mexc.js +2 -1
  28. package/dist/cjs/src/okx.js +4 -3
  29. package/dist/cjs/src/phemex.js +8 -8
  30. package/dist/cjs/src/pro/alpaca.js +8 -4
  31. package/dist/cjs/src/pro/ascendex.js +1 -2
  32. package/dist/cjs/src/pro/binance.js +14 -10
  33. package/dist/cjs/src/pro/bingx.js +1 -1
  34. package/dist/cjs/src/pro/bitfinex.js +21 -24
  35. package/dist/cjs/src/pro/bitfinex2.js +13 -17
  36. package/dist/cjs/src/pro/bitget.js +3 -1
  37. package/dist/cjs/src/pro/bitmart.js +3 -8
  38. package/dist/cjs/src/pro/bitmex.js +4 -7
  39. package/dist/cjs/src/pro/bitopro.js +2 -5
  40. package/dist/cjs/src/pro/bitrue.js +1 -1
  41. package/dist/cjs/src/pro/bitstamp.js +2 -3
  42. package/dist/cjs/src/pro/bitvavo.js +12 -5
  43. package/dist/cjs/src/pro/blockchaincom.js +22 -23
  44. package/dist/cjs/src/pro/bybit.js +5 -5
  45. package/dist/cjs/src/pro/cex.js +7 -7
  46. package/dist/cjs/src/pro/coinbase.js +3 -2
  47. package/dist/cjs/src/pro/coinbasepro.js +1 -1
  48. package/dist/cjs/src/pro/coinex.js +15 -13
  49. package/dist/cjs/src/pro/currencycom.js +5 -7
  50. package/dist/cjs/src/pro/deribit.js +4 -4
  51. package/dist/cjs/src/pro/exmo.js +15 -13
  52. package/dist/cjs/src/pro/gate.js +1 -1
  53. package/dist/cjs/src/pro/gemini.js +4 -2
  54. package/dist/cjs/src/pro/hitbtc.js +9 -8
  55. package/dist/cjs/src/pro/hollaex.js +2 -2
  56. package/dist/cjs/src/pro/htx.js +6 -7
  57. package/dist/cjs/src/pro/huobijp.js +3 -5
  58. package/dist/cjs/src/pro/idex.js +1 -1
  59. package/dist/cjs/src/pro/independentreserve.js +14 -13
  60. package/dist/cjs/src/pro/kraken.js +10 -16
  61. package/dist/cjs/src/pro/krakenfutures.js +10 -6
  62. package/dist/cjs/src/pro/kucoin.js +10 -11
  63. package/dist/cjs/src/pro/kucoinfutures.js +12 -11
  64. package/dist/cjs/src/pro/lbank.js +10 -10
  65. package/dist/cjs/src/pro/luno.js +12 -14
  66. package/dist/cjs/src/pro/mexc.js +3 -2
  67. package/dist/cjs/src/pro/ndax.js +7 -13
  68. package/dist/cjs/src/pro/okcoin.js +7 -12
  69. package/dist/cjs/src/pro/okx.js +6 -11
  70. package/dist/cjs/src/pro/onetrading.js +16 -15
  71. package/dist/cjs/src/pro/p2b.js +5 -3
  72. package/dist/cjs/src/pro/phemex.js +16 -11
  73. package/dist/cjs/src/pro/poloniex.js +6 -4
  74. package/dist/cjs/src/pro/poloniexfutures.js +14 -9
  75. package/dist/cjs/src/pro/probit.js +15 -11
  76. package/dist/cjs/src/pro/upbit.js +8 -8
  77. package/dist/cjs/src/pro/wazirx.js +6 -3
  78. package/dist/cjs/src/pro/woo.js +8 -6
  79. package/dist/cjs/src/probit.js +3 -3
  80. package/dist/cjs/src/tokocrypto.js +2 -2
  81. package/dist/cjs/src/wavesexchange.js +2 -1
  82. package/dist/cjs/src/woo.js +1 -1
  83. package/dist/cjs/src/yobit.js +39 -0
  84. package/js/ccxt.d.ts +1 -1
  85. package/js/ccxt.js +1 -1
  86. package/js/src/ace.d.ts +1 -1
  87. package/js/src/ace.js +3 -2
  88. package/js/src/alpaca.d.ts +1 -1
  89. package/js/src/ascendex.d.ts +5 -15
  90. package/js/src/ascendex.js +1 -1
  91. package/js/src/base/Exchange.d.ts +87 -78
  92. package/js/src/base/Exchange.js +54 -20
  93. package/js/src/base/types.d.ts +90 -6
  94. package/js/src/bigone.d.ts +5 -15
  95. package/js/src/bigone.js +21 -1
  96. package/js/src/binance.d.ts +13 -23
  97. package/js/src/binance.js +5 -4
  98. package/js/src/bingx.d.ts +6 -16
  99. package/js/src/bingx.js +4 -3
  100. package/js/src/bit2c.d.ts +1 -1
  101. package/js/src/bit2c.js +12 -0
  102. package/js/src/bitbank.d.ts +2 -2
  103. package/js/src/bitbns.d.ts +1 -1
  104. package/js/src/bitfinex.d.ts +5 -5
  105. package/js/src/bitfinex2.d.ts +7 -17
  106. package/js/src/bitflyer.d.ts +5 -5
  107. package/js/src/bitforex.d.ts +1 -1
  108. package/js/src/bitget.d.ts +8 -38
  109. package/js/src/bitget.js +3 -3
  110. package/js/src/bithumb.d.ts +2 -2
  111. package/js/src/bitmart.d.ts +10 -21
  112. package/js/src/bitmart.js +1 -1
  113. package/js/src/bitmex.d.ts +3 -3
  114. package/js/src/bitopro.d.ts +2 -2
  115. package/js/src/bitrue.d.ts +5 -15
  116. package/js/src/bitrue.js +3 -3
  117. package/js/src/bitso.d.ts +4 -4
  118. package/js/src/bitstamp.d.ts +2 -2
  119. package/js/src/bitteam.d.ts +1 -1
  120. package/js/src/bitvavo.d.ts +3 -3
  121. package/js/src/bl3p.d.ts +1 -1
  122. package/js/src/blockchaincom.d.ts +2 -2
  123. package/js/src/blockchaincom.js +1 -1
  124. package/js/src/btcalpha.d.ts +1 -1
  125. package/js/src/btcbox.d.ts +1 -1
  126. package/js/src/btcmarkets.d.ts +3 -3
  127. package/js/src/btcturk.d.ts +1 -1
  128. package/js/src/bybit.d.ts +8 -8
  129. package/js/src/bybit.js +1 -1
  130. package/js/src/cex.d.ts +1 -1
  131. package/js/src/coinbase.d.ts +6 -50
  132. package/js/src/coinbase.js +2 -2
  133. package/js/src/coinbasepro.d.ts +2 -2
  134. package/js/src/coincheck.d.ts +1 -1
  135. package/js/src/coinex.d.ts +8 -8
  136. package/js/src/coinex.js +1 -1
  137. package/js/src/coinlist.d.ts +4 -14
  138. package/js/src/coinmate.d.ts +2 -2
  139. package/js/src/coinmetro.d.ts +2 -2
  140. package/js/src/coinone.d.ts +1 -1
  141. package/js/src/coinsph.d.ts +2 -2
  142. package/js/src/coinspot.d.ts +1 -1
  143. package/js/src/cryptocom.d.ts +4 -4
  144. package/js/src/cryptocom.js +10 -10
  145. package/js/src/currencycom.d.ts +2 -2
  146. package/js/src/delta.d.ts +2 -2
  147. package/js/src/deribit.d.ts +4 -14
  148. package/js/src/digifinex.d.ts +10 -38
  149. package/js/src/exmo.d.ts +2 -2
  150. package/js/src/gate.d.ts +8 -18
  151. package/js/src/gate.js +34 -29
  152. package/js/src/gemini.d.ts +2 -2
  153. package/js/src/hitbtc.d.ts +6 -16
  154. package/js/src/hollaex.d.ts +2 -2
  155. package/js/src/htx.d.ts +11 -21
  156. package/js/src/huobijp.d.ts +4 -4
  157. package/js/src/idex.d.ts +3 -3
  158. package/js/src/independentreserve.d.ts +2 -2
  159. package/js/src/indodax.d.ts +2 -2
  160. package/js/src/kraken.d.ts +5 -5
  161. package/js/src/kraken.js +39 -0
  162. package/js/src/krakenfutures.d.ts +7 -7
  163. package/js/src/kucoin.d.ts +8 -29
  164. package/js/src/kucoin.js +1 -1
  165. package/js/src/kucoinfutures.d.ts +4 -4
  166. package/js/src/kuna.d.ts +2 -2
  167. package/js/src/latoken.d.ts +4 -14
  168. package/js/src/lbank.d.ts +2 -5
  169. package/js/src/luno.d.ts +1 -1
  170. package/js/src/lykke.d.ts +2 -2
  171. package/js/src/mercado.d.ts +2 -2
  172. package/js/src/mexc.d.ts +6 -6
  173. package/js/src/mexc.js +2 -1
  174. package/js/src/ndax.d.ts +2 -2
  175. package/js/src/novadax.d.ts +4 -15
  176. package/js/src/oceanex.d.ts +1 -1
  177. package/js/src/okcoin.d.ts +5 -15
  178. package/js/src/okx.d.ts +8 -18
  179. package/js/src/okx.js +4 -3
  180. package/js/src/onetrading.d.ts +2 -2
  181. package/js/src/p2b.d.ts +1 -1
  182. package/js/src/paymium.d.ts +3 -13
  183. package/js/src/phemex.d.ts +5 -5
  184. package/js/src/phemex.js +8 -8
  185. package/js/src/poloniex.d.ts +4 -14
  186. package/js/src/poloniexfutures.d.ts +1 -1
  187. package/js/src/pro/alpaca.d.ts +2 -2
  188. package/js/src/pro/alpaca.js +8 -4
  189. package/js/src/pro/ascendex.d.ts +2 -2
  190. package/js/src/pro/ascendex.js +1 -2
  191. package/js/src/pro/binance.d.ts +3 -3
  192. package/js/src/pro/binance.js +14 -10
  193. package/js/src/pro/bingx.d.ts +1 -1
  194. package/js/src/pro/bingx.js +1 -1
  195. package/js/src/pro/bitfinex.d.ts +2 -2
  196. package/js/src/pro/bitfinex.js +21 -24
  197. package/js/src/pro/bitfinex2.d.ts +2 -2
  198. package/js/src/pro/bitfinex2.js +13 -17
  199. package/js/src/pro/bitget.js +3 -1
  200. package/js/src/pro/bitmart.d.ts +3 -3
  201. package/js/src/pro/bitmart.js +3 -8
  202. package/js/src/pro/bitmex.d.ts +1 -1
  203. package/js/src/pro/bitmex.js +4 -7
  204. package/js/src/pro/bitopro.d.ts +1 -1
  205. package/js/src/pro/bitopro.js +2 -5
  206. package/js/src/pro/bitrue.js +1 -1
  207. package/js/src/pro/bitstamp.d.ts +1 -1
  208. package/js/src/pro/bitstamp.js +2 -3
  209. package/js/src/pro/bitvavo.d.ts +3 -3
  210. package/js/src/pro/bitvavo.js +12 -5
  211. package/js/src/pro/blockchaincom.d.ts +8 -8
  212. package/js/src/pro/blockchaincom.js +22 -23
  213. package/js/src/pro/bybit.d.ts +2 -2
  214. package/js/src/pro/bybit.js +5 -5
  215. package/js/src/pro/cex.d.ts +1 -1
  216. package/js/src/pro/cex.js +7 -7
  217. package/js/src/pro/coinbase.d.ts +1 -1
  218. package/js/src/pro/coinbase.js +3 -2
  219. package/js/src/pro/coinbasepro.d.ts +1 -1
  220. package/js/src/pro/coinbasepro.js +1 -1
  221. package/js/src/pro/coinex.d.ts +2 -2
  222. package/js/src/pro/coinex.js +15 -13
  223. package/js/src/pro/currencycom.d.ts +1 -1
  224. package/js/src/pro/currencycom.js +5 -7
  225. package/js/src/pro/deribit.d.ts +2 -2
  226. package/js/src/pro/deribit.js +4 -4
  227. package/js/src/pro/exmo.d.ts +2 -2
  228. package/js/src/pro/exmo.js +15 -13
  229. package/js/src/pro/gate.js +1 -1
  230. package/js/src/pro/gemini.d.ts +1 -1
  231. package/js/src/pro/gemini.js +4 -2
  232. package/js/src/pro/hitbtc.d.ts +2 -2
  233. package/js/src/pro/hitbtc.js +9 -8
  234. package/js/src/pro/hollaex.d.ts +2 -2
  235. package/js/src/pro/hollaex.js +2 -2
  236. package/js/src/pro/htx.d.ts +2 -2
  237. package/js/src/pro/htx.js +6 -7
  238. package/js/src/pro/huobijp.d.ts +1 -1
  239. package/js/src/pro/huobijp.js +3 -5
  240. package/js/src/pro/idex.js +1 -1
  241. package/js/src/pro/independentreserve.d.ts +1 -1
  242. package/js/src/pro/independentreserve.js +14 -13
  243. package/js/src/pro/kraken.d.ts +2 -2
  244. package/js/src/pro/kraken.js +10 -16
  245. package/js/src/pro/krakenfutures.d.ts +1 -1
  246. package/js/src/pro/krakenfutures.js +10 -6
  247. package/js/src/pro/kucoin.d.ts +3 -3
  248. package/js/src/pro/kucoin.js +10 -11
  249. package/js/src/pro/kucoinfutures.d.ts +3 -3
  250. package/js/src/pro/kucoinfutures.js +12 -11
  251. package/js/src/pro/lbank.d.ts +1 -1
  252. package/js/src/pro/lbank.js +10 -10
  253. package/js/src/pro/luno.d.ts +2 -2
  254. package/js/src/pro/luno.js +12 -14
  255. package/js/src/pro/mexc.d.ts +2 -2
  256. package/js/src/pro/mexc.js +3 -2
  257. package/js/src/pro/ndax.d.ts +3 -3
  258. package/js/src/pro/ndax.js +7 -13
  259. package/js/src/pro/okcoin.d.ts +1 -1
  260. package/js/src/pro/okcoin.js +7 -12
  261. package/js/src/pro/okx.d.ts +1 -1
  262. package/js/src/pro/okx.js +6 -11
  263. package/js/src/pro/onetrading.d.ts +1 -1
  264. package/js/src/pro/onetrading.js +16 -15
  265. package/js/src/pro/p2b.d.ts +1 -1
  266. package/js/src/pro/p2b.js +5 -3
  267. package/js/src/pro/phemex.d.ts +3 -3
  268. package/js/src/pro/phemex.js +16 -11
  269. package/js/src/pro/poloniex.d.ts +1 -1
  270. package/js/src/pro/poloniex.js +6 -4
  271. package/js/src/pro/poloniexfutures.d.ts +4 -4
  272. package/js/src/pro/poloniexfutures.js +13 -10
  273. package/js/src/pro/probit.d.ts +1 -1
  274. package/js/src/pro/probit.js +14 -12
  275. package/js/src/pro/upbit.js +8 -8
  276. package/js/src/pro/wazirx.d.ts +1 -1
  277. package/js/src/pro/wazirx.js +6 -3
  278. package/js/src/pro/woo.d.ts +3 -3
  279. package/js/src/pro/woo.js +8 -6
  280. package/js/src/probit.d.ts +3 -3
  281. package/js/src/probit.js +3 -3
  282. package/js/src/timex.d.ts +1 -1
  283. package/js/src/tokocrypto.d.ts +3 -3
  284. package/js/src/tokocrypto.js +2 -2
  285. package/js/src/upbit.d.ts +2 -2
  286. package/js/src/wavesexchange.d.ts +3 -4
  287. package/js/src/wavesexchange.js +2 -1
  288. package/js/src/wazirx.d.ts +1 -1
  289. package/js/src/whitebit.d.ts +5 -15
  290. package/js/src/woo.d.ts +5 -15
  291. package/js/src/woo.js +1 -1
  292. package/js/src/yobit.d.ts +21 -6
  293. package/js/src/yobit.js +39 -0
  294. package/js/src/zaif.d.ts +2 -2
  295. package/js/src/zonda.d.ts +4 -14
  296. package/package.json +22 -8
  297. package/skip-tests.json +9 -1
  298. package/tests-manager.sh +1 -2
@@ -27,6 +27,7 @@ import totp from './functions/totp.js';
27
27
  */
28
28
  export default class Exchange {
29
29
  constructor(userConfig = {}) {
30
+ this.throttleProp = undefined;
30
31
  this.api = undefined;
31
32
  this.userAgent = undefined;
32
33
  this.user_agent = undefined;
@@ -108,6 +109,7 @@ export default class Exchange {
108
109
  this.clients = {};
109
110
  this.newUpdates = true;
110
111
  this.streaming = {};
112
+ this.alias = false;
111
113
  this.deepExtend = deepExtend;
112
114
  this.isNode = isNode;
113
115
  this.keys = keysFunc;
@@ -689,7 +691,7 @@ export default class Exchange {
689
691
  // @ts-ignore
690
692
  this.httpProxyAgentModule = await import(/* webpackIgnore: true */ 'https-proxy-agent');
691
693
  }
692
- catch { }
694
+ catch (e) { }
693
695
  }
694
696
  if (this.socksProxyAgentModuleChecked === false) {
695
697
  this.socksProxyAgentModuleChecked = true;
@@ -951,7 +953,7 @@ export default class Exchange {
951
953
  const markets = await this.fetchMarkets(params);
952
954
  return this.setMarkets(markets, currencies);
953
955
  }
954
- loadMarkets(reload = false, params = {}) {
956
+ async loadMarkets(reload = false, params = {}) {
955
957
  // this method is async, it returns a promise
956
958
  if ((reload && !this.reloadingMarkets) || !this.marketsLoading) {
957
959
  this.reloadingMarkets = true;
@@ -965,28 +967,28 @@ export default class Exchange {
965
967
  }
966
968
  return this.marketsLoading;
967
969
  }
968
- fetchCurrencies(params = {}) {
970
+ async fetchCurrencies(params = {}) {
969
971
  // markets are returned as a list
970
972
  // currencies are returned as a dict
971
973
  // this is for historical reasons
972
974
  // and may be changed for consistency later
973
975
  return new Promise((resolve, reject) => resolve(this.currencies));
974
976
  }
975
- fetchCurrenciesWs(params = {}) {
977
+ async fetchCurrenciesWs(params = {}) {
976
978
  // markets are returned as a list
977
979
  // currencies are returned as a dict
978
980
  // this is for historical reasons
979
981
  // and may be changed for consistency later
980
982
  return new Promise((resolve, reject) => resolve(this.currencies));
981
983
  }
982
- fetchMarkets(params = {}) {
984
+ async fetchMarkets(params = {}) {
983
985
  // markets are returned as a list
984
986
  // currencies are returned as a dict
985
987
  // this is for historical reasons
986
988
  // and may be changed for consistency later
987
989
  return new Promise((resolve, reject) => resolve(Object.values(this.markets)));
988
990
  }
989
- fetchMarketsWs(params = {}) {
991
+ async fetchMarketsWs(params = {}) {
990
992
  // markets are returned as a list
991
993
  // currencies are returned as a dict
992
994
  // this is for historical reasons
@@ -1061,6 +1063,9 @@ export default class Exchange {
1061
1063
  }
1062
1064
  handleMessage(client, message) { } // stub to override
1063
1065
  // ping (client) {} // stub to override
1066
+ ping(client) {
1067
+ return undefined;
1068
+ }
1064
1069
  client(url) {
1065
1070
  this.clients = this.clients || {};
1066
1071
  if (!this.clients[url]) {
@@ -1690,6 +1695,9 @@ export default class Exchange {
1690
1695
  }
1691
1696
  }
1692
1697
  if (fromStart) {
1698
+ if (limit > arrayLength) {
1699
+ limit = arrayLength;
1700
+ }
1693
1701
  array = ascending ? this.arraySlice(array, 0, limit) : this.arraySlice(array, -limit);
1694
1702
  }
1695
1703
  else {
@@ -1918,6 +1926,18 @@ export default class Exchange {
1918
1926
  async setLeverage(leverage, symbol = undefined, params = {}) {
1919
1927
  throw new NotSupported(this.id + ' setLeverage() is not supported yet');
1920
1928
  }
1929
+ async fetchOpenInterestHistory(symbol, timeframe = '1h', since = undefined, limit = undefined, params = {}) {
1930
+ throw new NotSupported(this.id + ' fetchOpenInterestHistory() is not supported yet');
1931
+ }
1932
+ async fetchOpenInterest(symbol, params = {}) {
1933
+ throw new NotSupported(this.id + ' fetchOpenInterest() is not supported yet');
1934
+ }
1935
+ async signIn(params = {}) {
1936
+ throw new NotSupported(this.id + ' signIn() is not supported yet');
1937
+ }
1938
+ async fetchPaymentMethods(params = {}) {
1939
+ throw new NotSupported(this.id + ' fetchPaymentMethods() is not supported yet');
1940
+ }
1921
1941
  parseToInt(number) {
1922
1942
  // Solve Common parseInt misuse ex: parseInt ((since / 1000).toString ())
1923
1943
  // using a number as parameter which is not valid in ts
@@ -3528,6 +3548,15 @@ export default class Exchange {
3528
3548
  async fetchBidsAsks(symbols = undefined, params = {}) {
3529
3549
  throw new NotSupported(this.id + ' fetchBidsAsks() is not supported yet');
3530
3550
  }
3551
+ async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
3552
+ throw new NotSupported(this.id + ' fetchBorrowInterest() is not supported yet');
3553
+ }
3554
+ async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
3555
+ throw new NotSupported(this.id + ' fetchLedger() is not supported yet');
3556
+ }
3557
+ async fetchLedgerEntry(id, code = undefined, params = {}) {
3558
+ throw new NotSupported(this.id + ' fetchLedgerEntry() is not supported yet');
3559
+ }
3531
3560
  parseBidAsk(bidask, priceKey = 0, amountKey = 1, countOrIdKey = 2) {
3532
3561
  const price = this.safeNumber(bidask, priceKey);
3533
3562
  const amount = this.safeNumber(bidask, amountKey);
@@ -3828,6 +3857,9 @@ export default class Exchange {
3828
3857
  return this.handleOptionAndParams(params, methodName, 'marginMode', defaultValue);
3829
3858
  }
3830
3859
  throwExactlyMatchedException(exact, string, message) {
3860
+ if (string === undefined) {
3861
+ return;
3862
+ }
3831
3863
  if (string in exact) {
3832
3864
  throw new exact[string](message);
3833
3865
  }
@@ -4251,21 +4283,18 @@ export default class Exchange {
4251
4283
  */
4252
4284
  throw new NotSupported(this.id + ' fetchDepositsWithdrawals() is not supported yet');
4253
4285
  }
4254
- async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
4286
+ async fetchDeposits(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4255
4287
  throw new NotSupported(this.id + ' fetchDeposits() is not supported yet');
4256
4288
  }
4289
+ async fetchWithdrawals(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4290
+ throw new NotSupported(this.id + ' fetchWithdrawals() is not supported yet');
4291
+ }
4257
4292
  async fetchDepositsWs(code = undefined, since = undefined, limit = undefined, params = {}) {
4258
4293
  throw new NotSupported(this.id + ' fetchDepositsWs() is not supported yet');
4259
4294
  }
4260
- async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
4261
- throw new NotSupported(this.id + ' fetchWithdrawals() is not supported yet');
4262
- }
4263
4295
  async fetchWithdrawalsWs(code = undefined, since = undefined, limit = undefined, params = {}) {
4264
4296
  throw new NotSupported(this.id + ' fetchWithdrawalsWs() is not supported yet');
4265
4297
  }
4266
- async fetchOpenInterest(symbol, params = {}) {
4267
- throw new NotSupported(this.id + ' fetchOpenInterest() is not supported yet');
4268
- }
4269
4298
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4270
4299
  throw new NotSupported(this.id + ' fetchFundingRateHistory() is not supported yet');
4271
4300
  }
@@ -4353,7 +4382,7 @@ export default class Exchange {
4353
4382
  throw new NotSupported(this.id + ' createExpiredOptionMarket () is not supported yet');
4354
4383
  }
4355
4384
  handleWithdrawTagAndParams(tag, params) {
4356
- if (typeof tag === 'object') {
4385
+ if ((tag !== undefined) && (typeof tag === 'object')) {
4357
4386
  params = this.extend(tag, params);
4358
4387
  tag = undefined;
4359
4388
  }
@@ -4487,14 +4516,14 @@ export default class Exchange {
4487
4516
  throw new NotSupported(this.id + ' fetchMarketLeverageTiers() is not supported yet');
4488
4517
  }
4489
4518
  }
4490
- async createPostOnlyOrder(symbol, type, side, amount, price, params = {}) {
4519
+ async createPostOnlyOrder(symbol, type, side, amount, price = undefined, params = {}) {
4491
4520
  if (!this.has['createPostOnlyOrder']) {
4492
4521
  throw new NotSupported(this.id + 'createPostOnlyOrder() is not supported yet');
4493
4522
  }
4494
4523
  const query = this.extend(params, { 'postOnly': true });
4495
4524
  return await this.createOrder(symbol, type, side, amount, price, query);
4496
4525
  }
4497
- async createReduceOnlyOrder(symbol, type, side, amount, price, params = {}) {
4526
+ async createReduceOnlyOrder(symbol, type, side, amount, price = undefined, params = {}) {
4498
4527
  if (!this.has['createReduceOnlyOrder']) {
4499
4528
  throw new NotSupported(this.id + 'createReduceOnlyOrder() is not supported yet');
4500
4529
  }
@@ -5117,7 +5146,8 @@ export default class Exchange {
5117
5146
  const response = await this[method](symbol, undefined, maxEntriesPerRequest, params);
5118
5147
  const responseLength = response.length;
5119
5148
  if (this.verbose) {
5120
- this.log('Dynamic pagination call', calls, 'method', method, 'response length', responseLength, 'timestamp', paginationTimestamp);
5149
+ const backwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp;
5150
+ this.log(backwardMessage);
5121
5151
  }
5122
5152
  if (responseLength === 0) {
5123
5153
  break;
@@ -5135,7 +5165,8 @@ export default class Exchange {
5135
5165
  const response = await this[method](symbol, paginationTimestamp, maxEntriesPerRequest, params);
5136
5166
  const responseLength = response.length;
5137
5167
  if (this.verbose) {
5138
- this.log('Dynamic pagination call', calls, 'method', method, 'response length', responseLength, 'timestamp', paginationTimestamp);
5168
+ const forwardMessage = 'Dynamic pagination call ' + calls + ' method ' + method + ' response length ' + responseLength + ' timestamp ' + paginationTimestamp;
5169
+ this.log(forwardMessage);
5139
5170
  }
5140
5171
  if (responseLength === 0) {
5141
5172
  break;
@@ -5181,6 +5212,7 @@ export default class Exchange {
5181
5212
  throw e;
5182
5213
  }
5183
5214
  }
5215
+ return undefined;
5184
5216
  }
5185
5217
  async fetchPaginatedCallDeterministic(method, symbol = undefined, since = undefined, limit = undefined, timeframe = undefined, params = {}, maxEntriesPerRequest = undefined) {
5186
5218
  let maxCalls = undefined;
@@ -5245,7 +5277,8 @@ export default class Exchange {
5245
5277
  errors = 0;
5246
5278
  const responseLength = response.length;
5247
5279
  if (this.verbose) {
5248
- this.log('Cursor pagination call', i + 1, 'method', method, 'response length', responseLength, 'cursor', cursorValue);
5280
+ const cursorMessage = 'Cursor pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength + ' cursor ' + cursorValue;
5281
+ this.log(cursorMessage);
5249
5282
  }
5250
5283
  if (responseLength === 0) {
5251
5284
  break;
@@ -5289,7 +5322,8 @@ export default class Exchange {
5289
5322
  errors = 0;
5290
5323
  const responseLength = response.length;
5291
5324
  if (this.verbose) {
5292
- this.log('Incremental pagination call', i + 1, 'method', method, 'response length', responseLength);
5325
+ const incrementalMessage = 'Incremental pagination call ' + i + 1 + ' method ' + method + ' response length ' + responseLength;
5326
+ this.log(incrementalMessage);
5293
5327
  }
5294
5328
  if (responseLength === 0) {
5295
5329
  break;
@@ -203,34 +203,118 @@ export interface DepositAddressResponse {
203
203
  info: any;
204
204
  tag?: string;
205
205
  }
206
+ export interface FundingRate {
207
+ symbol: string;
208
+ info: any;
209
+ timestamp?: number;
210
+ fundingRate?: number;
211
+ datetime?: string;
212
+ markPrice?: number;
213
+ indexPrice?: number;
214
+ interestRate?: number;
215
+ estimatedSettlePrice?: number;
216
+ fundingTimestamp?: number;
217
+ fundingDatetime?: string;
218
+ nextFundingTimestamp?: number;
219
+ nextFundingDatetime?: string;
220
+ nextFundingRate?: number;
221
+ previousFundingTimestamp?: number;
222
+ previousFundingDatetime?: string;
223
+ previousFundingRate?: number;
224
+ }
206
225
  export interface Position {
207
226
  symbol: string;
208
- id: string;
227
+ id?: string;
228
+ info: any;
209
229
  timestamp?: number;
210
- datetime: string;
230
+ datetime?: string;
211
231
  contracts?: number;
212
232
  contractSize?: number;
213
233
  side: string;
214
234
  notional?: number;
215
235
  leverage?: number;
216
236
  unrealizedPnl?: number;
217
- realizedPnl?: number;
218
237
  collateral?: number;
219
238
  entryPrice?: number;
220
239
  markPrice?: number;
221
240
  liquidationPrice?: number;
241
+ marginMode?: string;
222
242
  hedged?: boolean;
223
- maintenanceMargin?: number;
243
+ maintenenceMargin?: number;
224
244
  maintenanceMarginPercentage?: number;
225
245
  initialMargin?: number;
226
246
  initialMarginPercentage?: number;
227
- marginMode: string;
228
247
  marginRatio?: number;
229
248
  lastUpdateTimestamp?: number;
230
249
  lastPrice?: number;
231
- percentage?: number;
232
250
  stopLossPrice?: number;
233
251
  takeProfitPrice?: number;
252
+ percentage?: number;
253
+ }
254
+ export interface BorrowInterest {
255
+ account?: string;
256
+ currency?: string;
257
+ interest?: number;
258
+ interestRate?: number;
259
+ amountBorrowed?: number;
260
+ marginMode?: string;
261
+ timestamp?: number;
262
+ datetime?: string;
263
+ info: any;
264
+ }
265
+ export interface LeverageTier {
266
+ tier?: number;
267
+ currency?: string;
268
+ minNotional?: number;
269
+ maxNotional?: number;
270
+ maintenanceMarginRate?: number;
271
+ maxLeverage?: number;
272
+ info: any;
273
+ }
274
+ export interface LedgerEntry {
275
+ id?: string;
276
+ info: any;
277
+ timestamp?: number;
278
+ datetime?: string;
279
+ direction?: string;
280
+ account?: string;
281
+ referenceId?: string;
282
+ referenceAccount?: string;
283
+ type?: string;
284
+ currency?: string;
285
+ amount?: number;
286
+ before?: number;
287
+ after?: number;
288
+ status?: string;
289
+ fee?: Fee;
290
+ }
291
+ export interface DepositWithdrawFeeNetwork {
292
+ fee?: number;
293
+ percentage?: boolean;
294
+ }
295
+ export interface DepositWithdrawFee {
296
+ info: any;
297
+ withdraw?: DepositWithdrawFeeNetwork;
298
+ deposit?: DepositWithdrawFeeNetwork;
299
+ networks?: Dictionary<DepositWithdrawFeeNetwork>;
300
+ }
301
+ export interface TransferEntry {
302
+ info?: any;
303
+ id?: string;
304
+ timestamp?: number;
305
+ datetime?: string;
306
+ currency?: string;
307
+ amount?: number;
308
+ fromAccount?: string;
309
+ toAccount?: string;
310
+ status?: string;
311
+ }
312
+ export interface BorrowRate {
313
+ currency?: string;
314
+ rate?: number;
315
+ period?: number;
316
+ timestamp?: number;
317
+ datetime?: string;
234
318
  info: any;
235
319
  }
236
320
  export interface FundingRateHistory {
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bigone.js';
2
- import type { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bigone
5
5
  * @augments Exchange
@@ -24,7 +24,7 @@ export default class bigone extends Exchange {
24
24
  parseType(type: string): string;
25
25
  parseOrder(order: any, market?: Market): Order;
26
26
  createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
27
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
27
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
28
28
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
29
29
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
30
30
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
@@ -51,29 +51,19 @@ export default class bigone extends Exchange {
51
51
  parseTransaction(transaction: any, currency?: Currency): Transaction;
52
52
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
53
53
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
54
- transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
55
- info: any;
56
- id: any;
57
- timestamp: any;
58
- datetime: any;
59
- currency: number;
60
- amount: any;
61
- fromAccount: any;
62
- toAccount: any;
63
- status: string;
64
- }>;
54
+ transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
65
55
  parseTransfer(transfer: any, currency?: Currency): {
66
56
  info: any;
67
57
  id: any;
68
58
  timestamp: any;
69
59
  datetime: any;
70
- currency: number;
60
+ currency: any;
71
61
  amount: any;
72
62
  fromAccount: any;
73
63
  toAccount: any;
74
64
  status: string;
75
65
  };
76
66
  parseTransferStatus(status: any): string;
77
- withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
67
+ withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
78
68
  handleErrors(httpCode: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
79
69
  }
package/js/src/bigone.js CHANGED
@@ -521,6 +521,7 @@ export default class bigone extends Exchange {
521
521
  * @method
522
522
  * @name bigone#fetchMarkets
523
523
  * @description retrieves data on all markets for bigone
524
+ * @see https://open.big.one/docs/spot_asset_pair.html
524
525
  * @param {object} [params] extra parameters specific to the exchange API endpoint
525
526
  * @returns {object[]} an array of objects representing market data
526
527
  */
@@ -783,6 +784,7 @@ export default class bigone extends Exchange {
783
784
  * @method
784
785
  * @name bigone#fetchTicker
785
786
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
787
+ * @see https://open.big.one/docs/spot_tickers.html
786
788
  * @param {string} symbol unified symbol of the market to fetch the ticker for
787
789
  * @param {object} [params] extra parameters specific to the exchange API endpoint
788
790
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -825,6 +827,7 @@ export default class bigone extends Exchange {
825
827
  * @method
826
828
  * @name bigone#fetchTickers
827
829
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
830
+ * @see https://open.big.one/docs/spot_tickers.html
828
831
  * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
829
832
  * @param {object} [params] extra parameters specific to the exchange API endpoint
830
833
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -912,6 +915,7 @@ export default class bigone extends Exchange {
912
915
  * @method
913
916
  * @name bigone#fetchTime
914
917
  * @description fetches the current integer timestamp in milliseconds from the exchange server
918
+ * @see https://open.big.one/docs/spot_ping.html
915
919
  * @param {object} [params] extra parameters specific to the exchange API endpoint
916
920
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
917
921
  */
@@ -932,6 +936,7 @@ export default class bigone extends Exchange {
932
936
  * @method
933
937
  * @name bigone#fetchOrderBook
934
938
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
939
+ * @see https://open.big.one/docs/contract_misc.html#get-orderbook-snapshot
935
940
  * @param {string} symbol unified symbol of the market to fetch the order book for
936
941
  * @param {int} [limit] the maximum amount of order book entries to return
937
942
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1174,6 +1179,7 @@ export default class bigone extends Exchange {
1174
1179
  * @method
1175
1180
  * @name bigone#fetchTrades
1176
1181
  * @description get the list of most recent trades for a particular symbol
1182
+ * @see https://open.big.one/docs/spot_asset_pair_trade.html
1177
1183
  * @param {string} symbol unified symbol of the market to fetch trades for
1178
1184
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1179
1185
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -1238,6 +1244,7 @@ export default class bigone extends Exchange {
1238
1244
  * @method
1239
1245
  * @name bigone#fetchOHLCV
1240
1246
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1247
+ * @see https://open.big.one/docs/spot_asset_pair_candle.html
1241
1248
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1242
1249
  * @param {string} timeframe the length of time each candle represents
1243
1250
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -1314,6 +1321,8 @@ export default class bigone extends Exchange {
1314
1321
  * @method
1315
1322
  * @name bigone#fetchBalance
1316
1323
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1324
+ * @see https://open.big.one/docs/fund_accounts.html
1325
+ * @see https://open.big.one/docs/spot_accounts.html
1317
1326
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1318
1327
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1319
1328
  */
@@ -1559,6 +1568,7 @@ export default class bigone extends Exchange {
1559
1568
  * @method
1560
1569
  * @name bigone#cancelOrder
1561
1570
  * @description cancels an open order
1571
+ * @see https://open.big.one/docs/spot_orders.html#cancel-order
1562
1572
  * @param {string} id order id
1563
1573
  * @param {string} symbol Not used by bigone cancelOrder ()
1564
1574
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1587,6 +1597,7 @@ export default class bigone extends Exchange {
1587
1597
  * @method
1588
1598
  * @name bigone#cancelAllOrders
1589
1599
  * @description cancel all open orders
1600
+ * @see https://open.big.one/docs/spot_orders.html#cancel-all-orders
1590
1601
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1591
1602
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1592
1603
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1616,6 +1627,7 @@ export default class bigone extends Exchange {
1616
1627
  * @method
1617
1628
  * @name bigone#fetchOrder
1618
1629
  * @description fetches information on an order made by the user
1630
+ * @see https://open.big.one/docs/spot_orders.html#get-one-order
1619
1631
  * @param {string} symbol not used by bigone fetchOrder
1620
1632
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1621
1633
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1631,6 +1643,7 @@ export default class bigone extends Exchange {
1631
1643
  * @method
1632
1644
  * @name bigone#fetchOrders
1633
1645
  * @description fetches information on multiple orders made by the user
1646
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1634
1647
  * @param {string} symbol unified market symbol of the market orders were made in
1635
1648
  * @param {int} [since] the earliest time in ms to fetch orders for
1636
1649
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1681,6 +1694,7 @@ export default class bigone extends Exchange {
1681
1694
  * @method
1682
1695
  * @name bigone#fetchMyTrades
1683
1696
  * @description fetch all trades made by the user
1697
+ * @see https://open.big.one/docs/spot_trade.html#trades-of-user
1684
1698
  * @param {string} symbol unified market symbol
1685
1699
  * @param {int} [since] the earliest time in ms to fetch trades for
1686
1700
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1750,6 +1764,7 @@ export default class bigone extends Exchange {
1750
1764
  * @method
1751
1765
  * @name bigone#fetchOpenOrders
1752
1766
  * @description fetch all unfilled currently open orders
1767
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1753
1768
  * @param {string} symbol unified market symbol
1754
1769
  * @param {int} [since] the earliest time in ms to fetch open orders for
1755
1770
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -1766,6 +1781,7 @@ export default class bigone extends Exchange {
1766
1781
  * @method
1767
1782
  * @name bigone#fetchClosedOrders
1768
1783
  * @description fetches information on multiple closed orders made by the user
1784
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1769
1785
  * @param {string} symbol unified market symbol of the market orders were made in
1770
1786
  * @param {int} [since] the earliest time in ms to fetch orders for
1771
1787
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1820,6 +1836,7 @@ export default class bigone extends Exchange {
1820
1836
  * @method
1821
1837
  * @name bigone#fetchDepositAddress
1822
1838
  * @description fetch the deposit address for a currency associated with this account
1839
+ * @see https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
1823
1840
  * @param {string} code unified currency code
1824
1841
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1825
1842
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -1970,6 +1987,7 @@ export default class bigone extends Exchange {
1970
1987
  * @method
1971
1988
  * @name bigone#fetchDeposits
1972
1989
  * @description fetch all deposits made to an account
1990
+ * @see https://open.big.one/docs/spot_deposit.html#deposit-of-user
1973
1991
  * @param {string} code unified currency code
1974
1992
  * @param {int} [since] the earliest time in ms to fetch deposits for
1975
1993
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -2021,6 +2039,7 @@ export default class bigone extends Exchange {
2021
2039
  * @method
2022
2040
  * @name bigone#fetchWithdrawals
2023
2041
  * @description fetch all withdrawals made from an account
2042
+ * @see https://open.big.one/docs/spot_withdrawal.html#get-withdrawals-of-user
2024
2043
  * @param {string} code unified currency code
2025
2044
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
2026
2045
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -2126,7 +2145,7 @@ export default class bigone extends Exchange {
2126
2145
  'id': undefined,
2127
2146
  'timestamp': undefined,
2128
2147
  'datetime': undefined,
2129
- 'currency': code,
2148
+ 'currency': undefined,
2130
2149
  'amount': undefined,
2131
2150
  'fromAccount': undefined,
2132
2151
  'toAccount': undefined,
@@ -2144,6 +2163,7 @@ export default class bigone extends Exchange {
2144
2163
  * @method
2145
2164
  * @name bigone#withdraw
2146
2165
  * @description make a withdrawal
2166
+ * @see https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
2147
2167
  * @param {string} code unified currency code
2148
2168
  * @param {float} amount the amount to withdraw
2149
2169
  * @param {string} address the address to withdraw to
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/binance.js';
2
- import type { Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface } from './base/types.js';
3
3
  /**
4
4
  * @class binance
5
5
  * @augments Exchange
@@ -21,7 +21,7 @@ export default class binance extends Exchange {
21
21
  fetchMarkets(params?: {}): Promise<any[]>;
22
22
  parseMarket(market: any): Market;
23
23
  parseBalanceHelper(entry: any): import("./base/types.js").Account;
24
- parseBalance(response: any, type?: any, marginMode?: any): Balances;
24
+ parseBalanceCustom(response: any, type?: any, marginMode?: any): Balances;
25
25
  fetchBalance(params?: {}): Promise<Balances>;
26
26
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
27
27
  parseTicker(ticker: any, market?: Market): Ticker;
@@ -48,15 +48,15 @@ export default class binance extends Exchange {
48
48
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
49
49
  parseTrade(trade: any, market?: Market): Trade;
50
50
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
51
- editSpotOrder(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): Promise<Order>;
52
- editSpotOrderRequest(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): any;
53
- editContractOrder(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): Promise<Order>;
51
+ editSpotOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
52
+ editSpotOrderRequest(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): any;
53
+ editContractOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
54
54
  editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
55
55
  parseOrderStatus(status: any): string;
56
56
  parseOrder(order: any, market?: Market): Order;
57
57
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
58
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
59
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): any;
58
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
59
+ createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
60
60
  createMarketOrderWithCost(symbol: string, side: OrderSide, cost: any, params?: {}): Promise<Order>;
61
61
  createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
62
62
  createMarketSellOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
@@ -114,17 +114,7 @@ export default class binance extends Exchange {
114
114
  id: string;
115
115
  amount: number;
116
116
  };
117
- transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
118
- info: any;
119
- id: string;
120
- timestamp: number;
121
- datetime: string;
122
- currency: string;
123
- amount: number;
124
- fromAccount: any;
125
- toAccount: any;
126
- status: string;
127
- }>;
117
+ transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
128
118
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
129
119
  fetchDepositAddress(code: string, params?: {}): Promise<{
130
120
  currency: string;
@@ -140,7 +130,7 @@ export default class binance extends Exchange {
140
130
  }>;
141
131
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
142
132
  parseDepositWithdrawFee(fee: any, currency?: Currency): any;
143
- withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
133
+ withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
144
134
  parseTradingFee(fee: any, market?: Market): {
145
135
  info: any;
146
136
  symbol: string;
@@ -269,7 +259,7 @@ export default class binance extends Exchange {
269
259
  fetchAccountPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
270
260
  fetchPositionsRisk(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
271
261
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
272
- setLeverage(leverage: any, symbol?: Str, params?: {}): Promise<any>;
262
+ setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
273
263
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
274
264
  setPositionMode(hedged: any, symbol?: Str, params?: {}): Promise<any>;
275
265
  fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
@@ -310,7 +300,7 @@ export default class binance extends Exchange {
310
300
  getExceptionsByUrl(url: any, exactOrBroad: any): any;
311
301
  handleErrors(code: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
312
302
  calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
313
- request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}, context?: {}): Promise<any>;
303
+ request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
314
304
  modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
315
305
  parseMarginModification(data: any, market?: Market): {
316
306
  info: any;
@@ -380,7 +370,7 @@ export default class binance extends Exchange {
380
370
  datetime: any;
381
371
  info: any;
382
372
  }>;
383
- borrowCrossMargin(code: string, amount: any, params?: {}): Promise<{
373
+ borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
384
374
  id: number;
385
375
  currency: string;
386
376
  amount: any;
@@ -389,7 +379,7 @@ export default class binance extends Exchange {
389
379
  datetime: any;
390
380
  info: any;
391
381
  }>;
392
- borrowIsolatedMargin(symbol: string, code: string, amount: any, params?: {}): Promise<{
382
+ borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: {}): Promise<{
393
383
  id: number;
394
384
  currency: string;
395
385
  amount: any;