ccxt 4.1.19__py2.py3-none-any.whl → 4.1.22__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 (179) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/okcoin.py +70 -206
  3. ccxt/ace.py +12 -12
  4. ccxt/ascendex.py +5 -5
  5. ccxt/async_support/__init__.py +1 -1
  6. ccxt/async_support/ace.py +12 -12
  7. ccxt/async_support/ascendex.py +5 -5
  8. ccxt/async_support/base/exchange.py +1 -1
  9. ccxt/async_support/bigone.py +2 -2
  10. ccxt/async_support/binance.py +184 -184
  11. ccxt/async_support/bingx.py +48 -48
  12. ccxt/async_support/bitbank.py +14 -14
  13. ccxt/async_support/bitbns.py +7 -7
  14. ccxt/async_support/bitfinex.py +2 -2
  15. ccxt/async_support/bitfinex2.py +35 -35
  16. ccxt/async_support/bitflyer.py +17 -17
  17. ccxt/async_support/bitforex.py +9 -9
  18. ccxt/async_support/bitget.py +433 -215
  19. ccxt/async_support/bitmart.py +39 -39
  20. ccxt/async_support/bitmex.py +7 -7
  21. ccxt/async_support/bitopro.py +1 -1
  22. ccxt/async_support/bitpanda.py +1 -1
  23. ccxt/async_support/bitrue.py +2 -2
  24. ccxt/async_support/bitso.py +2 -2
  25. ccxt/async_support/bitstamp.py +3 -3
  26. ccxt/async_support/bitvavo.py +2 -2
  27. ccxt/async_support/bl3p.py +1 -1
  28. ccxt/async_support/btcalpha.py +7 -7
  29. ccxt/async_support/btcturk.py +1 -1
  30. ccxt/async_support/bybit.py +58 -58
  31. ccxt/async_support/cex.py +1 -1
  32. ccxt/async_support/coinbase.py +13 -13
  33. ccxt/async_support/coinbasepro.py +15 -15
  34. ccxt/async_support/coinex.py +19 -19
  35. ccxt/async_support/coinone.py +2 -2
  36. ccxt/async_support/coinsph.py +4 -4
  37. ccxt/async_support/coinspot.py +2 -2
  38. ccxt/async_support/cryptocom.py +28 -28
  39. ccxt/async_support/currencycom.py +1 -1
  40. ccxt/async_support/delta.py +26 -26
  41. ccxt/async_support/deribit.py +9 -9
  42. ccxt/async_support/digifinex.py +38 -38
  43. ccxt/async_support/exmo.py +18 -18
  44. ccxt/async_support/gate.py +59 -59
  45. ccxt/async_support/gemini.py +4 -4
  46. ccxt/async_support/hitbtc.py +6 -6
  47. ccxt/async_support/hollaex.py +2 -2
  48. ccxt/async_support/huobi.py +70 -70
  49. ccxt/async_support/indodax.py +1 -1
  50. ccxt/async_support/kraken.py +33 -33
  51. ccxt/async_support/krakenfutures.py +6 -5
  52. ccxt/async_support/kucoin.py +74 -74
  53. ccxt/async_support/kucoinfutures.py +8 -8
  54. ccxt/async_support/latoken.py +14 -14
  55. ccxt/async_support/lbank2.py +33 -33
  56. ccxt/async_support/mexc.py +22 -22
  57. ccxt/async_support/ndax.py +1 -1
  58. ccxt/async_support/novadax.py +22 -22
  59. ccxt/async_support/oceanex.py +18 -18
  60. ccxt/async_support/okcoin.py +1950 -2758
  61. ccxt/async_support/okx.py +73 -73
  62. ccxt/async_support/paymium.py +11 -11
  63. ccxt/async_support/phemex.py +26 -26
  64. ccxt/async_support/poloniex.py +30 -30
  65. ccxt/async_support/poloniexfutures.py +25 -25
  66. ccxt/async_support/probit.py +21 -21
  67. ccxt/async_support/tokocrypto.py +22 -22
  68. ccxt/async_support/upbit.py +21 -21
  69. ccxt/async_support/wavesexchange.py +2 -2
  70. ccxt/async_support/wazirx.py +14 -14
  71. ccxt/async_support/whitebit.py +6 -6
  72. ccxt/async_support/woo.py +21 -21
  73. ccxt/async_support/yobit.py +16 -16
  74. ccxt/async_support/zaif.py +10 -10
  75. ccxt/async_support/zonda.py +15 -15
  76. ccxt/base/exchange.py +2 -1
  77. ccxt/bigone.py +2 -2
  78. ccxt/binance.py +184 -184
  79. ccxt/bingx.py +48 -48
  80. ccxt/bitbank.py +14 -14
  81. ccxt/bitbns.py +7 -7
  82. ccxt/bitfinex.py +2 -2
  83. ccxt/bitfinex2.py +35 -35
  84. ccxt/bitflyer.py +17 -17
  85. ccxt/bitforex.py +9 -9
  86. ccxt/bitget.py +433 -215
  87. ccxt/bitmart.py +39 -39
  88. ccxt/bitmex.py +7 -7
  89. ccxt/bitopro.py +1 -1
  90. ccxt/bitpanda.py +1 -1
  91. ccxt/bitrue.py +2 -2
  92. ccxt/bitso.py +2 -2
  93. ccxt/bitstamp.py +3 -3
  94. ccxt/bitvavo.py +2 -2
  95. ccxt/bl3p.py +1 -1
  96. ccxt/btcalpha.py +7 -7
  97. ccxt/btcturk.py +1 -1
  98. ccxt/bybit.py +58 -58
  99. ccxt/cex.py +1 -1
  100. ccxt/coinbase.py +13 -13
  101. ccxt/coinbasepro.py +15 -15
  102. ccxt/coinex.py +19 -19
  103. ccxt/coinone.py +2 -2
  104. ccxt/coinsph.py +4 -4
  105. ccxt/coinspot.py +2 -2
  106. ccxt/cryptocom.py +28 -28
  107. ccxt/currencycom.py +1 -1
  108. ccxt/delta.py +26 -26
  109. ccxt/deribit.py +9 -9
  110. ccxt/digifinex.py +38 -38
  111. ccxt/exmo.py +18 -18
  112. ccxt/gate.py +59 -59
  113. ccxt/gemini.py +4 -4
  114. ccxt/hitbtc.py +6 -6
  115. ccxt/hollaex.py +2 -2
  116. ccxt/huobi.py +70 -70
  117. ccxt/indodax.py +1 -1
  118. ccxt/kraken.py +33 -33
  119. ccxt/krakenfutures.py +6 -5
  120. ccxt/kucoin.py +74 -74
  121. ccxt/kucoinfutures.py +8 -8
  122. ccxt/latoken.py +14 -14
  123. ccxt/lbank2.py +33 -33
  124. ccxt/mexc.py +22 -22
  125. ccxt/ndax.py +1 -1
  126. ccxt/novadax.py +22 -22
  127. ccxt/oceanex.py +18 -18
  128. ccxt/okcoin.py +1950 -2758
  129. ccxt/okx.py +73 -73
  130. ccxt/paymium.py +11 -11
  131. ccxt/phemex.py +26 -26
  132. ccxt/poloniex.py +30 -30
  133. ccxt/poloniexfutures.py +25 -25
  134. ccxt/pro/__init__.py +1 -1
  135. ccxt/pro/ascendex.py +1 -1
  136. ccxt/pro/binance.py +9 -9
  137. ccxt/pro/bingx.py +12 -12
  138. ccxt/pro/bitget.py +2 -2
  139. ccxt/pro/bitpanda.py +7 -7
  140. ccxt/pro/bitrue.py +2 -2
  141. ccxt/pro/blockchaincom.py +6 -6
  142. ccxt/pro/bybit.py +15 -15
  143. ccxt/pro/cex.py +8 -8
  144. ccxt/pro/coinbase.py +6 -6
  145. ccxt/pro/coinbasepro.py +1 -1
  146. ccxt/pro/coinex.py +8 -8
  147. ccxt/pro/cryptocom.py +12 -12
  148. ccxt/pro/deribit.py +7 -7
  149. ccxt/pro/gemini.py +4 -4
  150. ccxt/pro/hitbtc.py +17 -17
  151. ccxt/pro/huobi.py +3 -3
  152. ccxt/pro/kraken.py +6 -6
  153. ccxt/pro/krakenfutures.py +10 -10
  154. ccxt/pro/kucoin.py +85 -42
  155. ccxt/pro/kucoinfutures.py +5 -5
  156. ccxt/pro/luno.py +1 -1
  157. ccxt/pro/mexc.py +7 -7
  158. ccxt/pro/okx.py +16 -15
  159. ccxt/pro/phemex.py +15 -15
  160. ccxt/pro/poloniex.py +9 -9
  161. ccxt/pro/poloniexfutures.py +5 -5
  162. ccxt/pro/probit.py +5 -5
  163. ccxt/pro/wazirx.py +5 -5
  164. ccxt/pro/woo.py +1 -1
  165. ccxt/probit.py +21 -21
  166. ccxt/test/base/test_shared_methods.py +1 -1
  167. ccxt/tokocrypto.py +22 -22
  168. ccxt/upbit.py +21 -21
  169. ccxt/wavesexchange.py +2 -2
  170. ccxt/wazirx.py +14 -14
  171. ccxt/whitebit.py +6 -6
  172. ccxt/woo.py +21 -21
  173. ccxt/yobit.py +16 -16
  174. ccxt/zaif.py +10 -10
  175. ccxt/zonda.py +15 -15
  176. {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/METADATA +5 -9
  177. {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/RECORD +179 -179
  178. {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/WHEEL +0 -0
  179. {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/top_level.txt +0 -0
ccxt/pro/cryptocom.py CHANGED
@@ -68,7 +68,7 @@ class cryptocom(ccxt.async_support.cryptocom):
68
68
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
69
69
  """
70
70
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
71
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
71
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
72
72
  :param str symbol: unified symbol of the market to fetch the order book for
73
73
  :param int [limit]: the maximum amount of order book entries to return
74
74
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
@@ -83,7 +83,7 @@ class cryptocom(ccxt.async_support.cryptocom):
83
83
  async def watch_order_book_for_symbols(self, symbols: List[str], limit: Optional[int] = None, params={}):
84
84
  """
85
85
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
86
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
86
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
87
87
  :param str[] symbols: unified array of symbols
88
88
  :param int [limit]: the maximum amount of order book entries to return
89
89
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
@@ -144,7 +144,7 @@ class cryptocom(ccxt.async_support.cryptocom):
144
144
  async def watch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
145
145
  """
146
146
  get the list of most recent trades for a particular symbol
147
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
147
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
148
148
  :param str symbol: unified symbol of the market to fetch trades for
149
149
  :param int [since]: timestamp in ms of the earliest trade to fetch
150
150
  :param int [limit]: the maximum amount of trades to fetch
@@ -163,7 +163,7 @@ class cryptocom(ccxt.async_support.cryptocom):
163
163
  async def watch_trades_for_symbols(self, symbols: List[str], since: Optional[int] = None, limit: Optional[int] = None, params={}):
164
164
  """
165
165
  get the list of most recent trades for a particular symbol
166
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
166
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#trade-instrument_name
167
167
  :param str symbol: unified symbol of the market to fetch trades for
168
168
  :param int [since]: timestamp in ms of the earliest trade to fetch
169
169
  :param int [limit]: the maximum amount of trades to fetch
@@ -234,7 +234,7 @@ class cryptocom(ccxt.async_support.cryptocom):
234
234
  async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
235
235
  """
236
236
  watches information on multiple trades made by the user
237
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-trade-instrument_name
237
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-trade-instrument_name
238
238
  :param str symbol: unified market symbol of the market trades were made in
239
239
  :param int [since]: the earliest time in ms to fetch trades for
240
240
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -256,7 +256,7 @@ class cryptocom(ccxt.async_support.cryptocom):
256
256
  async def watch_ticker(self, symbol: str, params={}):
257
257
  """
258
258
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
259
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
259
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#ticker-instrument_name
260
260
  :param str symbol: unified symbol of the market to fetch the ticker for
261
261
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
262
262
  :returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
@@ -303,7 +303,7 @@ class cryptocom(ccxt.async_support.cryptocom):
303
303
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
304
304
  """
305
305
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
306
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#candlestick-time_frame-instrument_name
306
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#candlestick-time_frame-instrument_name
307
307
  :param str symbol: unified symbol of the market to fetch OHLCV data for
308
308
  :param str timeframe: the length of time each candle represents
309
309
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -354,7 +354,7 @@ class cryptocom(ccxt.async_support.cryptocom):
354
354
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
355
355
  """
356
356
  watches information on multiple orders made by the user
357
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-order-instrument_name
357
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-order-instrument_name
358
358
  :param str symbol: unified market symbol of the market orders were made in
359
359
  :param int [since]: the earliest time in ms to fetch orders for
360
360
  :param int [limit]: the maximum number of order structures to retrieve
@@ -424,7 +424,7 @@ class cryptocom(ccxt.async_support.cryptocom):
424
424
  async def watch_balance(self, params={}):
425
425
  """
426
426
  watch balance and get the amount of funds available for trading or funds locked in orders
427
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-balance
427
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#user-balance
428
428
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
429
429
  :returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
430
430
  """
@@ -496,7 +496,7 @@ class cryptocom(ccxt.async_support.cryptocom):
496
496
 
497
497
  async def create_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Optional[float] = None, params={}):
498
498
  """
499
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order
499
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order
500
500
  create a trade order
501
501
  :param str symbol: unified symbol of the market to create an order in
502
502
  :param str type: 'market' or 'limit'
@@ -535,7 +535,7 @@ class cryptocom(ccxt.async_support.cryptocom):
535
535
  async def cancel_order_ws(self, id: str, symbol: Optional[str] = None, params={}):
536
536
  """
537
537
  cancels an open order
538
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
538
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
539
539
  :param str id: the order id of the order to cancel
540
540
  :param str [symbol]: unified symbol of the market the order was made in
541
541
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
@@ -555,7 +555,7 @@ class cryptocom(ccxt.async_support.cryptocom):
555
555
  async def cancel_all_orders_ws(self, symbol: Optional[str] = None, params={}):
556
556
  """
557
557
  cancel all open orders
558
- see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
558
+ :see: https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
559
559
  :param str symbol: unified market symbol of the orders to cancel
560
560
  :param dict [params]: extra parameters specific to the cryptocom api endpoint
561
561
  :returns dict} Returns exchange raw message {@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure:
ccxt/pro/deribit.py CHANGED
@@ -64,7 +64,7 @@ class deribit(ccxt.async_support.deribit):
64
64
 
65
65
  async def watch_balance(self, params={}):
66
66
  """
67
- see https://docs.deribit.com/#user-portfolio-currency
67
+ :see: https://docs.deribit.com/#user-portfolio-currency
68
68
  watch balance and get the amount of funds available for trading or funds locked in orders
69
69
  :param dict [params]: extra parameters specific to the deribit api endpoint
70
70
  :returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
@@ -144,7 +144,7 @@ class deribit(ccxt.async_support.deribit):
144
144
 
145
145
  async def watch_ticker(self, symbol: str, params={}):
146
146
  """
147
- see https://docs.deribit.com/#ticker-instrument_name-interval
147
+ :see: https://docs.deribit.com/#ticker-instrument_name-interval
148
148
  watches a price ticker, a statistical calculation with the information for a specific market.
149
149
  :param str symbol: unified symbol of the market to fetch the ticker for
150
150
  :param dict [params]: extra parameters specific to the deribit api endpoint
@@ -213,7 +213,7 @@ class deribit(ccxt.async_support.deribit):
213
213
  async def watch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
214
214
  """
215
215
  get the list of most recent trades for a particular symbol
216
- see https://docs.deribit.com/#trades-instrument_name-interval
216
+ :see: https://docs.deribit.com/#trades-instrument_name-interval
217
217
  :param str symbol: unified symbol of the market to fetch trades for
218
218
  :param int [since]: timestamp in ms of the earliest trade to fetch
219
219
  :param int [limit]: the maximum amount of trades to fetch
@@ -287,7 +287,7 @@ class deribit(ccxt.async_support.deribit):
287
287
  async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
288
288
  """
289
289
  get the list of trades associated with the user
290
- see https://docs.deribit.com/#user-trades-instrument_name-interval
290
+ :see: https://docs.deribit.com/#user-trades-instrument_name-interval
291
291
  :param str symbol: unified symbol of the market to fetch trades for. Use 'any' to watch all trades
292
292
  :param int [since]: timestamp in ms of the earliest trade to fetch
293
293
  :param int [limit]: the maximum amount of trades to fetch
@@ -366,7 +366,7 @@ class deribit(ccxt.async_support.deribit):
366
366
 
367
367
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
368
368
  """
369
- see https://docs.deribit.com/#public-get_book_summary_by_instrument
369
+ :see: https://docs.deribit.com/#public-get_book_summary_by_instrument
370
370
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
371
371
  :param str symbol: unified symbol of the market to fetch the order book for
372
372
  :param int [limit]: the maximum amount of order book entries to return
@@ -487,7 +487,7 @@ class deribit(ccxt.async_support.deribit):
487
487
 
488
488
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
489
489
  """
490
- see https://docs.deribit.com/#user-orders-instrument_name-raw
490
+ :see: https://docs.deribit.com/#user-orders-instrument_name-raw
491
491
  watches information on multiple orders made by the user
492
492
  :param str symbol: unified market symbol of the market orders were made in
493
493
  :param int [since]: the earliest time in ms to fetch orders for
@@ -573,7 +573,7 @@ class deribit(ccxt.async_support.deribit):
573
573
 
574
574
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
575
575
  """
576
- see https://docs.deribit.com/#chart-trades-instrument_name-resolution
576
+ :see: https://docs.deribit.com/#chart-trades-instrument_name-resolution
577
577
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
578
578
  :param str symbol: unified symbol of the market to fetch OHLCV data for
579
579
  :param str timeframe: the length of time each candle represents
ccxt/pro/gemini.py CHANGED
@@ -40,7 +40,7 @@ class gemini(ccxt.async_support.gemini):
40
40
  async def watch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
41
41
  """
42
42
  watch the list of most recent trades for a particular symbol
43
- see https://docs.gemini.com/websocket-api/#market-data-version-2
43
+ :see: https://docs.gemini.com/websocket-api/#market-data-version-2
44
44
  :param str symbol: unified symbol of the market to fetch trades for
45
45
  :param int [since]: timestamp in ms of the earliest trade to fetch
46
46
  :param int [limit]: the maximum amount of trades to fetch
@@ -184,7 +184,7 @@ class gemini(ccxt.async_support.gemini):
184
184
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
185
185
  """
186
186
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
187
- see https://docs.gemini.com/websocket-api/#candles-data-feed
187
+ :see: https://docs.gemini.com/websocket-api/#candles-data-feed
188
188
  :param str symbol: unified symbol of the market to fetch OHLCV data for
189
189
  :param str timeframe: the length of time each candle represents
190
190
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -269,7 +269,7 @@ class gemini(ccxt.async_support.gemini):
269
269
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
270
270
  """
271
271
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
272
- see https://docs.gemini.com/websocket-api/#market-data-version-2
272
+ :see: https://docs.gemini.com/websocket-api/#market-data-version-2
273
273
  :param str symbol: unified symbol of the market to fetch the order book for
274
274
  :param int [limit]: the maximum amount of order book entries to return
275
275
  :param dict [params]: extra parameters specific to the gemini api endpoint
@@ -360,7 +360,7 @@ class gemini(ccxt.async_support.gemini):
360
360
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
361
361
  """
362
362
  watches information on multiple orders made by the user
363
- see https://docs.gemini.com/websocket-api/#order-events
363
+ :see: https://docs.gemini.com/websocket-api/#order-events
364
364
  :param str symbol: unified market symbol of the market orders were made in
365
365
  :param int [since]: the earliest time in ms to fetch orders for
366
366
  :param int [limit]: the maximum number of orde structures to retrieve
ccxt/pro/hitbtc.py CHANGED
@@ -68,7 +68,7 @@ class hitbtc(ccxt.async_support.hitbtc):
68
68
  """
69
69
  * @ignore
70
70
  authenticates the user to access private web socket channels
71
- see https://api.hitbtc.com/#socket-authentication
71
+ :see: https://api.hitbtc.com/#socket-authentication
72
72
  :returns dict: response from exchange
73
73
  """
74
74
  self.check_required_credentials()
@@ -155,11 +155,11 @@ class hitbtc(ccxt.async_support.hitbtc):
155
155
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
156
156
  """
157
157
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
158
- see https://api.hitbtc.com/#subscribe-to-full-order-book
159
- see https://api.hitbtc.com/#subscribe-to-partial-order-book
160
- see https://api.hitbtc.com/#subscribe-to-partial-order-book-in-batches
161
- see https://api.hitbtc.com/#subscribe-to-top-of-book
162
- see https://api.hitbtc.com/#subscribe-to-top-of-book-in-batches
158
+ :see: https://api.hitbtc.com/#subscribe-to-full-order-book
159
+ :see: https://api.hitbtc.com/#subscribe-to-partial-order-book
160
+ :see: https://api.hitbtc.com/#subscribe-to-partial-order-book-in-batches
161
+ :see: https://api.hitbtc.com/#subscribe-to-top-of-book
162
+ :see: https://api.hitbtc.com/#subscribe-to-top-of-book-in-batches
163
163
  :param str symbol: unified symbol of the market to fetch the order book for
164
164
  :param int [limit]: the maximum amount of order book entries to return
165
165
  :param dict [params]: extra parameters specific to the hitbtc api endpoint
@@ -253,10 +253,10 @@ class hitbtc(ccxt.async_support.hitbtc):
253
253
  async def watch_ticker(self, symbol: str, params={}):
254
254
  """
255
255
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
256
- see https://api.hitbtc.com/#subscribe-to-ticker
257
- see https://api.hitbtc.com/#subscribe-to-ticker-in-batches
258
- see https://api.hitbtc.com/#subscribe-to-mini-ticker
259
- see https://api.hitbtc.com/#subscribe-to-mini-ticker-in-batches
256
+ :see: https://api.hitbtc.com/#subscribe-to-ticker
257
+ :see: https://api.hitbtc.com/#subscribe-to-ticker-in-batches
258
+ :see: https://api.hitbtc.com/#subscribe-to-mini-ticker
259
+ :see: https://api.hitbtc.com/#subscribe-to-mini-ticker-in-batches
260
260
  :param str symbol: unified symbol of the market to fetch the ticker for
261
261
  :param dict [params]: extra parameters specific to the hitbtc api endpoint
262
262
  :param str [params.method]: 'ticker/{speed}'(default), or 'ticker/price/{speed}'
@@ -434,7 +434,7 @@ class hitbtc(ccxt.async_support.hitbtc):
434
434
  async def watch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
435
435
  """
436
436
  get the list of most recent trades for a particular symbol
437
- see https://api.hitbtc.com/#subscribe-to-trades
437
+ :see: https://api.hitbtc.com/#subscribe-to-trades
438
438
  :param str symbol: unified symbol of the market to fetch trades for
439
439
  :param int [since]: timestamp in ms of the earliest trade to fetch
440
440
  :param int [limit]: the maximum amount of trades to fetch
@@ -553,7 +553,7 @@ class hitbtc(ccxt.async_support.hitbtc):
553
553
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
554
554
  """
555
555
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
556
- see https://api.hitbtc.com/#subscribe-to-candles
556
+ :see: https://api.hitbtc.com/#subscribe-to-candles
557
557
  :param str symbol: unified symbol of the market to fetch OHLCV data for
558
558
  :param str [timeframe]: the length of time each candle represents
559
559
  :param int [since]: not used by hitbtc watchOHLCV
@@ -657,9 +657,9 @@ class hitbtc(ccxt.async_support.hitbtc):
657
657
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
658
658
  """
659
659
  watches information on multiple orders made by the user
660
- see https://api.hitbtc.com/#subscribe-to-reports
661
- see https://api.hitbtc.com/#subscribe-to-reports-2
662
- see https://api.hitbtc.com/#subscribe-to-reports-3
660
+ :see: https://api.hitbtc.com/#subscribe-to-reports
661
+ :see: https://api.hitbtc.com/#subscribe-to-reports-2
662
+ :see: https://api.hitbtc.com/#subscribe-to-reports-3
663
663
  :param str [symbol]: unified CCXT market symbol
664
664
  :param int [since]: timestamp in ms of the earliest order to fetch
665
665
  :param int [limit]: the maximum amount of orders to fetch
@@ -880,8 +880,8 @@ class hitbtc(ccxt.async_support.hitbtc):
880
880
  async def watch_balance(self, params={}):
881
881
  """
882
882
  watches balance updates, cannot subscribe to margin account balances
883
- see https://api.hitbtc.com/#subscribe-to-spot-balances
884
- see https://api.hitbtc.com/#subscribe-to-futures-balances
883
+ :see: https://api.hitbtc.com/#subscribe-to-spot-balances
884
+ :see: https://api.hitbtc.com/#subscribe-to-futures-balances
885
885
  :param dict [params]: extra parameters specific to the hitbtc api endpoint
886
886
  :param str [params.type]: 'spot', 'swap', or 'future'
887
887
  *
ccxt/pro/huobi.py CHANGED
@@ -305,9 +305,9 @@ class huobi(ccxt.async_support.huobi):
305
305
 
306
306
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
307
307
  """
308
- see https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
309
- see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
310
- see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
308
+ :see: https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
309
+ :see: https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
310
+ :see: https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
311
311
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
312
312
  :param str symbol: unified symbol of the market to fetch the order book for
313
313
  :param int [limit]: the maximum amount of order book entries to return
ccxt/pro/kraken.py CHANGED
@@ -125,7 +125,7 @@ class kraken(ccxt.async_support.kraken):
125
125
 
126
126
  async def create_order_ws(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Optional[float] = None, params={}):
127
127
  """
128
- see https://docs.kraken.com/websockets/#message-addOrder
128
+ :see: https://docs.kraken.com/websockets/#message-addOrder
129
129
  create a trade order
130
130
  :param str symbol: unified symbol of the market to create an order in
131
131
  :param str type: 'market' or 'limit'
@@ -180,7 +180,7 @@ class kraken(ccxt.async_support.kraken):
180
180
  async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Optional[float] = None, params={}):
181
181
  """
182
182
  edit a trade order
183
- see https://docs.kraken.com/websockets/#message-editOrder
183
+ :see: https://docs.kraken.com/websockets/#message-editOrder
184
184
  :param str id: order id
185
185
  :param str symbol: unified symbol of the market to create an order in
186
186
  :param str type: 'market' or 'limit'
@@ -209,7 +209,7 @@ class kraken(ccxt.async_support.kraken):
209
209
 
210
210
  async def cancel_orders_ws(self, ids: List[str], symbol: Optional[str] = None, params={}):
211
211
  """
212
- see https://docs.kraken.com/websockets/#message-cancelOrder
212
+ :see: https://docs.kraken.com/websockets/#message-cancelOrder
213
213
  cancel multiple orders
214
214
  :param str[] ids: order ids
215
215
  :param str symbol: unified market symbol, default is None
@@ -231,7 +231,7 @@ class kraken(ccxt.async_support.kraken):
231
231
 
232
232
  async def cancel_order_ws(self, id: str, symbol: Optional[str] = None, params={}):
233
233
  """
234
- see https://docs.kraken.com/websockets/#message-cancelOrder
234
+ :see: https://docs.kraken.com/websockets/#message-cancelOrder
235
235
  cancels an open order
236
236
  :param str id: order id
237
237
  :param str symbol: unified symbol of the market the order was made in
@@ -267,7 +267,7 @@ class kraken(ccxt.async_support.kraken):
267
267
 
268
268
  async def cancel_all_orders_ws(self, symbol: Optional[str] = None, params={}):
269
269
  """
270
- see https://docs.kraken.com/websockets/#message-cancelAll
270
+ :see: https://docs.kraken.com/websockets/#message-cancelAll
271
271
  cancel all open orders
272
272
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
273
273
  :param dict [params]: extra parameters specific to the kraken api endpoint
@@ -938,7 +938,7 @@ class kraken(ccxt.async_support.kraken):
938
938
 
939
939
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
940
940
  """
941
- see https://docs.kraken.com/websockets/#message-openOrders
941
+ :see: https://docs.kraken.com/websockets/#message-openOrders
942
942
  watches information on multiple orders made by the user
943
943
  :param str symbol: unified market symbol of the market orders were made in
944
944
  :param int [since]: the earliest time in ms to fetch orders for
ccxt/pro/krakenfutures.py CHANGED
@@ -63,7 +63,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
63
63
  """
64
64
  * @ignore
65
65
  authenticates the user to access private web socket channels
66
- see https://docs.futures.kraken.com/#websocket-api-public-feeds-challenge
66
+ :see: https://docs.futures.kraken.com/#websocket-api-public-feeds-challenge
67
67
  :returns dict: response from exchange
68
68
  """
69
69
  self.check_required_credentials()
@@ -140,7 +140,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
140
140
  async def watch_ticker(self, symbol: str, params={}):
141
141
  """
142
142
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
143
- see https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker
143
+ :see: https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker
144
144
  :param str symbol: unified symbol of the market to fetch the ticker for
145
145
  :param dict [params]: extra parameters specific to the krakenfutures api endpoint
146
146
  :returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
@@ -154,7 +154,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
154
154
  async def watch_tickers(self, symbols: Optional[List[str]] = None, params={}):
155
155
  """
156
156
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
157
- see https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker-lite
157
+ :see: https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker-lite
158
158
  :param str symbol: unified symbol of the market to fetch the ticker for
159
159
  :param dict [params]: extra parameters specific to the krakenfutures api endpoint
160
160
  :returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
@@ -168,7 +168,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
168
168
  async def watch_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
169
169
  """
170
170
  get the list of most recent trades for a particular symbol
171
- see https://docs.futures.kraken.com/#websocket-api-public-feeds-trade
171
+ :see: https://docs.futures.kraken.com/#websocket-api-public-feeds-trade
172
172
  :param str symbol: unified symbol of the market to fetch trades for
173
173
  :param int [since]: timestamp in ms of the earliest trade to fetch
174
174
  :param int [limit]: the maximum amount of trades to fetch
@@ -185,7 +185,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
185
185
  async def watch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
186
186
  """
187
187
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
188
- see https://docs.futures.kraken.com/#websocket-api-public-feeds-book
188
+ :see: https://docs.futures.kraken.com/#websocket-api-public-feeds-book
189
189
  :param str symbol: unified symbol of the market to fetch the order book for
190
190
  :param int [limit]: not used by krakenfutures watchOrderBook
191
191
  :param dict [params]: extra parameters specific to the krakenfutures api endpoint
@@ -197,8 +197,8 @@ class krakenfutures(ccxt.async_support.krakenfutures):
197
197
  async def watch_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
198
198
  """
199
199
  watches information on multiple orders made by the user
200
- see https://docs.futures.kraken.com/#websocket-api-private-feeds-open-orders
201
- see https://docs.futures.kraken.com/#websocket-api-private-feeds-open-orders-verbose
200
+ :see: https://docs.futures.kraken.com/#websocket-api-private-feeds-open-orders
201
+ :see: https://docs.futures.kraken.com/#websocket-api-private-feeds-open-orders-verbose
202
202
  :param str symbol: not used by krakenfutures watchOrders
203
203
  :param int [since]: not used by krakenfutures watchOrders
204
204
  :param int [limit]: not used by krakenfutures watchOrders
@@ -219,7 +219,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
219
219
  async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
220
220
  """
221
221
  watches information on multiple trades made by the user
222
- see https://docs.futures.kraken.com/#websocket-api-private-feeds-fills
222
+ :see: https://docs.futures.kraken.com/#websocket-api-private-feeds-fills
223
223
  :param str symbol: unified market symbol of the market orders were made in
224
224
  :param int [since]: the earliest time in ms to fetch orders for
225
225
  :param int [limit]: the maximum number of orde structures to retrieve
@@ -240,7 +240,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
240
240
  async def watch_balance(self, params={}):
241
241
  """
242
242
  watches information on multiple orders made by the user
243
- see https://docs.futures.kraken.com/#websocket-api-private-feeds-balances
243
+ :see: https://docs.futures.kraken.com/#websocket-api-private-feeds-balances
244
244
  :param str symbol: not used by krakenfutures watchBalance
245
245
  :param int [since]: not used by krakenfutures watchBalance
246
246
  :param int [limit]: not used by krakenfutures watchBalance
@@ -1224,7 +1224,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1224
1224
  def handle_authenticate(self, client: Client, message):
1225
1225
  """
1226
1226
  * @ignore
1227
- see https://docs.futures.kraken.com/#websocket-api-websocket-api-introduction-sign-challenge-challenge
1227
+ :see: https://docs.futures.kraken.com/#websocket-api-websocket-api-introduction-sign-challenge-challenge
1228
1228
  """
1229
1229
  #
1230
1230
  # {
ccxt/pro/kucoin.py CHANGED
@@ -584,13 +584,16 @@ class kucoin(ccxt.async_support.kucoin):
584
584
  watches information on multiple orders made by the user
585
585
  :param str symbol: unified market symbol of the market orders were made in
586
586
  :param int [since]: the earliest time in ms to fetch orders for
587
- :param int [limit]: the maximum number of orde structures to retrieve
587
+ :param int [limit]: the maximum number of order structures to retrieve
588
588
  :param dict [params]: extra parameters specific to the kucoin api endpoint
589
+ :param boolean [params.stop]: trigger orders are watched if True
589
590
  :returns dict[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
590
591
  """
591
592
  await self.load_markets()
593
+ stop = self.safe_value_2(params, 'stop', 'trigger')
594
+ params = self.omit(params, ['stop', 'trigger'])
592
595
  url = await self.negotiate(True)
593
- topic = '/spotMarket/tradeOrders'
596
+ topic = '/spotMarket/advancedOrders' if stop else '/spotMarket/tradeOrders'
594
597
  request = {
595
598
  'privateChannel': True,
596
599
  }
@@ -611,59 +614,78 @@ class kucoin(ccxt.async_support.kucoin):
611
614
  'match': 'open',
612
615
  'update': 'open',
613
616
  'canceled': 'canceled',
617
+ 'cancel': 'canceled',
618
+ 'TRIGGERED': 'triggered',
614
619
  }
615
620
  return self.safe_string(statuses, status, status)
616
621
 
617
622
  def parse_ws_order(self, order, market=None):
618
623
  #
619
- # {
620
- # 'symbol': 'XCAD-USDT',
621
- # 'orderType': 'limit',
622
- # 'side': 'buy',
623
- # 'orderId': '6249167327218b000135e749',
624
- # 'type': 'canceled',
625
- # 'orderTime': 1648957043065280224,
626
- # 'size': '100.452',
627
- # 'filledSize': '0',
628
- # 'price': '2.9635',
629
- # 'clientOid': 'buy-XCAD-USDT-1648957043010159',
630
- # 'remainSize': '0',
631
- # 'status': 'done',
632
- # 'ts': 1648957054031001037
633
- # }
624
+ # /spotMarket/tradeOrders
625
+ #
626
+ # {
627
+ # 'symbol': 'XCAD-USDT',
628
+ # 'orderType': 'limit',
629
+ # 'side': 'buy',
630
+ # 'orderId': '6249167327218b000135e749',
631
+ # 'type': 'canceled',
632
+ # 'orderTime': 1648957043065280224,
633
+ # 'size': '100.452',
634
+ # 'filledSize': '0',
635
+ # 'price': '2.9635',
636
+ # 'clientOid': 'buy-XCAD-USDT-1648957043010159',
637
+ # 'remainSize': '0',
638
+ # 'status': 'done',
639
+ # 'ts': 1648957054031001037
640
+ # }
641
+ #
642
+ # /spotMarket/advancedOrders
643
+ #
644
+ # {
645
+ # "createdAt": 1589789942337,
646
+ # "orderId": "5ec244f6a8a75e0009958237",
647
+ # "orderPrice": "0.00062",
648
+ # "orderType": "stop",
649
+ # "side": "sell",
650
+ # "size": "1",
651
+ # "stop": "entry",
652
+ # "stopPrice": "0.00062",
653
+ # "symbol": "KCS-BTC",
654
+ # "tradeType": "TRADE",
655
+ # "triggerSuccess": True,
656
+ # "ts": 1589790121382281286,
657
+ # "type": "triggered"
658
+ # }
634
659
  #
635
- id = self.safe_string(order, 'orderId')
636
- clientOrderId = self.safe_string(order, 'clientOid')
637
- orderType = self.safe_string_lower(order, 'orderType')
638
- price = self.safe_string(order, 'price')
639
- filled = self.safe_string(order, 'filledSize')
640
- amount = self.safe_string(order, 'size')
641
660
  rawType = self.safe_string(order, 'type')
642
661
  status = self.parse_ws_order_status(rawType)
643
- timestamp = self.safe_integer(order, 'orderTime')
662
+ timestamp = self.safe_integer_2(order, 'orderTime', 'createdAt')
644
663
  marketId = self.safe_string(order, 'symbol')
645
664
  market = self.safe_market(marketId, market)
646
- symbol = market['symbol']
647
- side = self.safe_string_lower(order, 'side')
665
+ triggerPrice = self.safe_string(order, 'stopPrice')
666
+ triggerSuccess = self.safe_value(order, 'triggerSuccess')
667
+ triggerFail = (triggerSuccess is not True) and (triggerSuccess is not None) # TODO: updated to triggerSuccess == False once transpiler transpiles it correctly
668
+ if (status == 'triggered') and triggerFail:
669
+ status = 'canceled'
648
670
  return self.safe_order({
649
671
  'info': order,
650
- 'symbol': symbol,
651
- 'id': id,
652
- 'clientOrderId': clientOrderId,
672
+ 'symbol': market['symbol'],
673
+ 'id': self.safe_string(order, 'orderId'),
674
+ 'clientOrderId': self.safe_string(order, 'clientOid'),
653
675
  'timestamp': timestamp,
654
676
  'datetime': self.iso8601(timestamp),
655
677
  'lastTradeTimestamp': None,
656
- 'type': orderType,
678
+ 'type': self.safe_string_lower(order, 'orderType'),
657
679
  'timeInForce': None,
658
680
  'postOnly': None,
659
- 'side': side,
660
- 'price': price,
661
- 'stopPrice': None,
662
- 'triggerPrice': None,
663
- 'amount': amount,
681
+ 'side': self.safe_string_lower(order, 'side'),
682
+ 'price': self.safe_string_2(order, 'price', 'orderPrice'),
683
+ 'stopPrice': triggerPrice,
684
+ 'triggerPrice': triggerPrice,
685
+ 'amount': self.safe_string(order, 'size'),
664
686
  'cost': None,
665
687
  'average': None,
666
- 'filled': filled,
688
+ 'filled': self.safe_string(order, 'filledSize'),
667
689
  'remaining': None,
668
690
  'status': status,
669
691
  'fee': None,
@@ -671,28 +693,48 @@ class kucoin(ccxt.async_support.kucoin):
671
693
  }, market)
672
694
 
673
695
  def handle_order(self, client: Client, message):
696
+ #
697
+ # Trigger Orders
698
+ #
699
+ # {
700
+ # createdAt: 1692745706437,
701
+ # error: 'Balance insufficient!', # not always there
702
+ # orderId: 'vs86kp757vlda6ni003qs70v',
703
+ # orderPrice: '0.26',
704
+ # orderType: 'stop',
705
+ # side: 'sell',
706
+ # size: '5',
707
+ # stop: 'loss',
708
+ # stopPrice: '0.26',
709
+ # symbol: 'ADA-USDT',
710
+ # tradeType: 'TRADE',
711
+ # triggerSuccess: False, # not always there
712
+ # ts: '1692745706442929298',
713
+ # type: 'open'
714
+ # }
715
+ #
674
716
  messageHash = 'orders'
675
717
  data = self.safe_value(message, 'data')
676
718
  parsed = self.parse_ws_order(data)
677
719
  symbol = self.safe_string(parsed, 'symbol')
678
720
  orderId = self.safe_string(parsed, 'id')
721
+ triggerPrice = self.safe_value(parsed, 'triggerPrice')
722
+ isTriggerOrder = (triggerPrice is not None)
679
723
  if self.orders is None:
680
724
  limit = self.safe_integer(self.options, 'ordersLimit', 1000)
681
725
  self.orders = ArrayCacheBySymbolById(limit)
682
- cachedOrders = self.orders
726
+ self.triggerOrders = ArrayCacheBySymbolById(limit)
727
+ cachedOrders = self.triggerOrders if isTriggerOrder else self.orders
683
728
  orders = self.safe_value(cachedOrders.hashmap, symbol, {})
684
729
  order = self.safe_value(orders, orderId)
685
730
  if order is not None:
686
731
  # todo add others to calculate average etc
687
- stopPrice = self.safe_value(order, 'stopPrice')
688
- if stopPrice is not None:
689
- parsed['stopPrice'] = stopPrice
690
732
  if order['status'] == 'closed':
691
733
  parsed['status'] = 'closed'
692
734
  cachedOrders.append(parsed)
693
- client.resolve(self.orders, messageHash)
735
+ client.resolve(cachedOrders, messageHash)
694
736
  symbolSpecificMessageHash = messageHash + ':' + symbol
695
- client.resolve(self.orders, symbolSpecificMessageHash)
737
+ client.resolve(cachedOrders, symbolSpecificMessageHash)
696
738
 
697
739
  async def watch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
698
740
  """
@@ -878,6 +920,7 @@ class kucoin(ccxt.async_support.kucoin):
878
920
  'account.balance': self.handle_balance,
879
921
  '/spot/tradeFills': self.handle_my_trade,
880
922
  'orderChange': self.handle_order,
923
+ 'stopOrder': self.handle_order,
881
924
  }
882
925
  method = self.safe_value(methods, subject)
883
926
  if method is None: