ccxt 4.4.28__py2.py3-none-any.whl → 4.4.29__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/bybit.py +0 -13
- ccxt/alpaca.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/base/exchange.py +4 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +96 -8
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/bitopro.py +22 -22
- ccxt/async_support/bitrue.py +29 -29
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bitvavo.py +4 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/bybit.py +50 -585
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coincatch.py +25 -5
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +1 -1
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hashkey.py +1 -1
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +1 -1
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/lbank.py +6 -1
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +1 -1
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/phemex.py +1 -1
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +52 -8
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +1 -1
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/woofipro.py +1 -1
- ccxt/async_support/xt.py +1 -1
- ccxt/async_support/yobit.py +2 -2
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +4 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +1 -1
- ccxt/bingx.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +96 -8
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +1 -1
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +22 -22
- ccxt/bitrue.py +29 -29
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bitvavo.py +4 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/bybit.py +50 -585
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincatch.py +25 -5
- ccxt/coinex.py +1 -1
- ccxt/coinlist.py +1 -1
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +1 -1
- ccxt/exmo.py +1 -1
- ccxt/gate.py +1 -1
- ccxt/gemini.py +1 -1
- ccxt/hashkey.py +1 -1
- ccxt/hitbtc.py +1 -1
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +1 -1
- ccxt/huobijp.py +1 -1
- ccxt/idex.py +1 -1
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/kucoin.py +1 -1
- ccxt/kuna.py +1 -1
- ccxt/lbank.py +6 -1
- ccxt/lykke.py +1 -1
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +1 -1
- ccxt/onetrading.py +1 -1
- ccxt/oxfun.py +1 -1
- ccxt/phemex.py +1 -1
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitvavo.py +2 -1
- ccxt/pro/mexc.py +187 -30
- ccxt/probit.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +52 -8
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +1 -1
- ccxt/woo.py +1 -1
- ccxt/woofipro.py +1 -1
- ccxt/xt.py +1 -1
- ccxt/yobit.py +2 -2
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/METADATA +4 -4
- {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/RECORD +151 -151
- {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/WHEEL +0 -0
- {ccxt-4.4.28.dist-info → ccxt-4.4.29.dist-info}/top_level.txt +0 -0
ccxt/async_support/zaif.py
CHANGED
@@ -585,7 +585,7 @@ class zaif(Exchange, ImplicitAPI):
|
|
585
585
|
response = await self.privatePostTradeHistory(self.extend(request, params))
|
586
586
|
return self.parse_orders(response['return'], market, since, limit)
|
587
587
|
|
588
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
588
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
589
589
|
"""
|
590
590
|
:see: https://zaif-api-document.readthedocs.io/ja/latest/TradingAPI.html#id41
|
591
591
|
make a withdrawal
|
ccxt/async_support/zonda.py
CHANGED
@@ -1689,7 +1689,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
1689
1689
|
}
|
1690
1690
|
return self.safe_string(statuses, status, status)
|
1691
1691
|
|
1692
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1692
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1693
1693
|
"""
|
1694
1694
|
:see: https://docs.zondacrypto.exchange/reference/crypto-withdrawal-1
|
1695
1695
|
make a withdrawal
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.29'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -2480,6 +2480,9 @@ class Exchange(object):
|
|
2480
2480
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}):
|
2481
2481
|
raise NotSupported(self.id + ' fetchOrderBook() is not supported yet')
|
2482
2482
|
|
2483
|
+
def fetch_order_book_ws(self, symbol: str, limit: Int = None, params={}):
|
2484
|
+
raise NotSupported(self.id + ' fetchOrderBookWs() is not supported yet')
|
2485
|
+
|
2483
2486
|
def fetch_margin_mode(self, symbol: str, params={}):
|
2484
2487
|
if self.has['fetchMarginModes']:
|
2485
2488
|
marginModes = self.fetch_margin_modes([symbol], params)
|
ccxt/bigone.py
CHANGED
@@ -2018,7 +2018,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2018
2018
|
}
|
2019
2019
|
return self.safe_string(statuses, status, 'failed')
|
2020
2020
|
|
2021
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2021
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2022
2022
|
"""
|
2023
2023
|
make a withdrawal
|
2024
2024
|
:see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
ccxt/binance.py
CHANGED
@@ -8480,7 +8480,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8480
8480
|
}
|
8481
8481
|
return result
|
8482
8482
|
|
8483
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
8483
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8484
8484
|
"""
|
8485
8485
|
make a withdrawal
|
8486
8486
|
:see: https://developers.binance.com/docs/wallet/capital/withdraw
|
ccxt/bingx.py
CHANGED
@@ -4977,7 +4977,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4977
4977
|
coins = self.safe_list(response, 'data')
|
4978
4978
|
return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
|
4979
4979
|
|
4980
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4980
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4981
4981
|
"""
|
4982
4982
|
make a withdrawal
|
4983
4983
|
:see: https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
|
ccxt/bitbank.py
CHANGED
@@ -814,7 +814,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
814
814
|
'tag': None,
|
815
815
|
}
|
816
816
|
|
817
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
817
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
818
818
|
"""
|
819
819
|
make a withdrawal
|
820
820
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#new-withdrawal-request
|
ccxt/bitfinex.py
CHANGED
@@ -1528,7 +1528,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1528
1528
|
}
|
1529
1529
|
return self.safe_string(statuses, status, status)
|
1530
1530
|
|
1531
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1531
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1532
1532
|
"""
|
1533
1533
|
make a withdrawal
|
1534
1534
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
ccxt/bitfinex2.py
CHANGED
@@ -2458,7 +2458,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2458
2458
|
#
|
2459
2459
|
return self.parse_transactions(response, currency, since, limit)
|
2460
2460
|
|
2461
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2461
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2462
2462
|
"""
|
2463
2463
|
make a withdrawal
|
2464
2464
|
:see: https://docs.bitfinex.com/reference/rest-auth-withdraw
|
ccxt/bitflyer.py
CHANGED
@@ -775,7 +775,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
775
775
|
# todo unify parsePosition/parsePositions
|
776
776
|
return response
|
777
777
|
|
778
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
778
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
779
779
|
"""
|
780
780
|
make a withdrawal
|
781
781
|
:see: https://lightning.bitflyer.com/docs?lang=en#withdrawing-funds
|
ccxt/bitget.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bitget import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, LongShortRatio, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, BorrowInterest, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, LedgerEntry, Leverage, LeverageTier, Liquidation, LongShortRatio, MarginMode, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -105,7 +105,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
105
105
|
'fetchFundingIntervals': False,
|
106
106
|
'fetchFundingRate': True,
|
107
107
|
'fetchFundingRateHistory': True,
|
108
|
-
'fetchFundingRates':
|
108
|
+
'fetchFundingRates': True,
|
109
109
|
'fetchIndexOHLCV': True,
|
110
110
|
'fetchIsolatedBorrowRate': True,
|
111
111
|
'fetchIsolatedBorrowRates': False,
|
@@ -2142,7 +2142,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2142
2142
|
rawTransactions = self.safe_list(response, 'data', [])
|
2143
2143
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2144
2144
|
|
2145
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2145
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2146
2146
|
"""
|
2147
2147
|
make a withdrawal
|
2148
2148
|
:see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
@@ -6350,6 +6350,66 @@ class bitget(Exchange, ImplicitAPI):
|
|
6350
6350
|
data = self.safe_value(response, 'data', [])
|
6351
6351
|
return self.parse_funding_rate(data[0], market)
|
6352
6352
|
|
6353
|
+
def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
6354
|
+
"""
|
6355
|
+
fetch the current funding rates for all markets
|
6356
|
+
:see: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
6357
|
+
:param str[] [symbols]: list of unified market symbols
|
6358
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6359
|
+
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
6360
|
+
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
6361
|
+
:returns dict: a dictionary of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
|
6362
|
+
"""
|
6363
|
+
self.load_markets()
|
6364
|
+
market = None
|
6365
|
+
if symbols is not None:
|
6366
|
+
symbol = self.safe_value(symbols, 0)
|
6367
|
+
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
6368
|
+
if sandboxMode:
|
6369
|
+
sandboxSymbol = self.convert_symbol_for_sandbox(symbol)
|
6370
|
+
market = self.market(sandboxSymbol)
|
6371
|
+
else:
|
6372
|
+
market = self.market(symbol)
|
6373
|
+
request: dict = {}
|
6374
|
+
productType = None
|
6375
|
+
productType, params = self.handle_product_type_and_params(market, params)
|
6376
|
+
request['productType'] = productType
|
6377
|
+
response = self.publicMixGetV2MixMarketTickers(self.extend(request, params))
|
6378
|
+
# {
|
6379
|
+
# "code": "00000",
|
6380
|
+
# "msg": "success",
|
6381
|
+
# "requestTime": 1700533773477,
|
6382
|
+
# "data": [
|
6383
|
+
# {
|
6384
|
+
# "symbol": "BTCUSD",
|
6385
|
+
# "lastPr": "29904.5",
|
6386
|
+
# "askPr": "29904.5",
|
6387
|
+
# "bidPr": "29903.5",
|
6388
|
+
# "bidSz": "0.5091",
|
6389
|
+
# "askSz": "2.2694",
|
6390
|
+
# "high24h": "0",
|
6391
|
+
# "low24h": "0",
|
6392
|
+
# "ts": "1695794271400",
|
6393
|
+
# "change24h": "0",
|
6394
|
+
# "baseVolume": "0",
|
6395
|
+
# "quoteVolume": "0",
|
6396
|
+
# "usdtVolume": "0",
|
6397
|
+
# "openUtc": "0",
|
6398
|
+
# "changeUtc24h": "0",
|
6399
|
+
# "indexPrice": "29132.353333",
|
6400
|
+
# "fundingRate": "-0.0007",
|
6401
|
+
# "holdingAmount": "125.6844",
|
6402
|
+
# "deliveryStartTime": null,
|
6403
|
+
# "deliveryTime": null,
|
6404
|
+
# "deliveryStatus": "delivery_normal",
|
6405
|
+
# "open24h": "0",
|
6406
|
+
# "markPrice": "12345"
|
6407
|
+
# },
|
6408
|
+
# ]
|
6409
|
+
# }
|
6410
|
+
data = self.safe_list(response, 'data', [])
|
6411
|
+
return self.parse_funding_rates(data, market)
|
6412
|
+
|
6353
6413
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
6354
6414
|
#
|
6355
6415
|
# fetchFundingRate
|
@@ -6366,23 +6426,51 @@ class bitget(Exchange, ImplicitAPI):
|
|
6366
6426
|
# "nextFundingTime": "1727942400000",
|
6367
6427
|
# "ratePeriod": "8"
|
6368
6428
|
# }
|
6369
|
-
#
|
6429
|
+
# fetchFundingRates
|
6430
|
+
# {
|
6431
|
+
# "symbol": "BTCUSD",
|
6432
|
+
# "lastPr": "29904.5",
|
6433
|
+
# "askPr": "29904.5",
|
6434
|
+
# "bidPr": "29903.5",
|
6435
|
+
# "bidSz": "0.5091",
|
6436
|
+
# "askSz": "2.2694",
|
6437
|
+
# "high24h": "0",
|
6438
|
+
# "low24h": "0",
|
6439
|
+
# "ts": "1695794271400",
|
6440
|
+
# "change24h": "0",
|
6441
|
+
# "baseVolume": "0",
|
6442
|
+
# "quoteVolume": "0",
|
6443
|
+
# "usdtVolume": "0",
|
6444
|
+
# "openUtc": "0",
|
6445
|
+
# "changeUtc24h": "0",
|
6446
|
+
# "indexPrice": "29132.353333",
|
6447
|
+
# "fundingRate": "-0.0007",
|
6448
|
+
# "holdingAmount": "125.6844",
|
6449
|
+
# "deliveryStartTime": null,
|
6450
|
+
# "deliveryTime": null,
|
6451
|
+
# "deliveryStatus": "delivery_normal",
|
6452
|
+
# "open24h": "0",
|
6453
|
+
# "markPrice": "12345"
|
6454
|
+
# }
|
6370
6455
|
marketId = self.safe_string(contract, 'symbol')
|
6371
6456
|
symbol = self.safe_symbol(marketId, market, None, 'swap')
|
6372
6457
|
fundingTimestamp = self.safe_integer(contract, 'nextFundingTime')
|
6373
6458
|
interval = self.safe_string(contract, 'ratePeriod')
|
6459
|
+
timestamp = self.safe_integer(contract, 'ts')
|
6460
|
+
markPrice = self.safe_number(contract, 'markPrice')
|
6461
|
+
indexPrice = self.safe_number(contract, 'indexPrice')
|
6374
6462
|
intervalString = None
|
6375
6463
|
if interval is not None:
|
6376
6464
|
intervalString = interval + 'h'
|
6377
6465
|
return {
|
6378
6466
|
'info': contract,
|
6379
6467
|
'symbol': symbol,
|
6380
|
-
'markPrice':
|
6381
|
-
'indexPrice':
|
6468
|
+
'markPrice': markPrice,
|
6469
|
+
'indexPrice': indexPrice,
|
6382
6470
|
'interestRate': None,
|
6383
6471
|
'estimatedSettlePrice': None,
|
6384
|
-
'timestamp':
|
6385
|
-
'datetime':
|
6472
|
+
'timestamp': timestamp,
|
6473
|
+
'datetime': self.iso8601(timestamp),
|
6386
6474
|
'fundingRate': self.safe_number(contract, 'fundingRate'),
|
6387
6475
|
'fundingTimestamp': fundingTimestamp,
|
6388
6476
|
'fundingDatetime': self.iso8601(fundingTimestamp),
|
ccxt/bithumb.py
CHANGED
@@ -982,7 +982,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
982
982
|
}
|
983
983
|
return self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
984
984
|
|
985
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
985
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
986
986
|
"""
|
987
987
|
make a withdrawal
|
988
988
|
:see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
|
ccxt/bitmart.py
CHANGED
@@ -3277,7 +3277,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3277
3277
|
'tag': self.safe_string(depositAddress, 'address_memo'),
|
3278
3278
|
}
|
3279
3279
|
|
3280
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3280
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3281
3281
|
"""
|
3282
3282
|
make a withdrawal
|
3283
3283
|
:param str code: unified currency code
|
ccxt/bitmex.py
CHANGED
@@ -2285,7 +2285,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2285
2285
|
'takeProfitPrice': None,
|
2286
2286
|
})
|
2287
2287
|
|
2288
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2288
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2289
2289
|
"""
|
2290
2290
|
make a withdrawal
|
2291
2291
|
:see: https://www.bitmex.com/api/explorer/#not /User/User_requestWithdrawal
|
ccxt/bitopro.py
CHANGED
@@ -233,7 +233,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
233
233
|
:returns dict: an associative dictionary of currencies
|
234
234
|
"""
|
235
235
|
response = self.publicGetProvisioningCurrencies(params)
|
236
|
-
currencies = self.
|
236
|
+
currencies = self.safe_list(response, 'data', [])
|
237
237
|
#
|
238
238
|
# {
|
239
239
|
# "data":[
|
@@ -255,8 +255,8 @@ class bitopro(Exchange, ImplicitAPI):
|
|
255
255
|
currency = currencies[i]
|
256
256
|
currencyId = self.safe_string(currency, 'currency')
|
257
257
|
code = self.safe_currency_code(currencyId)
|
258
|
-
deposit = self.
|
259
|
-
withdraw = self.
|
258
|
+
deposit = self.safe_bool(currency, 'deposit')
|
259
|
+
withdraw = self.safe_bool(currency, 'withdraw')
|
260
260
|
fee = self.safe_number(currency, 'withdrawFee')
|
261
261
|
withdrawMin = self.safe_number(currency, 'minWithdraw')
|
262
262
|
withdrawMax = self.safe_number(currency, 'maxWithdraw')
|
@@ -293,7 +293,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
293
293
|
:returns dict[]: an array of objects representing market data
|
294
294
|
"""
|
295
295
|
response = self.publicGetProvisioningTradingPairs()
|
296
|
-
markets = self.
|
296
|
+
markets = self.safe_list(response, 'data', [])
|
297
297
|
#
|
298
298
|
# {
|
299
299
|
# "data":[
|
@@ -317,7 +317,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
317
317
|
return self.parse_markets(markets)
|
318
318
|
|
319
319
|
def parse_market(self, market: dict) -> Market:
|
320
|
-
active = not self.
|
320
|
+
active = not self.safe_bool(market, 'maintain')
|
321
321
|
id = self.safe_string(market, 'pair')
|
322
322
|
uppercaseId = id.upper()
|
323
323
|
baseId = self.safe_string(market, 'base')
|
@@ -429,7 +429,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
429
429
|
'pair': market['id'],
|
430
430
|
}
|
431
431
|
response = self.publicGetTickersPair(self.extend(request, params))
|
432
|
-
ticker = self.
|
432
|
+
ticker = self.safe_dict(response, 'data', {})
|
433
433
|
#
|
434
434
|
# {
|
435
435
|
# "data":{
|
@@ -455,7 +455,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
455
455
|
"""
|
456
456
|
self.load_markets()
|
457
457
|
response = self.publicGetTickers()
|
458
|
-
tickers = self.
|
458
|
+
tickers = self.safe_list(response, 'data', [])
|
459
459
|
#
|
460
460
|
# {
|
461
461
|
# "data":[
|
@@ -551,7 +551,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
551
551
|
type = self.safe_string_lower(trade, 'type')
|
552
552
|
side = self.safe_string_lower(trade, 'action')
|
553
553
|
if side is None:
|
554
|
-
isBuyer = self.
|
554
|
+
isBuyer = self.safe_bool(trade, 'isBuyer')
|
555
555
|
if isBuyer:
|
556
556
|
side = 'buy'
|
557
557
|
else:
|
@@ -568,7 +568,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
568
568
|
'currency': feeSymbol,
|
569
569
|
'rate': None,
|
570
570
|
}
|
571
|
-
isTaker = self.
|
571
|
+
isTaker = self.safe_bool(trade, 'isTaker')
|
572
572
|
takerOrMaker = None
|
573
573
|
if isTaker is not None:
|
574
574
|
if isTaker:
|
@@ -607,7 +607,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
607
607
|
'pair': market['id'],
|
608
608
|
}
|
609
609
|
response = self.publicGetTradesPair(self.extend(request, params))
|
610
|
-
trades = self.
|
610
|
+
trades = self.safe_list(response, 'data', [])
|
611
611
|
#
|
612
612
|
# {
|
613
613
|
# "data":[
|
@@ -631,7 +631,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
631
631
|
"""
|
632
632
|
self.load_markets()
|
633
633
|
response = self.publicGetProvisioningLimitationsAndFees(params)
|
634
|
-
tradingFeeRate = self.
|
634
|
+
tradingFeeRate = self.safe_dict(response, 'tradingFeeRate', {})
|
635
635
|
first = self.safe_value(tradingFeeRate, 0)
|
636
636
|
#
|
637
637
|
# {
|
@@ -753,7 +753,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
753
753
|
request['from'] = int(math.floor(since / 1000))
|
754
754
|
request['to'] = self.sum(request['from'], limit * timeframeInSeconds)
|
755
755
|
response = self.publicGetTradingHistoryPair(self.extend(request, params))
|
756
|
-
data = self.
|
756
|
+
data = self.safe_list(response, 'data', [])
|
757
757
|
#
|
758
758
|
# {
|
759
759
|
# "data":[
|
@@ -841,7 +841,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
841
841
|
"""
|
842
842
|
self.load_markets()
|
843
843
|
response = self.privateGetAccountsBalance(params)
|
844
|
-
balances = self.
|
844
|
+
balances = self.safe_list(response, 'data', [])
|
845
845
|
#
|
846
846
|
# {
|
847
847
|
# "data":[
|
@@ -1101,7 +1101,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1101
1101
|
response = self.privateDeleteOrdersPair(self.extend(request, params))
|
1102
1102
|
else:
|
1103
1103
|
response = self.privateDeleteOrdersAll(self.extend(request, params))
|
1104
|
-
data = self.
|
1104
|
+
data = self.safe_dict(response, 'data', {})
|
1105
1105
|
#
|
1106
1106
|
# {
|
1107
1107
|
# "data":{
|
@@ -1183,7 +1183,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1183
1183
|
if limit is not None:
|
1184
1184
|
request['limit'] = limit
|
1185
1185
|
response = self.privateGetOrdersAllPair(self.extend(request, params))
|
1186
|
-
orders = self.
|
1186
|
+
orders = self.safe_list(response, 'data', [])
|
1187
1187
|
if orders is None:
|
1188
1188
|
orders = []
|
1189
1189
|
#
|
@@ -1253,7 +1253,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1253
1253
|
'pair': market['id'],
|
1254
1254
|
}
|
1255
1255
|
response = self.privateGetOrdersTradesPair(self.extend(request, params))
|
1256
|
-
trades = self.
|
1256
|
+
trades = self.safe_list(response, 'data', [])
|
1257
1257
|
#
|
1258
1258
|
# {
|
1259
1259
|
# "data":[
|
@@ -1395,7 +1395,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1395
1395
|
if limit is not None:
|
1396
1396
|
request['limit'] = limit
|
1397
1397
|
response = self.privateGetWalletDepositHistoryCurrency(self.extend(request, params))
|
1398
|
-
result = self.
|
1398
|
+
result = self.safe_list(response, 'data', [])
|
1399
1399
|
#
|
1400
1400
|
# {
|
1401
1401
|
# "data":[
|
@@ -1442,7 +1442,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1442
1442
|
if limit is not None:
|
1443
1443
|
request['limit'] = limit
|
1444
1444
|
response = self.privateGetWalletWithdrawHistoryCurrency(self.extend(request, params))
|
1445
|
-
result = self.
|
1445
|
+
result = self.safe_list(response, 'data', [])
|
1446
1446
|
#
|
1447
1447
|
# {
|
1448
1448
|
# "data":[
|
@@ -1481,7 +1481,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1481
1481
|
'currency': currency['id'],
|
1482
1482
|
}
|
1483
1483
|
response = self.privateGetWalletWithdrawCurrencySerial(self.extend(request, params))
|
1484
|
-
result = self.
|
1484
|
+
result = self.safe_dict(response, 'data', {})
|
1485
1485
|
#
|
1486
1486
|
# {
|
1487
1487
|
# "data":{
|
@@ -1500,7 +1500,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1500
1500
|
#
|
1501
1501
|
return self.parse_transaction(result, currency)
|
1502
1502
|
|
1503
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1503
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1504
1504
|
"""
|
1505
1505
|
make a withdrawal
|
1506
1506
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/create_an_withdraw_invoice.md
|
@@ -1521,7 +1521,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1521
1521
|
'address': address,
|
1522
1522
|
}
|
1523
1523
|
if 'network' in params:
|
1524
|
-
networks = self.
|
1524
|
+
networks = self.safe_dict(self.options, 'networks', {})
|
1525
1525
|
requestedNetwork = self.safe_string_upper(params, 'network')
|
1526
1526
|
params = self.omit(params, ['network'])
|
1527
1527
|
networkId = self.safe_string(networks, requestedNetwork)
|
@@ -1531,7 +1531,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1531
1531
|
if tag is not None:
|
1532
1532
|
request['message'] = tag
|
1533
1533
|
response = self.privatePostWalletWithdrawCurrency(self.extend(request, params))
|
1534
|
-
result = self.
|
1534
|
+
result = self.safe_dict(response, 'data', {})
|
1535
1535
|
#
|
1536
1536
|
# {
|
1537
1537
|
# "data":{
|