ccxt 4.2.95__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 +1 -1
- ccxt/abstract/coinbase.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/coinbase.py +586 -102
- ccxt/async_support/gemini.py +26 -11
- ccxt/base/exchange.py +2 -2
- ccxt/coinbase.py +586 -102
- ccxt/gemini.py +26 -11
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/coinbase.py +19 -4
- {ccxt-4.2.95.dist-info → ccxt-4.2.96.dist-info}/METADATA +4 -4
- {ccxt-4.2.95.dist-info → ccxt-4.2.96.dist-info}/RECORD +15 -15
- {ccxt-4.2.95.dist-info → ccxt-4.2.96.dist-info}/WHEEL +0 -0
- {ccxt-4.2.95.dist-info → ccxt-4.2.96.dist-info}/top_level.txt +0 -0
ccxt/async_support/gemini.py
CHANGED
@@ -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,16 +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
|
-
|
674
|
-
|
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
|
675
690
|
base = self.safe_currency_code(baseId)
|
676
691
|
quote = self.safe_currency_code(quoteId)
|
677
692
|
settle = self.safe_currency_code(settleId)
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.2.
|
7
|
+
__version__ = '4.2.96'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1341,7 +1341,7 @@ class Exchange(object):
|
|
1341
1341
|
signature = Exchange.base64_to_binary(Exchange.rsa(token, Exchange.decode(secret), algorithm))
|
1342
1342
|
elif algoType == 'ES':
|
1343
1343
|
rawSignature = Exchange.ecdsa(token, secret, 'p256', algorithm)
|
1344
|
-
signature = Exchange.base16_to_binary(rawSignature['r'] + rawSignature['s'])
|
1344
|
+
signature = Exchange.base16_to_binary(rawSignature['r'].rjust(64, "0") + rawSignature['s'].rjust(64, "0"))
|
1345
1345
|
else:
|
1346
1346
|
signature = Exchange.hmac(Exchange.encode(token), secret, algos[algorithm], 'binary')
|
1347
1347
|
return token + '.' + Exchange.base64urlencode(signature)
|