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/__init__.py
CHANGED
ccxt/abstract/bybit.py
CHANGED
@@ -181,19 +181,6 @@ class ImplicitAPI:
|
|
181
181
|
private_get_v5_broker_earnings_info = privateGetV5BrokerEarningsInfo = Entry('v5/broker/earnings-info', 'private', 'GET', {'cost': 5})
|
182
182
|
private_get_v5_broker_account_info = privateGetV5BrokerAccountInfo = Entry('v5/broker/account-info', 'private', 'GET', {'cost': 5})
|
183
183
|
private_get_v5_broker_asset_query_sub_member_deposit_record = privateGetV5BrokerAssetQuerySubMemberDepositRecord = Entry('v5/broker/asset/query-sub-member-deposit-record', 'private', 'GET', {'cost': 10})
|
184
|
-
private_post_option_usdc_openapi_private_v1_place_order = privatePostOptionUsdcOpenapiPrivateV1PlaceOrder = Entry('option/usdc/openapi/private/v1/place-order', 'private', 'POST', {'cost': 2.5})
|
185
|
-
private_post_option_usdc_openapi_private_v1_replace_order = privatePostOptionUsdcOpenapiPrivateV1ReplaceOrder = Entry('option/usdc/openapi/private/v1/replace-order', 'private', 'POST', {'cost': 2.5})
|
186
|
-
private_post_option_usdc_openapi_private_v1_cancel_order = privatePostOptionUsdcOpenapiPrivateV1CancelOrder = Entry('option/usdc/openapi/private/v1/cancel-order', 'private', 'POST', {'cost': 2.5})
|
187
|
-
private_post_option_usdc_openapi_private_v1_cancel_all = privatePostOptionUsdcOpenapiPrivateV1CancelAll = Entry('option/usdc/openapi/private/v1/cancel-all', 'private', 'POST', {'cost': 2.5})
|
188
|
-
private_post_option_usdc_openapi_private_v1_query_active_orders = privatePostOptionUsdcOpenapiPrivateV1QueryActiveOrders = Entry('option/usdc/openapi/private/v1/query-active-orders', 'private', 'POST', {'cost': 2.5})
|
189
|
-
private_post_option_usdc_openapi_private_v1_query_order_history = privatePostOptionUsdcOpenapiPrivateV1QueryOrderHistory = Entry('option/usdc/openapi/private/v1/query-order-history', 'private', 'POST', {'cost': 2.5})
|
190
|
-
private_post_option_usdc_openapi_private_v1_execution_list = privatePostOptionUsdcOpenapiPrivateV1ExecutionList = Entry('option/usdc/openapi/private/v1/execution-list', 'private', 'POST', {'cost': 2.5})
|
191
|
-
private_post_option_usdc_openapi_private_v1_query_position = privatePostOptionUsdcOpenapiPrivateV1QueryPosition = Entry('option/usdc/openapi/private/v1/query-position', 'private', 'POST', {'cost': 2.5})
|
192
|
-
private_post_perpetual_usdc_openapi_private_v1_place_order = privatePostPerpetualUsdcOpenapiPrivateV1PlaceOrder = Entry('perpetual/usdc/openapi/private/v1/place-order', 'private', 'POST', {'cost': 2.5})
|
193
|
-
private_post_perpetual_usdc_openapi_private_v1_replace_order = privatePostPerpetualUsdcOpenapiPrivateV1ReplaceOrder = Entry('perpetual/usdc/openapi/private/v1/replace-order', 'private', 'POST', {'cost': 2.5})
|
194
|
-
private_post_perpetual_usdc_openapi_private_v1_cancel_order = privatePostPerpetualUsdcOpenapiPrivateV1CancelOrder = Entry('perpetual/usdc/openapi/private/v1/cancel-order', 'private', 'POST', {'cost': 2.5})
|
195
|
-
private_post_perpetual_usdc_openapi_private_v1_cancel_all = privatePostPerpetualUsdcOpenapiPrivateV1CancelAll = Entry('perpetual/usdc/openapi/private/v1/cancel-all', 'private', 'POST', {'cost': 2.5})
|
196
|
-
private_post_perpetual_usdc_openapi_private_v1_position_leverage_save = privatePostPerpetualUsdcOpenapiPrivateV1PositionLeverageSave = Entry('perpetual/usdc/openapi/private/v1/position/leverage/save', 'private', 'POST', {'cost': 2.5})
|
197
184
|
private_post_spot_v3_private_order = privatePostSpotV3PrivateOrder = Entry('spot/v3/private/order', 'private', 'POST', {'cost': 2.5})
|
198
185
|
private_post_spot_v3_private_cancel_order = privatePostSpotV3PrivateCancelOrder = Entry('spot/v3/private/cancel-order', 'private', 'POST', {'cost': 2.5})
|
199
186
|
private_post_spot_v3_private_cancel_orders = privatePostSpotV3PrivateCancelOrders = Entry('spot/v3/private/cancel-orders', 'private', 'POST', {'cost': 2.5})
|
ccxt/alpaca.py
CHANGED
@@ -1289,7 +1289,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1289
1289
|
'tag': None,
|
1290
1290
|
}
|
1291
1291
|
|
1292
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1292
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1293
1293
|
"""
|
1294
1294
|
make a withdrawal
|
1295
1295
|
:see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/alpaca.py
CHANGED
@@ -1289,7 +1289,7 @@ class alpaca(Exchange, ImplicitAPI):
|
|
1289
1289
|
'tag': None,
|
1290
1290
|
}
|
1291
1291
|
|
1292
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1292
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1293
1293
|
"""
|
1294
1294
|
make a withdrawal
|
1295
1295
|
:see: https://docs.alpaca.markets/reference/createcryptotransferforaccount
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.4.
|
5
|
+
__version__ = '4.4.29'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -631,6 +631,9 @@ class Exchange(BaseExchange):
|
|
631
631
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}):
|
632
632
|
raise NotSupported(self.id + ' fetchOrderBook() is not supported yet')
|
633
633
|
|
634
|
+
async def fetch_order_book_ws(self, symbol: str, limit: Int = None, params={}):
|
635
|
+
raise NotSupported(self.id + ' fetchOrderBookWs() is not supported yet')
|
636
|
+
|
634
637
|
async def fetch_margin_mode(self, symbol: str, params={}):
|
635
638
|
if self.has['fetchMarginModes']:
|
636
639
|
marginModes = await self.fetch_margin_modes([symbol], params)
|
ccxt/async_support/bigone.py
CHANGED
@@ -2019,7 +2019,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
2019
2019
|
}
|
2020
2020
|
return self.safe_string(statuses, status, 'failed')
|
2021
2021
|
|
2022
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2022
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2023
2023
|
"""
|
2024
2024
|
make a withdrawal
|
2025
2025
|
:see: https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
|
ccxt/async_support/binance.py
CHANGED
@@ -8481,7 +8481,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8481
8481
|
}
|
8482
8482
|
return result
|
8483
8483
|
|
8484
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
8484
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
8485
8485
|
"""
|
8486
8486
|
make a withdrawal
|
8487
8487
|
:see: https://developers.binance.com/docs/wallet/capital/withdraw
|
ccxt/async_support/bingx.py
CHANGED
@@ -4978,7 +4978,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4978
4978
|
coins = self.safe_list(response, 'data')
|
4979
4979
|
return self.parse_deposit_withdraw_fees(coins, codes, 'coin')
|
4980
4980
|
|
4981
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4981
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4982
4982
|
"""
|
4983
4983
|
make a withdrawal
|
4984
4984
|
:see: https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
|
ccxt/async_support/bitbank.py
CHANGED
@@ -814,7 +814,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
814
814
|
'tag': None,
|
815
815
|
}
|
816
816
|
|
817
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
817
|
+
async 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/async_support/bitfinex.py
CHANGED
@@ -1529,7 +1529,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1529
1529
|
}
|
1530
1530
|
return self.safe_string(statuses, status, status)
|
1531
1531
|
|
1532
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1532
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1533
1533
|
"""
|
1534
1534
|
make a withdrawal
|
1535
1535
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-withdrawal
|
ccxt/async_support/bitfinex2.py
CHANGED
@@ -2459,7 +2459,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2459
2459
|
#
|
2460
2460
|
return self.parse_transactions(response, currency, since, limit)
|
2461
2461
|
|
2462
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2462
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2463
2463
|
"""
|
2464
2464
|
make a withdrawal
|
2465
2465
|
:see: https://docs.bitfinex.com/reference/rest-auth-withdraw
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -775,7 +775,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
775
775
|
# todo unify parsePosition/parsePositions
|
776
776
|
return response
|
777
777
|
|
778
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
778
|
+
async 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/async_support/bitget.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.bitget import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
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
|
11
|
+
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
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import AuthenticationError
|
@@ -106,7 +106,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
106
106
|
'fetchFundingIntervals': False,
|
107
107
|
'fetchFundingRate': True,
|
108
108
|
'fetchFundingRateHistory': True,
|
109
|
-
'fetchFundingRates':
|
109
|
+
'fetchFundingRates': True,
|
110
110
|
'fetchIndexOHLCV': True,
|
111
111
|
'fetchIsolatedBorrowRate': True,
|
112
112
|
'fetchIsolatedBorrowRates': False,
|
@@ -2143,7 +2143,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2143
2143
|
rawTransactions = self.safe_list(response, 'data', [])
|
2144
2144
|
return self.parse_transactions(rawTransactions, currency, since, limit)
|
2145
2145
|
|
2146
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2146
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2147
2147
|
"""
|
2148
2148
|
make a withdrawal
|
2149
2149
|
:see: https://www.bitget.com/api-doc/spot/account/Wallet-Withdrawal
|
@@ -6351,6 +6351,66 @@ class bitget(Exchange, ImplicitAPI):
|
|
6351
6351
|
data = self.safe_value(response, 'data', [])
|
6352
6352
|
return self.parse_funding_rate(data[0], market)
|
6353
6353
|
|
6354
|
+
async def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
6355
|
+
"""
|
6356
|
+
fetch the current funding rates for all markets
|
6357
|
+
:see: https://www.bitget.com/api-doc/contract/market/Get-All-Symbol-Ticker
|
6358
|
+
:param str[] [symbols]: list of unified market symbols
|
6359
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
6360
|
+
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
6361
|
+
:param str [params.productType]: *contract only* 'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
|
6362
|
+
:returns dict: a dictionary of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rates-structure>`, indexed by market symbols
|
6363
|
+
"""
|
6364
|
+
await self.load_markets()
|
6365
|
+
market = None
|
6366
|
+
if symbols is not None:
|
6367
|
+
symbol = self.safe_value(symbols, 0)
|
6368
|
+
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
6369
|
+
if sandboxMode:
|
6370
|
+
sandboxSymbol = self.convert_symbol_for_sandbox(symbol)
|
6371
|
+
market = self.market(sandboxSymbol)
|
6372
|
+
else:
|
6373
|
+
market = self.market(symbol)
|
6374
|
+
request: dict = {}
|
6375
|
+
productType = None
|
6376
|
+
productType, params = self.handle_product_type_and_params(market, params)
|
6377
|
+
request['productType'] = productType
|
6378
|
+
response = await self.publicMixGetV2MixMarketTickers(self.extend(request, params))
|
6379
|
+
# {
|
6380
|
+
# "code": "00000",
|
6381
|
+
# "msg": "success",
|
6382
|
+
# "requestTime": 1700533773477,
|
6383
|
+
# "data": [
|
6384
|
+
# {
|
6385
|
+
# "symbol": "BTCUSD",
|
6386
|
+
# "lastPr": "29904.5",
|
6387
|
+
# "askPr": "29904.5",
|
6388
|
+
# "bidPr": "29903.5",
|
6389
|
+
# "bidSz": "0.5091",
|
6390
|
+
# "askSz": "2.2694",
|
6391
|
+
# "high24h": "0",
|
6392
|
+
# "low24h": "0",
|
6393
|
+
# "ts": "1695794271400",
|
6394
|
+
# "change24h": "0",
|
6395
|
+
# "baseVolume": "0",
|
6396
|
+
# "quoteVolume": "0",
|
6397
|
+
# "usdtVolume": "0",
|
6398
|
+
# "openUtc": "0",
|
6399
|
+
# "changeUtc24h": "0",
|
6400
|
+
# "indexPrice": "29132.353333",
|
6401
|
+
# "fundingRate": "-0.0007",
|
6402
|
+
# "holdingAmount": "125.6844",
|
6403
|
+
# "deliveryStartTime": null,
|
6404
|
+
# "deliveryTime": null,
|
6405
|
+
# "deliveryStatus": "delivery_normal",
|
6406
|
+
# "open24h": "0",
|
6407
|
+
# "markPrice": "12345"
|
6408
|
+
# },
|
6409
|
+
# ]
|
6410
|
+
# }
|
6411
|
+
data = self.safe_list(response, 'data', [])
|
6412
|
+
return self.parse_funding_rates(data, market)
|
6413
|
+
|
6354
6414
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
6355
6415
|
#
|
6356
6416
|
# fetchFundingRate
|
@@ -6367,23 +6427,51 @@ class bitget(Exchange, ImplicitAPI):
|
|
6367
6427
|
# "nextFundingTime": "1727942400000",
|
6368
6428
|
# "ratePeriod": "8"
|
6369
6429
|
# }
|
6370
|
-
#
|
6430
|
+
# fetchFundingRates
|
6431
|
+
# {
|
6432
|
+
# "symbol": "BTCUSD",
|
6433
|
+
# "lastPr": "29904.5",
|
6434
|
+
# "askPr": "29904.5",
|
6435
|
+
# "bidPr": "29903.5",
|
6436
|
+
# "bidSz": "0.5091",
|
6437
|
+
# "askSz": "2.2694",
|
6438
|
+
# "high24h": "0",
|
6439
|
+
# "low24h": "0",
|
6440
|
+
# "ts": "1695794271400",
|
6441
|
+
# "change24h": "0",
|
6442
|
+
# "baseVolume": "0",
|
6443
|
+
# "quoteVolume": "0",
|
6444
|
+
# "usdtVolume": "0",
|
6445
|
+
# "openUtc": "0",
|
6446
|
+
# "changeUtc24h": "0",
|
6447
|
+
# "indexPrice": "29132.353333",
|
6448
|
+
# "fundingRate": "-0.0007",
|
6449
|
+
# "holdingAmount": "125.6844",
|
6450
|
+
# "deliveryStartTime": null,
|
6451
|
+
# "deliveryTime": null,
|
6452
|
+
# "deliveryStatus": "delivery_normal",
|
6453
|
+
# "open24h": "0",
|
6454
|
+
# "markPrice": "12345"
|
6455
|
+
# }
|
6371
6456
|
marketId = self.safe_string(contract, 'symbol')
|
6372
6457
|
symbol = self.safe_symbol(marketId, market, None, 'swap')
|
6373
6458
|
fundingTimestamp = self.safe_integer(contract, 'nextFundingTime')
|
6374
6459
|
interval = self.safe_string(contract, 'ratePeriod')
|
6460
|
+
timestamp = self.safe_integer(contract, 'ts')
|
6461
|
+
markPrice = self.safe_number(contract, 'markPrice')
|
6462
|
+
indexPrice = self.safe_number(contract, 'indexPrice')
|
6375
6463
|
intervalString = None
|
6376
6464
|
if interval is not None:
|
6377
6465
|
intervalString = interval + 'h'
|
6378
6466
|
return {
|
6379
6467
|
'info': contract,
|
6380
6468
|
'symbol': symbol,
|
6381
|
-
'markPrice':
|
6382
|
-
'indexPrice':
|
6469
|
+
'markPrice': markPrice,
|
6470
|
+
'indexPrice': indexPrice,
|
6383
6471
|
'interestRate': None,
|
6384
6472
|
'estimatedSettlePrice': None,
|
6385
|
-
'timestamp':
|
6386
|
-
'datetime':
|
6473
|
+
'timestamp': timestamp,
|
6474
|
+
'datetime': self.iso8601(timestamp),
|
6387
6475
|
'fundingRate': self.safe_number(contract, 'fundingRate'),
|
6388
6476
|
'fundingTimestamp': fundingTimestamp,
|
6389
6477
|
'fundingDatetime': self.iso8601(fundingTimestamp),
|
ccxt/async_support/bithumb.py
CHANGED
@@ -983,7 +983,7 @@ class bithumb(Exchange, ImplicitAPI):
|
|
983
983
|
}
|
984
984
|
return await self.cancel_order(order['id'], order['symbol'], self.extend(request, params))
|
985
985
|
|
986
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
986
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
987
987
|
"""
|
988
988
|
make a withdrawal
|
989
989
|
: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/async_support/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
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3280
|
+
async 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/async_support/bitmex.py
CHANGED
@@ -2285,7 +2285,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2285
2285
|
'takeProfitPrice': None,
|
2286
2286
|
})
|
2287
2287
|
|
2288
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
2288
|
+
async 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/async_support/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 = await 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 = await 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 = await 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
|
await self.load_markets()
|
457
457
|
response = await 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 = await 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
|
await self.load_markets()
|
633
633
|
response = await 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 = await 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
|
await self.load_markets()
|
843
843
|
response = await 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 = await self.privateDeleteOrdersPair(self.extend(request, params))
|
1102
1102
|
else:
|
1103
1103
|
response = await 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 = await 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 = await 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 = await 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 = await 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 = await 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
|
-
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1503
|
+
async 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 = await self.privatePostWalletWithdrawCurrency(self.extend(request, params))
|
1534
|
-
result = self.
|
1534
|
+
result = self.safe_dict(response, 'data', {})
|
1535
1535
|
#
|
1536
1536
|
# {
|
1537
1537
|
# "data":{
|