ccxt 4.2.94__py2.py3-none-any.whl → 4.2.96__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 +2 -2
- ccxt/abstract/bitstamp.py +6 -0
- ccxt/abstract/coinbase.py +1 -0
- ccxt/ace.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +2 -2
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +3 -3
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bit2c.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/bitget.py +1 -1
- 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 +1 -1
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +7 -1
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.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/bybit.py +2 -2
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +587 -103
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coinbasepro.py +1 -1
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +62 -56
- 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/currencycom.py +1 -1
- ccxt/async_support/delta.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 +27 -11
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +117 -116
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +2 -2
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kucoinfutures.py +1 -1
- ccxt/async_support/latoken.py +1 -1
- ccxt/async_support/lbank.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/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +42 -42
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/phemex.py +1 -1
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/poloniexfutures.py +1 -1
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/timex.py +1 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/tradeogre.py +1 -1
- ccxt/async_support/upbit.py +2 -2
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +1 -1
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/errors.py +7 -7
- ccxt/base/exchange.py +2 -2
- ccxt/bigone.py +1 -1
- ccxt/binance.py +3 -3
- ccxt/bingx.py +1 -1
- ccxt/bit2c.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitget.py +1 -1
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +1 -1
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +1 -1
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +7 -1
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +1 -1
- ccxt/btcalpha.py +1 -1
- ccxt/btcbox.py +1 -1
- ccxt/bybit.py +2 -2
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +587 -103
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coinbasepro.py +1 -1
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +62 -56
- ccxt/coinlist.py +1 -1
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/currencycom.py +1 -1
- ccxt/delta.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 +27 -11
- ccxt/hitbtc.py +1 -1
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +117 -116
- ccxt/huobijp.py +1 -1
- ccxt/idex.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +2 -2
- ccxt/kucoin.py +1 -1
- ccxt/kucoinfutures.py +1 -1
- ccxt/latoken.py +1 -1
- ccxt/lbank.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +42 -42
- ccxt/onetrading.py +1 -1
- ccxt/p2b.py +1 -1
- ccxt/phemex.py +1 -1
- ccxt/poloniex.py +1 -1
- ccxt/poloniexfutures.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/ascendex.py +1 -1
- ccxt/pro/bitfinex2.py +1 -1
- ccxt/pro/bitget.py +1 -1
- ccxt/pro/bitmart.py +1 -1
- ccxt/pro/bitmex.py +1 -1
- ccxt/pro/bitstamp.py +1 -1
- ccxt/pro/bitvavo.py +1 -1
- ccxt/pro/blockchaincom.py +1 -1
- ccxt/pro/bybit.py +1 -1
- ccxt/pro/coinbase.py +31 -4
- ccxt/pro/coinbaseinternational.py +1 -1
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/cryptocom.py +1 -1
- ccxt/pro/gate.py +1 -1
- ccxt/pro/hitbtc.py +1 -1
- ccxt/pro/hollaex.py +1 -1
- ccxt/pro/htx.py +1 -1
- ccxt/pro/kraken.py +1 -1
- ccxt/pro/krakenfutures.py +1 -1
- ccxt/pro/okcoin.py +1 -1
- ccxt/pro/okx.py +1 -1
- ccxt/pro/poloniex.py +1 -1
- ccxt/pro/poloniexfutures.py +1 -1
- ccxt/pro/whitebit.py +1 -1
- ccxt/probit.py +1 -1
- ccxt/timex.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/tradeogre.py +1 -1
- ccxt/upbit.py +2 -2
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +1 -1
- ccxt/woo.py +1 -1
- ccxt/yobit.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.2.94.dist-info → ccxt-4.2.96.dist-info}/METADATA +4 -4
- {ccxt-4.2.94.dist-info → ccxt-4.2.96.dist-info}/RECORD +185 -185
- {ccxt-4.2.94.dist-info → ccxt-4.2.96.dist-info}/WHEEL +0 -0
- {ccxt-4.2.94.dist-info → ccxt-4.2.96.dist-info}/top_level.txt +0 -0
@@ -10,12 +10,12 @@ from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Order,
|
|
10
10
|
from typing import List
|
11
11
|
from typing import Any
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
|
+
from ccxt.base.errors import AuthenticationError
|
13
14
|
from ccxt.base.errors import PermissionDenied
|
14
15
|
from ccxt.base.errors import ArgumentsRequired
|
15
16
|
from ccxt.base.errors import BadRequest
|
16
17
|
from ccxt.base.errors import InvalidOrder
|
17
18
|
from ccxt.base.errors import DuplicateOrderId
|
18
|
-
from ccxt.base.errors import AuthenticationError
|
19
19
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
20
20
|
from ccxt.base.precise import Precise
|
21
21
|
|
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import ArgumentsRequired
|
14
15
|
from ccxt.base.errors import InsufficientFunds
|
@@ -17,7 +18,6 @@ from ccxt.base.errors import InvalidOrder
|
|
17
18
|
from ccxt.base.errors import OrderNotFound
|
18
19
|
from ccxt.base.errors import RateLimitExceeded
|
19
20
|
from ccxt.base.errors import OnMaintenance
|
20
|
-
from ccxt.base.errors import AuthenticationError
|
21
21
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
22
22
|
from ccxt.base.precise import Precise
|
23
23
|
|
ccxt/async_support/coincheck.py
CHANGED
@@ -9,8 +9,8 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
-
from ccxt.base.errors import BadSymbol
|
13
12
|
from ccxt.base.errors import AuthenticationError
|
13
|
+
from ccxt.base.errors import BadSymbol
|
14
14
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
15
15
|
|
16
16
|
|
ccxt/async_support/coinex.py
CHANGED
@@ -9,6 +9,7 @@ import asyncio
|
|
9
9
|
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, Leverages, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import ArgumentsRequired
|
14
15
|
from ccxt.base.errors import BadRequest
|
@@ -20,7 +21,6 @@ from ccxt.base.errors import NotSupported
|
|
20
21
|
from ccxt.base.errors import RateLimitExceeded
|
21
22
|
from ccxt.base.errors import ExchangeNotAvailable
|
22
23
|
from ccxt.base.errors import RequestTimeout
|
23
|
-
from ccxt.base.errors import AuthenticationError
|
24
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
25
|
from ccxt.base.precise import Precise
|
26
26
|
|
@@ -1076,8 +1076,8 @@ class coinex(Exchange, ImplicitAPI):
|
|
1076
1076
|
async def fetch_order_book(self, symbol: str, limit: Int = 20, params={}):
|
1077
1077
|
"""
|
1078
1078
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1079
|
-
:see: https://
|
1080
|
-
:see: https://
|
1079
|
+
:see: https://docs.coinex.com/api/v2/spot/market/http/list-market-depth
|
1080
|
+
:see: https://docs.coinex.com/api/v2/futures/market/http/list-market-depth
|
1081
1081
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1082
1082
|
:param int [limit]: the maximum amount of order book entries to return
|
1083
1083
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1088,63 +1088,69 @@ class coinex(Exchange, ImplicitAPI):
|
|
1088
1088
|
if limit is None:
|
1089
1089
|
limit = 20 # default
|
1090
1090
|
request = {
|
1091
|
-
'market':
|
1092
|
-
'
|
1093
|
-
'
|
1091
|
+
'market': market['id'],
|
1092
|
+
'limit': limit,
|
1093
|
+
'interval': '0',
|
1094
1094
|
}
|
1095
1095
|
response = None
|
1096
1096
|
if market['swap']:
|
1097
|
-
response = await self.
|
1097
|
+
response = await self.v2PublicGetFuturesDepth(self.extend(request, params))
|
1098
|
+
#
|
1099
|
+
# {
|
1100
|
+
# "code": 0,
|
1101
|
+
# "data": {
|
1102
|
+
# "depth": {
|
1103
|
+
# "asks": [
|
1104
|
+
# ["70851.94", "0.2119"],
|
1105
|
+
# ["70851.95", "0.0004"],
|
1106
|
+
# ["70851.96", "0.0004"]
|
1107
|
+
# ],
|
1108
|
+
# "bids": [
|
1109
|
+
# ["70851.93", "1.0314"],
|
1110
|
+
# ["70850.93", "0.0021"],
|
1111
|
+
# ["70850.42", "0.0306"]
|
1112
|
+
# ],
|
1113
|
+
# "checksum": 2956436260,
|
1114
|
+
# "last": "70851.94",
|
1115
|
+
# "updated_at": 1712824003252
|
1116
|
+
# },
|
1117
|
+
# "is_full": True,
|
1118
|
+
# "market": "BTCUSDT"
|
1119
|
+
# },
|
1120
|
+
# "message": "OK"
|
1121
|
+
# }
|
1122
|
+
#
|
1098
1123
|
else:
|
1099
|
-
response = await self.
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
# ["40625.50", "0.0219"],
|
1130
|
-
# ["40625.90", "0.3506"]
|
1131
|
-
# ],
|
1132
|
-
# "bids": [
|
1133
|
-
# ["40620.89", "19.6861"],
|
1134
|
-
# ["40620.80", "0.0012"],
|
1135
|
-
# ["40619.87", "0.0365"]
|
1136
|
-
# ],
|
1137
|
-
# "last": "40620.89",
|
1138
|
-
# "time": 1650587672406,
|
1139
|
-
# "sign_price": "40619.32",
|
1140
|
-
# "index_price": "40609.93"
|
1141
|
-
# },
|
1142
|
-
# "message": "OK"
|
1143
|
-
# }
|
1144
|
-
#
|
1145
|
-
result = self.safe_value(response, 'data', {})
|
1146
|
-
timestamp = self.safe_integer(result, 'time')
|
1147
|
-
return self.parse_order_book(result, symbol, timestamp)
|
1124
|
+
response = await self.v2PublicGetSpotDepth(self.extend(request, params))
|
1125
|
+
#
|
1126
|
+
# {
|
1127
|
+
# "code": 0,
|
1128
|
+
# "data": {
|
1129
|
+
# "depth": {
|
1130
|
+
# "asks": [
|
1131
|
+
# ["70875.31", "0.28670282"],
|
1132
|
+
# ["70875.32", "0.31008114"],
|
1133
|
+
# ["70875.42", "0.05876653"]
|
1134
|
+
# ],
|
1135
|
+
# "bids": [
|
1136
|
+
# ["70855.3", "0.00632222"],
|
1137
|
+
# ["70855.29", "0.36216834"],
|
1138
|
+
# ["70855.17", "0.10166802"]
|
1139
|
+
# ],
|
1140
|
+
# "checksum": 2313816665,
|
1141
|
+
# "last": "70857.19",
|
1142
|
+
# "updated_at": 1712823790987
|
1143
|
+
# },
|
1144
|
+
# "is_full": True,
|
1145
|
+
# "market": "BTCUSDT"
|
1146
|
+
# },
|
1147
|
+
# "message": "OK"
|
1148
|
+
# }
|
1149
|
+
#
|
1150
|
+
data = self.safe_dict(response, 'data', {})
|
1151
|
+
depth = self.safe_dict(data, 'depth', {})
|
1152
|
+
timestamp = self.safe_integer(depth, 'updated_at')
|
1153
|
+
return self.parse_order_book(depth, symbol, timestamp)
|
1148
1154
|
|
1149
1155
|
def parse_trade(self, trade, market: Market = None) -> Trade:
|
1150
1156
|
#
|
ccxt/async_support/coinlist.py
CHANGED
@@ -10,6 +10,7 @@ import math
|
|
10
10
|
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
|
+
from ccxt.base.errors import AuthenticationError
|
13
14
|
from ccxt.base.errors import PermissionDenied
|
14
15
|
from ccxt.base.errors import ArgumentsRequired
|
15
16
|
from ccxt.base.errors import BadRequest
|
@@ -20,7 +21,6 @@ from ccxt.base.errors import InvalidOrder
|
|
20
21
|
from ccxt.base.errors import OrderNotFound
|
21
22
|
from ccxt.base.errors import NotSupported
|
22
23
|
from ccxt.base.errors import OnMaintenance
|
23
|
-
from ccxt.base.errors import AuthenticationError
|
24
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
25
|
from ccxt.base.precise import Precise
|
26
26
|
|
ccxt/async_support/coinmate.py
CHANGED
@@ -9,12 +9,12 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import ArgumentsRequired
|
13
14
|
from ccxt.base.errors import InsufficientFunds
|
14
15
|
from ccxt.base.errors import InvalidOrder
|
15
16
|
from ccxt.base.errors import OrderNotFound
|
16
17
|
from ccxt.base.errors import RateLimitExceeded
|
17
|
-
from ccxt.base.errors import AuthenticationError
|
18
18
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
19
|
from ccxt.base.precise import Precise
|
20
20
|
|
ccxt/async_support/coinsph.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import ArgumentsRequired
|
14
15
|
from ccxt.base.errors import BadRequest
|
@@ -23,7 +24,6 @@ from ccxt.base.errors import DuplicateOrderId
|
|
23
24
|
from ccxt.base.errors import NotSupported
|
24
25
|
from ccxt.base.errors import RateLimitExceeded
|
25
26
|
from ccxt.base.errors import ExchangeNotAvailable
|
26
|
-
from ccxt.base.errors import AuthenticationError
|
27
27
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
28
28
|
from ccxt.base.precise import Precise
|
29
29
|
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Account, Balances, Currency, Int, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import AccountNotEnabled
|
14
15
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -20,7 +21,6 @@ from ccxt.base.errors import NotSupported
|
|
20
21
|
from ccxt.base.errors import DDoSProtection
|
21
22
|
from ccxt.base.errors import OnMaintenance
|
22
23
|
from ccxt.base.errors import InvalidNonce
|
23
|
-
from ccxt.base.errors import AuthenticationError
|
24
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
25
|
from ccxt.base.precise import Precise
|
26
26
|
|
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import ArgumentsRequired
|
13
14
|
from ccxt.base.errors import BadRequest
|
14
15
|
from ccxt.base.errors import BadSymbol
|
@@ -19,7 +20,6 @@ from ccxt.base.errors import NotSupported
|
|
19
20
|
from ccxt.base.errors import DDoSProtection
|
20
21
|
from ccxt.base.errors import ExchangeNotAvailable
|
21
22
|
from ccxt.base.errors import InvalidNonce
|
22
|
-
from ccxt.base.errors import AuthenticationError
|
23
23
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
24
24
|
from ccxt.base.precise import Precise
|
25
25
|
|
ccxt/async_support/delta.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import ArgumentsRequired
|
13
14
|
from ccxt.base.errors import BadRequest
|
14
15
|
from ccxt.base.errors import BadSymbol
|
@@ -16,7 +17,6 @@ from ccxt.base.errors import InsufficientFunds
|
|
16
17
|
from ccxt.base.errors import InvalidOrder
|
17
18
|
from ccxt.base.errors import OrderNotFound
|
18
19
|
from ccxt.base.errors import ExchangeNotAvailable
|
19
|
-
from ccxt.base.errors import AuthenticationError
|
20
20
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
21
21
|
from ccxt.base.precise import Precise
|
22
22
|
|
ccxt/async_support/deribit.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import ArgumentsRequired
|
14
15
|
from ccxt.base.errors import BadRequest
|
@@ -20,7 +21,6 @@ from ccxt.base.errors import NotSupported
|
|
20
21
|
from ccxt.base.errors import DDoSProtection
|
21
22
|
from ccxt.base.errors import ExchangeNotAvailable
|
22
23
|
from ccxt.base.errors import OnMaintenance
|
23
|
-
from ccxt.base.errors import AuthenticationError
|
24
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
25
|
from ccxt.base.precise import Precise
|
26
26
|
|
ccxt/async_support/digifinex.py
CHANGED
@@ -11,6 +11,7 @@ import json
|
|
11
11
|
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
|
+
from ccxt.base.errors import AuthenticationError
|
14
15
|
from ccxt.base.errors import PermissionDenied
|
15
16
|
from ccxt.base.errors import AccountSuspended
|
16
17
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -26,7 +27,6 @@ from ccxt.base.errors import NetworkError
|
|
26
27
|
from ccxt.base.errors import DDoSProtection
|
27
28
|
from ccxt.base.errors import RateLimitExceeded
|
28
29
|
from ccxt.base.errors import InvalidNonce
|
29
|
-
from ccxt.base.errors import AuthenticationError
|
30
30
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
31
31
|
from ccxt.base.precise import Precise
|
32
32
|
|
ccxt/async_support/exmo.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import ArgumentsRequired
|
14
15
|
from ccxt.base.errors import BadRequest
|
@@ -18,7 +19,6 @@ from ccxt.base.errors import OrderNotFound
|
|
18
19
|
from ccxt.base.errors import RateLimitExceeded
|
19
20
|
from ccxt.base.errors import OnMaintenance
|
20
21
|
from ccxt.base.errors import InvalidNonce
|
21
|
-
from ccxt.base.errors import AuthenticationError
|
22
22
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
23
23
|
from ccxt.base.precise import Precise
|
24
24
|
|
ccxt/async_support/gate.py
CHANGED
@@ -10,6 +10,7 @@ import hashlib
|
|
10
10
|
from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
|
+
from ccxt.base.errors import AuthenticationError
|
13
14
|
from ccxt.base.errors import PermissionDenied
|
14
15
|
from ccxt.base.errors import AccountNotEnabled
|
15
16
|
from ccxt.base.errors import AccountSuspended
|
@@ -24,7 +25,6 @@ from ccxt.base.errors import OrderImmediatelyFillable
|
|
24
25
|
from ccxt.base.errors import NotSupported
|
25
26
|
from ccxt.base.errors import RateLimitExceeded
|
26
27
|
from ccxt.base.errors import ExchangeNotAvailable
|
27
|
-
from ccxt.base.errors import AuthenticationError
|
28
28
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
29
29
|
from ccxt.base.precise import Precise
|
30
30
|
|
ccxt/async_support/gemini.py
CHANGED
@@ -10,6 +10,7 @@ import hashlib
|
|
10
10
|
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
|
+
from ccxt.base.errors import AuthenticationError
|
13
14
|
from ccxt.base.errors import PermissionDenied
|
14
15
|
from ccxt.base.errors import ArgumentsRequired
|
15
16
|
from ccxt.base.errors import BadRequest
|
@@ -21,7 +22,6 @@ from ccxt.base.errors import RateLimitExceeded
|
|
21
22
|
from ccxt.base.errors import ExchangeNotAvailable
|
22
23
|
from ccxt.base.errors import OnMaintenance
|
23
24
|
from ccxt.base.errors import InvalidNonce
|
24
|
-
from ccxt.base.errors import AuthenticationError
|
25
25
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
26
26
|
from ccxt.base.precise import Precise
|
27
27
|
|
@@ -300,7 +300,13 @@ class gemini(Exchange, ImplicitAPI):
|
|
300
300
|
'ATOM': 'cosmos',
|
301
301
|
'DOT': 'polkadot',
|
302
302
|
},
|
303
|
-
'nonce': 'milliseconds', # if getting a Network 400 error change to seconds
|
303
|
+
'nonce': 'milliseconds', # if getting a Network 400 error change to seconds,
|
304
|
+
'conflictingMarkets': {
|
305
|
+
'paxgusd': {
|
306
|
+
'base': 'PAXG',
|
307
|
+
'quote': 'USD',
|
308
|
+
},
|
309
|
+
},
|
304
310
|
},
|
305
311
|
})
|
306
312
|
|
@@ -662,15 +668,25 @@ class gemini(Exchange, ImplicitAPI):
|
|
662
668
|
marketIdUpper = marketId.upper()
|
663
669
|
isPerp = (marketIdUpper.find('PERP') >= 0)
|
664
670
|
marketIdWithoutPerp = marketIdUpper.replace('PERP', '')
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
671
|
+
conflictingMarkets = self.safe_dict(self.options, 'conflictingMarkets', {})
|
672
|
+
lowerCaseId = marketIdWithoutPerp.lower()
|
673
|
+
if lowerCaseId in conflictingMarkets:
|
674
|
+
conflictingMarket = conflictingMarkets[lowerCaseId]
|
675
|
+
baseId = conflictingMarket['base']
|
676
|
+
quoteId = conflictingMarket['quote']
|
677
|
+
if isPerp:
|
678
|
+
settleId = conflictingMarket['quote']
|
679
|
+
else:
|
680
|
+
quoteCurrencies = self.handle_option('fetchMarketsFromAPI', 'quoteCurrencies', [])
|
681
|
+
for i in range(0, len(quoteCurrencies)):
|
682
|
+
quoteCurrency = quoteCurrencies[i]
|
683
|
+
if marketIdWithoutPerp.endswith(quoteCurrency):
|
684
|
+
quoteLength = self.parse_to_int(-1 * len(quoteCurrency))
|
685
|
+
baseId = marketIdWithoutPerp[0:quoteLength]
|
686
|
+
quoteId = quoteCurrency
|
687
|
+
if isPerp:
|
688
|
+
settleId = quoteCurrency # always same
|
689
|
+
break
|
674
690
|
base = self.safe_currency_code(baseId)
|
675
691
|
quote = self.safe_currency_code(quoteId)
|
676
692
|
settle = self.safe_currency_code(settleId)
|
ccxt/async_support/hitbtc.py
CHANGED
@@ -9,6 +9,7 @@ import hashlib
|
|
9
9
|
from ccxt.base.types import Balances, Currencies, Currency, Int, Leverage, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import PermissionDenied
|
13
14
|
from ccxt.base.errors import AccountSuspended
|
14
15
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -21,7 +22,6 @@ from ccxt.base.errors import NotSupported
|
|
21
22
|
from ccxt.base.errors import RateLimitExceeded
|
22
23
|
from ccxt.base.errors import ExchangeNotAvailable
|
23
24
|
from ccxt.base.errors import OnMaintenance
|
24
|
-
from ccxt.base.errors import AuthenticationError
|
25
25
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
26
26
|
from ccxt.base.precise import Precise
|
27
27
|
|
ccxt/async_support/hollaex.py
CHANGED
@@ -8,13 +8,13 @@ from ccxt.abstract.hollaex import ImplicitAPI
|
|
8
8
|
import hashlib
|
9
9
|
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
|
+
from ccxt.base.errors import AuthenticationError
|
11
12
|
from ccxt.base.errors import ArgumentsRequired
|
12
13
|
from ccxt.base.errors import BadRequest
|
13
14
|
from ccxt.base.errors import InsufficientFunds
|
14
15
|
from ccxt.base.errors import OrderNotFound
|
15
16
|
from ccxt.base.errors import OrderImmediatelyFillable
|
16
17
|
from ccxt.base.errors import NetworkError
|
17
|
-
from ccxt.base.errors import AuthenticationError
|
18
18
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
19
|
from ccxt.base.precise import Precise
|
20
20
|
|