ccxt 4.4.29__py2.py3-none-any.whl → 4.4.31__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 (273) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/alpaca.py +1 -0
  3. ccxt/abstract/binance.py +9 -0
  4. ccxt/abstract/binancecoinm.py +9 -0
  5. ccxt/abstract/binanceus.py +9 -0
  6. ccxt/abstract/binanceusdm.py +9 -0
  7. ccxt/ace.py +36 -12
  8. ccxt/alpaca.py +113 -28
  9. ccxt/ascendex.py +65 -30
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ace.py +36 -12
  12. ccxt/async_support/alpaca.py +113 -28
  13. ccxt/async_support/ascendex.py +65 -30
  14. ccxt/async_support/base/exchange.py +3 -3
  15. ccxt/async_support/bigone.py +71 -27
  16. ccxt/async_support/binance.py +564 -323
  17. ccxt/async_support/bingx.py +208 -108
  18. ccxt/async_support/bit2c.py +34 -12
  19. ccxt/async_support/bitbank.py +42 -14
  20. ccxt/async_support/bitbns.py +29 -21
  21. ccxt/async_support/bitfinex.py +77 -33
  22. ccxt/async_support/bitfinex2.py +116 -44
  23. ccxt/async_support/bitflyer.py +54 -18
  24. ccxt/async_support/bitget.py +277 -145
  25. ccxt/async_support/bithumb.py +39 -14
  26. ccxt/async_support/bitmart.py +198 -132
  27. ccxt/async_support/bitmex.py +90 -30
  28. ccxt/async_support/bitopro.py +66 -22
  29. ccxt/async_support/bitrue.py +109 -57
  30. ccxt/async_support/bitso.py +55 -19
  31. ccxt/async_support/bitstamp.py +84 -36
  32. ccxt/async_support/bitteam.py +51 -17
  33. ccxt/async_support/bitvavo.py +57 -19
  34. ccxt/async_support/bl3p.py +26 -10
  35. ccxt/async_support/blockchaincom.py +63 -21
  36. ccxt/async_support/blofin.py +95 -38
  37. ccxt/async_support/btcalpha.py +48 -16
  38. ccxt/async_support/btcbox.py +27 -9
  39. ccxt/async_support/btcmarkets.py +57 -19
  40. ccxt/async_support/btcturk.py +36 -12
  41. ccxt/async_support/bybit.py +251 -95
  42. ccxt/async_support/cex.py +65 -22
  43. ccxt/async_support/coinbase.py +138 -56
  44. ccxt/async_support/coinbaseexchange.py +76 -28
  45. ccxt/async_support/coinbaseinternational.py +75 -27
  46. ccxt/async_support/coincatch.py +191 -97
  47. ccxt/async_support/coincheck.py +33 -11
  48. ccxt/async_support/coinex.py +212 -101
  49. ccxt/async_support/coinlist.py +87 -30
  50. ccxt/async_support/coinmate.py +55 -24
  51. ccxt/async_support/coinmetro.py +52 -18
  52. ccxt/async_support/coinone.py +27 -10
  53. ccxt/async_support/coinsph.py +73 -27
  54. ccxt/async_support/coinspot.py +25 -9
  55. ccxt/async_support/cryptocom.py +103 -38
  56. ccxt/async_support/currencycom.py +70 -23
  57. ccxt/async_support/delta.py +90 -30
  58. ccxt/async_support/deribit.py +138 -53
  59. ccxt/async_support/digifinex.py +114 -51
  60. ccxt/async_support/exmo.py +104 -45
  61. ccxt/async_support/gate.py +298 -155
  62. ccxt/async_support/gemini.py +57 -20
  63. ccxt/async_support/hashkey.py +151 -66
  64. ccxt/async_support/hitbtc.py +156 -73
  65. ccxt/async_support/hollaex.py +76 -25
  66. ccxt/async_support/htx.py +297 -240
  67. ccxt/async_support/huobijp.py +1 -0
  68. ccxt/async_support/hyperliquid.py +203 -42
  69. ccxt/async_support/idex.py +73 -24
  70. ccxt/async_support/independentreserve.py +12 -5
  71. ccxt/async_support/indodax.py +53 -16
  72. ccxt/async_support/kraken.py +107 -35
  73. ccxt/async_support/krakenfutures.py +88 -34
  74. ccxt/async_support/kucoin.py +211 -109
  75. ccxt/async_support/kucoinfutures.py +119 -42
  76. ccxt/async_support/kuna.py +80 -39
  77. ccxt/async_support/latoken.py +70 -33
  78. ccxt/async_support/lbank.py +90 -39
  79. ccxt/async_support/luno.py +54 -19
  80. ccxt/async_support/lykke.py +54 -19
  81. ccxt/async_support/mercado.py +1 -0
  82. ccxt/async_support/mexc.py +226 -108
  83. ccxt/async_support/ndax.py +58 -19
  84. ccxt/async_support/novadax.py +67 -22
  85. ccxt/async_support/oceanex.py +58 -19
  86. ccxt/async_support/okcoin.py +81 -38
  87. ccxt/async_support/okx.py +270 -109
  88. ccxt/async_support/onetrading.py +3 -1
  89. ccxt/async_support/oxfun.py +95 -36
  90. ccxt/async_support/p2b.py +49 -23
  91. ccxt/async_support/paradex.py +75 -27
  92. ccxt/async_support/paymium.py +31 -11
  93. ccxt/async_support/phemex.py +91 -41
  94. ccxt/async_support/poloniex.py +80 -30
  95. ccxt/async_support/poloniexfutures.py +72 -30
  96. ccxt/async_support/probit.py +64 -22
  97. ccxt/async_support/timex.py +58 -19
  98. ccxt/async_support/tokocrypto.py +63 -22
  99. ccxt/async_support/tradeogre.py +7 -2
  100. ccxt/async_support/upbit.py +72 -25
  101. ccxt/async_support/vertex.py +74 -28
  102. ccxt/async_support/wavesexchange.py +29 -8
  103. ccxt/async_support/wazirx.py +51 -17
  104. ccxt/async_support/whitebit.py +105 -41
  105. ccxt/async_support/woo.py +162 -65
  106. ccxt/async_support/woofipro.py +118 -49
  107. ccxt/async_support/xt.py +150 -73
  108. ccxt/async_support/yobit.py +49 -16
  109. ccxt/async_support/zaif.py +30 -10
  110. ccxt/async_support/zonda.py +46 -16
  111. ccxt/base/exchange.py +34 -34
  112. ccxt/base/types.py +1 -0
  113. ccxt/bigone.py +71 -27
  114. ccxt/binance.py +564 -323
  115. ccxt/bingx.py +208 -108
  116. ccxt/bit2c.py +34 -12
  117. ccxt/bitbank.py +42 -14
  118. ccxt/bitbns.py +29 -21
  119. ccxt/bitfinex.py +77 -33
  120. ccxt/bitfinex2.py +116 -44
  121. ccxt/bitflyer.py +54 -18
  122. ccxt/bitget.py +277 -145
  123. ccxt/bithumb.py +39 -14
  124. ccxt/bitmart.py +198 -132
  125. ccxt/bitmex.py +90 -30
  126. ccxt/bitopro.py +66 -22
  127. ccxt/bitrue.py +109 -57
  128. ccxt/bitso.py +55 -19
  129. ccxt/bitstamp.py +84 -36
  130. ccxt/bitteam.py +51 -17
  131. ccxt/bitvavo.py +57 -19
  132. ccxt/bl3p.py +26 -10
  133. ccxt/blockchaincom.py +63 -21
  134. ccxt/blofin.py +95 -38
  135. ccxt/btcalpha.py +48 -16
  136. ccxt/btcbox.py +27 -9
  137. ccxt/btcmarkets.py +57 -19
  138. ccxt/btcturk.py +36 -12
  139. ccxt/bybit.py +251 -95
  140. ccxt/cex.py +65 -22
  141. ccxt/coinbase.py +138 -56
  142. ccxt/coinbaseexchange.py +76 -28
  143. ccxt/coinbaseinternational.py +75 -27
  144. ccxt/coincatch.py +191 -97
  145. ccxt/coincheck.py +33 -11
  146. ccxt/coinex.py +212 -101
  147. ccxt/coinlist.py +87 -30
  148. ccxt/coinmate.py +55 -24
  149. ccxt/coinmetro.py +52 -18
  150. ccxt/coinone.py +27 -10
  151. ccxt/coinsph.py +73 -27
  152. ccxt/coinspot.py +25 -9
  153. ccxt/cryptocom.py +103 -38
  154. ccxt/currencycom.py +70 -23
  155. ccxt/delta.py +90 -30
  156. ccxt/deribit.py +138 -53
  157. ccxt/digifinex.py +114 -51
  158. ccxt/exmo.py +104 -45
  159. ccxt/gate.py +298 -155
  160. ccxt/gemini.py +57 -20
  161. ccxt/hashkey.py +151 -66
  162. ccxt/hitbtc.py +156 -73
  163. ccxt/hollaex.py +76 -25
  164. ccxt/htx.py +297 -240
  165. ccxt/huobijp.py +1 -0
  166. ccxt/hyperliquid.py +203 -42
  167. ccxt/idex.py +73 -24
  168. ccxt/independentreserve.py +12 -5
  169. ccxt/indodax.py +53 -16
  170. ccxt/kraken.py +107 -35
  171. ccxt/krakenfutures.py +88 -34
  172. ccxt/kucoin.py +211 -109
  173. ccxt/kucoinfutures.py +119 -42
  174. ccxt/kuna.py +80 -39
  175. ccxt/latoken.py +70 -33
  176. ccxt/lbank.py +90 -39
  177. ccxt/luno.py +54 -19
  178. ccxt/lykke.py +54 -19
  179. ccxt/mercado.py +1 -0
  180. ccxt/mexc.py +226 -108
  181. ccxt/ndax.py +58 -19
  182. ccxt/novadax.py +67 -22
  183. ccxt/oceanex.py +58 -19
  184. ccxt/okcoin.py +81 -38
  185. ccxt/okx.py +270 -109
  186. ccxt/onetrading.py +3 -1
  187. ccxt/oxfun.py +95 -36
  188. ccxt/p2b.py +49 -23
  189. ccxt/paradex.py +75 -27
  190. ccxt/paymium.py +31 -11
  191. ccxt/phemex.py +91 -41
  192. ccxt/poloniex.py +80 -30
  193. ccxt/poloniexfutures.py +72 -30
  194. ccxt/pro/__init__.py +1 -1
  195. ccxt/pro/alpaca.py +15 -5
  196. ccxt/pro/ascendex.py +18 -6
  197. ccxt/pro/binance.py +200 -119
  198. ccxt/pro/bingx.py +44 -24
  199. ccxt/pro/bitfinex.py +13 -5
  200. ccxt/pro/bitget.py +75 -36
  201. ccxt/pro/bithumb.py +12 -4
  202. ccxt/pro/bitmart.py +44 -20
  203. ccxt/pro/bitmex.py +42 -14
  204. ccxt/pro/bitopro.py +15 -5
  205. ccxt/pro/bitrue.py +7 -3
  206. ccxt/pro/bitvavo.py +51 -17
  207. ccxt/pro/blockchaincom.py +18 -6
  208. ccxt/pro/blofin.py +38 -13
  209. ccxt/pro/bybit.py +100 -42
  210. ccxt/pro/cex.py +48 -16
  211. ccxt/pro/coinbase.py +32 -12
  212. ccxt/pro/coinbaseexchange.py +1 -1
  213. ccxt/pro/coinbaseinternational.py +34 -14
  214. ccxt/pro/coincatch.py +54 -19
  215. ccxt/pro/coincheck.py +6 -2
  216. ccxt/pro/coinex.py +40 -20
  217. ccxt/pro/coinone.py +9 -3
  218. ccxt/pro/cryptocom.py +70 -26
  219. ccxt/pro/deribit.py +36 -12
  220. ccxt/pro/exmo.py +10 -4
  221. ccxt/pro/gate.py +64 -30
  222. ccxt/pro/gemini.py +21 -7
  223. ccxt/pro/hashkey.py +26 -8
  224. ccxt/pro/hitbtc.py +61 -37
  225. ccxt/pro/hollaex.py +15 -5
  226. ccxt/pro/htx.py +39 -21
  227. ccxt/pro/hyperliquid.py +41 -14
  228. ccxt/pro/kraken.py +49 -17
  229. ccxt/pro/krakenfutures.py +47 -24
  230. ccxt/pro/kucoin.py +60 -31
  231. ccxt/pro/kucoinfutures.py +41 -19
  232. ccxt/pro/lbank.py +27 -9
  233. ccxt/pro/luno.py +3 -1
  234. ccxt/pro/mexc.py +35 -17
  235. ccxt/pro/ndax.py +12 -4
  236. ccxt/pro/okcoin.py +18 -6
  237. ccxt/pro/okx.py +76 -28
  238. ccxt/pro/onetrading.py +21 -7
  239. ccxt/pro/oxfun.py +54 -20
  240. ccxt/pro/p2b.py +23 -11
  241. ccxt/pro/paradex.py +12 -4
  242. ccxt/pro/phemex.py +31 -19
  243. ccxt/pro/poloniex.py +50 -22
  244. ccxt/pro/poloniexfutures.py +17 -7
  245. ccxt/pro/probit.py +18 -6
  246. ccxt/pro/upbit.py +25 -9
  247. ccxt/pro/vertex.py +20 -6
  248. ccxt/pro/wazirx.py +21 -7
  249. ccxt/pro/whitebit.py +25 -9
  250. ccxt/pro/woo.py +32 -12
  251. ccxt/pro/woofipro.py +35 -13
  252. ccxt/pro/xt.py +46 -26
  253. ccxt/probit.py +64 -22
  254. ccxt/test/tests_helpers.py +2 -2
  255. ccxt/timex.py +58 -19
  256. ccxt/tokocrypto.py +63 -22
  257. ccxt/tradeogre.py +7 -2
  258. ccxt/upbit.py +72 -25
  259. ccxt/vertex.py +74 -28
  260. ccxt/wavesexchange.py +29 -8
  261. ccxt/wazirx.py +51 -17
  262. ccxt/whitebit.py +105 -41
  263. ccxt/woo.py +162 -65
  264. ccxt/woofipro.py +118 -49
  265. ccxt/xt.py +150 -73
  266. ccxt/yobit.py +49 -16
  267. ccxt/zaif.py +30 -10
  268. ccxt/zonda.py +46 -16
  269. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
  270. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
  271. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
  272. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
  273. {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/bit2c.py CHANGED
@@ -214,7 +214,9 @@ class bit2c(Exchange, ImplicitAPI):
214
214
  def fetch_balance(self, params={}) -> Balances:
215
215
  """
216
216
  query for balance and get the amount of funds available for trading or funds locked in orders
217
- :see: https://bit2c.co.il/home/api#balance
217
+
218
+ https://bit2c.co.il/home/api#balance
219
+
218
220
  :param dict [params]: extra parameters specific to the exchange API endpoint
219
221
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
220
222
  """
@@ -267,7 +269,9 @@ class bit2c(Exchange, ImplicitAPI):
267
269
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
268
270
  """
269
271
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
270
- :see: https://bit2c.co.il/home/api#orderb
272
+
273
+ https://bit2c.co.il/home/api#orderb
274
+
271
275
  :param str symbol: unified symbol of the market to fetch the order book for
272
276
  :param int [limit]: the maximum amount of order book entries to return
273
277
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -312,7 +316,9 @@ class bit2c(Exchange, ImplicitAPI):
312
316
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
313
317
  """
314
318
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
315
- :see: https://bit2c.co.il/home/api#ticker
319
+
320
+ https://bit2c.co.il/home/api#ticker
321
+
316
322
  :param str symbol: unified symbol of the market to fetch the ticker for
317
323
  :param dict [params]: extra parameters specific to the exchange API endpoint
318
324
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -328,8 +334,10 @@ class bit2c(Exchange, ImplicitAPI):
328
334
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
329
335
  """
330
336
  get the list of most recent trades for a particular symbol
331
- :see: https://bit2c.co.il/home/api#transactions
332
- :see: https://bit2c.co.il/home/api#trades
337
+
338
+ https://bit2c.co.il/home/api#transactions
339
+ https://bit2c.co.il/home/api#trades
340
+
333
341
  :param str symbol: unified symbol of the market to fetch trades for
334
342
  :param int [since]: timestamp in ms of the earliest trade to fetch
335
343
  :param int [limit]: the maximum amount of trades to fetch
@@ -365,7 +373,9 @@ class bit2c(Exchange, ImplicitAPI):
365
373
  def fetch_trading_fees(self, params={}) -> TradingFees:
366
374
  """
367
375
  fetch the trading fees for multiple markets
368
- :see: https://bit2c.co.il/home/api#balance
376
+
377
+ https://bit2c.co.il/home/api#balance
378
+
369
379
  :param dict [params]: extra parameters specific to the exchange API endpoint
370
380
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
371
381
  """
@@ -411,7 +421,9 @@ class bit2c(Exchange, ImplicitAPI):
411
421
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
412
422
  """
413
423
  create a trade order
414
- :see: https://bit2c.co.il/home/api#addo
424
+
425
+ https://bit2c.co.il/home/api#addo
426
+
415
427
  :param str symbol: unified symbol of the market to create an order in
416
428
  :param str type: 'market' or 'limit'
417
429
  :param str side: 'buy' or 'sell'
@@ -441,7 +453,9 @@ class bit2c(Exchange, ImplicitAPI):
441
453
  def cancel_order(self, id: str, symbol: Str = None, params={}):
442
454
  """
443
455
  cancels an open order
444
- :see: https://bit2c.co.il/home/api#cancelo
456
+
457
+ https://bit2c.co.il/home/api#cancelo
458
+
445
459
  :param str id: order id
446
460
  :param str symbol: Not used by bit2c cancelOrder()
447
461
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -456,7 +470,9 @@ class bit2c(Exchange, ImplicitAPI):
456
470
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
457
471
  """
458
472
  fetch all unfilled currently open orders
459
- :see: https://bit2c.co.il/home/api#geto
473
+
474
+ https://bit2c.co.il/home/api#geto
475
+
460
476
  :param str symbol: unified market symbol
461
477
  :param int [since]: the earliest time in ms to fetch open orders for
462
478
  :param int [limit]: the maximum number of open order structures to retrieve
@@ -479,7 +495,9 @@ class bit2c(Exchange, ImplicitAPI):
479
495
  def fetch_order(self, id: str, symbol: Str = None, params={}):
480
496
  """
481
497
  fetches information on an order made by the user
482
- :see: https://bit2c.co.il/home/api#getoid
498
+
499
+ https://bit2c.co.il/home/api#getoid
500
+
483
501
  :param str id: the order id
484
502
  :param str symbol: unified market symbol
485
503
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -617,7 +635,9 @@ class bit2c(Exchange, ImplicitAPI):
617
635
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
618
636
  """
619
637
  fetch all trades made by the user
620
- :see: https://bit2c.co.il/home/api#orderh
638
+
639
+ https://bit2c.co.il/home/api#orderh
640
+
621
641
  :param str symbol: unified market symbol
622
642
  :param int [since]: the earliest time in ms to fetch trades for
623
643
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -784,7 +804,9 @@ class bit2c(Exchange, ImplicitAPI):
784
804
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
785
805
  """
786
806
  fetch the deposit address for a currency associated with self account
787
- :see: https://bit2c.co.il/home/api#addc
807
+
808
+ https://bit2c.co.il/home/api#addc
809
+
788
810
  :param str code: unified currency code
789
811
  :param dict [params]: extra parameters specific to the exchange API endpoint
790
812
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
ccxt/bitbank.py CHANGED
@@ -174,7 +174,9 @@ class bitbank(Exchange, ImplicitAPI):
174
174
  def fetch_markets(self, params={}) -> List[Market]:
175
175
  """
176
176
  retrieves data on all markets for bitbank
177
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
177
+
178
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
179
+
178
180
  :param dict [params]: extra parameters specific to the exchange API endpoint
179
181
  :returns dict[]: an array of objects representing market data
180
182
  """
@@ -298,7 +300,9 @@ class bitbank(Exchange, ImplicitAPI):
298
300
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
299
301
  """
300
302
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
301
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#ticker
303
+
304
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#ticker
305
+
302
306
  :param str symbol: unified symbol of the market to fetch the ticker for
303
307
  :param dict [params]: extra parameters specific to the exchange API endpoint
304
308
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -315,7 +319,9 @@ class bitbank(Exchange, ImplicitAPI):
315
319
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
316
320
  """
317
321
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
318
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#depth
322
+
323
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#depth
324
+
319
325
  :param str symbol: unified symbol of the market to fetch the order book for
320
326
  :param int [limit]: the maximum amount of order book entries to return
321
327
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -378,7 +384,9 @@ class bitbank(Exchange, ImplicitAPI):
378
384
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
379
385
  """
380
386
  get the list of most recent trades for a particular symbol
381
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#transactions
387
+
388
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#transactions
389
+
382
390
  :param str symbol: unified symbol of the market to fetch trades for
383
391
  :param int [since]: timestamp in ms of the earliest trade to fetch
384
392
  :param int [limit]: the maximum amount of trades to fetch
@@ -398,7 +406,9 @@ class bitbank(Exchange, ImplicitAPI):
398
406
  def fetch_trading_fees(self, params={}) -> TradingFees:
399
407
  """
400
408
  fetch the trading fees for multiple markets
401
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
409
+
410
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-all-pairs-info
411
+
402
412
  :param dict [params]: extra parameters specific to the exchange API endpoint
403
413
  :returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
404
414
  """
@@ -473,7 +483,9 @@ class bitbank(Exchange, ImplicitAPI):
473
483
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
474
484
  """
475
485
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
476
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#candlestick
486
+
487
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/public-api.md#candlestick
488
+
477
489
  :param str symbol: unified symbol of the market to fetch OHLCV data for
478
490
  :param str timeframe: the length of time each candle represents
479
491
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -540,7 +552,9 @@ class bitbank(Exchange, ImplicitAPI):
540
552
  def fetch_balance(self, params={}) -> Balances:
541
553
  """
542
554
  query for balance and get the amount of funds available for trading or funds locked in orders
543
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#assets
555
+
556
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#assets
557
+
544
558
  :param dict [params]: extra parameters specific to the exchange API endpoint
545
559
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
546
560
  """
@@ -632,7 +646,9 @@ class bitbank(Exchange, ImplicitAPI):
632
646
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
633
647
  """
634
648
  create a trade order
635
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#create-new-order
649
+
650
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#create-new-order
651
+
636
652
  :param str symbol: unified symbol of the market to create an order in
637
653
  :param str type: 'market' or 'limit'
638
654
  :param str side: 'buy' or 'sell'
@@ -658,7 +674,9 @@ class bitbank(Exchange, ImplicitAPI):
658
674
  def cancel_order(self, id: str, symbol: Str = None, params={}):
659
675
  """
660
676
  cancels an open order
661
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#cancel-order
677
+
678
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#cancel-order
679
+
662
680
  :param str id: order id
663
681
  :param str symbol: unified symbol of the market the order was made in
664
682
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -700,7 +718,9 @@ class bitbank(Exchange, ImplicitAPI):
700
718
  def fetch_order(self, id: str, symbol: Str = None, params={}):
701
719
  """
702
720
  fetches information on an order made by the user
703
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
721
+
722
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
723
+
704
724
  :param str id: the order id
705
725
  :param str symbol: unified symbol of the market the order was made in
706
726
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -741,7 +761,9 @@ class bitbank(Exchange, ImplicitAPI):
741
761
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
742
762
  """
743
763
  fetch all unfilled currently open orders
744
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-active-orders
764
+
765
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-active-orders
766
+
745
767
  :param str symbol: unified market symbol
746
768
  :param int [since]: the earliest time in ms to fetch open orders for
747
769
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -765,7 +787,9 @@ class bitbank(Exchange, ImplicitAPI):
765
787
  def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
766
788
  """
767
789
  fetch all trades made by the user
768
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-trade-history
790
+
791
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-trade-history
792
+
769
793
  :param str symbol: unified market symbol
770
794
  :param int [since]: the earliest time in ms to fetch trades for
771
795
  :param int [limit]: the maximum number of trades structures to retrieve
@@ -790,7 +814,9 @@ class bitbank(Exchange, ImplicitAPI):
790
814
  def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
791
815
  """
792
816
  fetch the deposit address for a currency associated with self account
793
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-withdrawal-accounts
817
+
818
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#get-withdrawal-accounts
819
+
794
820
  :param str code: unified currency code
795
821
  :param dict [params]: extra parameters specific to the exchange API endpoint
796
822
  :returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
@@ -817,7 +843,9 @@ class bitbank(Exchange, ImplicitAPI):
817
843
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
818
844
  """
819
845
  make a withdrawal
820
- :see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
846
+
847
+ https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
848
+
821
849
  :param str code: unified currency code
822
850
  :param float amount: the amount to withdraw
823
851
  :param str address: the address to withdraw to
ccxt/bitbns.py CHANGED
@@ -226,11 +226,11 @@ class bitbns(Exchange, ImplicitAPI):
226
226
  quoteId = self.safe_string(market, 'quote')
227
227
  base = self.safe_currency_code(baseId)
228
228
  quote = self.safe_currency_code(quoteId)
229
- marketPrecision = self.safe_value(market, 'precision', {})
230
- marketLimits = self.safe_value(market, 'limits', {})
231
- amountLimits = self.safe_value(marketLimits, 'amount', {})
232
- priceLimits = self.safe_value(marketLimits, 'price', {})
233
- costLimits = self.safe_value(marketLimits, 'cost', {})
229
+ marketPrecision = self.safe_dict(market, 'precision', {})
230
+ marketLimits = self.safe_dict(market, 'limits', {})
231
+ amountLimits = self.safe_dict(marketLimits, 'amount', {})
232
+ priceLimits = self.safe_dict(marketLimits, 'price', {})
233
+ costLimits = self.safe_dict(marketLimits, 'cost', {})
234
234
  usdt = (quoteId == 'USDT')
235
235
  # INR markets don't need a _INR prefix
236
236
  uppercaseId = (baseId + '_' + quoteId) if usdt else baseId
@@ -430,7 +430,7 @@ class bitbns(Exchange, ImplicitAPI):
430
430
  'timestamp': timestamp,
431
431
  'datetime': self.iso8601(timestamp),
432
432
  }
433
- data = self.safe_value(response, 'data', {})
433
+ data = self.safe_dict(response, 'data', {})
434
434
  keys = list(data.keys())
435
435
  for i in range(0, len(keys)):
436
436
  key = keys[i]
@@ -569,8 +569,10 @@ class bitbns(Exchange, ImplicitAPI):
569
569
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
570
570
  """
571
571
  create a trade order
572
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/place-orders
573
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/market-orders-quantity # market orders
572
+
573
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/place-orders
574
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/market-orders-quantity # market orders
575
+
574
576
  :param str symbol: unified symbol of the market to create an order in
575
577
  :param str type: 'market' or 'limit'
576
578
  :param str side: 'buy' or 'sell'
@@ -578,8 +580,8 @@ class bitbns(Exchange, ImplicitAPI):
578
580
  :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
579
581
  :param dict [params]: extra parameters specific to the exchange API endpoint
580
582
  :param float [params.triggerPrice]: the price at which a trigger order is triggered at
581
- *
582
- * EXCHANGE SPECIFIC PARAMETERS
583
+
584
+ EXCHANGE SPECIFIC PARAMETERS
583
585
  :param float [params.target_rate]: *requires params.trail_rate when set, type must be 'limit'* a bracket order is placed when set
584
586
  :param float [params.trail_rate]: *requires params.target_rate when set, type must be 'limit'* a bracket order is placed when set
585
587
  :returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -625,8 +627,10 @@ class bitbns(Exchange, ImplicitAPI):
625
627
  def cancel_order(self, id: str, symbol: Str = None, params={}):
626
628
  """
627
629
  cancels an open order
628
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/cancel-orders
629
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/cancel-stop-loss-orders
630
+
631
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/cancel-orders
632
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/cancel-stop-loss-orders
633
+
630
634
  :param str id: order id
631
635
  :param str symbol: unified symbol of the market the order was made in
632
636
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -637,7 +641,7 @@ class bitbns(Exchange, ImplicitAPI):
637
641
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
638
642
  self.load_markets()
639
643
  market = self.market(symbol)
640
- isTrigger = self.safe_value_2(params, 'trigger', 'stop')
644
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
641
645
  params = self.omit(params, ['trigger', 'stop'])
642
646
  request: dict = {
643
647
  'entry_id': id,
@@ -654,7 +658,9 @@ class bitbns(Exchange, ImplicitAPI):
654
658
  def fetch_order(self, id: str, symbol: Str = None, params={}):
655
659
  """
656
660
  fetches information on an order made by the user
657
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/order-status
661
+
662
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-1/order-status
663
+
658
664
  :param str id: order id
659
665
  :param str symbol: unified symbol of the market the order was made in
660
666
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -668,7 +674,7 @@ class bitbns(Exchange, ImplicitAPI):
668
674
  'symbol': market['id'],
669
675
  'entry_id': id,
670
676
  }
671
- trigger = self.safe_value_2(params, 'trigger', 'stop')
677
+ trigger = self.safe_bool_2(params, 'trigger', 'stop')
672
678
  if trigger:
673
679
  raise BadRequest(self.id + ' fetchOrder cannot fetch stop orders')
674
680
  response = self.v1PostOrderStatusSymbol(self.extend(request, params))
@@ -697,15 +703,17 @@ class bitbns(Exchange, ImplicitAPI):
697
703
  # "code":200
698
704
  # }
699
705
  #
700
- data = self.safe_value(response, 'data', [])
706
+ data = self.safe_list(response, 'data', [])
701
707
  first = self.safe_dict(data, 0)
702
708
  return self.parse_order(first, market)
703
709
 
704
710
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
705
711
  """
706
712
  fetch all unfilled currently open orders
707
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit
708
- :see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit/order-status-stop-limit
713
+
714
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit
715
+ https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/order-status-limit/order-status-stop-limit
716
+
709
717
  :param str symbol: unified market symbol
710
718
  :param int [since]: the earliest time in ms to fetch open orders for
711
719
  :param int [limit]: the maximum number of open orders structures to retrieve
@@ -717,7 +725,7 @@ class bitbns(Exchange, ImplicitAPI):
717
725
  raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
718
726
  self.load_markets()
719
727
  market = self.market(symbol)
720
- isTrigger = self.safe_value_2(params, 'trigger', 'stop')
728
+ isTrigger = self.safe_bool_2(params, 'trigger', 'stop')
721
729
  params = self.omit(params, ['trigger', 'stop'])
722
730
  quoteSide = 'usdtListOpen' if (market['quoteId'] == 'USDT') else 'listOpen'
723
731
  request: dict = {
@@ -1000,7 +1008,7 @@ class bitbns(Exchange, ImplicitAPI):
1000
1008
  '6': 'ok', # Completed
1001
1009
  },
1002
1010
  }
1003
- statuses = self.safe_value(statusesByType, type, {})
1011
+ statuses = self.safe_dict(statusesByType, type, {})
1004
1012
  return self.safe_string(statuses, status, status)
1005
1013
 
1006
1014
  def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
@@ -1090,7 +1098,7 @@ class bitbns(Exchange, ImplicitAPI):
1090
1098
  # "error":null
1091
1099
  # }
1092
1100
  #
1093
- data = self.safe_value(response, 'data', {})
1101
+ data = self.safe_dict(response, 'data', {})
1094
1102
  address = self.safe_string(data, 'token')
1095
1103
  tag = self.safe_string(data, 'tag')
1096
1104
  self.check_address(address)