ccxt 2.9.11__tar.gz → 2.9.12__tar.gz

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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (340) hide show
  1. {ccxt-2.9.11/ccxt.egg-info → ccxt-2.9.12}/PKG-INFO +4 -4
  2. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/__init__.py +1 -1
  3. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/__init__.py +1 -1
  4. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/base/exchange.py +1 -1
  5. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bybit.py +99 -45
  6. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/novadax.py +3 -0
  7. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/okx.py +5 -1
  8. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/base/exchange.py +1 -1
  9. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bybit.py +99 -45
  10. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/novadax.py +3 -0
  11. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/okx.py +5 -1
  12. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/__init__.py +1 -1
  13. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/exchange.py +1 -1
  14. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/binance.py +2 -2
  15. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bybit.py +505 -502
  16. {ccxt-2.9.11 → ccxt-2.9.12/ccxt.egg-info}/PKG-INFO +4 -4
  17. {ccxt-2.9.11 → ccxt-2.9.12}/package.json +1 -1
  18. {ccxt-2.9.11 → ccxt-2.9.12}/LICENSE.txt +0 -0
  19. {ccxt-2.9.11 → ccxt-2.9.12}/MANIFEST.in +0 -0
  20. {ccxt-2.9.11 → ccxt-2.9.12}/README.rst +0 -0
  21. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/ace.py +0 -0
  22. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/alpaca.py +0 -0
  23. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/ascendex.py +0 -0
  24. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/ace.py +0 -0
  25. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/alpaca.py +0 -0
  26. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/ascendex.py +0 -0
  27. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/base/__init__.py +0 -0
  28. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/base/throttler.py +0 -0
  29. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bequant.py +0 -0
  30. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bigone.py +0 -0
  31. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/binance.py +0 -0
  32. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/binancecoinm.py +0 -0
  33. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/binanceus.py +0 -0
  34. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/binanceusdm.py +0 -0
  35. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bit2c.py +0 -0
  36. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitbank.py +0 -0
  37. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitbay.py +0 -0
  38. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitbns.py +0 -0
  39. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitcoincom.py +0 -0
  40. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitfinex.py +0 -0
  41. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitfinex2.py +0 -0
  42. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitflyer.py +0 -0
  43. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitforex.py +0 -0
  44. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitget.py +0 -0
  45. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bithumb.py +0 -0
  46. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitmart.py +0 -0
  47. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitmex.py +0 -0
  48. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitopro.py +0 -0
  49. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitpanda.py +0 -0
  50. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitrue.py +0 -0
  51. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitso.py +0 -0
  52. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitstamp.py +0 -0
  53. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitstamp1.py +0 -0
  54. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bittrex.py +0 -0
  55. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bitvavo.py +0 -0
  56. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bkex.py +0 -0
  57. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/bl3p.py +0 -0
  58. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/blockchaincom.py +0 -0
  59. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btcalpha.py +0 -0
  60. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btcbox.py +0 -0
  61. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btcex.py +0 -0
  62. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btcmarkets.py +0 -0
  63. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btctradeua.py +0 -0
  64. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/btcturk.py +0 -0
  65. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/buda.py +0 -0
  66. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/cex.py +0 -0
  67. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinbase.py +0 -0
  68. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinbaseprime.py +0 -0
  69. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinbasepro.py +0 -0
  70. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coincheck.py +0 -0
  71. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinex.py +0 -0
  72. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinfalcon.py +0 -0
  73. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinmate.py +0 -0
  74. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinone.py +0 -0
  75. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/coinspot.py +0 -0
  76. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/cryptocom.py +0 -0
  77. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/currencycom.py +0 -0
  78. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/delta.py +0 -0
  79. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/deribit.py +0 -0
  80. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/digifinex.py +0 -0
  81. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/exmo.py +0 -0
  82. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/flowbtc.py +0 -0
  83. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/fmfwio.py +0 -0
  84. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/gate.py +0 -0
  85. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/gateio.py +0 -0
  86. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/gemini.py +0 -0
  87. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/hitbtc.py +0 -0
  88. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/hitbtc3.py +0 -0
  89. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/hollaex.py +0 -0
  90. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/huobi.py +0 -0
  91. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/huobijp.py +0 -0
  92. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/huobipro.py +0 -0
  93. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/idex.py +0 -0
  94. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/independentreserve.py +0 -0
  95. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/indodax.py +0 -0
  96. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/itbit.py +0 -0
  97. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/kraken.py +0 -0
  98. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/krakenfutures.py +0 -0
  99. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/kucoin.py +0 -0
  100. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/kucoinfutures.py +0 -0
  101. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/kuna.py +0 -0
  102. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/latoken.py +0 -0
  103. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/lbank.py +0 -0
  104. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/lbank2.py +0 -0
  105. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/luno.py +0 -0
  106. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/lykke.py +0 -0
  107. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/mercado.py +0 -0
  108. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/mexc.py +0 -0
  109. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/mexc3.py +0 -0
  110. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/ndax.py +0 -0
  111. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/oceanex.py +0 -0
  112. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/okcoin.py +0 -0
  113. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/okex.py +0 -0
  114. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/okex5.py +0 -0
  115. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/paymium.py +0 -0
  116. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/phemex.py +0 -0
  117. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/poloniex.py +0 -0
  118. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/poloniexfutures.py +0 -0
  119. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/probit.py +0 -0
  120. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/ripio.py +0 -0
  121. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/stex.py +0 -0
  122. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/tidex.py +0 -0
  123. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/timex.py +0 -0
  124. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/tokocrypto.py +0 -0
  125. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/upbit.py +0 -0
  126. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/wavesexchange.py +0 -0
  127. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/wazirx.py +0 -0
  128. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/whitebit.py +0 -0
  129. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/woo.py +0 -0
  130. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/yobit.py +0 -0
  131. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/zaif.py +0 -0
  132. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/zb.py +0 -0
  133. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/async_support/zonda.py +0 -0
  134. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/base/__init__.py +0 -0
  135. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/base/decimal_to_precision.py +0 -0
  136. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/base/errors.py +0 -0
  137. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/base/precise.py +0 -0
  138. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bequant.py +0 -0
  139. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bigone.py +0 -0
  140. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/binance.py +0 -0
  141. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/binancecoinm.py +0 -0
  142. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/binanceus.py +0 -0
  143. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/binanceusdm.py +0 -0
  144. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bit2c.py +0 -0
  145. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitbank.py +0 -0
  146. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitbay.py +0 -0
  147. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitbns.py +0 -0
  148. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitcoincom.py +0 -0
  149. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitfinex.py +0 -0
  150. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitfinex2.py +0 -0
  151. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitflyer.py +0 -0
  152. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitforex.py +0 -0
  153. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitget.py +0 -0
  154. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bithumb.py +0 -0
  155. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitmart.py +0 -0
  156. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitmex.py +0 -0
  157. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitopro.py +0 -0
  158. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitpanda.py +0 -0
  159. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitrue.py +0 -0
  160. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitso.py +0 -0
  161. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitstamp.py +0 -0
  162. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitstamp1.py +0 -0
  163. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bittrex.py +0 -0
  164. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bitvavo.py +0 -0
  165. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bkex.py +0 -0
  166. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/bl3p.py +0 -0
  167. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/blockchaincom.py +0 -0
  168. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btcalpha.py +0 -0
  169. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btcbox.py +0 -0
  170. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btcex.py +0 -0
  171. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btcmarkets.py +0 -0
  172. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btctradeua.py +0 -0
  173. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/btcturk.py +0 -0
  174. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/buda.py +0 -0
  175. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/cex.py +0 -0
  176. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinbase.py +0 -0
  177. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinbaseprime.py +0 -0
  178. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinbasepro.py +0 -0
  179. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coincheck.py +0 -0
  180. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinex.py +0 -0
  181. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinfalcon.py +0 -0
  182. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinmate.py +0 -0
  183. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinone.py +0 -0
  184. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/coinspot.py +0 -0
  185. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/cryptocom.py +0 -0
  186. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/currencycom.py +0 -0
  187. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/delta.py +0 -0
  188. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/deribit.py +0 -0
  189. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/digifinex.py +0 -0
  190. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/exmo.py +0 -0
  191. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/flowbtc.py +0 -0
  192. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/fmfwio.py +0 -0
  193. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/gate.py +0 -0
  194. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/gateio.py +0 -0
  195. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/gemini.py +0 -0
  196. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/hitbtc.py +0 -0
  197. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/hitbtc3.py +0 -0
  198. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/hollaex.py +0 -0
  199. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/huobi.py +0 -0
  200. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/huobijp.py +0 -0
  201. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/huobipro.py +0 -0
  202. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/idex.py +0 -0
  203. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/independentreserve.py +0 -0
  204. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/indodax.py +0 -0
  205. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/itbit.py +0 -0
  206. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/kraken.py +0 -0
  207. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/krakenfutures.py +0 -0
  208. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/kucoin.py +0 -0
  209. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/kucoinfutures.py +0 -0
  210. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/kuna.py +0 -0
  211. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/latoken.py +0 -0
  212. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/lbank.py +0 -0
  213. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/lbank2.py +0 -0
  214. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/luno.py +0 -0
  215. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/lykke.py +0 -0
  216. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/mercado.py +0 -0
  217. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/mexc.py +0 -0
  218. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/mexc3.py +0 -0
  219. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/ndax.py +0 -0
  220. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/oceanex.py +0 -0
  221. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/okcoin.py +0 -0
  222. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/okex.py +0 -0
  223. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/okex5.py +0 -0
  224. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/paymium.py +0 -0
  225. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/phemex.py +0 -0
  226. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/poloniex.py +0 -0
  227. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/poloniexfutures.py +0 -0
  228. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/alpaca.py +0 -0
  229. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/ascendex.py +0 -0
  230. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/__init__.py +0 -0
  231. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/aiohttp_client.py +0 -0
  232. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/cache.py +0 -0
  233. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/client.py +0 -0
  234. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/fast_client.py +0 -0
  235. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/functions.py +0 -0
  236. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/future.py +0 -0
  237. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/order_book.py +0 -0
  238. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/base/order_book_side.py +0 -0
  239. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bequant.py +0 -0
  240. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/binancecoinm.py +0 -0
  241. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/binanceus.py +0 -0
  242. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/binanceusdm.py +0 -0
  243. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitcoincom.py +0 -0
  244. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitfinex.py +0 -0
  245. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitfinex2.py +0 -0
  246. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitget.py +0 -0
  247. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitmart.py +0 -0
  248. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitmex.py +0 -0
  249. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitopro.py +0 -0
  250. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitrue.py +0 -0
  251. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitstamp.py +0 -0
  252. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bittrex.py +0 -0
  253. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/bitvavo.py +0 -0
  254. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/btcex.py +0 -0
  255. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/cex.py +0 -0
  256. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/coinbaseprime.py +0 -0
  257. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/coinbasepro.py +0 -0
  258. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/coinex.py +0 -0
  259. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/cryptocom.py +0 -0
  260. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/currencycom.py +0 -0
  261. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/deribit.py +0 -0
  262. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/exmo.py +0 -0
  263. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/gate.py +0 -0
  264. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/gateio.py +0 -0
  265. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/gemini.py +0 -0
  266. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/hitbtc.py +0 -0
  267. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/hollaex.py +0 -0
  268. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/huobi.py +0 -0
  269. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/huobijp.py +0 -0
  270. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/huobipro.py +0 -0
  271. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/idex.py +0 -0
  272. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/independentreserve.py +0 -0
  273. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/kraken.py +0 -0
  274. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/kucoin.py +0 -0
  275. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/kucoinfutures.py +0 -0
  276. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/luno.py +0 -0
  277. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/mexc.py +0 -0
  278. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/ndax.py +0 -0
  279. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/okcoin.py +0 -0
  280. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/okex.py +0 -0
  281. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/okx.py +0 -0
  282. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/phemex.py +0 -0
  283. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/ripio.py +0 -0
  284. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/upbit.py +0 -0
  285. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/wazirx.py +0 -0
  286. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/whitebit.py +0 -0
  287. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/woo.py +0 -0
  288. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/pro/zb.py +0 -0
  289. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/probit.py +0 -0
  290. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/ripio.py +0 -0
  291. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/__init__.py +0 -0
  292. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/__init__.py +0 -0
  293. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/_version.py +0 -0
  294. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/curves.py +0 -0
  295. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/der.py +0 -0
  296. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/ecdsa.py +0 -0
  297. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/ellipticcurve.py +0 -0
  298. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/keys.py +0 -0
  299. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/numbertheory.py +0 -0
  300. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/rfc6979.py +0 -0
  301. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/ecdsa/util.py +0 -0
  302. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/keccak/__init__.py +0 -0
  303. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/static_dependencies/keccak/keccak.py +0 -0
  304. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/stex.py +0 -0
  305. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/__init__.py +0 -0
  306. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_account.py +0 -0
  307. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_async.py +0 -0
  308. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_calculate_fee.py +0 -0
  309. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_crypto.py +0 -0
  310. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_decimal_to_precision.py +0 -0
  311. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_deep_extend.py +0 -0
  312. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_exchange_datetime_functions.py +0 -0
  313. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_leverage_tier.py +0 -0
  314. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_margin_modification.py +0 -0
  315. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_market.py +0 -0
  316. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_ohlcv.py +0 -0
  317. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_order.py +0 -0
  318. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_position.py +0 -0
  319. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_sync.py +0 -0
  320. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_throttle.py +0 -0
  321. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_trade.py +0 -0
  322. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/test/test_transaction.py +0 -0
  323. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/tidex.py +0 -0
  324. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/timex.py +0 -0
  325. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/tokocrypto.py +0 -0
  326. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/upbit.py +0 -0
  327. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/wavesexchange.py +0 -0
  328. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/wazirx.py +0 -0
  329. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/whitebit.py +0 -0
  330. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/woo.py +0 -0
  331. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/yobit.py +0 -0
  332. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/zaif.py +0 -0
  333. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/zb.py +0 -0
  334. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt/zonda.py +0 -0
  335. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt.egg-info/SOURCES.txt +0 -0
  336. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt.egg-info/dependency_links.txt +0 -0
  337. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt.egg-info/requires.txt +0 -0
  338. {ccxt-2.9.11 → ccxt-2.9.12}/ccxt.egg-info/top_level.txt +0 -0
  339. {ccxt-2.9.11 → ccxt-2.9.12}/setup.cfg +0 -0
  340. {ccxt-2.9.11 → ccxt-2.9.12}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 2.9.11
3
+ Version: 2.9.12
4
4
  Summary: A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -222,13 +222,13 @@ Description: # CCXT – CryptoCurrency eXchange Trading Library
222
222
 
223
223
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
224
224
 
225
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@2.9.11/dist/ccxt.browser.js
226
- * unpkg: https://unpkg.com/ccxt@2.9.11/dist/ccxt.browser.js
225
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@2.9.12/dist/ccxt.browser.js
226
+ * unpkg: https://unpkg.com/ccxt@2.9.12/dist/ccxt.browser.js
227
227
 
228
228
  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.
229
229
 
230
230
  ```HTML
231
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@2.9.11/dist/ccxt.browser.js"></script>
231
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@2.9.12/dist/ccxt.browser.js"></script>
232
232
  ```
233
233
 
234
234
  Creates a global `ccxt` object:
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '2.9.11'
25
+ __version__ = '2.9.12'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '2.9.11'
7
+ __version__ = '2.9.12'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '2.9.11'
5
+ __version__ = '2.9.12'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1348,7 +1348,7 @@ class bybit(Exchange):
1348
1348
  # "baseCoin": "BTC",
1349
1349
  # "quoteCoin": "USDT",
1350
1350
  # "innovation": "0",
1351
- # "status": "1",
1351
+ # "status": "Trading",
1352
1352
  # "lotSizeFilter": {
1353
1353
  # "basePrecision": "0.000001",
1354
1354
  # "quotePrecision": "0.00000001",
@@ -1381,7 +1381,7 @@ class bybit(Exchange):
1381
1381
  quote = self.safe_currency_code(quoteId)
1382
1382
  symbol = base + '/' + quote
1383
1383
  status = self.safe_string(market, 'status')
1384
- active = (status == 'trading') or (status == '1') # latter can be removed after 10/03
1384
+ active = (status == 'Trading')
1385
1385
  lotSizeFilter = self.safe_value(market, 'lotSizeFilter')
1386
1386
  priceFilter = self.safe_value(market, 'priceFilter')
1387
1387
  quotePrecision = self.safe_number(lotSizeFilter, 'quotePrecision')
@@ -2388,6 +2388,10 @@ class bybit(Exchange):
2388
2388
  marketType = 'contract'
2389
2389
  if market is not None:
2390
2390
  marketType = market['type']
2391
+ category = self.safe_string(trade, 'category')
2392
+ if category is not None:
2393
+ if category == 'spot':
2394
+ marketType = 'spot'
2391
2395
  market = self.safe_market(marketId, market, None, marketType)
2392
2396
  symbol = market['symbol']
2393
2397
  amountString = self.safe_string_n(trade, ['execQty', 'orderQty', 'size'])
@@ -3043,6 +3047,10 @@ class bybit(Exchange):
3043
3047
  marketType = 'contract'
3044
3048
  if market is not None:
3045
3049
  marketType = market['type']
3050
+ category = self.safe_string(order, 'category')
3051
+ if category is not None:
3052
+ if category == 'spot':
3053
+ marketType = 'spot'
3046
3054
  market = self.safe_market(marketId, market, None, marketType)
3047
3055
  symbol = market['symbol']
3048
3056
  timestamp = self.safe_integer(order, 'createdTime')
@@ -3240,6 +3248,10 @@ class bybit(Exchange):
3240
3248
  async def create_order(self, symbol, type, side, amount, price=None, params={}):
3241
3249
  """
3242
3250
  create a trade order
3251
+ see https://bybit-exchange.github.io/docs/v5/order/create-order
3252
+ see https://bybit-exchange.github.io/docs/spot/trade/place-order
3253
+ see https://bybit-exchange.github.io/docs/derivatives/unified/place-order
3254
+ see https://bybit-exchange.github.io/docs/derivatives/contract/place-order
3243
3255
  :param str symbol: unified symbol of the market to create an order in
3244
3256
  :param str type: 'market' or 'limit'
3245
3257
  :param str side: 'buy' or 'sell'
@@ -3320,25 +3332,36 @@ class bybit(Exchange):
3320
3332
  request['timeInForce'] = 'FOK'
3321
3333
  elif timeInForce == 'ioc':
3322
3334
  request['timeInForce'] = 'IOC'
3323
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3324
- stopLossPrice = self.safe_value(params, 'stopLossPrice')
3325
- isStopLossOrder = stopLossPrice is not None
3326
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3327
- isTakeProfitOrder = takeProfitPrice is not None
3328
- if isStopLossOrder:
3329
- request['stopLoss'] = self.price_to_precision(symbol, stopLossPrice)
3330
- if isTakeProfitOrder:
3331
- request['takeProfit'] = self.price_to_precision(symbol, takeProfitPrice)
3335
+ triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
3336
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3337
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3338
+ stopLoss = self.safe_number(params, 'stopLoss')
3339
+ takeProfit = self.safe_number(params, 'takeProfit')
3340
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3341
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3342
+ isStopLoss = stopLoss is not None
3343
+ isTakeProfit = takeProfit is not None
3332
3344
  if triggerPrice is not None:
3333
- # logical xor
3334
3345
  isBuy = side == 'buy'
3335
- ascending = not isBuy if stopLossPrice else isBuy
3346
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3336
3347
  request['triggerDirection'] = 2 if ascending else 1
3337
- request['triggerBy'] = 'LastPrice'
3338
3348
  request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
3349
+ elif isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3350
+ if isStopLossTriggerOrder:
3351
+ request['triggerPrice'] = self.price_to_precision(symbol, stopLossTriggerPrice)
3352
+ request['triggerDirection'] = 2
3353
+ else:
3354
+ request['triggerPrice'] = self.price_to_precision(symbol, takeProfitTriggerPrice)
3355
+ request['triggerDirection'] = 1
3356
+ request['reduceOnly'] = True
3357
+ elif isStopLoss or isTakeProfit:
3358
+ if isStopLoss:
3359
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3360
+ if isTakeProfit:
3361
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3339
3362
  if market['spot']:
3340
3363
  # only works for spot market
3341
- if triggerPrice is not None or isStopLossOrder or isTakeProfitOrder:
3364
+ if triggerPrice is not None or stopLossTriggerPrice is not None or takeProfitTriggerPrice is not None or isStopLoss or isTakeProfit:
3342
3365
  request['orderFilter'] = 'tpslOrder'
3343
3366
  clientOrderId = self.safe_string(params, 'clientOrderId')
3344
3367
  if clientOrderId is not None:
@@ -3346,7 +3369,7 @@ class bybit(Exchange):
3346
3369
  elif market['option']:
3347
3370
  # mandatory field for options
3348
3371
  request['orderLinkId'] = self.uuid16()
3349
- params = self.omit(params, ['stopPrice', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3372
+ params = self.omit(params, ['stopPrice', 'timeInForce', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3350
3373
  response = await self.privatePostV5OrderCreate(self.extend(request, params))
3351
3374
  #
3352
3375
  # {
@@ -3484,21 +3507,30 @@ class bybit(Exchange):
3484
3507
  request['timeInForce'] = 'FillOrKill'
3485
3508
  elif timeInForce == 'ioc':
3486
3509
  request['timeInForce'] = 'ImmediateOrCancel'
3487
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3488
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3489
- isStopLossOrder = stopLossPrice is not None
3490
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3491
- isTakeProfitOrder = takeProfitPrice is not None
3492
- if isStopLossOrder or isTakeProfitOrder:
3510
+ triggerPrice = self.safe_number_2(params, 'stopPrice', 'triggerPrice')
3511
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3512
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3513
+ stopLoss = self.safe_number(params, 'stopLoss')
3514
+ takeProfit = self.safe_number(params, 'takeProfit')
3515
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3516
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3517
+ isStopLoss = stopLoss is not None
3518
+ isTakeProfit = takeProfit is not None
3519
+ if isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3493
3520
  request['triggerBy'] = 'LastPrice'
3494
- triggerAt = stopLossPrice if isStopLossOrder else takeProfitPrice
3521
+ triggerAt = stopLossTriggerPrice if isStopLossTriggerOrder else takeProfitTriggerPrice
3495
3522
  preciseTriggerPrice = self.price_to_precision(symbol, triggerAt)
3496
3523
  request['triggerPrice'] = preciseTriggerPrice
3497
3524
  isBuy = side == 'buy'
3498
3525
  # logical xor
3499
- ascending = not isBuy if stopLossPrice else isBuy
3526
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3500
3527
  delta = self.number_to_string(market['precision']['price'])
3501
3528
  request['basePrice'] = Precise.string_add(preciseTriggerPrice, delta) if ascending else Precise.string_sub(preciseTriggerPrice, delta)
3529
+ elif isStopLoss or isTakeProfit:
3530
+ if isStopLoss:
3531
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3532
+ if isTakeProfit:
3533
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3502
3534
  clientOrderId = self.safe_string(params, 'clientOrderId')
3503
3535
  if clientOrderId is not None:
3504
3536
  request['orderLinkId'] = clientOrderId
@@ -3567,27 +3599,40 @@ class bybit(Exchange):
3567
3599
  request['timeInForce'] = 'FillOrKill'
3568
3600
  elif timeInForce == 'ioc':
3569
3601
  request['timeInForce'] = 'ImmediateOrCancel'
3570
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3571
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3572
- isStopLossOrder = stopLossPrice is not None
3573
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3574
- isTakeProfitOrder = takeProfitPrice is not None
3575
- if isStopLossOrder or isTakeProfitOrder:
3576
- triggerAt = stopLossPrice if isStopLossOrder else takeProfitPrice
3577
- preciseTriggerPrice = self.price_to_precision(symbol, triggerAt)
3602
+ triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
3603
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3604
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3605
+ stopLoss = self.safe_number(params, 'stopLoss')
3606
+ takeProfit = self.safe_number(params, 'takeProfit')
3607
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3608
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3609
+ isStopLoss = stopLoss is not None
3610
+ isTakeProfit = takeProfit is not None
3611
+ if triggerPrice:
3578
3612
  isBuy = side == 'buy'
3579
- # logical xor
3580
- ascending = not isBuy if stopLossPrice else isBuy
3613
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3581
3614
  request['triggerDirection'] = 2 if ascending else 1
3582
- request['triggerBy'] = 'LastPrice'
3583
- request['triggerPrice'] = self.price_to_precision(symbol, preciseTriggerPrice)
3615
+ request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
3616
+ elif isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3617
+ if isStopLossTriggerOrder:
3618
+ request['triggerPrice'] = self.price_to_precision(symbol, stopLossTriggerPrice)
3619
+ request['triggerDirection'] = 2
3620
+ else:
3621
+ request['triggerPrice'] = self.price_to_precision(symbol, takeProfitTriggerPrice)
3622
+ request['triggerDirection'] = 1
3623
+ request['reduceOnly'] = True
3624
+ elif isStopLoss or isTakeProfit:
3625
+ if isStopLoss:
3626
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3627
+ if isTakeProfit:
3628
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3584
3629
  clientOrderId = self.safe_string(params, 'clientOrderId')
3585
3630
  if clientOrderId is not None:
3586
3631
  request['orderLinkId'] = clientOrderId
3587
3632
  elif market['option']:
3588
3633
  # mandatory field for options
3589
3634
  request['orderLinkId'] = self.uuid16()
3590
- params = self.omit(params, ['stopPrice', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3635
+ params = self.omit(params, ['stopPrice', 'timeInForce', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3591
3636
  response = await self.privatePostContractV3PrivateOrderCreate(self.extend(request, params))
3592
3637
  #
3593
3638
  # {
@@ -3648,20 +3693,29 @@ class bybit(Exchange):
3648
3693
  elif timeInForce == 'ioc':
3649
3694
  request['time_in_force'] = 'ImmediateOrCancel'
3650
3695
  if market['swap']:
3651
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3652
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3653
- isStopLossOrder = stopLossPrice is not None
3654
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3655
- isTakeProfitOrder = takeProfitPrice is not None
3656
- isStopOrder = isStopLossOrder or isTakeProfitOrder
3696
+ triggerPrice = self.safe_number_2(params, 'stopPrice', 'triggerPrice')
3697
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3698
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3699
+ stopLoss = self.safe_number(params, 'stopLoss')
3700
+ takeProfit = self.safe_number(params, 'takeProfit')
3701
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3702
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3703
+ isStopLoss = stopLoss is not None
3704
+ isTakeProfit = takeProfit is not None
3705
+ isStopOrder = isStopLossTriggerOrder or isTakeProfitTriggerOrder
3657
3706
  if isStopOrder:
3658
3707
  request['orderFilter'] = 'StopOrder'
3659
3708
  request['trigger_by'] = 'LastPrice'
3660
- stopPx = stopLossPrice if isStopLossOrder else takeProfitPrice
3709
+ stopPx = stopLossTriggerPrice if isStopLossTriggerOrder else takeProfitTriggerPrice
3661
3710
  preciseStopPrice = self.price_to_precision(symbol, stopPx)
3662
3711
  request['triggerPrice'] = preciseStopPrice
3663
3712
  delta = self.number_to_string(market['precision']['price'])
3664
- request['basePrice'] = Precise.string_sub(preciseStopPrice, delta) if isStopLossOrder else Precise.string_add(preciseStopPrice, delta)
3713
+ request['basePrice'] = Precise.string_sub(preciseStopPrice, delta) if isStopLossTriggerOrder else Precise.string_add(preciseStopPrice, delta)
3714
+ elif isStopLoss or isTakeProfit:
3715
+ if isStopLoss:
3716
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3717
+ if isTakeProfit:
3718
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3665
3719
  else:
3666
3720
  request['orderFilter'] = 'Order'
3667
3721
  clientOrderId = self.safe_string(params, 'clientOrderId')
@@ -55,6 +55,9 @@ class novadax(Exchange):
55
55
  'fetchBorrowRates': False,
56
56
  'fetchBorrowRatesPerSymbol': False,
57
57
  'fetchClosedOrders': True,
58
+ 'fetchDepositAddress': False,
59
+ 'fetchDepositAddresses': False,
60
+ 'fetchDepositAddressesByNetwork': False,
58
61
  'fetchDeposits': True,
59
62
  'fetchFundingHistory': False,
60
63
  'fetchFundingRate': False,
@@ -2458,7 +2458,9 @@ class okx(Exchange):
2458
2458
  clientOrderId = self.safe_string(order, 'clOrdId')
2459
2459
  if (clientOrderId is not None) and (len(clientOrderId) < 1):
2460
2460
  clientOrderId = None # fix empty clientOrderId string
2461
- stopPrice = self.safe_number_n(order, ['tpTriggerPx', 'triggerPx', 'slTriggerPx'])
2461
+ stopLossPrice = self.safe_number_2(order, 'slTriggerPx', 'slOrdPx')
2462
+ takeProfitPrice = self.safe_number_2(order, 'tpTriggerPx', 'tpOrdPx')
2463
+ stopPrice = self.safe_number_n(order, ['triggerPx', 'moveTriggerPx'])
2462
2464
  reduceOnly = self.safe_string(order, 'reduceOnly')
2463
2465
  if reduceOnly is not None:
2464
2466
  reduceOnly = (reduceOnly == 'true')
@@ -2475,6 +2477,8 @@ class okx(Exchange):
2475
2477
  'postOnly': postOnly,
2476
2478
  'side': side,
2477
2479
  'price': price,
2480
+ 'stopLossPrice': stopLossPrice,
2481
+ 'takeProfitPrice': takeProfitPrice,
2478
2482
  'stopPrice': stopPrice,
2479
2483
  'triggerPrice': stopPrice,
2480
2484
  'average': average,
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '2.9.11'
7
+ __version__ = '2.9.12'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -1346,7 +1346,7 @@ class bybit(Exchange):
1346
1346
  # "baseCoin": "BTC",
1347
1347
  # "quoteCoin": "USDT",
1348
1348
  # "innovation": "0",
1349
- # "status": "1",
1349
+ # "status": "Trading",
1350
1350
  # "lotSizeFilter": {
1351
1351
  # "basePrecision": "0.000001",
1352
1352
  # "quotePrecision": "0.00000001",
@@ -1379,7 +1379,7 @@ class bybit(Exchange):
1379
1379
  quote = self.safe_currency_code(quoteId)
1380
1380
  symbol = base + '/' + quote
1381
1381
  status = self.safe_string(market, 'status')
1382
- active = (status == 'trading') or (status == '1') # latter can be removed after 10/03
1382
+ active = (status == 'Trading')
1383
1383
  lotSizeFilter = self.safe_value(market, 'lotSizeFilter')
1384
1384
  priceFilter = self.safe_value(market, 'priceFilter')
1385
1385
  quotePrecision = self.safe_number(lotSizeFilter, 'quotePrecision')
@@ -2386,6 +2386,10 @@ class bybit(Exchange):
2386
2386
  marketType = 'contract'
2387
2387
  if market is not None:
2388
2388
  marketType = market['type']
2389
+ category = self.safe_string(trade, 'category')
2390
+ if category is not None:
2391
+ if category == 'spot':
2392
+ marketType = 'spot'
2389
2393
  market = self.safe_market(marketId, market, None, marketType)
2390
2394
  symbol = market['symbol']
2391
2395
  amountString = self.safe_string_n(trade, ['execQty', 'orderQty', 'size'])
@@ -3041,6 +3045,10 @@ class bybit(Exchange):
3041
3045
  marketType = 'contract'
3042
3046
  if market is not None:
3043
3047
  marketType = market['type']
3048
+ category = self.safe_string(order, 'category')
3049
+ if category is not None:
3050
+ if category == 'spot':
3051
+ marketType = 'spot'
3044
3052
  market = self.safe_market(marketId, market, None, marketType)
3045
3053
  symbol = market['symbol']
3046
3054
  timestamp = self.safe_integer(order, 'createdTime')
@@ -3238,6 +3246,10 @@ class bybit(Exchange):
3238
3246
  def create_order(self, symbol, type, side, amount, price=None, params={}):
3239
3247
  """
3240
3248
  create a trade order
3249
+ see https://bybit-exchange.github.io/docs/v5/order/create-order
3250
+ see https://bybit-exchange.github.io/docs/spot/trade/place-order
3251
+ see https://bybit-exchange.github.io/docs/derivatives/unified/place-order
3252
+ see https://bybit-exchange.github.io/docs/derivatives/contract/place-order
3241
3253
  :param str symbol: unified symbol of the market to create an order in
3242
3254
  :param str type: 'market' or 'limit'
3243
3255
  :param str side: 'buy' or 'sell'
@@ -3318,25 +3330,36 @@ class bybit(Exchange):
3318
3330
  request['timeInForce'] = 'FOK'
3319
3331
  elif timeInForce == 'ioc':
3320
3332
  request['timeInForce'] = 'IOC'
3321
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3322
- stopLossPrice = self.safe_value(params, 'stopLossPrice')
3323
- isStopLossOrder = stopLossPrice is not None
3324
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3325
- isTakeProfitOrder = takeProfitPrice is not None
3326
- if isStopLossOrder:
3327
- request['stopLoss'] = self.price_to_precision(symbol, stopLossPrice)
3328
- if isTakeProfitOrder:
3329
- request['takeProfit'] = self.price_to_precision(symbol, takeProfitPrice)
3333
+ triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
3334
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3335
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3336
+ stopLoss = self.safe_number(params, 'stopLoss')
3337
+ takeProfit = self.safe_number(params, 'takeProfit')
3338
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3339
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3340
+ isStopLoss = stopLoss is not None
3341
+ isTakeProfit = takeProfit is not None
3330
3342
  if triggerPrice is not None:
3331
- # logical xor
3332
3343
  isBuy = side == 'buy'
3333
- ascending = not isBuy if stopLossPrice else isBuy
3344
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3334
3345
  request['triggerDirection'] = 2 if ascending else 1
3335
- request['triggerBy'] = 'LastPrice'
3336
3346
  request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
3347
+ elif isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3348
+ if isStopLossTriggerOrder:
3349
+ request['triggerPrice'] = self.price_to_precision(symbol, stopLossTriggerPrice)
3350
+ request['triggerDirection'] = 2
3351
+ else:
3352
+ request['triggerPrice'] = self.price_to_precision(symbol, takeProfitTriggerPrice)
3353
+ request['triggerDirection'] = 1
3354
+ request['reduceOnly'] = True
3355
+ elif isStopLoss or isTakeProfit:
3356
+ if isStopLoss:
3357
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3358
+ if isTakeProfit:
3359
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3337
3360
  if market['spot']:
3338
3361
  # only works for spot market
3339
- if triggerPrice is not None or isStopLossOrder or isTakeProfitOrder:
3362
+ if triggerPrice is not None or stopLossTriggerPrice is not None or takeProfitTriggerPrice is not None or isStopLoss or isTakeProfit:
3340
3363
  request['orderFilter'] = 'tpslOrder'
3341
3364
  clientOrderId = self.safe_string(params, 'clientOrderId')
3342
3365
  if clientOrderId is not None:
@@ -3344,7 +3367,7 @@ class bybit(Exchange):
3344
3367
  elif market['option']:
3345
3368
  # mandatory field for options
3346
3369
  request['orderLinkId'] = self.uuid16()
3347
- params = self.omit(params, ['stopPrice', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3370
+ params = self.omit(params, ['stopPrice', 'timeInForce', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3348
3371
  response = self.privatePostV5OrderCreate(self.extend(request, params))
3349
3372
  #
3350
3373
  # {
@@ -3482,21 +3505,30 @@ class bybit(Exchange):
3482
3505
  request['timeInForce'] = 'FillOrKill'
3483
3506
  elif timeInForce == 'ioc':
3484
3507
  request['timeInForce'] = 'ImmediateOrCancel'
3485
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3486
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3487
- isStopLossOrder = stopLossPrice is not None
3488
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3489
- isTakeProfitOrder = takeProfitPrice is not None
3490
- if isStopLossOrder or isTakeProfitOrder:
3508
+ triggerPrice = self.safe_number_2(params, 'stopPrice', 'triggerPrice')
3509
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3510
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3511
+ stopLoss = self.safe_number(params, 'stopLoss')
3512
+ takeProfit = self.safe_number(params, 'takeProfit')
3513
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3514
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3515
+ isStopLoss = stopLoss is not None
3516
+ isTakeProfit = takeProfit is not None
3517
+ if isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3491
3518
  request['triggerBy'] = 'LastPrice'
3492
- triggerAt = stopLossPrice if isStopLossOrder else takeProfitPrice
3519
+ triggerAt = stopLossTriggerPrice if isStopLossTriggerOrder else takeProfitTriggerPrice
3493
3520
  preciseTriggerPrice = self.price_to_precision(symbol, triggerAt)
3494
3521
  request['triggerPrice'] = preciseTriggerPrice
3495
3522
  isBuy = side == 'buy'
3496
3523
  # logical xor
3497
- ascending = not isBuy if stopLossPrice else isBuy
3524
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3498
3525
  delta = self.number_to_string(market['precision']['price'])
3499
3526
  request['basePrice'] = Precise.string_add(preciseTriggerPrice, delta) if ascending else Precise.string_sub(preciseTriggerPrice, delta)
3527
+ elif isStopLoss or isTakeProfit:
3528
+ if isStopLoss:
3529
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3530
+ if isTakeProfit:
3531
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3500
3532
  clientOrderId = self.safe_string(params, 'clientOrderId')
3501
3533
  if clientOrderId is not None:
3502
3534
  request['orderLinkId'] = clientOrderId
@@ -3565,27 +3597,40 @@ class bybit(Exchange):
3565
3597
  request['timeInForce'] = 'FillOrKill'
3566
3598
  elif timeInForce == 'ioc':
3567
3599
  request['timeInForce'] = 'ImmediateOrCancel'
3568
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3569
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3570
- isStopLossOrder = stopLossPrice is not None
3571
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3572
- isTakeProfitOrder = takeProfitPrice is not None
3573
- if isStopLossOrder or isTakeProfitOrder:
3574
- triggerAt = stopLossPrice if isStopLossOrder else takeProfitPrice
3575
- preciseTriggerPrice = self.price_to_precision(symbol, triggerAt)
3600
+ triggerPrice = self.safe_number_2(params, 'triggerPrice', 'stopPrice')
3601
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3602
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3603
+ stopLoss = self.safe_number(params, 'stopLoss')
3604
+ takeProfit = self.safe_number(params, 'takeProfit')
3605
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3606
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3607
+ isStopLoss = stopLoss is not None
3608
+ isTakeProfit = takeProfit is not None
3609
+ if triggerPrice:
3576
3610
  isBuy = side == 'buy'
3577
- # logical xor
3578
- ascending = not isBuy if stopLossPrice else isBuy
3611
+ ascending = not isBuy if stopLossTriggerPrice else isBuy
3579
3612
  request['triggerDirection'] = 2 if ascending else 1
3580
- request['triggerBy'] = 'LastPrice'
3581
- request['triggerPrice'] = self.price_to_precision(symbol, preciseTriggerPrice)
3613
+ request['triggerPrice'] = self.price_to_precision(symbol, triggerPrice)
3614
+ elif isStopLossTriggerOrder or isTakeProfitTriggerOrder:
3615
+ if isStopLossTriggerOrder:
3616
+ request['triggerPrice'] = self.price_to_precision(symbol, stopLossTriggerPrice)
3617
+ request['triggerDirection'] = 2
3618
+ else:
3619
+ request['triggerPrice'] = self.price_to_precision(symbol, takeProfitTriggerPrice)
3620
+ request['triggerDirection'] = 1
3621
+ request['reduceOnly'] = True
3622
+ elif isStopLoss or isTakeProfit:
3623
+ if isStopLoss:
3624
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3625
+ if isTakeProfit:
3626
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3582
3627
  clientOrderId = self.safe_string(params, 'clientOrderId')
3583
3628
  if clientOrderId is not None:
3584
3629
  request['orderLinkId'] = clientOrderId
3585
3630
  elif market['option']:
3586
3631
  # mandatory field for options
3587
3632
  request['orderLinkId'] = self.uuid16()
3588
- params = self.omit(params, ['stopPrice', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3633
+ params = self.omit(params, ['stopPrice', 'timeInForce', 'stopLossPrice', 'takeProfitPrice', 'postOnly', 'clientOrderId'])
3589
3634
  response = self.privatePostContractV3PrivateOrderCreate(self.extend(request, params))
3590
3635
  #
3591
3636
  # {
@@ -3646,20 +3691,29 @@ class bybit(Exchange):
3646
3691
  elif timeInForce == 'ioc':
3647
3692
  request['time_in_force'] = 'ImmediateOrCancel'
3648
3693
  if market['swap']:
3649
- triggerPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
3650
- stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice)
3651
- isStopLossOrder = stopLossPrice is not None
3652
- takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
3653
- isTakeProfitOrder = takeProfitPrice is not None
3654
- isStopOrder = isStopLossOrder or isTakeProfitOrder
3694
+ triggerPrice = self.safe_number_2(params, 'stopPrice', 'triggerPrice')
3695
+ stopLossTriggerPrice = self.safe_number(params, 'stopLossPrice', triggerPrice)
3696
+ takeProfitTriggerPrice = self.safe_number(params, 'takeProfitPrice')
3697
+ stopLoss = self.safe_number(params, 'stopLoss')
3698
+ takeProfit = self.safe_number(params, 'takeProfit')
3699
+ isStopLossTriggerOrder = stopLossTriggerPrice is not None
3700
+ isTakeProfitTriggerOrder = takeProfitTriggerPrice is not None
3701
+ isStopLoss = stopLoss is not None
3702
+ isTakeProfit = takeProfit is not None
3703
+ isStopOrder = isStopLossTriggerOrder or isTakeProfitTriggerOrder
3655
3704
  if isStopOrder:
3656
3705
  request['orderFilter'] = 'StopOrder'
3657
3706
  request['trigger_by'] = 'LastPrice'
3658
- stopPx = stopLossPrice if isStopLossOrder else takeProfitPrice
3707
+ stopPx = stopLossTriggerPrice if isStopLossTriggerOrder else takeProfitTriggerPrice
3659
3708
  preciseStopPrice = self.price_to_precision(symbol, stopPx)
3660
3709
  request['triggerPrice'] = preciseStopPrice
3661
3710
  delta = self.number_to_string(market['precision']['price'])
3662
- request['basePrice'] = Precise.string_sub(preciseStopPrice, delta) if isStopLossOrder else Precise.string_add(preciseStopPrice, delta)
3711
+ request['basePrice'] = Precise.string_sub(preciseStopPrice, delta) if isStopLossTriggerOrder else Precise.string_add(preciseStopPrice, delta)
3712
+ elif isStopLoss or isTakeProfit:
3713
+ if isStopLoss:
3714
+ request['stopLoss'] = self.price_to_precision(symbol, stopLoss)
3715
+ if isTakeProfit:
3716
+ request['takeProfit'] = self.price_to_precision(symbol, takeProfit)
3663
3717
  else:
3664
3718
  request['orderFilter'] = 'Order'
3665
3719
  clientOrderId = self.safe_string(params, 'clientOrderId')
@@ -55,6 +55,9 @@ class novadax(Exchange):
55
55
  'fetchBorrowRates': False,
56
56
  'fetchBorrowRatesPerSymbol': False,
57
57
  'fetchClosedOrders': True,
58
+ 'fetchDepositAddress': False,
59
+ 'fetchDepositAddresses': False,
60
+ 'fetchDepositAddressesByNetwork': False,
58
61
  'fetchDeposits': True,
59
62
  'fetchFundingHistory': False,
60
63
  'fetchFundingRate': False,
@@ -2456,7 +2456,9 @@ class okx(Exchange):
2456
2456
  clientOrderId = self.safe_string(order, 'clOrdId')
2457
2457
  if (clientOrderId is not None) and (len(clientOrderId) < 1):
2458
2458
  clientOrderId = None # fix empty clientOrderId string
2459
- stopPrice = self.safe_number_n(order, ['tpTriggerPx', 'triggerPx', 'slTriggerPx'])
2459
+ stopLossPrice = self.safe_number_2(order, 'slTriggerPx', 'slOrdPx')
2460
+ takeProfitPrice = self.safe_number_2(order, 'tpTriggerPx', 'tpOrdPx')
2461
+ stopPrice = self.safe_number_n(order, ['triggerPx', 'moveTriggerPx'])
2460
2462
  reduceOnly = self.safe_string(order, 'reduceOnly')
2461
2463
  if reduceOnly is not None:
2462
2464
  reduceOnly = (reduceOnly == 'true')
@@ -2473,6 +2475,8 @@ class okx(Exchange):
2473
2475
  'postOnly': postOnly,
2474
2476
  'side': side,
2475
2477
  'price': price,
2478
+ 'stopLossPrice': stopLossPrice,
2479
+ 'takeProfitPrice': takeProfitPrice,
2476
2480
  'stopPrice': stopPrice,
2477
2481
  'triggerPrice': stopPrice,
2478
2482
  'average': average,
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '2.9.11'
7
+ __version__ = '2.9.12'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '2.9.11'
5
+ __version__ = '2.9.12'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8