ccxt 4.2.31__py2.py3-none-any.whl → 4.2.34__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/ace.py +4 -3
- ccxt/alpaca.py +1 -1
- ccxt/ascendex.py +6 -6
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +4 -3
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +6 -6
- ccxt/async_support/base/exchange.py +62 -39
- ccxt/async_support/bigone.py +25 -5
- ccxt/async_support/binance.py +16 -15
- ccxt/async_support/bingx.py +10 -9
- ccxt/async_support/bit2c.py +13 -1
- ccxt/async_support/bitbank.py +2 -2
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitfinex.py +5 -5
- ccxt/async_support/bitfinex2.py +6 -6
- ccxt/async_support/bitflyer.py +5 -5
- ccxt/async_support/bitforex.py +1 -1
- ccxt/async_support/bitget.py +11 -11
- ccxt/async_support/bithumb.py +2 -2
- ccxt/async_support/bitmart.py +9 -9
- ccxt/async_support/bitmex.py +3 -3
- ccxt/async_support/bitopro.py +2 -2
- ccxt/async_support/bitrue.py +8 -8
- ccxt/async_support/bitso.py +4 -4
- ccxt/async_support/bitstamp.py +2 -2
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.py +3 -3
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/blockchaincom.py +3 -3
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +2 -2
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +9 -9
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +6 -6
- ccxt/async_support/coinbasepro.py +2 -2
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +9 -9
- ccxt/async_support/coinlist.py +4 -4
- ccxt/async_support/coinmate.py +2 -2
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinsph.py +2 -2
- ccxt/async_support/coinspot.py +1 -1
- ccxt/async_support/cryptocom.py +14 -14
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +4 -4
- ccxt/async_support/digifinex.py +6 -6
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +41 -37
- ccxt/async_support/gemini.py +2 -2
- ccxt/async_support/hitbtc.py +5 -5
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/htx.py +10 -10
- ccxt/async_support/huobijp.py +4 -4
- ccxt/async_support/idex.py +2 -2
- ccxt/async_support/independentreserve.py +2 -2
- ccxt/async_support/indodax.py +2 -2
- ccxt/async_support/kraken.py +42 -4
- ccxt/async_support/krakenfutures.py +5 -5
- ccxt/async_support/kucoin.py +8 -8
- ccxt/async_support/kucoinfutures.py +4 -4
- ccxt/async_support/kuna.py +2 -2
- ccxt/async_support/latoken.py +3 -3
- ccxt/async_support/lbank.py +2 -2
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/lykke.py +2 -2
- ccxt/async_support/mercado.py +2 -2
- ccxt/async_support/mexc.py +7 -6
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/novadax.py +4 -4
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +5 -5
- ccxt/async_support/okx.py +11 -10
- ccxt/async_support/onetrading.py +2 -2
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paymium.py +3 -3
- ccxt/async_support/phemex.py +13 -13
- ccxt/async_support/poloniex.py +4 -4
- ccxt/async_support/poloniexfutures.py +1 -1
- ccxt/async_support/probit.py +5 -5
- ccxt/async_support/timex.py +1 -1
- ccxt/async_support/tokocrypto.py +4 -4
- ccxt/async_support/upbit.py +2 -2
- ccxt/async_support/wavesexchange.py +4 -3
- ccxt/async_support/wazirx.py +1 -1
- ccxt/async_support/whitebit.py +5 -5
- ccxt/async_support/woo.py +6 -6
- ccxt/async_support/yobit.py +41 -2
- ccxt/async_support/zaif.py +2 -2
- ccxt/async_support/zonda.py +4 -4
- ccxt/base/exchange.py +67 -40
- ccxt/base/types.py +10 -0
- ccxt/bigone.py +25 -5
- ccxt/binance.py +16 -15
- ccxt/bingx.py +10 -9
- ccxt/bit2c.py +13 -1
- ccxt/bitbank.py +2 -2
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +5 -5
- ccxt/bitfinex2.py +6 -6
- ccxt/bitflyer.py +5 -5
- ccxt/bitforex.py +1 -1
- ccxt/bitget.py +11 -11
- ccxt/bithumb.py +2 -2
- ccxt/bitmart.py +9 -9
- ccxt/bitmex.py +3 -3
- ccxt/bitopro.py +2 -2
- ccxt/bitrue.py +8 -8
- ccxt/bitso.py +4 -4
- ccxt/bitstamp.py +2 -2
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +3 -3
- ccxt/bl3p.py +1 -1
- ccxt/blockchaincom.py +3 -3
- ccxt/btcalpha.py +1 -1
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +2 -2
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +9 -9
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +6 -6
- ccxt/coinbasepro.py +2 -2
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +9 -9
- ccxt/coinlist.py +4 -4
- ccxt/coinmate.py +2 -2
- ccxt/coinmetro.py +2 -2
- ccxt/coinone.py +1 -1
- ccxt/coinsph.py +2 -2
- ccxt/coinspot.py +1 -1
- ccxt/cryptocom.py +14 -14
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +2 -2
- ccxt/deribit.py +4 -4
- ccxt/digifinex.py +6 -6
- ccxt/exmo.py +2 -2
- ccxt/gate.py +41 -37
- ccxt/gemini.py +2 -2
- ccxt/hitbtc.py +5 -5
- ccxt/hollaex.py +2 -2
- ccxt/htx.py +10 -10
- ccxt/huobijp.py +4 -4
- ccxt/idex.py +2 -2
- ccxt/independentreserve.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +42 -4
- ccxt/krakenfutures.py +5 -5
- ccxt/kucoin.py +8 -8
- ccxt/kucoinfutures.py +4 -4
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +3 -3
- ccxt/lbank.py +2 -2
- ccxt/luno.py +1 -1
- ccxt/lykke.py +2 -2
- ccxt/mercado.py +2 -2
- ccxt/mexc.py +7 -6
- ccxt/ndax.py +2 -2
- ccxt/novadax.py +4 -4
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +5 -5
- ccxt/okx.py +11 -10
- ccxt/onetrading.py +2 -2
- ccxt/p2b.py +1 -1
- ccxt/paymium.py +3 -3
- ccxt/phemex.py +13 -13
- ccxt/poloniex.py +4 -4
- ccxt/poloniexfutures.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -4
- ccxt/pro/ascendex.py +1 -2
- ccxt/pro/binance.py +14 -10
- ccxt/pro/bingx.py +1 -1
- ccxt/pro/bitfinex.py +21 -22
- ccxt/pro/bitfinex2.py +13 -15
- ccxt/pro/bitget.py +3 -1
- ccxt/pro/bitmart.py +3 -7
- ccxt/pro/bitmex.py +4 -6
- ccxt/pro/bitopro.py +2 -4
- ccxt/pro/bitrue.py +1 -1
- ccxt/pro/bitstamp.py +2 -3
- ccxt/pro/bitvavo.py +10 -5
- ccxt/pro/blockchaincom.py +22 -22
- ccxt/pro/bybit.py +5 -5
- ccxt/pro/cex.py +7 -7
- ccxt/pro/coinbase.py +3 -2
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/coinex.py +15 -13
- ccxt/pro/currencycom.py +5 -6
- ccxt/pro/deribit.py +4 -4
- ccxt/pro/exmo.py +15 -13
- ccxt/pro/gate.py +1 -1
- ccxt/pro/gemini.py +4 -2
- ccxt/pro/hitbtc.py +10 -9
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +6 -6
- ccxt/pro/huobijp.py +3 -4
- ccxt/pro/idex.py +1 -1
- ccxt/pro/independentreserve.py +14 -13
- ccxt/pro/kraken.py +10 -14
- ccxt/pro/krakenfutures.py +10 -6
- ccxt/pro/kucoin.py +10 -10
- ccxt/pro/kucoinfutures.py +11 -10
- ccxt/pro/lbank.py +10 -10
- ccxt/pro/luno.py +12 -14
- ccxt/pro/mexc.py +3 -2
- ccxt/pro/ndax.py +7 -11
- ccxt/pro/okcoin.py +7 -10
- ccxt/pro/okx.py +6 -9
- ccxt/pro/onetrading.py +16 -15
- ccxt/pro/p2b.py +5 -3
- ccxt/pro/phemex.py +16 -11
- ccxt/pro/poloniex.py +6 -4
- ccxt/pro/poloniexfutures.py +13 -9
- ccxt/pro/probit.py +15 -12
- ccxt/pro/upbit.py +8 -8
- ccxt/pro/wazirx.py +6 -3
- ccxt/pro/woo.py +9 -7
- ccxt/probit.py +5 -5
- ccxt/test/base/test_order_book.py +7 -7
- ccxt/test/base/test_shared_methods.py +1 -1
- ccxt/test/test_async.py +86 -36
- ccxt/test/test_sync.py +86 -36
- ccxt/timex.py +1 -1
- ccxt/tokocrypto.py +4 -4
- ccxt/upbit.py +2 -2
- ccxt/wavesexchange.py +4 -3
- ccxt/wazirx.py +1 -1
- ccxt/whitebit.py +5 -5
- ccxt/woo.py +6 -6
- ccxt/yobit.py +41 -2
- ccxt/zaif.py +2 -2
- ccxt/zonda.py +4 -4
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/METADATA +9 -8
- ccxt-4.2.34.dist-info/RECORD +438 -0
- ccxt-4.2.31.dist-info/RECORD +0 -438
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
- {ccxt-4.2.31.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/bigone.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bigone import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import PermissionDenied
|
@@ -521,6 +521,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
521
521
|
def fetch_markets(self, params={}):
|
522
522
|
"""
|
523
523
|
retrieves data on all markets for bigone
|
524
|
+
:see: https://open.big.one/docs/spot_asset_pair.html
|
524
525
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
525
526
|
:returns dict[]: an array of objects representing market data
|
526
527
|
"""
|
@@ -779,6 +780,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
779
780
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
780
781
|
"""
|
781
782
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
783
|
+
:see: https://open.big.one/docs/spot_tickers.html
|
782
784
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
783
785
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
784
786
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -817,6 +819,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
817
819
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
818
820
|
"""
|
819
821
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
822
|
+
:see: https://open.big.one/docs/spot_tickers.html
|
820
823
|
:param str[] [symbols]: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
821
824
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
822
825
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -898,6 +901,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
898
901
|
def fetch_time(self, params={}):
|
899
902
|
"""
|
900
903
|
fetches the current integer timestamp in milliseconds from the exchange server
|
904
|
+
:see: https://open.big.one/docs/spot_ping.html
|
901
905
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
902
906
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
903
907
|
"""
|
@@ -916,6 +920,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
916
920
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
917
921
|
"""
|
918
922
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
923
|
+
:see: https://open.big.one/docs/contract_misc.html#get-orderbook-snapshot
|
919
924
|
:param str symbol: unified symbol of the market to fetch the order book for
|
920
925
|
:param int [limit]: the maximum amount of order book entries to return
|
921
926
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1130,6 +1135,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1130
1135
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
1131
1136
|
"""
|
1132
1137
|
get the list of most recent trades for a particular symbol
|
1138
|
+
:see: https://open.big.one/docs/spot_asset_pair_trade.html
|
1133
1139
|
:param str symbol: unified symbol of the market to fetch trades for
|
1134
1140
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1135
1141
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -1191,6 +1197,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1191
1197
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1192
1198
|
"""
|
1193
1199
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1200
|
+
:see: https://open.big.one/docs/spot_asset_pair_candle.html
|
1194
1201
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1195
1202
|
:param str timeframe: the length of time each candle represents
|
1196
1203
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1261,6 +1268,8 @@ class bigone(Exchange, ImplicitAPI):
|
|
1261
1268
|
def fetch_balance(self, params={}) -> Balances:
|
1262
1269
|
"""
|
1263
1270
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
1271
|
+
:see: https://open.big.one/docs/fund_accounts.html
|
1272
|
+
:see: https://open.big.one/docs/spot_accounts.html
|
1264
1273
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1265
1274
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
1266
1275
|
"""
|
@@ -1380,7 +1389,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1380
1389
|
params['createMarketBuyOrderRequiresPrice'] = False
|
1381
1390
|
return self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1382
1391
|
|
1383
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1392
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1384
1393
|
"""
|
1385
1394
|
create a trade order
|
1386
1395
|
:see: https://open.big.one/docs/spot_orders.html#create-order
|
@@ -1477,6 +1486,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1477
1486
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1478
1487
|
"""
|
1479
1488
|
cancels an open order
|
1489
|
+
:see: https://open.big.one/docs/spot_orders.html#cancel-order
|
1480
1490
|
:param str id: order id
|
1481
1491
|
:param str symbol: Not used by bigone cancelOrder()
|
1482
1492
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1503,6 +1513,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1503
1513
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1504
1514
|
"""
|
1505
1515
|
cancel all open orders
|
1516
|
+
:see: https://open.big.one/docs/spot_orders.html#cancel-all-orders
|
1506
1517
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
1507
1518
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1508
1519
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1530,6 +1541,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1530
1541
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1531
1542
|
"""
|
1532
1543
|
fetches information on an order made by the user
|
1544
|
+
:see: https://open.big.one/docs/spot_orders.html#get-one-order
|
1533
1545
|
:param str symbol: not used by bigone fetchOrder
|
1534
1546
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1535
1547
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1543,6 +1555,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1543
1555
|
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1544
1556
|
"""
|
1545
1557
|
fetches information on multiple orders made by the user
|
1558
|
+
:see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1546
1559
|
:param str symbol: unified market symbol of the market orders were made in
|
1547
1560
|
:param int [since]: the earliest time in ms to fetch orders for
|
1548
1561
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1589,6 +1602,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1589
1602
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1590
1603
|
"""
|
1591
1604
|
fetch all trades made by the user
|
1605
|
+
:see: https://open.big.one/docs/spot_trade.html#trades-of-user
|
1592
1606
|
:param str symbol: unified market symbol
|
1593
1607
|
:param int [since]: the earliest time in ms to fetch trades for
|
1594
1608
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1654,6 +1668,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1654
1668
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1655
1669
|
"""
|
1656
1670
|
fetch all unfilled currently open orders
|
1671
|
+
:see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1657
1672
|
:param str symbol: unified market symbol
|
1658
1673
|
:param int [since]: the earliest time in ms to fetch open orders for
|
1659
1674
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -1668,6 +1683,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1668
1683
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1669
1684
|
"""
|
1670
1685
|
fetches information on multiple closed orders made by the user
|
1686
|
+
:see: https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
|
1671
1687
|
:param str symbol: unified market symbol of the market orders were made in
|
1672
1688
|
:param int [since]: the earliest time in ms to fetch orders for
|
1673
1689
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1714,6 +1730,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1714
1730
|
def fetch_deposit_address(self, code: str, params={}):
|
1715
1731
|
"""
|
1716
1732
|
fetch the deposit address for a currency associated with self account
|
1733
|
+
:see: https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
|
1717
1734
|
:param str code: unified currency code
|
1718
1735
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1719
1736
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1861,6 +1878,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1861
1878
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1862
1879
|
"""
|
1863
1880
|
fetch all deposits made to an account
|
1881
|
+
:see: https://open.big.one/docs/spot_deposit.html#deposit-of-user
|
1864
1882
|
:param str code: unified currency code
|
1865
1883
|
:param int [since]: the earliest time in ms to fetch deposits for
|
1866
1884
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -1908,6 +1926,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1908
1926
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1909
1927
|
"""
|
1910
1928
|
fetch all withdrawals made from an account
|
1929
|
+
:see: https://open.big.one/docs/spot_withdrawal.html#get-withdrawals-of-user
|
1911
1930
|
:param str code: unified currency code
|
1912
1931
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
1913
1932
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -1952,7 +1971,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1952
1971
|
withdrawals = self.safe_value(response, 'data', [])
|
1953
1972
|
return self.parse_transactions(withdrawals, currency, since, limit)
|
1954
1973
|
|
1955
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1974
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1956
1975
|
"""
|
1957
1976
|
transfer currency internally between wallets on the same account
|
1958
1977
|
:see: https://open.big.one/docs/spot_transfer.html#transfer-of-user
|
@@ -2008,7 +2027,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2008
2027
|
'id': None,
|
2009
2028
|
'timestamp': None,
|
2010
2029
|
'datetime': None,
|
2011
|
-
'currency':
|
2030
|
+
'currency': None,
|
2012
2031
|
'amount': None,
|
2013
2032
|
'fromAccount': None,
|
2014
2033
|
'toAccount': None,
|
@@ -2021,9 +2040,10 @@ class bigone(Exchange, ImplicitAPI):
|
|
2021
2040
|
}
|
2022
2041
|
return self.safe_string(statuses, status, 'failed')
|
2023
2042
|
|
2024
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2043
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2025
2044
|
"""
|
2026
2045
|
make a withdrawal
|
2046
|
+
:see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
2027
2047
|
:param str code: unified currency code
|
2028
2048
|
:param float amount: the amount to withdraw
|
2029
2049
|
:param str address: the address to withdraw to
|
ccxt/binance.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.binance import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -3089,7 +3089,7 @@ class binance(Exchange, ImplicitAPI):
|
|
3089
3089
|
account['debt'] = Precise.string_add(debt, interest)
|
3090
3090
|
return account
|
3091
3091
|
|
3092
|
-
def
|
3092
|
+
def parse_balance_custom(self, response, type=None, marginMode=None) -> Balances:
|
3093
3093
|
result = {
|
3094
3094
|
'info': response,
|
3095
3095
|
}
|
@@ -3407,7 +3407,7 @@ class binance(Exchange, ImplicitAPI):
|
|
3407
3407
|
# }
|
3408
3408
|
# ]
|
3409
3409
|
#
|
3410
|
-
return self.
|
3410
|
+
return self.parse_balance_custom(response, type, marginMode)
|
3411
3411
|
|
3412
3412
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
3413
3413
|
"""
|
@@ -4354,7 +4354,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4354
4354
|
#
|
4355
4355
|
return self.parse_trades(response, market, since, limit)
|
4356
4356
|
|
4357
|
-
def edit_spot_order(self, id: str, symbol, type, side, amount, price=None, params={}):
|
4357
|
+
def edit_spot_order(self, id: str, symbol, type, side, amount: float, price: float = None, params={}):
|
4358
4358
|
"""
|
4359
4359
|
* @ignore
|
4360
4360
|
edit a trade order
|
@@ -4417,7 +4417,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4417
4417
|
data = self.safe_value(response, 'newOrderResponse')
|
4418
4418
|
return self.parse_order(data, market)
|
4419
4419
|
|
4420
|
-
def edit_spot_order_request(self, id: str, symbol, type, side, amount, price=None, params={}):
|
4420
|
+
def edit_spot_order_request(self, id: str, symbol, type, side, amount: float, price: float = None, params={}):
|
4421
4421
|
"""
|
4422
4422
|
* @ignore
|
4423
4423
|
helper function to build request for editSpotOrder
|
@@ -4522,7 +4522,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4522
4522
|
params = self.omit(params, ['quoteOrderQty', 'cost', 'stopPrice', 'newClientOrderId', 'clientOrderId', 'postOnly'])
|
4523
4523
|
return self.extend(request, params)
|
4524
4524
|
|
4525
|
-
def edit_contract_order(self, id: str, symbol, type, side, amount, price=None, params={}):
|
4525
|
+
def edit_contract_order(self, id: str, symbol, type, side, amount: float, price: float = None, params={}):
|
4526
4526
|
"""
|
4527
4527
|
edit a trade order
|
4528
4528
|
:see: https://binance-docs.github.io/apidocs/futures/en/#modify-order-trade
|
@@ -4945,7 +4945,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4945
4945
|
#
|
4946
4946
|
return self.parse_orders(response)
|
4947
4947
|
|
4948
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
4948
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
4949
4949
|
"""
|
4950
4950
|
create a trade order
|
4951
4951
|
:see: https://binance-docs.github.io/apidocs/spot/en/#new-order-trade
|
@@ -4994,7 +4994,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4994
4994
|
response = getattr(self, method)(request)
|
4995
4995
|
return self.parse_order(response, market)
|
4996
4996
|
|
4997
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
4997
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
4998
4998
|
"""
|
4999
4999
|
* @ignore
|
5000
5000
|
helper function to build request
|
@@ -5020,7 +5020,7 @@ class binance(Exchange, ImplicitAPI):
|
|
5020
5020
|
stopLossPrice = self.safe_value(params, 'stopLossPrice', triggerPrice) # fallback to stopLoss
|
5021
5021
|
takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
|
5022
5022
|
trailingDelta = self.safe_value(params, 'trailingDelta')
|
5023
|
-
trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activationPrice', price)
|
5023
|
+
trailingTriggerPrice = self.safe_string_2(params, 'trailingTriggerPrice', 'activationPrice', self.number_to_string(price))
|
5024
5024
|
trailingPercent = self.safe_string_2(params, 'trailingPercent', 'callbackRate')
|
5025
5025
|
isTrailingPercentOrder = trailingPercent is not None
|
5026
5026
|
isStopLoss = stopLossPrice is not None or trailingDelta is not None
|
@@ -6432,7 +6432,7 @@ class binance(Exchange, ImplicitAPI):
|
|
6432
6432
|
'amount': amount,
|
6433
6433
|
}
|
6434
6434
|
|
6435
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
6435
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
6436
6436
|
"""
|
6437
6437
|
transfer currency internally between wallets on the same account
|
6438
6438
|
:see: https://binance-docs.github.io/apidocs/spot/en/#user-universal-transfer-user_data
|
@@ -6882,7 +6882,7 @@ class binance(Exchange, ImplicitAPI):
|
|
6882
6882
|
}
|
6883
6883
|
return result
|
6884
6884
|
|
6885
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
6885
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
6886
6886
|
"""
|
6887
6887
|
make a withdrawal
|
6888
6888
|
:see: https://binance-docs.github.io/apidocs/spot/en/#withdraw-user_data
|
@@ -8207,7 +8207,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8207
8207
|
raise NotSupported(self.id + ' fetchFundingHistory() supports linear and inverse contracts only')
|
8208
8208
|
return self.parse_incomes(response, market, since, limit)
|
8209
8209
|
|
8210
|
-
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
8210
|
+
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
8211
8211
|
"""
|
8212
8212
|
set the level of leverage for a market
|
8213
8213
|
:see: https://binance-docs.github.io/apidocs/futures/en/#change-initial-leverage-trade
|
@@ -8847,7 +8847,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8847
8847
|
return entry[1]
|
8848
8848
|
return self.safe_value(config, 'cost', 1)
|
8849
8849
|
|
8850
|
-
def request(self, path, api='public', method='GET', params={}, headers=None, body=None, config={}
|
8850
|
+
def request(self, path, api='public', method='GET', params={}, headers=None, body=None, config={}):
|
8851
8851
|
response = self.fetch2(path, api, method, params, headers, body, config)
|
8852
8852
|
# a workaround for {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."}
|
8853
8853
|
if api == 'private':
|
@@ -9225,7 +9225,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9225
9225
|
#
|
9226
9226
|
return self.parse_margin_loan(response, currency)
|
9227
9227
|
|
9228
|
-
def borrow_cross_margin(self, code: str, amount, params={}):
|
9228
|
+
def borrow_cross_margin(self, code: str, amount: float, params={}):
|
9229
9229
|
"""
|
9230
9230
|
create a loan to borrow margin
|
9231
9231
|
:see: https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-repay-margin
|
@@ -9251,7 +9251,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9251
9251
|
#
|
9252
9252
|
return self.parse_margin_loan(response, currency)
|
9253
9253
|
|
9254
|
-
def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
9254
|
+
def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
9255
9255
|
"""
|
9256
9256
|
create a loan to borrow margin
|
9257
9257
|
:see: https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-repay-margin
|
@@ -9420,6 +9420,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9420
9420
|
return item
|
9421
9421
|
else:
|
9422
9422
|
return self.parse_open_interest(response, market)
|
9423
|
+
return None
|
9423
9424
|
|
9424
9425
|
def parse_open_interest(self, interest, market: Market = None):
|
9425
9426
|
timestamp = self.safe_integer_2(interest, 'timestamp', 'time')
|
ccxt/bingx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -1679,7 +1679,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1679
1679
|
params['quoteOrderQty'] = cost
|
1680
1680
|
return self.create_order(symbol, 'market', 'sell', cost, None, params)
|
1681
1681
|
|
1682
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1682
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1683
1683
|
"""
|
1684
1684
|
* @ignore
|
1685
1685
|
helper function to build request
|
@@ -1782,6 +1782,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1782
1782
|
requestTrailingPercent = Precise.string_div(trailingPercent, '100')
|
1783
1783
|
request['priceRate'] = self.parse_to_numeric(requestTrailingPercent)
|
1784
1784
|
if isStopLoss or isTakeProfit:
|
1785
|
+
stringifiedAmount = self.number_to_string(amount)
|
1785
1786
|
if isStopLoss:
|
1786
1787
|
slTriggerPrice = self.safe_string_2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss)
|
1787
1788
|
slWorkingType = self.safe_string(stopLoss, 'workingType', 'MARK_PRICE')
|
@@ -1794,7 +1795,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1794
1795
|
slPrice = self.safe_string(stopLoss, 'price')
|
1795
1796
|
if slPrice is not None:
|
1796
1797
|
slRequest['price'] = self.parse_to_numeric(self.price_to_precision(symbol, slPrice))
|
1797
|
-
slQuantity = self.safe_string(stopLoss, 'quantity',
|
1798
|
+
slQuantity = self.safe_string(stopLoss, 'quantity', stringifiedAmount)
|
1798
1799
|
slRequest['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, slQuantity))
|
1799
1800
|
request['stopLoss'] = self.json(slRequest)
|
1800
1801
|
if isTakeProfit:
|
@@ -1809,7 +1810,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1809
1810
|
slPrice = self.safe_string(takeProfit, 'price')
|
1810
1811
|
if slPrice is not None:
|
1811
1812
|
tpRequest['price'] = self.parse_to_numeric(self.price_to_precision(symbol, slPrice))
|
1812
|
-
tkQuantity = self.safe_string(takeProfit, 'quantity',
|
1813
|
+
tkQuantity = self.safe_string(takeProfit, 'quantity', stringifiedAmount)
|
1813
1814
|
tpRequest['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, tkQuantity))
|
1814
1815
|
request['takeProfit'] = self.json(tpRequest)
|
1815
1816
|
positionSide = None
|
@@ -1822,7 +1823,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1822
1823
|
params = self.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'takeProfit', 'stopLoss', 'clientOrderId'])
|
1823
1824
|
return self.extend(request, params)
|
1824
1825
|
|
1825
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1826
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1826
1827
|
"""
|
1827
1828
|
create a trade order
|
1828
1829
|
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
|
@@ -2681,7 +2682,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2681
2682
|
orders = self.safe_value(data, 'orders', [])
|
2682
2683
|
return self.parse_orders(orders, market, since, limit)
|
2683
2684
|
|
2684
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
2685
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2685
2686
|
"""
|
2686
2687
|
transfer currency internally between wallets on the same account
|
2687
2688
|
:see: https://bingx-api.github.io/docs/#/spot/account-api.html#User%20Universal%20Transfer
|
@@ -3137,7 +3138,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3137
3138
|
#
|
3138
3139
|
return response
|
3139
3140
|
|
3140
|
-
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
3141
|
+
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
3141
3142
|
"""
|
3142
3143
|
set the level of leverage for a market
|
3143
3144
|
:see: https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
|
@@ -3333,7 +3334,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3333
3334
|
coins = self.safe_value(response, 'data')
|
3334
3335
|
return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
|
3335
3336
|
|
3336
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
3337
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
3337
3338
|
"""
|
3338
3339
|
make a withdrawal
|
3339
3340
|
:see: https://bingx-api.github.io/docs/#/common/account-api.html#Withdraw
|
@@ -3371,7 +3372,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3371
3372
|
# "id":"1197073063359000577"
|
3372
3373
|
# }
|
3373
3374
|
# }
|
3374
|
-
self.parse_transaction(data)
|
3375
|
+
return self.parse_transaction(data)
|
3375
3376
|
|
3376
3377
|
def parse_params(self, params):
|
3377
3378
|
sortedParams = self.keysort(params)
|
ccxt/bit2c.py
CHANGED
@@ -212,6 +212,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
212
212
|
def fetch_balance(self, params={}) -> Balances:
|
213
213
|
"""
|
214
214
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
215
|
+
:see: https://bit2c.co.il/home/api#balance
|
215
216
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
216
217
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
217
218
|
"""
|
@@ -264,6 +265,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
264
265
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
265
266
|
"""
|
266
267
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
268
|
+
:see: https://bit2c.co.il/home/api#orderb
|
267
269
|
:param str symbol: unified symbol of the market to fetch the order book for
|
268
270
|
:param int [limit]: the maximum amount of order book entries to return
|
269
271
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -308,6 +310,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
308
310
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
309
311
|
"""
|
310
312
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
313
|
+
:see: https://bit2c.co.il/home/api#ticker
|
311
314
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
312
315
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
313
316
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -323,6 +326,8 @@ class bit2c(Exchange, ImplicitAPI):
|
|
323
326
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
324
327
|
"""
|
325
328
|
get the list of most recent trades for a particular symbol
|
329
|
+
:see: https://bit2c.co.il/home/api#transactions
|
330
|
+
:see: https://bit2c.co.il/home/api#trades
|
326
331
|
:param str symbol: unified symbol of the market to fetch trades for
|
327
332
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
328
333
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -358,6 +363,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
358
363
|
def fetch_trading_fees(self, params={}):
|
359
364
|
"""
|
360
365
|
fetch the trading fees for multiple markets
|
366
|
+
:see: https://bit2c.co.il/home/api#balance
|
361
367
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
362
368
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
363
369
|
"""
|
@@ -400,9 +406,10 @@ class bit2c(Exchange, ImplicitAPI):
|
|
400
406
|
}
|
401
407
|
return result
|
402
408
|
|
403
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
409
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
404
410
|
"""
|
405
411
|
create a trade order
|
412
|
+
:see: https://bit2c.co.il/home/api#addo
|
406
413
|
:param str symbol: unified symbol of the market to create an order in
|
407
414
|
:param str type: 'market' or 'limit'
|
408
415
|
:param str side: 'buy' or 'sell'
|
@@ -432,6 +439,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
432
439
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
433
440
|
"""
|
434
441
|
cancels an open order
|
442
|
+
:see: https://bit2c.co.il/home/api#cancelo
|
435
443
|
:param str id: order id
|
436
444
|
:param str symbol: Not used by bit2c cancelOrder()
|
437
445
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -445,6 +453,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
445
453
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
446
454
|
"""
|
447
455
|
fetch all unfilled currently open orders
|
456
|
+
:see: https://bit2c.co.il/home/api#geto
|
448
457
|
:param str symbol: unified market symbol
|
449
458
|
:param int [since]: the earliest time in ms to fetch open orders for
|
450
459
|
:param int [limit]: the maximum number of open order structures to retrieve
|
@@ -467,6 +476,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
467
476
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
468
477
|
"""
|
469
478
|
fetches information on an order made by the user
|
479
|
+
:see: https://bit2c.co.il/home/api#getoid
|
470
480
|
:param str symbol: unified market symbol
|
471
481
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
472
482
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -603,6 +613,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
603
613
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
604
614
|
"""
|
605
615
|
fetch all trades made by the user
|
616
|
+
:see: https://bit2c.co.il/home/api#orderh
|
606
617
|
:param str symbol: unified market symbol
|
607
618
|
:param int [since]: the earliest time in ms to fetch trades for
|
608
619
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -769,6 +780,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
769
780
|
def fetch_deposit_address(self, code: str, params={}):
|
770
781
|
"""
|
771
782
|
fetch the deposit address for a currency associated with self account
|
783
|
+
:see: https://bit2c.co.il/home/api#addc
|
772
784
|
:param str code: unified currency code
|
773
785
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
774
786
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
ccxt/bitbank.py
CHANGED
@@ -622,7 +622,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
622
622
|
'info': order,
|
623
623
|
}, market)
|
624
624
|
|
625
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
625
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
626
626
|
"""
|
627
627
|
create a trade order
|
628
628
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#create-new-order
|
@@ -761,7 +761,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
761
761
|
'info': response,
|
762
762
|
}
|
763
763
|
|
764
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
764
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
765
765
|
"""
|
766
766
|
make a withdrawal
|
767
767
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
|
ccxt/bitbns.py
CHANGED
@@ -564,7 +564,7 @@ class bitbns(Exchange, ImplicitAPI):
|
|
564
564
|
'trades': None,
|
565
565
|
}, market)
|
566
566
|
|
567
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
567
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
568
568
|
"""
|
569
569
|
create a trade order
|
570
570
|
:see: https://docs.bitbns.com/bitbns/rest-endpoints/order-apis/version-2/place-orders
|
ccxt/bitfinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -724,7 +724,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
724
724
|
result[code] = account
|
725
725
|
return self.safe_balance(result)
|
726
726
|
|
727
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
727
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
728
728
|
"""
|
729
729
|
transfer currency internally between wallets on the same account
|
730
730
|
:param str code: unified currency code
|
@@ -953,7 +953,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
953
953
|
'fee': fee,
|
954
954
|
}, market)
|
955
955
|
|
956
|
-
def fetch_trades(self, symbol: str, since: Int = None, limit=50, params={}) -> List[Trade]:
|
956
|
+
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 50, params={}) -> List[Trade]:
|
957
957
|
"""
|
958
958
|
get the list of most recent trades for a particular symbol
|
959
959
|
:param str symbol: unified symbol of the market to fetch trades for
|
@@ -1008,7 +1008,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1008
1008
|
response = self.privatePostMytrades(self.extend(request, params))
|
1009
1009
|
return self.parse_trades(response, market, since, limit)
|
1010
1010
|
|
1011
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1011
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1012
1012
|
"""
|
1013
1013
|
create a trade order
|
1014
1014
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1441,7 +1441,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1441
1441
|
}
|
1442
1442
|
return self.safe_string(statuses, status, status)
|
1443
1443
|
|
1444
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1444
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1445
1445
|
"""
|
1446
1446
|
make a withdrawal
|
1447
1447
|
:param str code: unified currency code
|
ccxt/bitfinex2.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex2 import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -853,7 +853,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
853
853
|
result[code] = account
|
854
854
|
return self.safe_balance(result)
|
855
855
|
|
856
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
856
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
857
857
|
"""
|
858
858
|
transfer currency internally between wallets on the same account
|
859
859
|
:see: https://docs.bitfinex.com/reference/rest-auth-transfer
|
@@ -1302,7 +1302,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1302
1302
|
trades = self.sort_by(response, 1)
|
1303
1303
|
return self.parse_trades(trades, market, None, limit)
|
1304
1304
|
|
1305
|
-
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit=100, params={}) -> List[list]:
|
1305
|
+
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = 100, params={}) -> List[list]:
|
1306
1306
|
"""
|
1307
1307
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1308
1308
|
:see: https://docs.bitfinex.com/reference/rest-public-candles
|
@@ -1462,7 +1462,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1462
1462
|
'trades': None,
|
1463
1463
|
}, market)
|
1464
1464
|
|
1465
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1465
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1466
1466
|
"""
|
1467
1467
|
* @ignore
|
1468
1468
|
helper function to build an order request
|
@@ -1531,7 +1531,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1531
1531
|
params = self.omit(params, ['triggerPrice', 'stopPrice', 'timeInForce', 'postOnly', 'reduceOnly', 'trailingAmount', 'clientOrderId'])
|
1532
1532
|
return self.extend(request, params)
|
1533
1533
|
|
1534
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1534
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1535
1535
|
"""
|
1536
1536
|
create an order on the exchange
|
1537
1537
|
:see: https://docs.bitfinex.com/reference/rest-auth-submit-order
|
@@ -2392,7 +2392,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2392
2392
|
#
|
2393
2393
|
return self.parse_transactions(response, currency, since, limit)
|
2394
2394
|
|
2395
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2395
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2396
2396
|
"""
|
2397
2397
|
make a withdrawal
|
2398
2398
|
:see: https://docs.bitfinex.com/reference/rest-auth-withdraw
|