ccxt 4.3.18 → 4.3.20

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 (173) hide show
  1. package/README.md +7 -5
  2. package/dist/cjs/ccxt.js +6 -1
  3. package/dist/cjs/src/abstract/woofipro.js +9 -0
  4. package/dist/cjs/src/ascendex.js +3 -4
  5. package/dist/cjs/src/base/Exchange.js +45 -2
  6. package/dist/cjs/src/base/functions/crypto.js +10 -3
  7. package/dist/cjs/src/base/functions/encode.js +6 -3
  8. package/dist/cjs/src/base/functions/number.js +8 -5
  9. package/dist/cjs/src/base/functions/rsa.js +5 -5
  10. package/dist/cjs/src/bigone.js +1 -1
  11. package/dist/cjs/src/bitfinex.js +25 -1
  12. package/dist/cjs/src/bitfinex2.js +59 -51
  13. package/dist/cjs/src/bitget.js +4 -5
  14. package/dist/cjs/src/bitmart.js +3 -3
  15. package/dist/cjs/src/bitstamp.js +1 -3
  16. package/dist/cjs/src/bybit.js +39 -9
  17. package/dist/cjs/src/coinex.js +360 -560
  18. package/dist/cjs/src/coinlist.js +1 -2
  19. package/dist/cjs/src/deribit.js +1 -1
  20. package/dist/cjs/src/hollaex.js +3 -3
  21. package/dist/cjs/src/indodax.js +1 -1
  22. package/dist/cjs/src/latoken.js +1 -1
  23. package/dist/cjs/src/mexc.js +1 -1
  24. package/dist/cjs/src/novadax.js +0 -1
  25. package/dist/cjs/src/okx.js +17 -0
  26. package/dist/cjs/src/phemex.js +17 -6
  27. package/dist/cjs/src/poloniex.js +1 -2
  28. package/dist/cjs/src/pro/bitget.js +136 -192
  29. package/dist/cjs/src/pro/coinbaseinternational.js +9 -1
  30. package/dist/cjs/src/pro/htx.js +12 -7
  31. package/dist/cjs/src/pro/okx.js +85 -0
  32. package/dist/cjs/src/pro/woofipro.js +1263 -0
  33. package/dist/cjs/src/wavesexchange.js +2 -2
  34. package/dist/cjs/src/woo.js +17 -3
  35. package/dist/cjs/src/woofipro.js +2698 -0
  36. package/js/ccxt.d.ts +8 -2
  37. package/js/ccxt.js +6 -2
  38. package/js/src/abstract/bitget.d.ts +3 -0
  39. package/js/src/abstract/bybit.d.ts +1 -0
  40. package/js/src/abstract/okx.d.ts +1 -0
  41. package/js/src/abstract/woofipro.d.ts +122 -0
  42. package/js/src/abstract/woofipro.js +11 -0
  43. package/js/src/ace.d.ts +2 -2
  44. package/js/src/ascendex.d.ts +5 -15
  45. package/js/src/ascendex.js +3 -4
  46. package/js/src/base/Exchange.d.ts +26 -17
  47. package/js/src/base/Exchange.js +45 -2
  48. package/js/src/base/functions/crypto.d.ts +1 -1
  49. package/js/src/base/functions/crypto.js +10 -3
  50. package/js/src/base/functions/encode.d.ts +1 -1
  51. package/js/src/base/functions/encode.js +6 -3
  52. package/js/src/base/functions/number.d.ts +1 -1
  53. package/js/src/base/functions/number.js +8 -5
  54. package/js/src/base/functions/rsa.js +6 -6
  55. package/js/src/base/types.d.ts +4 -0
  56. package/js/src/bigone.d.ts +4 -14
  57. package/js/src/bigone.js +1 -1
  58. package/js/src/binance.d.ts +13 -71
  59. package/js/src/binancecoinm.d.ts +2 -22
  60. package/js/src/binanceusdm.d.ts +2 -22
  61. package/js/src/bingx.d.ts +4 -14
  62. package/js/src/bit2c.d.ts +2 -2
  63. package/js/src/bitbank.d.ts +2 -2
  64. package/js/src/bitbns.d.ts +2 -2
  65. package/js/src/bitfinex.d.ts +6 -16
  66. package/js/src/bitfinex.js +25 -1
  67. package/js/src/bitfinex2.d.ts +6 -16
  68. package/js/src/bitfinex2.js +59 -51
  69. package/js/src/bitflyer.d.ts +2 -2
  70. package/js/src/bitget.d.ts +7 -17
  71. package/js/src/bitget.js +4 -5
  72. package/js/src/bithumb.d.ts +3 -3
  73. package/js/src/bitmart.d.ts +5 -14
  74. package/js/src/bitmart.js +3 -3
  75. package/js/src/bitmex.d.ts +4 -4
  76. package/js/src/bitopro.d.ts +2 -2
  77. package/js/src/bitrue.d.ts +5 -5
  78. package/js/src/bitso.d.ts +2 -2
  79. package/js/src/bitstamp.d.ts +3 -3
  80. package/js/src/bitstamp.js +1 -3
  81. package/js/src/bitteam.d.ts +2 -2
  82. package/js/src/bitvavo.d.ts +5 -5
  83. package/js/src/bl3p.d.ts +2 -2
  84. package/js/src/blockchaincom.d.ts +2 -2
  85. package/js/src/blofin.d.ts +4 -14
  86. package/js/src/btcalpha.d.ts +2 -2
  87. package/js/src/btcbox.d.ts +2 -2
  88. package/js/src/btcmarkets.d.ts +2 -2
  89. package/js/src/btcturk.d.ts +2 -2
  90. package/js/src/bybit.d.ts +9 -56
  91. package/js/src/bybit.js +39 -9
  92. package/js/src/cex.d.ts +2 -2
  93. package/js/src/coinbase.d.ts +4 -4
  94. package/js/src/coinbasepro.d.ts +3 -3
  95. package/js/src/coincheck.d.ts +2 -2
  96. package/js/src/coinex.d.ts +7 -17
  97. package/js/src/coinex.js +360 -560
  98. package/js/src/coinlist.d.ts +5 -15
  99. package/js/src/coinlist.js +1 -2
  100. package/js/src/coinmate.d.ts +2 -2
  101. package/js/src/coinmetro.d.ts +3 -3
  102. package/js/src/coinone.d.ts +2 -2
  103. package/js/src/coinsph.d.ts +2 -2
  104. package/js/src/coinspot.d.ts +2 -2
  105. package/js/src/cryptocom.d.ts +2 -2
  106. package/js/src/currencycom.d.ts +3 -3
  107. package/js/src/delta.d.ts +5 -43
  108. package/js/src/deribit.d.ts +7 -55
  109. package/js/src/deribit.js +1 -1
  110. package/js/src/digifinex.d.ts +5 -15
  111. package/js/src/exmo.d.ts +2 -2
  112. package/js/src/gate.d.ts +6 -54
  113. package/js/src/gemini.d.ts +2 -2
  114. package/js/src/hitbtc.d.ts +4 -14
  115. package/js/src/hollaex.d.ts +3 -3
  116. package/js/src/hollaex.js +3 -3
  117. package/js/src/htx.d.ts +4 -14
  118. package/js/src/huobijp.d.ts +4 -4
  119. package/js/src/hyperliquid.d.ts +1 -1
  120. package/js/src/idex.d.ts +3 -3
  121. package/js/src/independentreserve.d.ts +2 -2
  122. package/js/src/indodax.d.ts +2 -2
  123. package/js/src/indodax.js +1 -1
  124. package/js/src/kraken.d.ts +4 -14
  125. package/js/src/krakenfutures.d.ts +4 -14
  126. package/js/src/kucoin.d.ts +5 -15
  127. package/js/src/kucoinfutures.d.ts +4 -14
  128. package/js/src/kuna.d.ts +2 -2
  129. package/js/src/latoken.d.ts +5 -15
  130. package/js/src/latoken.js +1 -1
  131. package/js/src/lbank.d.ts +2 -2
  132. package/js/src/luno.d.ts +2 -2
  133. package/js/src/lykke.d.ts +2 -2
  134. package/js/src/mercado.d.ts +2 -2
  135. package/js/src/mexc.d.ts +8 -28
  136. package/js/src/mexc.js +1 -1
  137. package/js/src/ndax.d.ts +2 -2
  138. package/js/src/novadax.d.ts +4 -15
  139. package/js/src/novadax.js +0 -1
  140. package/js/src/okcoin.d.ts +4 -14
  141. package/js/src/okx.d.ts +10 -68
  142. package/js/src/okx.js +17 -0
  143. package/js/src/onetrading.d.ts +2 -2
  144. package/js/src/paymium.d.ts +4 -14
  145. package/js/src/phemex.d.ts +5 -15
  146. package/js/src/phemex.js +17 -6
  147. package/js/src/poloniex.d.ts +3 -13
  148. package/js/src/poloniex.js +1 -2
  149. package/js/src/poloniexfutures.d.ts +2 -2
  150. package/js/src/pro/bitget.js +137 -193
  151. package/js/src/pro/coinbaseinternational.d.ts +3 -3
  152. package/js/src/pro/coinbaseinternational.js +9 -1
  153. package/js/src/pro/htx.js +12 -7
  154. package/js/src/pro/okx.d.ts +4 -1
  155. package/js/src/pro/okx.js +85 -0
  156. package/js/src/pro/woofipro.d.ts +47 -0
  157. package/js/src/pro/woofipro.js +1264 -0
  158. package/js/src/probit.d.ts +3 -3
  159. package/js/src/timex.d.ts +2 -2
  160. package/js/src/tokocrypto.d.ts +3 -3
  161. package/js/src/upbit.d.ts +2 -2
  162. package/js/src/wavesexchange.d.ts +3 -3
  163. package/js/src/wavesexchange.js +2 -2
  164. package/js/src/wazirx.d.ts +2 -2
  165. package/js/src/whitebit.d.ts +3 -13
  166. package/js/src/woo.d.ts +7 -17
  167. package/js/src/woo.js +17 -3
  168. package/js/src/woofipro.d.ts +131 -0
  169. package/js/src/woofipro.js +2699 -0
  170. package/js/src/yobit.d.ts +2 -2
  171. package/js/src/zaif.d.ts +2 -2
  172. package/js/src/zonda.d.ts +4 -14
  173. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CCXT – CryptoCurrency eXchange Trading Library
2
2
 
3
- [![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-103-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Twitter Follow](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://twitter.com/ccxt_official)
3
+ [![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/ccxt) [![Supported Exchanges](https://img.shields.io/badge/exchanges-104-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Twitter Follow](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://twitter.com/ccxt_official)
4
4
 
5
5
  A JavaScript / Python / PHP / C# library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
6
6
 
@@ -52,10 +52,11 @@ Current feature list:
52
52
  | [![mexc](https://user-images.githubusercontent.com/1294454/137283979-8b2a818d-8633-461b-bfca-de89e8c446b2.jpg)](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | mexc | [MEXC Global](https://m.mexc.com/auth/signup?inviteCode=1FQ1G) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://mexcdevelop.github.io/apidocs/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | |
53
53
  | [![okx](https://user-images.githubusercontent.com/1294454/152485636-38b19e4a-bece-4dec-979a-5982859ffc04.jpg)](https://www.okx.com/join/CCXT2023) | okx | [OKX](https://www.okx.com/join/CCXT2023) | [![API Version 5](https://img.shields.io/badge/5-lightgray)](https://www.okx.com/docs-v5/en/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with OKX using CCXT's referral link for a 20% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d20%25&color=orange)](https://www.okx.com/join/CCXT2023) |
54
54
  | [![woo](https://user-images.githubusercontent.com/1294454/150730761-1a00e5e0-d28c-480f-9e65-089ce3e6ef3b.jpg)](https://x.woo.org/register?ref=YWOWC96B) | woo | [WOO X](https://x.woo.org/register?ref=YWOWC96B) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://docs.woo.org/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with WOO X using CCXT's referral link for a 35% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d35%25&color=orange)](https://x.woo.org/register?ref=YWOWC96B) |
55
+ | [![woofipro](https://github.com/ccxt/ccxt/assets/43336371/b1e7b348-a0fc-4605-8b7f-91176958fd69)](https://dex.woo.org/en/trade?ref=CCXT) | woofipro | [WOOFI PRO](https://dex.woo.org/en/trade?ref=CCXT) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://orderly.network/docs/build-on-evm/building-on-evm) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | [![Sign up with WOOFI PRO using CCXT's referral link for a 5% discount!](https://img.shields.io/static/v1?label=Fee&message=%2d5%25&color=orange)](https://dex.woo.org/en/trade?ref=CCXT) |
55
56
 
56
57
  ## Supported Cryptocurrency Exchanges
57
58
 
58
- The CCXT library currently supports the following 97 cryptocurrency exchange markets and trading APIs:
59
+ The CCXT library currently supports the following 98 cryptocurrency exchange markets and trading APIs:
59
60
 
60
61
  | logo | id | name | ver | certified | pro |
61
62
  |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
@@ -153,6 +154,7 @@ The CCXT library currently supports the following 97 cryptocurrency exchange mar
153
154
  | [![wazirx](https://user-images.githubusercontent.com/1294454/148647666-c109c20b-f8ac-472f-91c3-5f658cb90f49.jpeg)](https://wazirx.com/invite/k7rrnks5) | wazirx | [WazirX](https://wazirx.com/invite/k7rrnks5) | [![API Version 2](https://img.shields.io/badge/2-lightgray)](https://docs.wazirx.com/#public-rest-api-for-wazirx) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
154
155
  | [![whitebit](https://user-images.githubusercontent.com/1294454/66732963-8eb7dd00-ee66-11e9-849b-10d9282bb9e0.jpg)](https://whitebit.com/referral/d9bdf40e-28f2-4b52-b2f9-cd1415d82963) | whitebit | [WhiteBit](https://whitebit.com/referral/d9bdf40e-28f2-4b52-b2f9-cd1415d82963) | [![API Version 4](https://img.shields.io/badge/4-lightgray)](https://github.com/whitebit-exchange/api-docs) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
155
156
  | [![woo](https://user-images.githubusercontent.com/1294454/150730761-1a00e5e0-d28c-480f-9e65-089ce3e6ef3b.jpg)](https://x.woo.org/register?ref=YWOWC96B) | woo | [WOO X](https://x.woo.org/register?ref=YWOWC96B) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://docs.woo.org/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
157
+ | [![woofipro](https://github.com/ccxt/ccxt/assets/43336371/b1e7b348-a0fc-4605-8b7f-91176958fd69)](https://dex.woo.org/en/trade?ref=CCXT) | woofipro | [WOOFI PRO](https://dex.woo.org/en/trade?ref=CCXT) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://orderly.network/docs/build-on-evm/building-on-evm) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) |
156
158
  | [![yobit](https://user-images.githubusercontent.com/1294454/27766910-cdcbfdae-5eea-11e7-9859-03fea873272d.jpg)](https://www.yobit.net) | yobit | [YoBit](https://www.yobit.net) | [![API Version 3](https://img.shields.io/badge/3-lightgray)](https://www.yobit.net/en/api/) | | |
157
159
  | [![zaif](https://user-images.githubusercontent.com/1294454/27766927-39ca2ada-5eeb-11e7-972f-1b4199518ca6.jpg)](https://zaif.jp) | zaif | [Zaif](https://zaif.jp) | [![API Version 1](https://img.shields.io/badge/1-lightgray)](https://techbureau-api-document.readthedocs.io/ja/latest/index.html) | | |
158
160
  | [![zonda](https://user-images.githubusercontent.com/1294454/159202310-a0e38007-5e7c-4ba9-a32f-c8263a0291fe.jpg)](https://auth.zondaglobal.com/ref/jHlbB4mIkdS1) | zonda | [Zonda](https://auth.zondaglobal.com/ref/jHlbB4mIkdS1) | [![API Version *](https://img.shields.io/badge/*-lightgray)](https://docs.zondacrypto.exchange/) | | |
@@ -213,13 +215,13 @@ console.log(version, Object.keys(exchanges));
213
215
 
214
216
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
215
217
 
216
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.18/dist/ccxt.browser.js
217
- * unpkg: https://unpkg.com/ccxt@4.3.18/dist/ccxt.browser.js
218
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.20/dist/ccxt.browser.js
219
+ * unpkg: https://unpkg.com/ccxt@4.3.20/dist/ccxt.browser.js
218
220
 
219
221
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
220
222
 
221
223
  ```HTML
222
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.18/dist/ccxt.browser.js"></script>
224
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.20/dist/ccxt.browser.js"></script>
223
225
  ```
224
226
 
225
227
  Creates a global `ccxt` object:
package/dist/cjs/ccxt.js CHANGED
@@ -112,6 +112,7 @@ var wavesexchange = require('./src/wavesexchange.js');
112
112
  var wazirx = require('./src/wazirx.js');
113
113
  var whitebit = require('./src/whitebit.js');
114
114
  var woo = require('./src/woo.js');
115
+ var woofipro = require('./src/woofipro.js');
115
116
  var yobit = require('./src/yobit.js');
116
117
  var zaif = require('./src/zaif.js');
117
118
  var zonda = require('./src/zonda.js');
@@ -179,10 +180,11 @@ var upbit$1 = require('./src/pro/upbit.js');
179
180
  var wazirx$1 = require('./src/pro/wazirx.js');
180
181
  var whitebit$1 = require('./src/pro/whitebit.js');
181
182
  var woo$1 = require('./src/pro/woo.js');
183
+ var woofipro$1 = require('./src/pro/woofipro.js');
182
184
 
183
185
  //-----------------------------------------------------------------------------
184
186
  // this is updated by vss.js when building
185
- const version = '4.3.18';
187
+ const version = '4.3.20';
186
188
  Exchange["default"].ccxtVersion = version;
187
189
  const exchanges = {
188
190
  'ace': ace,
@@ -285,6 +287,7 @@ const exchanges = {
285
287
  'wazirx': wazirx,
286
288
  'whitebit': whitebit,
287
289
  'woo': woo,
290
+ 'woofipro': woofipro,
288
291
  'yobit': yobit,
289
292
  'zaif': zaif,
290
293
  'zonda': zonda,
@@ -354,6 +357,7 @@ const pro = {
354
357
  'wazirx': wazirx$1,
355
358
  'whitebit': whitebit$1,
356
359
  'woo': woo$1,
360
+ 'woofipro': woofipro$1,
357
361
  };
358
362
  pro.exchanges = Object.keys(pro);
359
363
  pro['Exchange'] = Exchange["default"]; // now the same for rest and ts
@@ -502,6 +506,7 @@ exports.wavesexchange = wavesexchange;
502
506
  exports.wazirx = wazirx;
503
507
  exports.whitebit = whitebit;
504
508
  exports.woo = woo;
509
+ exports.woofipro = woofipro;
505
510
  exports.yobit = yobit;
506
511
  exports.zaif = zaif;
507
512
  exports.zonda = zonda;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Exchange$1 = require('../base/Exchange.js');
4
+
5
+ // -------------------------------------------------------------------------------
6
+ class Exchange extends Exchange$1["default"] {
7
+ }
8
+
9
+ module.exports = Exchange;
@@ -3162,7 +3162,6 @@ class ascendex extends ascendex$1 {
3162
3162
  const account = this.safeValue(this.accounts, 0, {});
3163
3163
  const accountGroup = this.safeString(account, 'id');
3164
3164
  const currency = this.currency(code);
3165
- amount = this.currencyToPrecision(code, amount);
3166
3165
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
3167
3166
  const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
3168
3167
  const toId = this.safeString(accountsByType, toAccount, toAccount);
@@ -3171,7 +3170,7 @@ class ascendex extends ascendex$1 {
3171
3170
  }
3172
3171
  const request = {
3173
3172
  'account-group': accountGroup,
3174
- 'amount': amount,
3173
+ 'amount': this.currencyToPrecision(code, amount),
3175
3174
  'asset': currency['id'],
3176
3175
  'fromAccount': fromId,
3177
3176
  'toAccount': toId,
@@ -3195,7 +3194,7 @@ class ascendex extends ascendex$1 {
3195
3194
  //
3196
3195
  // { "code": "0" }
3197
3196
  //
3198
- const status = this.safeInteger(transfer, 'code');
3197
+ const status = this.safeString(transfer, 'code');
3199
3198
  const currencyCode = this.safeCurrencyCode(undefined, currency);
3200
3199
  return {
3201
3200
  'info': transfer,
@@ -3210,7 +3209,7 @@ class ascendex extends ascendex$1 {
3210
3209
  };
3211
3210
  }
3212
3211
  parseTransferStatus(status) {
3213
- if (status === 0) {
3212
+ if (status === '0') {
3214
3213
  return 'ok';
3215
3214
  }
3216
3215
  return 'failed';
@@ -44,7 +44,7 @@ function _interopNamespace(e) {
44
44
  }
45
45
 
46
46
  // ----------------------------------------------------------------------------
47
- const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
47
+ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
48
48
  // ----------------------------------------------------------------------------
49
49
  /**
50
50
  * @class Exchange
@@ -83,6 +83,7 @@ class Exchange {
83
83
  this.balance = {};
84
84
  this.orderbooks = {};
85
85
  this.tickers = {};
86
+ this.fundingRates = {};
86
87
  this.bidsasks = {};
87
88
  this.orders = undefined;
88
89
  this.triggerOrders = undefined;
@@ -232,6 +233,7 @@ class Exchange {
232
233
  this.base64ToString = base64ToString;
233
234
  this.crc32 = crc32;
234
235
  this.packb = packb;
236
+ this.urlencodeBase64 = urlencodeBase64;
235
237
  this.httpProxyAgentModule = undefined;
236
238
  this.httpsProxyAgentModule = undefined;
237
239
  this.socksProxyAgentModule = undefined;
@@ -586,6 +588,7 @@ class Exchange {
586
588
  'apiKey': true,
587
589
  'secret': true,
588
590
  'uid': false,
591
+ 'accountId': false,
589
592
  'login': false,
590
593
  'password': false,
591
594
  'twofa': false,
@@ -2158,6 +2161,13 @@ class Exchange {
2158
2161
  const res = this.parseToNumeric((value % 1));
2159
2162
  return res === 0;
2160
2163
  }
2164
+ safeIntegerOmitZero(obj, key, defaultValue = undefined) {
2165
+ const timestamp = this.safeInteger(obj, key, defaultValue);
2166
+ if (timestamp === undefined || timestamp === 0) {
2167
+ return undefined;
2168
+ }
2169
+ return timestamp;
2170
+ }
2161
2171
  afterConstruct() {
2162
2172
  this.createNetworksByIdObject();
2163
2173
  }
@@ -5246,6 +5256,7 @@ class Exchange {
5246
5256
  //
5247
5257
  // the value of tickers is either a dict or a list
5248
5258
  //
5259
+ //
5249
5260
  // dict
5250
5261
  //
5251
5262
  // {
@@ -5340,13 +5351,17 @@ class Exchange {
5340
5351
  }
5341
5352
  return result;
5342
5353
  }
5343
- isTriggerOrder(params) {
5354
+ handleTriggerAndParams(params) {
5344
5355
  const isTrigger = this.safeBool2(params, 'trigger', 'stop');
5345
5356
  if (isTrigger) {
5346
5357
  params = this.omit(params, ['trigger', 'stop']);
5347
5358
  }
5348
5359
  return [isTrigger, params];
5349
5360
  }
5361
+ isTriggerOrder(params) {
5362
+ // for backwards compatibility
5363
+ return this.handleTriggerAndParams(params);
5364
+ }
5350
5365
  isPostOnly(isMarketOrder, exchangeSpecificParam, params = {}) {
5351
5366
  /**
5352
5367
  * @ignore
@@ -5933,6 +5948,9 @@ class Exchange {
5933
5948
  if (method === 'fetchAccounts') {
5934
5949
  response = await this[method](params);
5935
5950
  }
5951
+ else if (method === 'getLeverageTiersPaginated') {
5952
+ response = await this[method](symbol, params);
5953
+ }
5936
5954
  else {
5937
5955
  response = await this[method](symbol, since, maxEntriesPerRequest, params);
5938
5956
  }
@@ -6298,6 +6316,31 @@ class Exchange {
6298
6316
  }
6299
6317
  return marginModifications;
6300
6318
  }
6319
+ async fetchTransfer(id, code = undefined, params = {}) {
6320
+ /**
6321
+ * @method
6322
+ * @name exchange#fetchTransfer
6323
+ * @description fetches a transfer
6324
+ * @param {string} id transfer id
6325
+ * @param {[string]} code unified currency code
6326
+ * @param {object} params extra parameters specific to the exchange api endpoint
6327
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
6328
+ */
6329
+ throw new errors.NotSupported(this.id + ' fetchTransfer () is not supported yet');
6330
+ }
6331
+ async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
6332
+ /**
6333
+ * @method
6334
+ * @name exchange#fetchTransfer
6335
+ * @description fetches a transfer
6336
+ * @param {string} id transfer id
6337
+ * @param {int} [since] timestamp in ms of the earliest transfer to fetch
6338
+ * @param {int} [limit] the maximum amount of transfers to fetch
6339
+ * @param {object} params extra parameters specific to the exchange api endpoint
6340
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
6341
+ */
6342
+ throw new errors.NotSupported(this.id + ' fetchTransfers () is not supported yet');
6343
+ }
6301
6344
  }
6302
6345
 
6303
6346
  exports.Exchange = Exchange;
@@ -91,9 +91,16 @@ function axolotl(request, secret, curve) {
91
91
  return index.base58.encode(signature);
92
92
  }
93
93
  function eddsa(request, secret, curve) {
94
- // secret is the base64 pem encoded key
95
- // we get the last 32 bytes
96
- const privateKey = new Uint8Array(base64.Base64.unarmor(secret).slice(16));
94
+ let privateKey = undefined;
95
+ if (secret.length === 32) {
96
+ // ed25519 secret is 32 bytes
97
+ privateKey = secret;
98
+ }
99
+ else if (typeof secret === 'string') {
100
+ // secret is the base64 pem encoded key
101
+ // we get the last 32 bytes
102
+ privateKey = new Uint8Array(base64.Base64.unarmor(secret).slice(16));
103
+ }
97
104
  const signature = curve.sign(request, privateKey);
98
105
  return index.base64.encode(signature);
99
106
  }
@@ -15,9 +15,12 @@ const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedOb
15
15
  , urlencodeWithArrayRepeat = (object) => index$1.stringify(object, { arrayFormat: 'repeat' }), rawencode = (object) => index$1.stringify(object, { encode: false }), encode = index.utf8.decode // lol
16
16
  , decode = index.utf8.encode
17
17
  // Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
18
- , urlencodeBase64 = (base64string) => base64string.replace(/[=]+$/, '')
19
- .replace(/\+/g, '-')
20
- .replace(/\//g, '_'), numberToLE = (n, padding) => utils.numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => utils.numberToBytesBE(BigInt(n), padding);
18
+ , urlencodeBase64 = (payload) => {
19
+ const payload64 = (typeof payload === 'string') ? stringToBase64(payload) : binaryToBase64(payload);
20
+ return payload64.replace(/[=]+$/, '')
21
+ .replace(/\+/g, '-')
22
+ .replace(/\//g, '_');
23
+ }, numberToLE = (n, padding) => utils.numberToBytesLE(BigInt(n), padding), numberToBE = (n, padding) => utils.numberToBytesBE(BigInt(n), padding);
21
24
  function packb(req) {
22
25
  return msgpack.serialize(req);
23
26
  }
@@ -96,6 +96,9 @@ function precisionFromString(str) {
96
96
  }
97
97
  /* ------------------------------------------------------------------------ */
98
98
  const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
99
+ return _decimalToPrecision(x, roundingMode, numPrecisionDigits, countingMode, paddingMode);
100
+ };
101
+ const _decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode = DECIMAL_PLACES, paddingMode = NO_PADDING) => {
99
102
  if (countingMode === TICK_SIZE) {
100
103
  if (typeof numPrecisionDigits === 'string') {
101
104
  numPrecisionDigits = parseFloat(numPrecisionDigits);
@@ -107,7 +110,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
107
110
  if (numPrecisionDigits < 0) {
108
111
  const toNearest = Math.pow(10, -numPrecisionDigits);
109
112
  if (roundingMode === ROUND) {
110
- return (toNearest * decimalToPrecision(x / toNearest, roundingMode, 0, countingMode, paddingMode)).toString();
113
+ return (toNearest * _decimalToPrecision(x / toNearest, roundingMode, 0, countingMode, paddingMode)).toString();
111
114
  }
112
115
  if (roundingMode === TRUNCATE) {
113
116
  return (x - (x % toNearest)).toString();
@@ -115,12 +118,12 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
115
118
  }
116
119
  /* handle tick size */
117
120
  if (countingMode === TICK_SIZE) {
118
- const precisionDigitsString = decimalToPrecision(numPrecisionDigits, ROUND, 22, DECIMAL_PLACES, NO_PADDING);
121
+ const precisionDigitsString = _decimalToPrecision(numPrecisionDigits, ROUND, 22, DECIMAL_PLACES, NO_PADDING);
119
122
  const newNumPrecisionDigits = precisionFromString(precisionDigitsString);
120
123
  let missing = x % numPrecisionDigits;
121
124
  // See: https://github.com/ccxt/ccxt/pull/6486
122
- missing = Number(decimalToPrecision(missing, ROUND, 8, DECIMAL_PLACES, NO_PADDING));
123
- const fpError = decimalToPrecision(missing / numPrecisionDigits, ROUND, Math.max(newNumPrecisionDigits, 8), DECIMAL_PLACES, NO_PADDING);
125
+ missing = Number(_decimalToPrecision(missing, ROUND, 8, DECIMAL_PLACES, NO_PADDING));
126
+ const fpError = _decimalToPrecision(missing / numPrecisionDigits, ROUND, Math.max(newNumPrecisionDigits, 8), DECIMAL_PLACES, NO_PADDING);
124
127
  if (precisionFromString(fpError) !== 0) {
125
128
  if (roundingMode === ROUND) {
126
129
  if (x > 0) {
@@ -144,7 +147,7 @@ const decimalToPrecision = (x, roundingMode, numPrecisionDigits, countingMode =
144
147
  x = x - missing;
145
148
  }
146
149
  }
147
- return decimalToPrecision(x, ROUND, newNumPrecisionDigits, DECIMAL_PLACES, paddingMode);
150
+ return _decimalToPrecision(x, ROUND, newNumPrecisionDigits, DECIMAL_PLACES, paddingMode);
148
151
  }
149
152
  /* Convert to a string (if needed), skip leading minus sign (if any) */
150
153
  const str = numberToString(x);
@@ -25,22 +25,22 @@ function jwt(request, secret, hash, isRSA = false, opts = {}) {
25
25
  request['iat'] = header['iat'];
26
26
  delete header['iat'];
27
27
  }
28
- const encodedHeader = encode.urlencodeBase64(encode.stringToBase64(JSON.stringify(header)));
29
- const encodedData = encode.urlencodeBase64(encode.stringToBase64(JSON.stringify(request)));
28
+ const encodedHeader = encode.urlencodeBase64(JSON.stringify(header));
29
+ const encodedData = encode.urlencodeBase64(JSON.stringify(request));
30
30
  const token = [encodedHeader, encodedData].join('.');
31
31
  const algoType = alg.slice(0, 2);
32
32
  let signature = undefined;
33
33
  if (algoType === 'HS') {
34
- signature = encode.urlencodeBase64(crypto.hmac(token, secret, hash, 'base64'));
34
+ signature = encode.urlencodeBase64(crypto.hmac(token, secret, hash, 'binary'));
35
35
  }
36
36
  else if (isRSA || algoType === 'RS') {
37
- signature = encode.urlencodeBase64(rsa(token, index.utf8.encode(secret), hash));
37
+ signature = encode.urlencodeBase64(encode.base64ToBinary(rsa(token, index.utf8.encode(secret), hash)));
38
38
  }
39
39
  else if (algoType === 'ES') {
40
40
  const signedHash = crypto.ecdsa(token, index.utf8.encode(secret), p256.P256, hash);
41
41
  const r = signedHash.r.padStart(64, '0');
42
42
  const s = signedHash.s.padStart(64, '0');
43
- signature = encode.urlencodeBase64(encode.binaryToBase64(encode.base16ToBinary(r + s)));
43
+ signature = encode.urlencodeBase64(encode.base16ToBinary(r + s));
44
44
  }
45
45
  return [token, signature].join('.');
46
46
  }
@@ -2140,7 +2140,7 @@ class bigone extends bigone$1 {
2140
2140
  // "data": null
2141
2141
  // }
2142
2142
  //
2143
- const code = this.safeNumber(transfer, 'code');
2143
+ const code = this.safeString(transfer, 'code');
2144
2144
  return {
2145
2145
  'info': transfer,
2146
2146
  'id': undefined,
@@ -860,7 +860,7 @@ class bitfinex extends bitfinex$1 {
860
860
  const response = await this.publicGetTickers(params);
861
861
  const result = {};
862
862
  for (let i = 0; i < response.length; i++) {
863
- const ticker = this.parseTicker(response[i]);
863
+ const ticker = this.parseTicker({ 'result': response[i] });
864
864
  const symbol = ticker['symbol'];
865
865
  result[symbol] = ticker;
866
866
  }
@@ -882,9 +882,33 @@ class bitfinex extends bitfinex$1 {
882
882
  'symbol': market['id'],
883
883
  };
884
884
  const ticker = await this.publicGetPubtickerSymbol(this.extend(request, params));
885
+ //
886
+ // {
887
+ // mid: '63560.5',
888
+ // bid: '63560.0',
889
+ // ask: '63561.0',
890
+ // last_price: '63547.0',
891
+ // low: '62812.0',
892
+ // high: '64480.0',
893
+ // volume: '517.25634977',
894
+ // timestamp: '1715102384.9849467'
895
+ // }
896
+ //
885
897
  return this.parseTicker(ticker, market);
886
898
  }
887
899
  parseTicker(ticker, market = undefined) {
900
+ //
901
+ // {
902
+ // mid: '63560.5',
903
+ // bid: '63560.0',
904
+ // ask: '63561.0',
905
+ // last_price: '63547.0',
906
+ // low: '62812.0',
907
+ // high: '64480.0',
908
+ // volume: '517.25634977',
909
+ // timestamp: '1715102384.9849467'
910
+ // }
911
+ //
888
912
  const timestamp = this.safeTimestamp(ticker, 'timestamp');
889
913
  const marketId = this.safeString(ticker, 'pair');
890
914
  market = this.safeMarket(marketId, market);
@@ -946,7 +946,7 @@ class bitfinex2 extends bitfinex2$1 {
946
946
  this.throwExactlyMatchedException(this.exceptions['exact'], message, this.id + ' ' + message);
947
947
  throw new errors.ExchangeError(this.id + ' ' + message);
948
948
  }
949
- return this.parseTransfer(response, currency);
949
+ return this.parseTransfer({ 'result': response }, currency);
950
950
  }
951
951
  parseTransfer(transfer, currency = undefined) {
952
952
  //
@@ -972,12 +972,13 @@ class bitfinex2 extends bitfinex2$1 {
972
972
  // "1.0 Tether USDt transfered from Exchange to Margin"
973
973
  // ]
974
974
  //
975
- const timestamp = this.safeInteger(transfer, 0);
976
- const info = this.safeValue(transfer, 4);
975
+ const result = this.safeList(transfer, 'result');
976
+ const timestamp = this.safeInteger(result, 0);
977
+ const info = this.safeValue(result, 4);
977
978
  const fromAccount = this.safeString(info, 1);
978
979
  const toAccount = this.safeString(info, 2);
979
980
  const currencyId = this.safeString(info, 5);
980
- const status = this.safeString(transfer, 6);
981
+ const status = this.safeString(result, 6);
981
982
  return {
982
983
  'id': undefined,
983
984
  'timestamp': timestamp,
@@ -987,7 +988,7 @@ class bitfinex2 extends bitfinex2$1 {
987
988
  'currency': this.safeCurrencyCode(currencyId, currency),
988
989
  'fromAccount': fromAccount,
989
990
  'toAccount': toAccount,
990
- 'info': transfer,
991
+ 'info': result,
991
992
  };
992
993
  }
993
994
  parseTransferStatus(status) {
@@ -1073,67 +1074,73 @@ class bitfinex2 extends bitfinex2$1 {
1073
1074
  //
1074
1075
  // on trading pairs (ex. tBTCUSD)
1075
1076
  //
1076
- // [
1077
- // SYMBOL,
1078
- // BID,
1079
- // BID_SIZE,
1080
- // ASK,
1081
- // ASK_SIZE,
1082
- // DAILY_CHANGE,
1083
- // DAILY_CHANGE_RELATIVE,
1084
- // LAST_PRICE,
1085
- // VOLUME,
1086
- // HIGH,
1087
- // LOW
1088
- // ]
1077
+ // {
1078
+ // 'result': [
1079
+ // SYMBOL,
1080
+ // BID,
1081
+ // BID_SIZE,
1082
+ // ASK,
1083
+ // ASK_SIZE,
1084
+ // DAILY_CHANGE,
1085
+ // DAILY_CHANGE_RELATIVE,
1086
+ // LAST_PRICE,
1087
+ // VOLUME,
1088
+ // HIGH,
1089
+ // LOW
1090
+ // ]
1091
+ // }
1092
+ //
1089
1093
  //
1090
1094
  // on funding currencies (ex. fUSD)
1091
1095
  //
1092
- // [
1093
- // SYMBOL,
1094
- // FRR,
1095
- // BID,
1096
- // BID_PERIOD,
1097
- // BID_SIZE,
1098
- // ASK,
1099
- // ASK_PERIOD,
1100
- // ASK_SIZE,
1101
- // DAILY_CHANGE,
1102
- // DAILY_CHANGE_RELATIVE,
1103
- // LAST_PRICE,
1104
- // VOLUME,
1105
- // HIGH,
1106
- // LOW,
1107
- // _PLACEHOLDER,
1108
- // _PLACEHOLDER,
1109
- // FRR_AMOUNT_AVAILABLE
1110
- // ]
1096
+ // {
1097
+ // 'result': [
1098
+ // SYMBOL,
1099
+ // FRR,
1100
+ // BID,
1101
+ // BID_PERIOD,
1102
+ // BID_SIZE,
1103
+ // ASK,
1104
+ // ASK_PERIOD,
1105
+ // ASK_SIZE,
1106
+ // DAILY_CHANGE,
1107
+ // DAILY_CHANGE_RELATIVE,
1108
+ // LAST_PRICE,
1109
+ // VOLUME,
1110
+ // HIGH,
1111
+ // LOW,
1112
+ // _PLACEHOLDER,
1113
+ // _PLACEHOLDER,
1114
+ // FRR_AMOUNT_AVAILABLE
1115
+ // ]
1116
+ // }
1111
1117
  //
1118
+ const result = this.safeList(ticker, 'result');
1112
1119
  const symbol = this.safeSymbol(undefined, market);
1113
- const length = ticker.length;
1114
- const last = this.safeString(ticker, length - 4);
1115
- const percentage = this.safeString(ticker, length - 5);
1120
+ const length = result.length;
1121
+ const last = this.safeString(result, length - 4);
1122
+ const percentage = this.safeString(result, length - 5);
1116
1123
  return this.safeTicker({
1117
1124
  'symbol': symbol,
1118
1125
  'timestamp': undefined,
1119
1126
  'datetime': undefined,
1120
- 'high': this.safeString(ticker, length - 2),
1121
- 'low': this.safeString(ticker, length - 1),
1122
- 'bid': this.safeString(ticker, length - 10),
1123
- 'bidVolume': this.safeString(ticker, length - 9),
1124
- 'ask': this.safeString(ticker, length - 8),
1125
- 'askVolume': this.safeString(ticker, length - 7),
1127
+ 'high': this.safeString(result, length - 2),
1128
+ 'low': this.safeString(result, length - 1),
1129
+ 'bid': this.safeString(result, length - 10),
1130
+ 'bidVolume': this.safeString(result, length - 9),
1131
+ 'ask': this.safeString(result, length - 8),
1132
+ 'askVolume': this.safeString(result, length - 7),
1126
1133
  'vwap': undefined,
1127
1134
  'open': undefined,
1128
1135
  'close': last,
1129
1136
  'last': last,
1130
1137
  'previousClose': undefined,
1131
- 'change': this.safeString(ticker, length - 6),
1138
+ 'change': this.safeString(result, length - 6),
1132
1139
  'percentage': Precise["default"].stringMul(percentage, '100'),
1133
1140
  'average': undefined,
1134
- 'baseVolume': this.safeString(ticker, length - 3),
1141
+ 'baseVolume': this.safeString(result, length - 3),
1135
1142
  'quoteVolume': undefined,
1136
- 'info': ticker,
1143
+ 'info': result,
1137
1144
  }, market);
1138
1145
  }
1139
1146
  async fetchTickers(symbols = undefined, params = {}) {
@@ -1202,7 +1209,7 @@ class bitfinex2 extends bitfinex2$1 {
1202
1209
  const marketId = this.safeString(ticker, 0);
1203
1210
  const market = this.safeMarket(marketId);
1204
1211
  const symbol = market['symbol'];
1205
- result[symbol] = this.parseTicker(ticker, market);
1212
+ result[symbol] = this.parseTicker({ 'result': ticker }, market);
1206
1213
  }
1207
1214
  return this.filterByArrayTickers(result, 'symbol', symbols);
1208
1215
  }
@@ -1222,7 +1229,8 @@ class bitfinex2 extends bitfinex2$1 {
1222
1229
  'symbol': market['id'],
1223
1230
  };
1224
1231
  const ticker = await this.publicGetTickerSymbol(this.extend(request, params));
1225
- return this.parseTicker(ticker, market);
1232
+ const result = { 'result': ticker };
1233
+ return this.parseTicker(result, market);
1226
1234
  }
1227
1235
  parseTrade(trade, market = undefined) {
1228
1236
  //
@@ -310,6 +310,9 @@ class bitget extends bitget$1 {
310
310
  'v2/spot/account/subaccount-assets': 2,
311
311
  'v2/spot/account/bills': 2,
312
312
  'v2/spot/account/transferRecords': 1,
313
+ 'v2/account/funding-assets': 2,
314
+ 'v2/account/bot-assets': 2,
315
+ 'v2/account/all-account-balance': 20,
313
316
  'v2/spot/wallet/deposit-address': 2,
314
317
  'v2/spot/wallet/deposit-records': 2,
315
318
  'v2/spot/wallet/withdrawal-records': 2,
@@ -2632,11 +2635,7 @@ class bitget extends bitget$1 {
2632
2635
  //
2633
2636
  const marketId = this.safeString(ticker, 'symbol');
2634
2637
  const close = this.safeString(ticker, 'lastPr');
2635
- const timestampString = this.omitZero(this.safeString(ticker, 'ts')); // exchange sometimes provided 0
2636
- let timestamp = undefined;
2637
- if (timestampString !== undefined) {
2638
- timestamp = this.parseToInt(timestampString);
2639
- }
2638
+ const timestamp = this.safeIntegerOmitZero(ticker, 'ts'); // exchange bitget provided 0
2640
2639
  const change = this.safeString(ticker, 'change24h');
2641
2640
  const open24 = this.safeString(ticker, 'open24');
2642
2641
  const open = this.safeString(ticker, 'open');