ccxt 4.4.71__py2.py3-none-any.whl → 4.4.73__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 -3
- ccxt/abstract/bingx.py +1 -1
- ccxt/ace.py +36 -1
- ccxt/alpaca.py +46 -0
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/ace.py +36 -1
- ccxt/async_support/alpaca.py +46 -0
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +19 -15
- ccxt/async_support/bingx.py +2 -2
- ccxt/async_support/bit2c.py +11 -0
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex1.py +1 -1
- ccxt/async_support/bitget.py +6 -5
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bl3p.py +2 -2
- ccxt/async_support/bybit.py +32 -25
- ccxt/async_support/cex.py +1 -0
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinbaseexchange.py +3 -2
- ccxt/async_support/coinbaseinternational.py +3 -2
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/defx.py +1 -1
- ccxt/async_support/deribit.py +2 -1
- ccxt/async_support/derive.py +13 -7
- ccxt/async_support/gate.py +3 -0
- ccxt/async_support/gemini.py +2 -1
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hyperliquid.py +38 -0
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +4 -0
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +21 -30
- ccxt/async_support/paradex.py +65 -7
- ccxt/async_support/paymium.py +1 -1
- ccxt/async_support/poloniex.py +2 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/whitebit.py +98 -2
- ccxt/async_support/woo.py +3 -1
- ccxt/async_support/woofipro.py +1 -1
- ccxt/async_support/yobit.py +2 -1
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +13 -12
- ccxt/binance.py +19 -15
- ccxt/bingx.py +2 -2
- ccxt/bit2c.py +11 -0
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex1.py +1 -1
- ccxt/bitget.py +6 -5
- ccxt/bitrue.py +1 -1
- ccxt/bl3p.py +2 -2
- ccxt/bybit.py +32 -25
- ccxt/cex.py +1 -0
- ccxt/coinbase.py +3 -2
- ccxt/coinbaseexchange.py +3 -2
- ccxt/coinbaseinternational.py +3 -2
- ccxt/coinex.py +1 -1
- ccxt/defx.py +1 -1
- ccxt/deribit.py +2 -1
- ccxt/derive.py +13 -7
- ccxt/gate.py +3 -0
- ccxt/gemini.py +2 -1
- ccxt/hitbtc.py +1 -1
- ccxt/hyperliquid.py +38 -0
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +4 -0
- ccxt/kucoin.py +1 -1
- ccxt/kuna.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +21 -30
- ccxt/paradex.py +65 -7
- ccxt/paymium.py +1 -1
- ccxt/poloniex.py +2 -1
- ccxt/pro/__init__.py +1 -3
- ccxt/pro/bingx.py +1 -1
- ccxt/pro/bitmart.py +15 -7
- ccxt/pro/derive.py +2 -2
- ccxt/pro/krakenfutures.py +1 -1
- ccxt/test/tests_async.py +6 -3
- ccxt/test/tests_sync.py +6 -3
- ccxt/upbit.py +1 -1
- ccxt/whitebit.py +98 -2
- ccxt/woo.py +3 -1
- ccxt/woofipro.py +1 -1
- ccxt/yobit.py +2 -1
- {ccxt-4.4.71.dist-info → ccxt-4.4.73.dist-info}/METADATA +5 -5
- {ccxt-4.4.71.dist-info → ccxt-4.4.73.dist-info}/RECORD +98 -99
- ccxt/abstract/bitfinex1.py +0 -69
- {ccxt-4.4.71.dist-info → ccxt-4.4.73.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.71.dist-info → ccxt-4.4.73.dist-info}/WHEEL +0 -0
- {ccxt-4.4.71.dist-info → ccxt-4.4.73.dist-info}/top_level.txt +0 -0
ccxt/upbit.py
CHANGED
@@ -1886,7 +1886,7 @@ class upbit(Exchange, ImplicitAPI):
|
|
1886
1886
|
#
|
1887
1887
|
return self.parse_deposit_address(response)
|
1888
1888
|
|
1889
|
-
def create_deposit_address(self, code: str, params={}):
|
1889
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1890
1890
|
"""
|
1891
1891
|
|
1892
1892
|
https://docs.upbit.com/reference/%EC%9E%85%EA%B8%88-%EC%A3%BC%EC%86%8C-%EC%83%9D%EC%84%B1-%EC%9A%94%EC%B2%AD
|
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 Any, Balances, BorrowInterest, Bool, Conversion, Currencies, Currency, DepositAddress, FundingHistory, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Any, Balances, BorrowInterest, Bool, Conversion, CrossBorrowRate, Currencies, Currency, DepositAddress, FundingHistory, Int, Market, MarketType, Num, Order, OrderBook, OrderSide, OrderType, Position, 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
|
@@ -46,13 +46,16 @@ class whitebit(Exchange, ImplicitAPI):
|
|
46
46
|
'cancelOrder': True,
|
47
47
|
'cancelOrders': False,
|
48
48
|
'createConvertTrade': True,
|
49
|
+
'createDepositAddress': True,
|
49
50
|
'createMarketBuyOrderWithCost': True,
|
50
51
|
'createMarketOrderWithCost': False,
|
51
52
|
'createMarketSellOrderWithCost': False,
|
52
53
|
'createOrder': True,
|
54
|
+
'createPostOnlyOrder': True,
|
53
55
|
'createStopLimitOrder': True,
|
54
56
|
'createStopMarketOrder': True,
|
55
57
|
'createStopOrder': True,
|
58
|
+
'createTriggerOrder': True,
|
56
59
|
'editOrder': False,
|
57
60
|
'fetchBalance': True,
|
58
61
|
'fetchBorrowRateHistories': False,
|
@@ -61,7 +64,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
61
64
|
'fetchConvertQuote': True,
|
62
65
|
'fetchConvertTrade': False,
|
63
66
|
'fetchConvertTradeHistory': True,
|
64
|
-
'fetchCrossBorrowRate':
|
67
|
+
'fetchCrossBorrowRate': True,
|
65
68
|
'fetchCrossBorrowRates': False,
|
66
69
|
'fetchCurrencies': True,
|
67
70
|
'fetchDeposit': True,
|
@@ -1375,6 +1378,10 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1375
1378
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1376
1379
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1377
1380
|
:param float [params.cost]: *market orders only* the cost of the order in units of the base currency
|
1381
|
+
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
1382
|
+
:param bool [params.postOnly]: If True, the order will only be posted to the order book and not executed immediately
|
1383
|
+
:param str [params.clientOrderId]: a unique id for the order
|
1384
|
+
:param str [params.marginMode]: 'cross' or 'isolated', for margin trading, uses self.options.defaultMarginMode if not passed, defaults to None/None/None
|
1378
1385
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1379
1386
|
"""
|
1380
1387
|
self.load_markets()
|
@@ -2001,6 +2008,60 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2001
2008
|
'tag': tag,
|
2002
2009
|
}
|
2003
2010
|
|
2011
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2012
|
+
"""
|
2013
|
+
create a currency deposit address
|
2014
|
+
|
2015
|
+
https://docs.whitebit.com/private/http-main-v4/#create-new-address-for-deposit
|
2016
|
+
|
2017
|
+
:param str code: unified currency code of the currency for the deposit address
|
2018
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2019
|
+
:param str [params.network]: the blockchain network to create a deposit address on
|
2020
|
+
:param str [params.type]: address type, available for specific currencies
|
2021
|
+
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
2022
|
+
"""
|
2023
|
+
self.load_markets()
|
2024
|
+
currency = self.currency(code)
|
2025
|
+
request: dict = {
|
2026
|
+
'ticker': currency['id'],
|
2027
|
+
}
|
2028
|
+
response = self.v4PrivatePostMainAccountCreateNewAddress(self.extend(request, params))
|
2029
|
+
#
|
2030
|
+
# {
|
2031
|
+
# "account": {
|
2032
|
+
# "address": "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN",
|
2033
|
+
# "memo": "48565488244493"
|
2034
|
+
# },
|
2035
|
+
# "required": {
|
2036
|
+
# "maxAmount": "0",
|
2037
|
+
# "minAmount": "1",
|
2038
|
+
# "fixedFee": "0",
|
2039
|
+
# "flexFee": {
|
2040
|
+
# "maxFee": "0",
|
2041
|
+
# "minFee": "0",
|
2042
|
+
# "percent": "0"
|
2043
|
+
# }
|
2044
|
+
# }
|
2045
|
+
# }
|
2046
|
+
#
|
2047
|
+
data = self.safe_dict(response, 'account', {})
|
2048
|
+
return self.parse_deposit_address(data, currency)
|
2049
|
+
|
2050
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
2051
|
+
#
|
2052
|
+
# {
|
2053
|
+
# "address": "GDTSOI56XNVAKJNJBLJGRNZIVOCIZJRBIDKTWSCYEYNFAZEMBLN75RMN",
|
2054
|
+
# "memo": "48565488244493"
|
2055
|
+
# },
|
2056
|
+
#
|
2057
|
+
return {
|
2058
|
+
'info': depositAddress,
|
2059
|
+
'currency': self.safe_currency_code(None, currency),
|
2060
|
+
'network': None,
|
2061
|
+
'address': self.safe_string(depositAddress, 'address'),
|
2062
|
+
'tag': self.safe_string(depositAddress, 'memo'),
|
2063
|
+
}
|
2064
|
+
|
2004
2065
|
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
2005
2066
|
"""
|
2006
2067
|
set the level of leverage for a market
|
@@ -3069,6 +3130,41 @@ class whitebit(Exchange, ImplicitAPI):
|
|
3069
3130
|
'takeProfitPrice': self.safe_number(tpsl, 'takeProfit'),
|
3070
3131
|
})
|
3071
3132
|
|
3133
|
+
def fetch_cross_borrow_rate(self, code: str, params={}) -> CrossBorrowRate:
|
3134
|
+
"""
|
3135
|
+
fetch the rate of interest to borrow a currency for margin trading
|
3136
|
+
|
3137
|
+
https://docs.whitebit.com/private/http-main-v4/#get-plans
|
3138
|
+
|
3139
|
+
:param str code: unified currency code
|
3140
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3141
|
+
:returns dict: a `borrow rate structure <https://docs.ccxt.com/#/?id=borrow-rate-structure>`
|
3142
|
+
"""
|
3143
|
+
self.load_markets()
|
3144
|
+
currency = self.currency(code)
|
3145
|
+
request: dict = {
|
3146
|
+
'ticker': currency['id'],
|
3147
|
+
}
|
3148
|
+
response = self.v4PrivatePostMainAccountSmartPlans(self.extend(request, params))
|
3149
|
+
#
|
3150
|
+
#
|
3151
|
+
data = self.safe_list(response, 0, [])
|
3152
|
+
return self.parse_borrow_rate(data, currency)
|
3153
|
+
|
3154
|
+
def parse_borrow_rate(self, info, currency: Currency = None):
|
3155
|
+
#
|
3156
|
+
#
|
3157
|
+
currencyId = self.safe_string(info, 'ticker')
|
3158
|
+
percent = self.safe_string(info, 'percent')
|
3159
|
+
return {
|
3160
|
+
'currency': self.safe_currency_code(currencyId, currency),
|
3161
|
+
'rate': self.parse_number(Precise.string_div(percent, '100')),
|
3162
|
+
'period': self.safe_integer(info, 'duration'),
|
3163
|
+
'timestamp': None,
|
3164
|
+
'datetime': None,
|
3165
|
+
'info': info,
|
3166
|
+
}
|
3167
|
+
|
3072
3168
|
def is_fiat(self, currency: str) -> bool:
|
3073
3169
|
fiatCurrencies = self.safe_value(self.options, 'fiatCurrencies', [])
|
3074
3170
|
return self.in_array(currency, fiatCurrencies)
|
ccxt/woo.py
CHANGED
@@ -563,6 +563,7 @@ class woo(Exchange, ImplicitAPI):
|
|
563
563
|
symbol = base + '/' + quote
|
564
564
|
contractSize: Num = None
|
565
565
|
linear: Bool = None
|
566
|
+
inverse: Bool = None
|
566
567
|
margin = True
|
567
568
|
contract = swap
|
568
569
|
if contract:
|
@@ -572,6 +573,7 @@ class woo(Exchange, ImplicitAPI):
|
|
572
573
|
symbol = base + '/' + quote + ':' + settle
|
573
574
|
contractSize = self.parse_number('1')
|
574
575
|
linear = True
|
576
|
+
inverse = False
|
575
577
|
return {
|
576
578
|
'id': marketId,
|
577
579
|
'symbol': symbol,
|
@@ -590,7 +592,7 @@ class woo(Exchange, ImplicitAPI):
|
|
590
592
|
'active': self.safe_string(market, 'is_trading') == '1',
|
591
593
|
'contract': contract,
|
592
594
|
'linear': linear,
|
593
|
-
'inverse':
|
595
|
+
'inverse': inverse,
|
594
596
|
'contractSize': contractSize,
|
595
597
|
'expiry': None,
|
596
598
|
'expiryDatetime': None,
|
ccxt/woofipro.py
CHANGED
ccxt/yobit.py
CHANGED
@@ -1216,7 +1216,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
1216
1216
|
result.append(trade)
|
1217
1217
|
return self.filter_by_symbol_since_limit(result, market['symbol'], since, limit)
|
1218
1218
|
|
1219
|
-
def create_deposit_address(self, code: str, params={}):
|
1219
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1220
1220
|
"""
|
1221
1221
|
|
1222
1222
|
https://yobit.net/en/api
|
@@ -1236,6 +1236,7 @@ class yobit(Exchange, ImplicitAPI):
|
|
1236
1236
|
'currency': code,
|
1237
1237
|
'address': address,
|
1238
1238
|
'tag': None,
|
1239
|
+
'network': None,
|
1239
1240
|
'info': response['info'],
|
1240
1241
|
}
|
1241
1242
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.73
|
4
4
|
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
|
5
5
|
Home-page: https://ccxt.com
|
6
6
|
Author: Igor Kroitor
|
@@ -49,7 +49,7 @@ Requires-Dist: mypy==1.6.1; extra == "type"
|
|
49
49
|
|
50
50
|
# CCXT – CryptoCurrency eXchange Trading Library
|
51
51
|
|
52
|
-
[](https://www.npmjs.com/package/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.nuget.org/packages/ccxt) [](https://godoc.org/github.com/ccxt/ccxt/go/v4) [](https://discord.gg/ccxt) [](https://www.npmjs.com/package/ccxt) [](https://npmjs.com/package/ccxt) [](https://pypi.python.org/pypi/ccxt) [](https://www.nuget.org/packages/ccxt) [](https://godoc.org/github.com/ccxt/ccxt/go/v4) [](https://discord.gg/ccxt) [](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [](https://x.com/ccxt_official)
|
53
53
|
|
54
54
|
A `JavaScript` / `Python` / `PHP` / `C#` / `Go` library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs.
|
55
55
|
|
@@ -275,13 +275,13 @@ console.log(version, Object.keys(exchanges));
|
|
275
275
|
|
276
276
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
277
277
|
|
278
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
279
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
278
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.73/dist/ccxt.browser.min.js
|
279
|
+
* unpkg: https://unpkg.com/ccxt@4.4.73/dist/ccxt.browser.min.js
|
280
280
|
|
281
281
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
282
282
|
|
283
283
|
```HTML
|
284
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
284
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.73/dist/ccxt.browser.min.js"></script>
|
285
285
|
```
|
286
286
|
|
287
287
|
Creates a global `ccxt` object:
|