ccxt 4.4.30__py2.py3-none-any.whl → 4.4.32__py2.py3-none-any.whl

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 (268) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/ace.py +36 -12
  3. ccxt/alpaca.py +62 -22
  4. ccxt/ascendex.py +65 -30
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +36 -12
  7. ccxt/async_support/alpaca.py +62 -22
  8. ccxt/async_support/ascendex.py +65 -30
  9. ccxt/async_support/base/exchange.py +3 -3
  10. ccxt/async_support/base/ws/aiohttp_client.py +25 -3
  11. ccxt/async_support/bigone.py +71 -27
  12. ccxt/async_support/binance.py +555 -323
  13. ccxt/async_support/bingx.py +208 -108
  14. ccxt/async_support/bit2c.py +34 -12
  15. ccxt/async_support/bitbank.py +42 -14
  16. ccxt/async_support/bitbns.py +17 -9
  17. ccxt/async_support/bitfinex.py +68 -24
  18. ccxt/async_support/bitfinex2.py +116 -44
  19. ccxt/async_support/bitflyer.py +54 -18
  20. ccxt/async_support/bitget.py +277 -145
  21. ccxt/async_support/bithumb.py +39 -14
  22. ccxt/async_support/bitmart.py +145 -79
  23. ccxt/async_support/bitmex.py +90 -30
  24. ccxt/async_support/bitopro.py +66 -22
  25. ccxt/async_support/bitrue.py +109 -57
  26. ccxt/async_support/bitso.py +55 -19
  27. ccxt/async_support/bitstamp.py +84 -36
  28. ccxt/async_support/bitteam.py +51 -17
  29. ccxt/async_support/bitvavo.py +57 -22
  30. ccxt/async_support/bl3p.py +26 -10
  31. ccxt/async_support/blockchaincom.py +63 -21
  32. ccxt/async_support/blofin.py +95 -38
  33. ccxt/async_support/btcalpha.py +48 -16
  34. ccxt/async_support/btcbox.py +27 -9
  35. ccxt/async_support/btcmarkets.py +57 -19
  36. ccxt/async_support/btcturk.py +36 -12
  37. ccxt/async_support/bybit.py +251 -95
  38. ccxt/async_support/cex.py +65 -22
  39. ccxt/async_support/coinbase.py +138 -56
  40. ccxt/async_support/coinbaseexchange.py +76 -28
  41. ccxt/async_support/coinbaseinternational.py +75 -27
  42. ccxt/async_support/coincatch.py +191 -97
  43. ccxt/async_support/coincheck.py +33 -11
  44. ccxt/async_support/coinex.py +212 -101
  45. ccxt/async_support/coinlist.py +87 -30
  46. ccxt/async_support/coinmate.py +55 -24
  47. ccxt/async_support/coinmetro.py +52 -18
  48. ccxt/async_support/coinone.py +27 -10
  49. ccxt/async_support/coinsph.py +73 -27
  50. ccxt/async_support/coinspot.py +25 -9
  51. ccxt/async_support/cryptocom.py +103 -38
  52. ccxt/async_support/currencycom.py +70 -23
  53. ccxt/async_support/delta.py +90 -30
  54. ccxt/async_support/deribit.py +131 -50
  55. ccxt/async_support/digifinex.py +114 -51
  56. ccxt/async_support/exmo.py +104 -45
  57. ccxt/async_support/gate.py +313 -157
  58. ccxt/async_support/gemini.py +57 -20
  59. ccxt/async_support/hashkey.py +151 -66
  60. ccxt/async_support/hitbtc.py +157 -74
  61. ccxt/async_support/hollaex.py +76 -25
  62. ccxt/async_support/htx.py +297 -240
  63. ccxt/async_support/huobijp.py +1 -0
  64. ccxt/async_support/hyperliquid.py +94 -38
  65. ccxt/async_support/idex.py +73 -24
  66. ccxt/async_support/independentreserve.py +12 -5
  67. ccxt/async_support/indodax.py +54 -17
  68. ccxt/async_support/kraken.py +108 -36
  69. ccxt/async_support/krakenfutures.py +88 -34
  70. ccxt/async_support/kucoin.py +214 -110
  71. ccxt/async_support/kucoinfutures.py +209 -64
  72. ccxt/async_support/kuna.py +80 -39
  73. ccxt/async_support/latoken.py +70 -33
  74. ccxt/async_support/lbank.py +89 -38
  75. ccxt/async_support/luno.py +54 -19
  76. ccxt/async_support/lykke.py +54 -19
  77. ccxt/async_support/mercado.py +1 -0
  78. ccxt/async_support/mexc.py +226 -108
  79. ccxt/async_support/ndax.py +58 -19
  80. ccxt/async_support/novadax.py +67 -22
  81. ccxt/async_support/oceanex.py +58 -19
  82. ccxt/async_support/okcoin.py +81 -38
  83. ccxt/async_support/okx.py +270 -109
  84. ccxt/async_support/onetrading.py +3 -1
  85. ccxt/async_support/oxfun.py +95 -36
  86. ccxt/async_support/p2b.py +49 -23
  87. ccxt/async_support/paradex.py +75 -27
  88. ccxt/async_support/paymium.py +31 -11
  89. ccxt/async_support/phemex.py +108 -56
  90. ccxt/async_support/poloniex.py +80 -30
  91. ccxt/async_support/poloniexfutures.py +72 -30
  92. ccxt/async_support/probit.py +64 -22
  93. ccxt/async_support/timex.py +58 -19
  94. ccxt/async_support/tokocrypto.py +63 -22
  95. ccxt/async_support/tradeogre.py +7 -2
  96. ccxt/async_support/upbit.py +72 -25
  97. ccxt/async_support/vertex.py +74 -28
  98. ccxt/async_support/wavesexchange.py +32 -8
  99. ccxt/async_support/wazirx.py +51 -17
  100. ccxt/async_support/whitebit.py +105 -41
  101. ccxt/async_support/woo.py +162 -65
  102. ccxt/async_support/woofipro.py +119 -50
  103. ccxt/async_support/xt.py +150 -73
  104. ccxt/async_support/yobit.py +49 -16
  105. ccxt/async_support/zaif.py +30 -10
  106. ccxt/async_support/zonda.py +46 -16
  107. ccxt/base/exchange.py +47 -35
  108. ccxt/base/types.py +1 -0
  109. ccxt/bigone.py +71 -27
  110. ccxt/binance.py +555 -323
  111. ccxt/bingx.py +208 -108
  112. ccxt/bit2c.py +34 -12
  113. ccxt/bitbank.py +42 -14
  114. ccxt/bitbns.py +17 -9
  115. ccxt/bitfinex.py +68 -24
  116. ccxt/bitfinex2.py +116 -44
  117. ccxt/bitflyer.py +54 -18
  118. ccxt/bitget.py +277 -145
  119. ccxt/bithumb.py +39 -14
  120. ccxt/bitmart.py +145 -79
  121. ccxt/bitmex.py +90 -30
  122. ccxt/bitopro.py +66 -22
  123. ccxt/bitrue.py +109 -57
  124. ccxt/bitso.py +55 -19
  125. ccxt/bitstamp.py +84 -36
  126. ccxt/bitteam.py +51 -17
  127. ccxt/bitvavo.py +57 -22
  128. ccxt/bl3p.py +26 -10
  129. ccxt/blockchaincom.py +63 -21
  130. ccxt/blofin.py +95 -38
  131. ccxt/btcalpha.py +48 -16
  132. ccxt/btcbox.py +27 -9
  133. ccxt/btcmarkets.py +57 -19
  134. ccxt/btcturk.py +36 -12
  135. ccxt/bybit.py +251 -95
  136. ccxt/cex.py +65 -22
  137. ccxt/coinbase.py +138 -56
  138. ccxt/coinbaseexchange.py +76 -28
  139. ccxt/coinbaseinternational.py +75 -27
  140. ccxt/coincatch.py +191 -97
  141. ccxt/coincheck.py +33 -11
  142. ccxt/coinex.py +212 -101
  143. ccxt/coinlist.py +87 -30
  144. ccxt/coinmate.py +55 -24
  145. ccxt/coinmetro.py +52 -18
  146. ccxt/coinone.py +27 -10
  147. ccxt/coinsph.py +73 -27
  148. ccxt/coinspot.py +25 -9
  149. ccxt/cryptocom.py +103 -38
  150. ccxt/currencycom.py +70 -23
  151. ccxt/delta.py +90 -30
  152. ccxt/deribit.py +131 -50
  153. ccxt/digifinex.py +114 -51
  154. ccxt/exmo.py +104 -45
  155. ccxt/gate.py +313 -157
  156. ccxt/gemini.py +57 -20
  157. ccxt/hashkey.py +151 -66
  158. ccxt/hitbtc.py +157 -74
  159. ccxt/hollaex.py +76 -25
  160. ccxt/htx.py +297 -240
  161. ccxt/huobijp.py +1 -0
  162. ccxt/hyperliquid.py +94 -38
  163. ccxt/idex.py +73 -24
  164. ccxt/independentreserve.py +12 -5
  165. ccxt/indodax.py +54 -17
  166. ccxt/kraken.py +108 -36
  167. ccxt/krakenfutures.py +88 -34
  168. ccxt/kucoin.py +214 -110
  169. ccxt/kucoinfutures.py +209 -64
  170. ccxt/kuna.py +80 -39
  171. ccxt/latoken.py +70 -33
  172. ccxt/lbank.py +89 -38
  173. ccxt/luno.py +54 -19
  174. ccxt/lykke.py +54 -19
  175. ccxt/mercado.py +1 -0
  176. ccxt/mexc.py +226 -108
  177. ccxt/ndax.py +58 -19
  178. ccxt/novadax.py +67 -22
  179. ccxt/oceanex.py +58 -19
  180. ccxt/okcoin.py +81 -38
  181. ccxt/okx.py +270 -109
  182. ccxt/onetrading.py +3 -1
  183. ccxt/oxfun.py +95 -36
  184. ccxt/p2b.py +49 -23
  185. ccxt/paradex.py +75 -27
  186. ccxt/paymium.py +31 -11
  187. ccxt/phemex.py +108 -56
  188. ccxt/poloniex.py +80 -30
  189. ccxt/poloniexfutures.py +72 -30
  190. ccxt/pro/__init__.py +1 -1
  191. ccxt/pro/alpaca.py +15 -5
  192. ccxt/pro/ascendex.py +18 -6
  193. ccxt/pro/binance.py +204 -123
  194. ccxt/pro/bingx.py +44 -24
  195. ccxt/pro/bitfinex.py +13 -5
  196. ccxt/pro/bitget.py +76 -37
  197. ccxt/pro/bithumb.py +12 -4
  198. ccxt/pro/bitmart.py +44 -20
  199. ccxt/pro/bitmex.py +42 -14
  200. ccxt/pro/bitopro.py +15 -5
  201. ccxt/pro/bitrue.py +7 -3
  202. ccxt/pro/bitvavo.py +97 -62
  203. ccxt/pro/blockchaincom.py +18 -6
  204. ccxt/pro/blofin.py +36 -12
  205. ccxt/pro/bybit.py +100 -42
  206. ccxt/pro/cex.py +48 -16
  207. ccxt/pro/coinbase.py +32 -12
  208. ccxt/pro/coinbaseexchange.py +1 -1
  209. ccxt/pro/coinbaseinternational.py +34 -14
  210. ccxt/pro/coincatch.py +54 -19
  211. ccxt/pro/coincheck.py +6 -2
  212. ccxt/pro/coinex.py +40 -20
  213. ccxt/pro/coinone.py +9 -3
  214. ccxt/pro/cryptocom.py +71 -27
  215. ccxt/pro/deribit.py +36 -12
  216. ccxt/pro/exmo.py +10 -4
  217. ccxt/pro/gate.py +65 -31
  218. ccxt/pro/gemini.py +21 -7
  219. ccxt/pro/hashkey.py +27 -9
  220. ccxt/pro/hitbtc.py +61 -37
  221. ccxt/pro/hollaex.py +15 -5
  222. ccxt/pro/htx.py +39 -21
  223. ccxt/pro/hyperliquid.py +41 -14
  224. ccxt/pro/kraken.py +49 -17
  225. ccxt/pro/krakenfutures.py +47 -24
  226. ccxt/pro/kucoin.py +60 -31
  227. ccxt/pro/kucoinfutures.py +41 -19
  228. ccxt/pro/lbank.py +27 -9
  229. ccxt/pro/luno.py +3 -1
  230. ccxt/pro/mexc.py +36 -19
  231. ccxt/pro/ndax.py +12 -4
  232. ccxt/pro/okcoin.py +18 -6
  233. ccxt/pro/okx.py +76 -28
  234. ccxt/pro/onetrading.py +21 -7
  235. ccxt/pro/oxfun.py +54 -20
  236. ccxt/pro/p2b.py +23 -11
  237. ccxt/pro/paradex.py +12 -4
  238. ccxt/pro/phemex.py +31 -19
  239. ccxt/pro/poloniex.py +50 -22
  240. ccxt/pro/poloniexfutures.py +17 -7
  241. ccxt/pro/probit.py +18 -6
  242. ccxt/pro/upbit.py +25 -9
  243. ccxt/pro/vertex.py +20 -6
  244. ccxt/pro/wazirx.py +21 -7
  245. ccxt/pro/whitebit.py +25 -9
  246. ccxt/pro/woo.py +32 -12
  247. ccxt/pro/woofipro.py +35 -13
  248. ccxt/pro/xt.py +46 -26
  249. ccxt/probit.py +64 -22
  250. ccxt/timex.py +58 -19
  251. ccxt/tokocrypto.py +63 -22
  252. ccxt/tradeogre.py +7 -2
  253. ccxt/upbit.py +72 -25
  254. ccxt/vertex.py +74 -28
  255. ccxt/wavesexchange.py +32 -8
  256. ccxt/wazirx.py +51 -17
  257. ccxt/whitebit.py +105 -41
  258. ccxt/woo.py +162 -65
  259. ccxt/woofipro.py +119 -50
  260. ccxt/xt.py +150 -73
  261. ccxt/yobit.py +49 -16
  262. ccxt/zaif.py +30 -10
  263. ccxt/zonda.py +46 -16
  264. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/METADATA +11 -5
  265. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/RECORD +268 -268
  266. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/LICENSE.txt +0 -0
  267. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/WHEEL +0 -0
  268. {ccxt-4.4.30.dist-info → ccxt-4.4.32.dist-info}/top_level.txt +0 -0
ccxt/pro/bitmex.py CHANGED
@@ -66,7 +66,9 @@ class bitmex(ccxt.async_support.bitmex):
66
66
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
67
67
  """
68
68
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
69
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
69
+
70
+ https://www.bitmex.com/app/wsAPI#Subscriptions
71
+
70
72
  :param str symbol: unified symbol of the market to fetch the ticker for
71
73
  :param dict [params]: extra parameters specific to the exchange API endpoint
72
74
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -79,7 +81,9 @@ class bitmex(ccxt.async_support.bitmex):
79
81
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
80
82
  """
81
83
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
82
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
84
+
85
+ https://www.bitmex.com/app/wsAPI#Subscriptions
86
+
83
87
  :param str[] symbols: unified symbol of the market to fetch the ticker for
84
88
  :param dict [params]: extra parameters specific to the exchange API endpoint
85
89
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -359,7 +363,9 @@ class bitmex(ccxt.async_support.bitmex):
359
363
  async def watch_liquidations(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
360
364
  """
361
365
  watch the public liquidations of a trading pair
362
- :see: https://www.bitmex.com/app/wsAPI#Liquidation
366
+
367
+ https://www.bitmex.com/app/wsAPI#Liquidation
368
+
363
369
  :param str symbol: unified CCXT market symbol
364
370
  :param int [since]: the earliest time in ms to fetch liquidations for
365
371
  :param int [limit]: the maximum number of liquidation structures to retrieve
@@ -371,8 +377,10 @@ class bitmex(ccxt.async_support.bitmex):
371
377
  async def watch_liquidations_for_symbols(self, symbols: List[str] = None, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
372
378
  """
373
379
  watch the public liquidations of a trading pair
374
- :see: https://www.bitmex.com/app/wsAPI#Liquidation
375
- :param str symbol: unified CCXT market symbol
380
+
381
+ https://www.bitmex.com/app/wsAPI#Liquidation
382
+
383
+ :param str[] symbols:
376
384
  :param int [since]: the earliest time in ms to fetch liquidations for
377
385
  :param int [limit]: the maximum number of liquidation structures to retrieve
378
386
  :param dict [params]: exchange specific parameters for the bitmex api endpoint
@@ -451,7 +459,9 @@ class bitmex(ccxt.async_support.bitmex):
451
459
  async def watch_balance(self, params={}) -> Balances:
452
460
  """
453
461
  watch balance and get the amount of funds available for trading or funds locked in orders
454
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
462
+
463
+ https://www.bitmex.com/app/wsAPI#Subscriptions
464
+
455
465
  :param dict [params]: extra parameters specific to the exchange API endpoint
456
466
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
457
467
  """
@@ -654,7 +664,9 @@ class bitmex(ccxt.async_support.bitmex):
654
664
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
655
665
  """
656
666
  get the list of most recent trades for a particular symbol
657
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
667
+
668
+ https://www.bitmex.com/app/wsAPI#Subscriptions
669
+
658
670
  :param str symbol: unified symbol of the market to fetch trades for
659
671
  :param int [since]: timestamp in ms of the earliest trade to fetch
660
672
  :param int [limit]: the maximum amount of trades to fetch
@@ -702,8 +714,12 @@ class bitmex(ccxt.async_support.bitmex):
702
714
  async def watch_positions(self, symbols: Strings = None, since: Int = None, limit: Int = None, params={}) -> List[Position]:
703
715
  """
704
716
  watch all open positions
705
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
717
+
718
+ https://www.bitmex.com/app/wsAPI#Subscriptions
719
+
706
720
  :param str[]|None symbols: list of unified market symbols
721
+ :param int [since]: the earliest time in ms to watch positions for
722
+ :param int [limit]: the maximum number of positions to retrieve
707
723
  :param dict params: extra parameters specific to the exchange API endpoint
708
724
  :returns dict[]: a list of `position structure <https://docs.ccxt.com/en/latest/manual.html#position-structure>`
709
725
  """
@@ -898,7 +914,9 @@ class bitmex(ccxt.async_support.bitmex):
898
914
  async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
899
915
  """
900
916
  watches information on multiple orders made by the user
901
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
917
+
918
+ https://www.bitmex.com/app/wsAPI#Subscriptions
919
+
902
920
  :param str symbol: unified market symbol of the market orders were made in
903
921
  :param int [since]: the earliest time in ms to fetch orders for
904
922
  :param int [limit]: the maximum number of order structures to retrieve
@@ -1105,7 +1123,9 @@ class bitmex(ccxt.async_support.bitmex):
1105
1123
  async def watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
1106
1124
  """
1107
1125
  watches information on multiple trades made by the user
1108
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
1126
+
1127
+ https://www.bitmex.com/app/wsAPI#Subscriptions
1128
+
1109
1129
  :param str symbol: unified market symbol of the market trades were made in
1110
1130
  :param int [since]: the earliest time in ms to fetch trades for
1111
1131
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -1215,7 +1235,9 @@ class bitmex(ccxt.async_support.bitmex):
1215
1235
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
1216
1236
  """
1217
1237
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1218
- :see: https://www.bitmex.com/app/wsAPI#OrderBookL2
1238
+
1239
+ https://www.bitmex.com/app/wsAPI#OrderBookL2
1240
+
1219
1241
  :param str symbol: unified symbol of the market to fetch the order book for
1220
1242
  :param int [limit]: the maximum amount of order book entries to return
1221
1243
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1226,7 +1248,9 @@ class bitmex(ccxt.async_support.bitmex):
1226
1248
  async def watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={}) -> OrderBook:
1227
1249
  """
1228
1250
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
1229
- :see: https://www.bitmex.com/app/wsAPI#OrderBookL2
1251
+
1252
+ https://www.bitmex.com/app/wsAPI#OrderBookL2
1253
+
1230
1254
  :param str[] symbols: unified array of symbols
1231
1255
  :param int [limit]: the maximum amount of order book entries to return
1232
1256
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1263,7 +1287,9 @@ class bitmex(ccxt.async_support.bitmex):
1263
1287
  async def watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={}) -> List[Trade]:
1264
1288
  """
1265
1289
  get the list of most recent trades for a list of symbols
1266
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
1290
+
1291
+ https://www.bitmex.com/app/wsAPI#Subscriptions
1292
+
1267
1293
  :param str[] symbols: unified symbol of the market to fetch trades for
1268
1294
  :param int [since]: timestamp in ms of the earliest trade to fetch
1269
1295
  :param int [limit]: the maximum amount of trades to fetch
@@ -1297,7 +1323,9 @@ class bitmex(ccxt.async_support.bitmex):
1297
1323
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
1298
1324
  """
1299
1325
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1300
- :see: https://www.bitmex.com/app/wsAPI#Subscriptions
1326
+
1327
+ https://www.bitmex.com/app/wsAPI#Subscriptions
1328
+
1301
1329
  :param str symbol: unified symbol of the market to fetch OHLCV data for
1302
1330
  :param str timeframe: the length of time each candle represents
1303
1331
  :param int [since]: timestamp in ms of the earliest candle to fetch
ccxt/pro/bitopro.py CHANGED
@@ -58,7 +58,9 @@ class bitopro(ccxt.async_support.bitopro):
58
58
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
59
59
  """
60
60
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
61
- :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/order_book_stream.md
61
+
62
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/order_book_stream.md
63
+
62
64
  :param str symbol: unified symbol of the market to fetch the order book for
63
65
  :param int [limit]: the maximum amount of order book entries to return
64
66
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -117,7 +119,9 @@ class bitopro(ccxt.async_support.bitopro):
117
119
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
118
120
  """
119
121
  get the list of most recent trades for a particular symbol
120
- :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/trade_stream.md
122
+
123
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/trade_stream.md
124
+
121
125
  :param str symbol: unified symbol of the market to fetch trades for
122
126
  :param int [since]: timestamp in ms of the earliest trade to fetch
123
127
  :param int [limit]: the maximum amount of trades to fetch
@@ -172,7 +176,9 @@ class bitopro(ccxt.async_support.bitopro):
172
176
  async def watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
173
177
  """
174
178
  watches information on multiple trades made by the user
175
- :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/private/matches_stream.md
179
+
180
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/private/matches_stream.md
181
+
176
182
  :param str symbol: unified market symbol of the market trades were made in
177
183
  :param int [since]: the earliest time in ms to fetch trades for
178
184
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -304,7 +310,9 @@ class bitopro(ccxt.async_support.bitopro):
304
310
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
305
311
  """
306
312
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
307
- :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/ticker_stream.md
313
+
314
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/public/ticker_stream.md
315
+
308
316
  :param str symbol: unified symbol of the market to fetch the ticker for
309
317
  :param dict [params]: extra parameters specific to the exchange API endpoint
310
318
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -382,7 +390,9 @@ class bitopro(ccxt.async_support.bitopro):
382
390
  async def watch_balance(self, params={}) -> Balances:
383
391
  """
384
392
  watch balance and get the amount of funds available for trading or funds locked in orders
385
- :see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/private/user_balance_stream.md
393
+
394
+ https://github.com/bitoex/bitopro-offical-api-docs/blob/master/ws/private/user_balance_stream.md
395
+
386
396
  :param dict [params]: extra parameters specific to the exchange API endpoint
387
397
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
388
398
  """
ccxt/pro/bitrue.py CHANGED
@@ -60,7 +60,9 @@ class bitrue(ccxt.async_support.bitrue):
60
60
  async def watch_balance(self, params={}) -> Balances:
61
61
  """
62
62
  watch balance and get the amount of funds available for trading or funds locked in orders
63
- :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#balance-update
63
+
64
+ https://github.com/Bitrue-exchange/Spot-official-api-docs#balance-update
65
+
64
66
  :param dict [params]: extra parameters specific to the exchange API endpoint
65
67
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
66
68
  """
@@ -166,8 +168,10 @@ class bitrue(ccxt.async_support.bitrue):
166
168
  async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
167
169
  """
168
170
  watches information on user orders
169
- :see: https://github.com/Bitrue-exchange/Spot-official-api-docs#order-update
170
- :param str[] symbols: unified symbols of the market to watch the orders for
171
+
172
+ https://github.com/Bitrue-exchange/Spot-official-api-docs#order-update
173
+
174
+ :param str symbol:
171
175
  :param int [since]: timestamp in ms of the earliest order
172
176
  :param int [limit]: the maximum amount of orders to return
173
177
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/pro/bitvavo.py CHANGED
@@ -111,7 +111,9 @@ class bitvavo(ccxt.async_support.bitvavo):
111
111
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
112
112
  """
113
113
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
114
- :see: https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
114
+
115
+ https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
116
+
115
117
  :param str symbol: unified symbol of the market to fetch the ticker for
116
118
  :param dict [params]: extra parameters specific to the exchange API endpoint
117
119
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -121,7 +123,9 @@ class bitvavo(ccxt.async_support.bitvavo):
121
123
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
122
124
  """
123
125
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
124
- :see: https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
126
+
127
+ https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
128
+
125
129
  :param str[] [symbols]: unified symbol of the market to fetch the ticker for
126
130
  :param dict [params]: extra parameters specific to the exchange API endpoint
127
131
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -173,7 +177,9 @@ class bitvavo(ccxt.async_support.bitvavo):
173
177
  async def watch_bids_asks(self, symbols: Strings = None, params={}) -> Tickers:
174
178
  """
175
179
  watches best bid & ask for symbols
176
- :see: https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
180
+
181
+ https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
182
+
177
183
  :param str[] symbols: unified symbol of the market to fetch the ticker for
178
184
  :param dict [params]: extra parameters specific to the exchange API endpoint
179
185
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -300,10 +306,9 @@ class bitvavo(ccxt.async_support.bitvavo):
300
306
  # ]
301
307
  # }
302
308
  #
303
- action = self.safe_string(message, 'action')
304
309
  response = self.safe_value(message, 'response')
305
310
  ohlcv = self.parse_ohlcvs(response, None, None, None)
306
- messageHash = self.build_message_hash(action)
311
+ messageHash = self.safe_string(message, 'requestId')
307
312
  client.resolve(ohlcv, messageHash)
308
313
 
309
314
  def handle_ohlcv(self, client: Client, message):
@@ -590,7 +595,9 @@ class bitvavo(ccxt.async_support.bitvavo):
590
595
  async def create_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> Order:
591
596
  """
592
597
  create a trade order
593
- :see: https://docs.bitvavo.com/#tag/Orders/paths/~1order/post
598
+
599
+ https://docs.bitvavo.com/#tag/Orders/paths/~1order/post
600
+
594
601
  :param str symbol: unified symbol of the market to create an order in
595
602
  :param str type: 'market' or 'limit'
596
603
  :param str side: 'buy' or 'sell'
@@ -618,7 +625,9 @@ class bitvavo(ccxt.async_support.bitvavo):
618
625
  async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}) -> Order:
619
626
  """
620
627
  edit a trade order
621
- :see: https://docs.bitvavo.com/#tag/Orders/paths/~1order/put
628
+
629
+ https://docs.bitvavo.com/#tag/Orders/paths/~1order/put
630
+
622
631
  :param str id: cancel order id
623
632
  :param str symbol: unified symbol of the market to create an order in
624
633
  :param str type: 'market' or 'limit'
@@ -635,7 +644,9 @@ class bitvavo(ccxt.async_support.bitvavo):
635
644
 
636
645
  async def cancel_order_ws(self, id: str, symbol: Str = None, params={}):
637
646
  """
638
- :see: https://docs.bitvavo.com/#tag/Orders/paths/~1order/delete
647
+
648
+ https://docs.bitvavo.com/#tag/Orders/paths/~1order/delete
649
+
639
650
  cancels an open order
640
651
  :param str id: order id
641
652
  :param str symbol: unified symbol of the market the order was made in
@@ -649,7 +660,9 @@ class bitvavo(ccxt.async_support.bitvavo):
649
660
 
650
661
  async def cancel_all_orders_ws(self, symbol: Str = None, params={}):
651
662
  """
652
- :see: https://docs.bitvavo.com/#tag/Orders/paths/~1orders/delete
663
+
664
+ https://docs.bitvavo.com/#tag/Orders/paths/~1orders/delete
665
+
653
666
  cancel all open orders
654
667
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
655
668
  :param dict [params]: extra parameters specific to the bitvavo api endpoint
@@ -673,19 +686,22 @@ class bitvavo(ccxt.async_support.bitvavo):
673
686
  # }]
674
687
  # }
675
688
  #
676
- action = self.safe_string(message, 'action')
677
- response = self.safe_value(message, 'response')
678
- firstRawOrder = self.safe_value(response, 0, {})
679
- marketId = self.safe_string(firstRawOrder, 'market')
689
+ # action = self.safe_string(message, 'action')
690
+ response = self.safe_list(message, 'response')
691
+ # firstRawOrder = self.safe_value(response, 0, {})
692
+ # marketId = self.safe_string(firstRawOrder, 'market')
680
693
  orders = self.parse_orders(response)
681
- messageHash = self.build_message_hash(action, {'market': marketId})
682
- client.resolve(orders, messageHash)
683
- messageHash = self.build_message_hash(action, message)
694
+ # messageHash = self.build_message_hash(action, {'market': marketId})
695
+ # client.resolve(orders, messageHash)
696
+ # messageHash = self.build_message_hash(action, message)
697
+ messageHash = self.safe_string(message, 'requestId')
684
698
  client.resolve(orders, messageHash)
685
699
 
686
700
  async def fetch_order_ws(self, id: str, symbol: Str = None, params={}) -> Order:
687
701
  """
688
- :see: https://docs.bitvavo.com/#tag/General/paths/~1assets/get
702
+
703
+ https://docs.bitvavo.com/#tag/General/paths/~1assets/get
704
+
689
705
  fetches information on an order made by the user
690
706
  :param str id: the order id
691
707
  :param str symbol: unified symbol of the market the order was made in
@@ -705,7 +721,9 @@ class bitvavo(ccxt.async_support.bitvavo):
705
721
 
706
722
  async def fetch_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
707
723
  """
708
- :see: https://docs.bitvavo.com/#tag/Orders/paths/~1orders/get
724
+
725
+ https://docs.bitvavo.com/#tag/Orders/paths/~1orders/get
726
+
709
727
  fetches information on multiple orders made by the user
710
728
  :param str symbol: unified market symbol of the market orders were made in
711
729
  :param int [since]: the earliest time in ms to fetch orders for
@@ -721,13 +739,19 @@ class bitvavo(ccxt.async_support.bitvavo):
721
739
  orders = await self.watch_request('privateGetOrders', request)
722
740
  return self.filter_by_symbol_since_limit(orders, symbol, since, limit)
723
741
 
742
+ def request_id(self):
743
+ ts = str(self.milliseconds())
744
+ randomNumber = self.rand_number(4)
745
+ randomPart = str(randomNumber)
746
+ return int(ts + randomPart)
747
+
724
748
  async def watch_request(self, action, request):
749
+ messageHash = self.request_id()
750
+ messageHashStr = str(messageHash)
725
751
  request['action'] = action
726
- messageHash = self.build_message_hash(action, request)
727
- self.check_message_hash_does_not_exist(messageHash)
752
+ request['requestId'] = messageHash
728
753
  url = self.urls['api']['ws']
729
- randomSubHash = str(self.rand_number(5)) + ':' + messageHash
730
- return await self.watch(url, messageHash, request, randomSubHash)
754
+ return await self.watch(url, messageHashStr, request, messageHashStr)
731
755
 
732
756
  async def fetch_open_orders_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
733
757
  """
@@ -752,7 +776,9 @@ class bitvavo(ccxt.async_support.bitvavo):
752
776
 
753
777
  async def fetch_my_trades_ws(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
754
778
  """
755
- :see: https://docs.bitvavo.com/#tag/Trades
779
+
780
+ https://docs.bitvavo.com/#tag/Trades
781
+
756
782
  fetch all trades made by the user
757
783
  :param str symbol: unified market symbol
758
784
  :param int [since]: the earliest time in ms to fetch trades for
@@ -790,12 +816,12 @@ class bitvavo(ccxt.async_support.bitvavo):
790
816
  # }
791
817
  #
792
818
  #
793
- action = self.safe_string(message, 'action')
794
- response = self.safe_value(message, 'response')
795
- firstRawTrade = self.safe_value(response, 0, {})
796
- marketId = self.safe_string(firstRawTrade, 'market')
819
+ # action = self.safe_string(message, 'action')
820
+ response = self.safe_list(message, 'response')
821
+ # marketId = self.safe_string(firstRawTrade, 'market')
797
822
  trades = self.parse_trades(response, None, None, None)
798
- messageHash = self.build_message_hash(action, {'market': marketId})
823
+ # messageHash = self.build_message_hash(action, {'market': marketId})
824
+ messageHash = self.safe_string(message, 'requestId')
799
825
  client.resolve(trades, messageHash)
800
826
 
801
827
  async def withdraw_ws(self, code: str, amount, address, tag=None, params={}):
@@ -826,15 +852,18 @@ class bitvavo(ccxt.async_support.bitvavo):
826
852
  # }
827
853
  # }
828
854
  #
829
- action = self.safe_string(message, 'action')
830
- messageHash = self.build_message_hash(action, message)
855
+ # action = self.safe_string(message, 'action')
856
+ # messageHash = self.build_message_hash(action, message)
857
+ messageHash = self.safe_string(message, 'requestId')
831
858
  response = self.safe_value(message, 'response')
832
859
  withdraw = self.parse_transaction(response)
833
860
  client.resolve(withdraw, messageHash)
834
861
 
835
862
  async def fetch_withdrawals_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
836
863
  """
837
- :see: https://docs.bitvavo.com/#tag/Account/paths/~1withdrawalHistory/get
864
+
865
+ https://docs.bitvavo.com/#tag/Account/paths/~1withdrawalHistory/get
866
+
838
867
  fetch all withdrawals made from an account
839
868
  :param str code: unified currency code
840
869
  :param int [since]: the earliest time in ms to fetch withdrawals for
@@ -864,15 +893,18 @@ class bitvavo(ccxt.async_support.bitvavo):
864
893
  # ]
865
894
  # }
866
895
  #
867
- action = self.safe_string(message, 'action')
868
- messageHash = self.build_message_hash(action, message)
869
- response = self.safe_value(message, 'response')
896
+ # action = self.safe_string(message, 'action')
897
+ # messageHash = self.build_message_hash(action, message)
898
+ response = self.safe_list(message, 'response')
899
+ messageHash = self.safe_string(message, 'requestId')
870
900
  withdrawals = self.parse_transactions(response, None, None, None, {'type': 'withdrawal'})
871
901
  client.resolve(withdrawals, messageHash)
872
902
 
873
903
  async def fetch_ohlcv_ws(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
874
904
  """
875
- :see: https://docs.bitvavo.com/#tag/Market-Data/paths/~1{market}~1candles/get
905
+
906
+ https://docs.bitvavo.com/#tag/Market-Data/paths/~1{market}~1candles/get
907
+
876
908
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
877
909
  :param str symbol: unified symbol of the market to fetch OHLCV data for
878
910
  :param str timeframe: the length of time each candle represents
@@ -889,7 +921,9 @@ class bitvavo(ccxt.async_support.bitvavo):
889
921
 
890
922
  async def fetch_deposits_ws(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
891
923
  """
892
- :see: https://docs.bitvavo.com/#tag/Account/paths/~1depositHistory/get
924
+
925
+ https://docs.bitvavo.com/#tag/Account/paths/~1depositHistory/get
926
+
893
927
  fetch all deposits made to an account
894
928
  :param str code: unified currency code
895
929
  :param int [since]: the earliest time in ms to fetch deposits for
@@ -919,15 +953,16 @@ class bitvavo(ccxt.async_support.bitvavo):
919
953
  # ]
920
954
  # }
921
955
  #
922
- action = self.safe_string(message, 'action')
923
- messageHash = self.build_message_hash(action, message)
924
956
  response = self.safe_value(message, 'response')
925
957
  deposits = self.parse_transactions(response, None, None, None, {'type': 'deposit'})
958
+ messageHash = self.safe_string(message, 'requestId')
926
959
  client.resolve(deposits, messageHash)
927
960
 
928
961
  async def fetch_trading_fees_ws(self, params={}) -> TradingFees:
929
962
  """
930
- :see: https://docs.bitvavo.com/#tag/Account/paths/~1account/get
963
+
964
+ https://docs.bitvavo.com/#tag/Account/paths/~1account/get
965
+
931
966
  fetch the trading fees for multiple markets
932
967
  :param dict [params]: extra parameters specific to the bitvavo api endpoint
933
968
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
@@ -938,7 +973,9 @@ class bitvavo(ccxt.async_support.bitvavo):
938
973
 
939
974
  async def fetch_markets_ws(self, params={}):
940
975
  """
941
- :see: https://docs.bitvavo.com/#tag/General/paths/~1markets/get
976
+
977
+ https://docs.bitvavo.com/#tag/General/paths/~1markets/get
978
+
942
979
  retrieves data on all markets for bitvavo
943
980
  :param dict [params]: extra parameters specific to the exchange api endpoint
944
981
  :returns dict[]: an array of objects representing market data
@@ -947,7 +984,9 @@ class bitvavo(ccxt.async_support.bitvavo):
947
984
 
948
985
  async def fetch_currencies_ws(self, params={}):
949
986
  """
950
- :see: https://docs.bitvavo.com/#tag/General/paths/~1assets/get
987
+
988
+ https://docs.bitvavo.com/#tag/General/paths/~1assets/get
989
+
951
990
  fetches all available currencies on an exchange
952
991
  :param dict [params]: extra parameters specific to the bitvavo api endpoint
953
992
  :returns dict: an associative dictionary of currencies
@@ -976,8 +1015,7 @@ class bitvavo(ccxt.async_support.bitvavo):
976
1015
  # ]
977
1016
  # }
978
1017
  #
979
- action = self.safe_string(message, 'action')
980
- messageHash = self.build_message_hash(action, message)
1018
+ messageHash = self.safe_string(message, 'requestId')
981
1019
  response = self.safe_value(message, 'response')
982
1020
  currencies = self.parse_currencies(response)
983
1021
  client.resolve(currencies, messageHash)
@@ -995,15 +1033,16 @@ class bitvavo(ccxt.async_support.bitvavo):
995
1033
  # }
996
1034
  # }
997
1035
  #
998
- action = self.safe_string(message, 'action')
999
- messageHash = self.build_message_hash(action, message)
1036
+ messageHash = self.safe_string(message, 'requestId')
1000
1037
  response = self.safe_value(message, 'response')
1001
1038
  fees = self.parse_trading_fees(response)
1002
1039
  client.resolve(fees, messageHash)
1003
1040
 
1004
1041
  async def fetch_balance_ws(self, params={}) -> Balances:
1005
1042
  """
1006
- :see: https://docs.bitvavo.com/#tag/Account/paths/~1balance/get
1043
+
1044
+ https://docs.bitvavo.com/#tag/Account/paths/~1balance/get
1045
+
1007
1046
  query for balance and get the amount of funds available for trading or funds locked in orders
1008
1047
  :param dict [params]: extra parameters specific to the bitvavo api endpoint
1009
1048
  :returns dict: a `balance structure <https://docs.ccxt.com/en/latest/manual.html?#balance-structure>`
@@ -1025,8 +1064,7 @@ class bitvavo(ccxt.async_support.bitvavo):
1025
1064
  # ]
1026
1065
  # }
1027
1066
  #
1028
- action = self.safe_string(message, 'action', 'privateGetBalance')
1029
- messageHash = self.build_message_hash(action, message)
1067
+ messageHash = self.safe_string(message, 'requestId')
1030
1068
  response = self.safe_value(message, 'response', [])
1031
1069
  balance = self.parse_balance(response)
1032
1070
  client.resolve(balance, messageHash)
@@ -1060,10 +1098,9 @@ class bitvavo(ccxt.async_support.bitvavo):
1060
1098
  # }
1061
1099
  # }
1062
1100
  #
1063
- action = self.safe_string(message, 'action')
1064
1101
  response = self.safe_value(message, 'response', {})
1065
1102
  order = self.parse_order(response)
1066
- messageHash = self.build_message_hash(action, response)
1103
+ messageHash = self.safe_string(message, 'requestId')
1067
1104
  client.resolve(order, messageHash)
1068
1105
 
1069
1106
  def handle_markets(self, client: Client, message):
@@ -1086,10 +1123,9 @@ class bitvavo(ccxt.async_support.bitvavo):
1086
1123
  # ]
1087
1124
  # }
1088
1125
  #
1089
- action = self.safe_string(message, 'action')
1090
1126
  response = self.safe_value(message, 'response', {})
1091
1127
  markets = self.parse_markets(response)
1092
- messageHash = self.build_message_hash(action, response)
1128
+ messageHash = self.safe_string(message, 'requestId')
1093
1129
  client.resolve(markets, messageHash)
1094
1130
 
1095
1131
  def build_message_hash(self, action, params={}):
@@ -1106,15 +1142,6 @@ class bitvavo(ccxt.async_support.bitvavo):
1106
1142
  messageHash = method(action, params)
1107
1143
  return messageHash
1108
1144
 
1109
- def check_message_hash_does_not_exist(self, messageHash):
1110
- supressMultipleWsRequestsError = self.safe_bool(self.options, 'supressMultipleWsRequestsError', False)
1111
- if not supressMultipleWsRequestsError:
1112
- client = self.safe_value(self.clients, self.urls['api']['ws'])
1113
- if client is not None:
1114
- future = self.safe_value(client.futures, messageHash)
1115
- if future is not None:
1116
- raise ExchangeError(self.id + ' a similar request with messageHash ' + messageHash + ' is already pending, you must wait for a response, or turn off self error by setting supressMultipleWsRequestsError in the options to True')
1117
-
1118
1145
  def action_and_market_message_hash(self, action, params={}):
1119
1146
  symbol = self.safe_string(params, 'market', '')
1120
1147
  return action + symbol
@@ -1258,11 +1285,19 @@ class bitvavo(ccxt.async_support.bitvavo):
1258
1285
  # errorCode: 217,
1259
1286
  # error: 'Minimum order size in quote currency is 5 EUR or 0.001 BTC.'
1260
1287
  # }
1288
+ # {
1289
+ # action: 'privateCreateOrder',
1290
+ # requestId: '17317539426571916',
1291
+ # market: 'USDT-EUR',
1292
+ # errorCode: 216,
1293
+ # error: 'You do not have sufficient balance to complete self operation.'
1294
+ # }
1261
1295
  #
1262
1296
  error = self.safe_string(message, 'error')
1263
1297
  code = self.safe_integer(error, 'errorCode')
1264
1298
  action = self.safe_string(message, 'action')
1265
- messageHash = self.build_message_hash(action, message)
1299
+ buildMessage = self.build_message_hash(action, message)
1300
+ messageHash = self.safe_string(message, 'requestId', buildMessage)
1266
1301
  rejected = False
1267
1302
  try:
1268
1303
  self.handle_errors(code, error, client.url, None, None, error, message, None, None)