ccxt 4.2.73__py2.py3-none-any.whl → 4.2.75__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 +3 -1
- ccxt/abstract/tradeogre.py +16 -0
- ccxt/ascendex.py +5 -4
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/ascendex.py +5 -4
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bitget.py +53 -43
- ccxt/async_support/bitmart.py +2 -0
- ccxt/async_support/bybit.py +84 -29
- ccxt/async_support/coinbase.py +4 -4
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coinbasepro.py +2 -2
- ccxt/async_support/coinex.py +4 -3
- ccxt/async_support/coinlist.py +2 -2
- ccxt/async_support/cryptocom.py +2 -2
- ccxt/async_support/currencycom.py +2 -2
- ccxt/async_support/deribit.py +2 -2
- ccxt/async_support/gate.py +1 -0
- ccxt/async_support/htx.py +16 -9
- ccxt/async_support/huobijp.py +2 -2
- ccxt/async_support/hyperliquid.py +2 -1
- ccxt/async_support/kraken.py +3 -3
- ccxt/async_support/kucoin.py +3 -3
- ccxt/async_support/luno.py +2 -2
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/novadax.py +2 -2
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/tradeogre.py +598 -0
- ccxt/async_support/woo.py +2 -2
- ccxt/base/exchange.py +3 -3
- ccxt/base/types.py +8 -1
- ccxt/bitget.py +53 -43
- ccxt/bitmart.py +2 -0
- ccxt/bybit.py +84 -29
- ccxt/coinbase.py +4 -4
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coinbasepro.py +2 -2
- ccxt/coinex.py +4 -3
- ccxt/coinlist.py +2 -2
- ccxt/cryptocom.py +2 -2
- ccxt/currencycom.py +2 -2
- ccxt/deribit.py +2 -2
- ccxt/gate.py +1 -0
- ccxt/htx.py +16 -9
- ccxt/huobijp.py +2 -2
- ccxt/hyperliquid.py +2 -1
- ccxt/kraken.py +3 -3
- ccxt/kucoin.py +3 -3
- ccxt/luno.py +2 -2
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +2 -2
- ccxt/novadax.py +2 -2
- ccxt/okx.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/krakenfutures.py +8 -7
- ccxt/test/base/test_market.py +1 -1
- ccxt/test/test_async.py +16 -12
- ccxt/test/test_sync.py +16 -12
- ccxt/tradeogre.py +598 -0
- ccxt/woo.py +2 -2
- {ccxt-4.2.73.dist-info → ccxt-4.2.75.dist-info}/METADATA +11 -10
- {ccxt-4.2.73.dist-info → ccxt-4.2.75.dist-info}/RECORD +65 -62
- {ccxt-4.2.73.dist-info → ccxt-4.2.75.dist-info}/WHEEL +0 -0
- {ccxt-4.2.73.dist-info → ccxt-4.2.75.dist-info}/top_level.txt +0 -0
ccxt/luno.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.luno import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
8
|
+
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -268,7 +268,7 @@ class luno(Exchange, ImplicitAPI):
|
|
268
268
|
})
|
269
269
|
return result
|
270
270
|
|
271
|
-
def fetch_accounts(self, params={}):
|
271
|
+
def fetch_accounts(self, params={}) -> List[Account]:
|
272
272
|
"""
|
273
273
|
fetch all the accounts associated with a profile
|
274
274
|
:see: https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
|
ccxt/mexc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.mexc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, IndexType, Int, Leverage, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currency, IndexType, Int, Leverage, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -3319,7 +3319,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
3319
3319
|
return self.safe_value(response, 'data')
|
3320
3320
|
return None
|
3321
3321
|
|
3322
|
-
def fetch_accounts(self, params={}):
|
3322
|
+
def fetch_accounts(self, params={}) -> List[Account]:
|
3323
3323
|
"""
|
3324
3324
|
fetch all the accounts associated with a profile
|
3325
3325
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
ccxt/ndax.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.ndax import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import json
|
10
|
-
from ccxt.base.types import Balances, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
|
10
|
+
from ccxt.base.types import Account, Balances, Currency, IndexType, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import BadSymbol
|
@@ -962,7 +962,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
962
962
|
#
|
963
963
|
return self.parse_trades(response, market, since, limit)
|
964
964
|
|
965
|
-
def fetch_accounts(self, params={}):
|
965
|
+
def fetch_accounts(self, params={}) -> List[Account]:
|
966
966
|
"""
|
967
967
|
fetch all the accounts associated with a profile
|
968
968
|
:see: https://apidoc.ndax.io/#getuseraccounts
|
ccxt/novadax.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.novadax import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1185,7 +1185,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1185
1185
|
#
|
1186
1186
|
return self.parse_transaction(response, currency)
|
1187
1187
|
|
1188
|
-
def fetch_accounts(self, params={}):
|
1188
|
+
def fetch_accounts(self, params={}) -> List[Account]:
|
1189
1189
|
"""
|
1190
1190
|
fetch all the accounts associated with a profile
|
1191
1191
|
:see: https://doc.novadax.com/en-US/#get-sub-account-list
|
ccxt/okx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Leverage, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currency, Greeks, Int, Leverage, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1275,7 +1275,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1275
1275
|
first = self.safe_value(data, 0, {})
|
1276
1276
|
return self.safe_integer(first, 'ts')
|
1277
1277
|
|
1278
|
-
def fetch_accounts(self, params={}):
|
1278
|
+
def fetch_accounts(self, params={}) -> List[Account]:
|
1279
1279
|
"""
|
1280
1280
|
fetch all the accounts associated with a profile
|
1281
1281
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/krakenfutures.py
CHANGED
@@ -437,15 +437,16 @@ class krakenfutures(ccxt.async_support.krakenfutures):
|
|
437
437
|
market = self.market(marketId)
|
438
438
|
symbol = market['symbol']
|
439
439
|
messageHash = 'trade:' + symbol
|
440
|
-
|
441
|
-
if tradesArray is None:
|
440
|
+
if self.safe_list(self.trades, symbol) is None:
|
442
441
|
tradesLimit = self.safe_integer(self.options, 'tradesLimit', 1000)
|
443
|
-
|
444
|
-
|
442
|
+
self.trades[symbol] = ArrayCache(tradesLimit)
|
443
|
+
tradesArray = self.trades[symbol]
|
445
444
|
if channel == 'trade_snapshot':
|
446
|
-
trades = self.
|
447
|
-
|
448
|
-
|
445
|
+
trades = self.safe_list(message, 'trades', [])
|
446
|
+
length = len(trades)
|
447
|
+
for i in range(0, length):
|
448
|
+
index = length - 1 - i # need reverse to correct chronology
|
449
|
+
item = trades[index]
|
449
450
|
trade = self.parse_ws_trade(item)
|
450
451
|
tradesArray.append(trade)
|
451
452
|
else:
|
ccxt/test/base/test_market.py
CHANGED
@@ -68,7 +68,7 @@ def test_market(exchange, skipped_properties, method, market):
|
|
68
68
|
test_shared_methods.assert_symbol(exchange, skipped_properties, method, market, 'symbol')
|
69
69
|
log_text = test_shared_methods.log_template(exchange, method, market)
|
70
70
|
#
|
71
|
-
valid_types = ['spot', 'margin', 'swap', 'future', 'option']
|
71
|
+
valid_types = ['spot', 'margin', 'swap', 'future', 'option', 'index']
|
72
72
|
test_shared_methods.assert_in_array(exchange, skipped_properties, method, market, 'type', valid_types)
|
73
73
|
has_index = ('index' in market) # todo: add in all
|
74
74
|
# check if string is consistent with 'type'
|
ccxt/test/test_async.py
CHANGED
@@ -459,18 +459,22 @@ class testMainClass(baseMainTestClass):
|
|
459
459
|
# get "method-specific" skips
|
460
460
|
skips_for_method = exchange.safe_value(self.skipped_methods, method_name, {})
|
461
461
|
# get "object-specific" skips
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
462
|
+
object_skips = {
|
463
|
+
'orderBook': ['fetchOrderBook', 'fetchOrderBooks', 'fetchL2OrderBook', 'watchOrderBook', 'watchOrderBookForSymbols'],
|
464
|
+
'ticker': ['fetchTicker', 'fetchTickers', 'watchTicker', 'watchTickers'],
|
465
|
+
'trade': ['fetchTrades', 'watchTrades', 'watchTradesForSymbols'],
|
466
|
+
'ohlcv': ['fetchOHLCV', 'watchOHLCV', 'watchOHLCVForSymbols'],
|
467
|
+
'ledger': ['fetchLedger', 'fetchLedgerEntry'],
|
468
|
+
'depositWithdraw': ['fetchDepositsWithdrawals', 'fetchDeposits', 'fetchWithdrawals'],
|
469
|
+
'depositWithdrawFee': ['fetchDepositWithdrawFee', 'fetchDepositWithdrawFees'],
|
470
|
+
}
|
471
|
+
object_names = list(object_skips.keys())
|
472
|
+
for i in range(0, len(object_names)):
|
473
|
+
object_name = object_names[i]
|
474
|
+
object_methods = object_skips[object_name]
|
475
|
+
if exchange.in_array(method_name, object_methods):
|
476
|
+
extra_skips = exchange.safe_dict(self.skipped_methods, object_name, {})
|
477
|
+
return exchange.deep_extend(skips_for_method, extra_skips)
|
474
478
|
return skips_for_method
|
475
479
|
|
476
480
|
async def test_safe(self, method_name, exchange, args=[], is_public=False):
|
ccxt/test/test_sync.py
CHANGED
@@ -458,18 +458,22 @@ class testMainClass(baseMainTestClass):
|
|
458
458
|
# get "method-specific" skips
|
459
459
|
skips_for_method = exchange.safe_value(self.skipped_methods, method_name, {})
|
460
460
|
# get "object-specific" skips
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
461
|
+
object_skips = {
|
462
|
+
'orderBook': ['fetchOrderBook', 'fetchOrderBooks', 'fetchL2OrderBook', 'watchOrderBook', 'watchOrderBookForSymbols'],
|
463
|
+
'ticker': ['fetchTicker', 'fetchTickers', 'watchTicker', 'watchTickers'],
|
464
|
+
'trade': ['fetchTrades', 'watchTrades', 'watchTradesForSymbols'],
|
465
|
+
'ohlcv': ['fetchOHLCV', 'watchOHLCV', 'watchOHLCVForSymbols'],
|
466
|
+
'ledger': ['fetchLedger', 'fetchLedgerEntry'],
|
467
|
+
'depositWithdraw': ['fetchDepositsWithdrawals', 'fetchDeposits', 'fetchWithdrawals'],
|
468
|
+
'depositWithdrawFee': ['fetchDepositWithdrawFee', 'fetchDepositWithdrawFees'],
|
469
|
+
}
|
470
|
+
object_names = list(object_skips.keys())
|
471
|
+
for i in range(0, len(object_names)):
|
472
|
+
object_name = object_names[i]
|
473
|
+
object_methods = object_skips[object_name]
|
474
|
+
if exchange.in_array(method_name, object_methods):
|
475
|
+
extra_skips = exchange.safe_dict(self.skipped_methods, object_name, {})
|
476
|
+
return exchange.deep_extend(skips_for_method, extra_skips)
|
473
477
|
return skips_for_method
|
474
478
|
|
475
479
|
def test_safe(self, method_name, exchange, args=[], is_public=False):
|