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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +113 -28
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +113 -28
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +564 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +29 -21
- ccxt/async_support/bitfinex.py +77 -33
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +198 -132
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -19
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +138 -53
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +298 -155
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +156 -73
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +203 -42
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +53 -16
- ccxt/async_support/kraken.py +107 -35
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +211 -109
- ccxt/async_support/kucoinfutures.py +119 -42
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +90 -39
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +91 -41
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +29 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +118 -49
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +34 -34
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +564 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +29 -21
- ccxt/bitfinex.py +77 -33
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +198 -132
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -19
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +138 -53
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +298 -155
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +156 -73
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +203 -42
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +53 -16
- ccxt/kraken.py +107 -35
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +211 -109
- ccxt/kucoinfutures.py +119 -42
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +90 -39
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +91 -41
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +200 -119
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +75 -36
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +51 -17
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +38 -13
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +70 -26
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +64 -30
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +26 -8
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +35 -17
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/test/tests_helpers.py +2 -2
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +29 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +118 -49
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/bitfinex.py
CHANGED
@@ -417,9 +417,11 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
417
417
|
|
418
418
|
def fetch_transaction_fees(self, codes: Strings = None, params={}):
|
419
419
|
"""
|
420
|
-
|
420
|
+
@deprecated
|
421
421
|
please use fetchDepositWithdrawFees instead
|
422
|
-
|
422
|
+
|
423
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
424
|
+
|
423
425
|
:param str[]|None codes: list of unified currency codes
|
424
426
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
425
427
|
:returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -434,7 +436,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
434
436
|
# }
|
435
437
|
# }
|
436
438
|
#
|
437
|
-
fees = self.
|
439
|
+
fees = self.safe_dict(response, 'withdraw', {})
|
438
440
|
ids = list(fees.keys())
|
439
441
|
for i in range(0, len(ids)):
|
440
442
|
id = ids[i]
|
@@ -451,7 +453,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
451
453
|
def fetch_deposit_withdraw_fees(self, codes: Strings = None, params={}):
|
452
454
|
"""
|
453
455
|
fetch deposit and withdraw fees
|
454
|
-
|
456
|
+
|
457
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-fees
|
458
|
+
|
455
459
|
:param str[]|None codes: list of unified currency codes
|
456
460
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
457
461
|
:returns dict[]: a list of `fees structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -489,7 +493,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
489
493
|
def fetch_trading_fees(self, params={}) -> TradingFees:
|
490
494
|
"""
|
491
495
|
fetch the trading fees for multiple markets
|
492
|
-
|
496
|
+
|
497
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-summary
|
498
|
+
|
493
499
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
494
500
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
495
501
|
"""
|
@@ -535,7 +541,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
535
541
|
# }
|
536
542
|
#
|
537
543
|
result: dict = {}
|
538
|
-
fiat = self.
|
544
|
+
fiat = self.safe_dict(self.options, 'fiat', {})
|
539
545
|
makerFee = self.safe_number(response, 'maker_fee')
|
540
546
|
takerFee = self.safe_number(response, 'taker_fee')
|
541
547
|
makerFee2Fiat = self.safe_number(response, 'maker_fee_2fiat')
|
@@ -566,8 +572,10 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
566
572
|
def fetch_markets(self, params={}) -> List[Market]:
|
567
573
|
"""
|
568
574
|
retrieves data on all markets for bitfinex
|
569
|
-
|
570
|
-
|
575
|
+
|
576
|
+
https://docs.bitfinex.com/v1/reference/rest-public-symbols
|
577
|
+
https://docs.bitfinex.com/v1/reference/rest-public-symbol-details
|
578
|
+
|
571
579
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
572
580
|
:returns dict[]: an array of objects representing market data
|
573
581
|
"""
|
@@ -624,7 +632,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
624
632
|
'settleId': None,
|
625
633
|
'type': type,
|
626
634
|
'spot': (type == 'spot'),
|
627
|
-
'margin': self.
|
635
|
+
'margin': self.safe_bool(market, 'margin'),
|
628
636
|
'swap': (type == 'swap'),
|
629
637
|
'future': False,
|
630
638
|
'option': False,
|
@@ -686,12 +694,14 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
686
694
|
def fetch_balance(self, params={}) -> Balances:
|
687
695
|
"""
|
688
696
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
689
|
-
|
697
|
+
|
698
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-wallet-balances
|
699
|
+
|
690
700
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
691
701
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
692
702
|
"""
|
693
703
|
self.load_markets()
|
694
|
-
accountsByType = self.
|
704
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
695
705
|
requestedType = self.safe_string(params, 'type', 'exchange')
|
696
706
|
accountType = self.safe_string(accountsByType, requestedType, requestedType)
|
697
707
|
if accountType is None:
|
@@ -738,7 +748,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
738
748
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
739
749
|
"""
|
740
750
|
transfer currency internally between wallets on the same account
|
741
|
-
|
751
|
+
|
752
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-transfer-between-wallets
|
753
|
+
|
742
754
|
:param str code: unified currency code
|
743
755
|
:param float amount: amount to transfer
|
744
756
|
:param str fromAccount: account to transfer from
|
@@ -749,7 +761,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
749
761
|
# transferring between derivatives wallet and regular wallet is not documented in their API
|
750
762
|
# however we support it in CCXT(from just looking at web inspector)
|
751
763
|
self.load_markets()
|
752
|
-
accountsByType = self.
|
764
|
+
accountsByType = self.safe_dict(self.options, 'accountsByType', {})
|
753
765
|
fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
|
754
766
|
toId = self.safe_string(accountsByType, toAccount, toAccount)
|
755
767
|
currency = self.currency(code)
|
@@ -819,7 +831,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
819
831
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
820
832
|
"""
|
821
833
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
822
|
-
|
834
|
+
|
835
|
+
https://docs.bitfinex.com/v1/reference/rest-public-orderbook
|
836
|
+
|
823
837
|
:param str symbol: unified symbol of the market to fetch the order book for
|
824
838
|
:param int [limit]: the maximum amount of order book entries to return
|
825
839
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -856,7 +870,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
856
870
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
857
871
|
"""
|
858
872
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
859
|
-
|
873
|
+
|
874
|
+
https://docs.bitfinex.com/v1/reference/rest-public-ticker
|
875
|
+
|
860
876
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
861
877
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
862
878
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -994,7 +1010,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
994
1010
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = 50, params={}) -> List[Trade]:
|
995
1011
|
"""
|
996
1012
|
get the list of most recent trades for a particular symbol
|
997
|
-
|
1013
|
+
|
1014
|
+
https://docs.bitfinex.com/v1/reference/rest-public-trades
|
1015
|
+
|
998
1016
|
:param str symbol: unified symbol of the market to fetch trades for
|
999
1017
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1000
1018
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -1027,7 +1045,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1027
1045
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1028
1046
|
"""
|
1029
1047
|
fetch all trades made by the user
|
1030
|
-
|
1048
|
+
|
1049
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-past-trades
|
1050
|
+
|
1031
1051
|
:param str symbol: unified market symbol
|
1032
1052
|
:param int [since]: the earliest time in ms to fetch trades for
|
1033
1053
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1051,7 +1071,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1051
1071
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1052
1072
|
"""
|
1053
1073
|
create a trade order
|
1054
|
-
|
1074
|
+
|
1075
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-new-order
|
1076
|
+
|
1055
1077
|
:param str symbol: unified symbol of the market to create an order in
|
1056
1078
|
:param str type: 'market' or 'limit'
|
1057
1079
|
:param str side: 'buy' or 'sell'
|
@@ -1108,7 +1130,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1108
1130
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1109
1131
|
"""
|
1110
1132
|
cancels an open order
|
1111
|
-
|
1133
|
+
|
1134
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-cancel-order
|
1135
|
+
|
1112
1136
|
:param str id: order id
|
1113
1137
|
:param str symbol: not used by bitfinex cancelOrder()
|
1114
1138
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1149,7 +1173,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1149
1173
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1150
1174
|
"""
|
1151
1175
|
cancel all open orders
|
1152
|
-
|
1176
|
+
|
1177
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-cancel-all-orders
|
1178
|
+
|
1153
1179
|
:param str symbol: not used by bitfinex cancelAllOrders
|
1154
1180
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1155
1181
|
:returns dict: response from exchange
|
@@ -1190,8 +1216,8 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1190
1216
|
# }
|
1191
1217
|
#
|
1192
1218
|
side = self.safe_string(order, 'side')
|
1193
|
-
open = self.
|
1194
|
-
canceled = self.
|
1219
|
+
open = self.safe_bool(order, 'is_live')
|
1220
|
+
canceled = self.safe_bool(order, 'is_cancelled')
|
1195
1221
|
status = None
|
1196
1222
|
if open:
|
1197
1223
|
status = 'open'
|
@@ -1236,7 +1262,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1236
1262
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1237
1263
|
"""
|
1238
1264
|
fetch all unfilled currently open orders
|
1239
|
-
|
1265
|
+
|
1266
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-active-orders
|
1267
|
+
|
1240
1268
|
:param str symbol: unified market symbol
|
1241
1269
|
:param int [since]: the earliest time in ms to fetch open orders for
|
1242
1270
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -1256,7 +1284,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1256
1284
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1257
1285
|
"""
|
1258
1286
|
fetches information on multiple closed orders made by the user
|
1259
|
-
|
1287
|
+
|
1288
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-orders-history
|
1289
|
+
|
1260
1290
|
:param str symbol: unified market symbol of the market orders were made in
|
1261
1291
|
:param int [since]: the earliest time in ms to fetch orders for
|
1262
1292
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -1278,7 +1308,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1278
1308
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1279
1309
|
"""
|
1280
1310
|
fetches information on an order made by the user
|
1281
|
-
|
1311
|
+
|
1312
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-order-status
|
1313
|
+
|
1282
1314
|
:param str id: the order id
|
1283
1315
|
:param str symbol: not used by bitfinex fetchOrder
|
1284
1316
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1314,7 +1346,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1314
1346
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1315
1347
|
"""
|
1316
1348
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1317
|
-
|
1349
|
+
|
1350
|
+
https://docs.bitfinex.com/reference/rest-public-candles#aggregate-funding-currency-candles
|
1351
|
+
|
1318
1352
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1319
1353
|
:param str timeframe: the length of time each candle represents
|
1320
1354
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1356,7 +1390,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1356
1390
|
def create_deposit_address(self, code: str, params={}):
|
1357
1391
|
"""
|
1358
1392
|
create a currency deposit address
|
1359
|
-
|
1393
|
+
|
1394
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-deposit
|
1395
|
+
|
1360
1396
|
:param str code: unified currency code of the currency for the deposit address
|
1361
1397
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1362
1398
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1370,7 +1406,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1370
1406
|
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1371
1407
|
"""
|
1372
1408
|
fetch the deposit address for a currency associated with self account
|
1373
|
-
|
1409
|
+
|
1410
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-deposit
|
1411
|
+
|
1374
1412
|
:param str code: unified currency code
|
1375
1413
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1376
1414
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1401,7 +1439,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1401
1439
|
def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1402
1440
|
"""
|
1403
1441
|
fetch history of deposits and withdrawals
|
1404
|
-
|
1442
|
+
|
1443
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-deposit-withdrawal-history
|
1444
|
+
|
1405
1445
|
:param str code: unified currency code for the currency of the deposit/withdrawals
|
1406
1446
|
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
|
1407
1447
|
:param int [limit]: max number of deposit/withdrawals to return, default is None
|
@@ -1531,7 +1571,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1531
1571
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1532
1572
|
"""
|
1533
1573
|
make a withdrawal
|
1534
|
-
|
1574
|
+
|
1575
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
1576
|
+
|
1535
1577
|
:param str code: unified currency code
|
1536
1578
|
:param float amount: the amount to withdraw
|
1537
1579
|
:param str address: the address to withdraw to
|
@@ -1563,7 +1605,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1563
1605
|
# }
|
1564
1606
|
# ]
|
1565
1607
|
#
|
1566
|
-
response = self.
|
1608
|
+
response = self.safe_dict(responses, 0, {})
|
1567
1609
|
id = self.safe_integer(response, 'withdrawal_id')
|
1568
1610
|
message = self.safe_string(response, 'message')
|
1569
1611
|
errorMessage = self.find_broadly_matched_key(self.exceptions['broad'], message)
|
@@ -1577,7 +1619,9 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1577
1619
|
def fetch_positions(self, symbols: Strings = None, params={}):
|
1578
1620
|
"""
|
1579
1621
|
fetch all open positions
|
1580
|
-
|
1622
|
+
|
1623
|
+
https://docs.bitfinex.com/v1/reference/rest-auth-active-positions
|
1624
|
+
|
1581
1625
|
:param str[]|None symbols: list of unified market symbols
|
1582
1626
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1583
1627
|
:returns dict[]: a list of `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -1646,7 +1690,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1646
1690
|
else:
|
1647
1691
|
# json response with error, i.e:
|
1648
1692
|
# [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}]
|
1649
|
-
responseObject = self.
|
1693
|
+
responseObject = self.safe_dict(response, 0, {})
|
1650
1694
|
status = self.safe_string(responseObject, 'status', '')
|
1651
1695
|
if status == 'error':
|
1652
1696
|
throwError = True
|