ccxt 4.4.25__py2.py3-none-any.whl → 4.4.27__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 +3 -0
- ccxt/abstract/bingx.py +1 -0
- ccxt/abstract/hyperliquid.py +1 -1
- ccxt/abstract/okx.py +1 -0
- ccxt/abstract/phemex.py +1 -0
- ccxt/ace.py +1 -1
- ccxt/alpaca.py +426 -17
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/alpaca.py +426 -17
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +24 -6
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +6 -7
- ccxt/async_support/binancecoinm.py +1 -1
- ccxt/async_support/binanceus.py +1 -1
- ccxt/async_support/binanceusdm.py +1 -1
- ccxt/async_support/bingx.py +29 -29
- ccxt/async_support/bit2c.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitbns.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 +6 -6
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +7 -7
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +10 -16
- ccxt/async_support/cex.py +36 -0
- ccxt/async_support/coinbase.py +89 -11
- ccxt/async_support/coinex.py +6 -8
- ccxt/async_support/digifinex.py +5 -5
- ccxt/async_support/exmo.py +1 -0
- ccxt/async_support/gate.py +26 -22
- ccxt/async_support/htx.py +5 -6
- ccxt/async_support/hyperliquid.py +31 -5
- ccxt/async_support/kucoin.py +5 -5
- ccxt/async_support/lbank.py +97 -2
- ccxt/async_support/okx.py +6 -5
- ccxt/async_support/phemex.py +4 -2
- ccxt/async_support/wavesexchange.py +13 -2
- ccxt/async_support/whitebit.py +5 -5
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/xt.py +32 -24
- ccxt/base/exchange.py +29 -6
- ccxt/base/types.py +12 -0
- ccxt/bequant.py +1 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +6 -7
- ccxt/binancecoinm.py +1 -1
- ccxt/binanceus.py +1 -1
- ccxt/binanceusdm.py +1 -1
- ccxt/bingx.py +29 -29
- ccxt/bit2c.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +6 -6
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +7 -7
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +1 -1
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/bl3p.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +1 -1
- ccxt/btcalpha.py +1 -1
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +10 -16
- ccxt/cex.py +36 -0
- ccxt/coinbase.py +89 -11
- ccxt/coinex.py +6 -8
- ccxt/digifinex.py +5 -5
- ccxt/exmo.py +1 -0
- ccxt/gate.py +26 -22
- ccxt/htx.py +5 -6
- ccxt/hyperliquid.py +31 -5
- ccxt/kucoin.py +5 -5
- ccxt/lbank.py +97 -2
- ccxt/okx.py +6 -5
- ccxt/phemex.py +4 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -2
- ccxt/pro/bybit.py +1 -1
- ccxt/pro/exmo.py +204 -4
- ccxt/pro/lbank.py +7 -4
- ccxt/pro/okx.py +1 -1
- ccxt/test/tests_helpers.py +3 -1
- ccxt/wavesexchange.py +13 -2
- ccxt/whitebit.py +5 -5
- ccxt/woo.py +1 -1
- ccxt/xt.py +32 -24
- ccxt-4.4.27.dist-info/METADATA +637 -0
- {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/RECORD +122 -122
- ccxt-4.4.25.dist-info/METADATA +0 -636
- {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/WHEEL +0 -0
- {ccxt-4.4.25.dist-info → ccxt-4.4.27.dist-info}/top_level.txt +0 -0
ccxt/whitebit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.whitebit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, BorrowInterest, Bool, Currencies, Currency, DepositAddress, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -2144,7 +2144,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2144
2144
|
records = self.safe_list(response, 'records', [])
|
2145
2145
|
return self.parse_transactions(records, currency, since, limit)
|
2146
2146
|
|
2147
|
-
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2147
|
+
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
|
2148
2148
|
"""
|
2149
2149
|
fetch the interest owed by the user for borrowing currency for margin trading
|
2150
2150
|
:see: https://docs.whitebit.com/private/http-trade-v4/#open-positions
|
@@ -2186,7 +2186,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2186
2186
|
interest = self.parse_borrow_interests(response, market)
|
2187
2187
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
2188
2188
|
|
2189
|
-
def parse_borrow_interest(self, info: dict, market: Market = None):
|
2189
|
+
def parse_borrow_interest(self, info: dict, market: Market = None) -> BorrowInterest:
|
2190
2190
|
#
|
2191
2191
|
# {
|
2192
2192
|
# "positionId": 191823,
|
@@ -2210,15 +2210,15 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2210
2210
|
symbol = self.safe_symbol(marketId, market, '_')
|
2211
2211
|
timestamp = self.safe_timestamp(info, 'modifyDate')
|
2212
2212
|
return {
|
2213
|
+
'info': info,
|
2213
2214
|
'symbol': symbol,
|
2214
|
-
'marginMode': 'cross',
|
2215
2215
|
'currency': 'USDT',
|
2216
2216
|
'interest': self.safe_number(info, 'unrealizedFunding'),
|
2217
2217
|
'interestRate': 0.00098, # https://whitebit.com/fees
|
2218
2218
|
'amountBorrowed': self.safe_number(info, 'amount'),
|
2219
|
+
'marginMode': 'cross',
|
2219
2220
|
'timestamp': timestamp,
|
2220
2221
|
'datetime': self.iso8601(timestamp),
|
2221
|
-
'info': info,
|
2222
2222
|
}
|
2223
2223
|
|
2224
2224
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
ccxt/woo.py
CHANGED
@@ -2332,7 +2332,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2332
2332
|
#
|
2333
2333
|
return self.parse_transaction(response, currency)
|
2334
2334
|
|
2335
|
-
def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
|
2335
|
+
def repay_margin(self, code: str, amount: float, symbol: Str = None, params={}):
|
2336
2336
|
"""
|
2337
2337
|
repay borrowed margin and interest
|
2338
2338
|
:see: https://docs.woo.org/#repay-interest
|
ccxt/xt.py
CHANGED
@@ -1905,6 +1905,17 @@ class xt(Exchange, ImplicitAPI):
|
|
1905
1905
|
# "b": True
|
1906
1906
|
# }
|
1907
1907
|
#
|
1908
|
+
# spot: watchTrades
|
1909
|
+
#
|
1910
|
+
# {
|
1911
|
+
# s: 'btc_usdt',
|
1912
|
+
# i: '228825383103928709',
|
1913
|
+
# t: 1684258222702,
|
1914
|
+
# p: '27003.65',
|
1915
|
+
# q: '0.000796',
|
1916
|
+
# b: True
|
1917
|
+
# }
|
1918
|
+
#
|
1908
1919
|
# spot: watchMyTrades
|
1909
1920
|
#
|
1910
1921
|
# {
|
@@ -1917,17 +1928,6 @@ class xt(Exchange, ImplicitAPI):
|
|
1917
1928
|
# "v": "90000" # volume trade amount
|
1918
1929
|
# }
|
1919
1930
|
#
|
1920
|
-
# spot: watchTrades
|
1921
|
-
#
|
1922
|
-
# {
|
1923
|
-
# s: 'btc_usdt',
|
1924
|
-
# i: '228825383103928709',
|
1925
|
-
# t: 1684258222702,
|
1926
|
-
# p: '27003.65',
|
1927
|
-
# q: '0.000796',
|
1928
|
-
# b: True
|
1929
|
-
# }
|
1930
|
-
#
|
1931
1931
|
# swap and future: fetchTrades
|
1932
1932
|
#
|
1933
1933
|
# {
|
@@ -2006,19 +2006,27 @@ class xt(Exchange, ImplicitAPI):
|
|
2006
2006
|
if marketType is None:
|
2007
2007
|
marketType = 'spot' if hasSpotKeys else 'contract'
|
2008
2008
|
market = self.safe_market(marketId, market, '_', marketType)
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2009
|
+
side = None
|
2010
|
+
takerOrMaker = None
|
2011
|
+
isBuyerMaker = self.safe_bool(trade, 'b')
|
2012
|
+
if isBuyerMaker is not None:
|
2013
|
+
side = 'sell' if isBuyerMaker else 'buy'
|
2014
|
+
takerOrMaker = 'taker' # public trades always taker
|
2015
|
+
else:
|
2016
|
+
takerMaker = self.safe_string_lower(trade, 'takerMaker')
|
2017
|
+
if takerMaker is not None:
|
2018
|
+
takerOrMaker = takerMaker
|
2019
|
+
else:
|
2020
|
+
isMaker = self.safe_bool(trade, 'isMaker')
|
2021
|
+
if isMaker is not None:
|
2022
|
+
takerOrMaker = 'maker' if isMaker else 'taker'
|
2023
|
+
orderSide = self.safe_string_lower(trade, 'orderSide')
|
2024
|
+
if orderSide is not None:
|
2025
|
+
side = orderSide
|
2026
|
+
else:
|
2027
|
+
bidOrAsk = self.safe_string(trade, 'm')
|
2028
|
+
if bidOrAsk is not None:
|
2029
|
+
side = 'buy' if (bidOrAsk == 'BID') else 'sell'
|
2022
2030
|
timestamp = self.safe_integer_n(trade, ['t', 'time', 'timestamp'])
|
2023
2031
|
quantity = self.safe_string_2(trade, 'q', 'quantity')
|
2024
2032
|
amount = None
|