ccxt 4.3.88__py2.py3-none-any.whl → 4.3.90__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/ace.py +1 -0
- ccxt/alpaca.py +3 -2
- ccxt/ascendex.py +102 -116
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +1 -0
- ccxt/async_support/alpaca.py +3 -2
- ccxt/async_support/ascendex.py +102 -116
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +1 -0
- ccxt/async_support/bingx.py +30 -17
- ccxt/async_support/bit2c.py +1 -0
- ccxt/async_support/bitbank.py +1 -0
- ccxt/async_support/bitfinex.py +1 -0
- ccxt/async_support/bitfinex2.py +21 -22
- ccxt/async_support/bitflyer.py +1 -0
- ccxt/async_support/bitget.py +3 -2
- ccxt/async_support/bitmart.py +4 -8
- ccxt/async_support/bitmex.py +1 -0
- ccxt/async_support/bitopro.py +1 -0
- ccxt/async_support/bitrue.py +62 -71
- ccxt/async_support/bitso.py +1 -0
- ccxt/async_support/bitstamp.py +1 -0
- ccxt/async_support/bitvavo.py +1 -0
- ccxt/async_support/blockchaincom.py +1 -0
- ccxt/async_support/btcalpha.py +1 -0
- ccxt/async_support/btcbox.py +1 -0
- ccxt/async_support/btcmarkets.py +1 -0
- ccxt/async_support/bybit.py +2 -0
- ccxt/async_support/cex.py +1 -0
- ccxt/async_support/coinbaseexchange.py +1 -0
- ccxt/async_support/coinbaseinternational.py +2 -1
- ccxt/async_support/coinex.py +1 -16
- ccxt/async_support/cryptocom.py +0 -12
- ccxt/async_support/hitbtc.py +1 -0
- ccxt/async_support/huobijp.py +0 -8
- ccxt/async_support/kraken.py +48 -48
- ccxt/async_support/latoken.py +1 -0
- ccxt/async_support/mexc.py +1 -61
- ccxt/async_support/okcoin.py +4 -9
- ccxt/async_support/okx.py +1 -8
- ccxt/async_support/onetrading.py +1 -0
- ccxt/async_support/phemex.py +1 -0
- ccxt/async_support/poloniexfutures.py +1 -0
- ccxt/async_support/probit.py +1 -0
- ccxt/async_support/vertex.py +1 -0
- ccxt/async_support/whitebit.py +5 -3
- ccxt/async_support/woo.py +1 -0
- ccxt/async_support/woofipro.py +1 -0
- ccxt/base/exchange.py +6 -4
- ccxt/bigone.py +1 -0
- ccxt/bingx.py +30 -17
- ccxt/bit2c.py +1 -0
- ccxt/bitbank.py +1 -0
- ccxt/bitfinex.py +1 -0
- ccxt/bitfinex2.py +21 -22
- ccxt/bitflyer.py +1 -0
- ccxt/bitget.py +3 -2
- ccxt/bitmart.py +4 -8
- ccxt/bitmex.py +1 -0
- ccxt/bitopro.py +1 -0
- ccxt/bitrue.py +62 -71
- ccxt/bitso.py +1 -0
- ccxt/bitstamp.py +1 -0
- ccxt/bitvavo.py +1 -0
- ccxt/blockchaincom.py +1 -0
- ccxt/btcalpha.py +1 -0
- ccxt/btcbox.py +1 -0
- ccxt/btcmarkets.py +1 -0
- ccxt/bybit.py +2 -0
- ccxt/cex.py +1 -0
- ccxt/coinbaseexchange.py +1 -0
- ccxt/coinbaseinternational.py +2 -1
- ccxt/coinex.py +1 -16
- ccxt/cryptocom.py +0 -12
- ccxt/hitbtc.py +1 -0
- ccxt/huobijp.py +0 -8
- ccxt/kraken.py +48 -48
- ccxt/latoken.py +1 -0
- ccxt/mexc.py +1 -61
- ccxt/okcoin.py +4 -9
- ccxt/okx.py +1 -8
- ccxt/onetrading.py +1 -0
- ccxt/phemex.py +1 -0
- ccxt/poloniexfutures.py +1 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +280 -0
- ccxt/pro/bingx.py +235 -85
- ccxt/pro/bithumb.py +4 -0
- ccxt/pro/bitvavo.py +1 -0
- ccxt/pro/bybit.py +253 -2
- ccxt/pro/cex.py +1 -0
- ccxt/pro/coinex.py +941 -662
- ccxt/pro/lbank.py +1 -2
- ccxt/pro/okx.py +142 -2
- ccxt/probit.py +1 -0
- ccxt/vertex.py +1 -0
- ccxt/whitebit.py +5 -3
- ccxt/woo.py +1 -0
- ccxt/woofipro.py +1 -0
- {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/METADATA +4 -4
- {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/RECORD +105 -105
- {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/WHEEL +0 -0
- {ccxt-4.3.88.dist-info → ccxt-4.3.90.dist-info}/top_level.txt +0 -0
ccxt/async_support/bigone.py
CHANGED
@@ -1564,6 +1564,7 @@ class bigone(Exchange, ImplicitAPI):
|
|
1564
1564
|
"""
|
1565
1565
|
fetches information on an order made by the user
|
1566
1566
|
:see: https://open.big.one/docs/spot_orders.html#get-one-order
|
1567
|
+
:param str id: the order id
|
1567
1568
|
:param str symbol: not used by bigone fetchOrder
|
1568
1569
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1569
1570
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bingx.py
CHANGED
@@ -1036,8 +1036,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1036
1036
|
|
1037
1037
|
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
1038
1038
|
#
|
1039
|
-
# spot
|
1040
|
-
# fetchTrades
|
1039
|
+
# spot fetchTrades
|
1041
1040
|
#
|
1042
1041
|
# {
|
1043
1042
|
# "id": 43148253,
|
@@ -1047,8 +1046,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
1047
1046
|
# "buyerMaker": False
|
1048
1047
|
# }
|
1049
1048
|
#
|
1050
|
-
# spot
|
1051
|
-
#
|
1049
|
+
# spot fetchMyTrades
|
1050
|
+
#
|
1052
1051
|
# {
|
1053
1052
|
# "symbol": "LTC-USDT",
|
1054
1053
|
# "id": 36237072,
|
@@ -1063,8 +1062,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1063
1062
|
# "isMaker": False
|
1064
1063
|
# }
|
1065
1064
|
#
|
1066
|
-
# swap
|
1067
|
-
# fetchTrades
|
1065
|
+
# swap fetchTrades
|
1068
1066
|
#
|
1069
1067
|
# {
|
1070
1068
|
# "time": 1672025549368,
|
@@ -1074,8 +1072,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1074
1072
|
# "quoteQty": "55723.87"
|
1075
1073
|
# }
|
1076
1074
|
#
|
1077
|
-
# swap
|
1078
|
-
# fetchMyTrades
|
1075
|
+
# swap fetchMyTrades
|
1079
1076
|
#
|
1080
1077
|
# {
|
1081
1078
|
# "volume": "0.1",
|
@@ -1089,10 +1086,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1089
1086
|
# "filledTime": "2023-07-04T20:56:01.000+0800"
|
1090
1087
|
# }
|
1091
1088
|
#
|
1092
|
-
#
|
1093
|
-
# ws
|
1094
|
-
#
|
1095
|
-
# spot
|
1089
|
+
# ws spot
|
1096
1090
|
#
|
1097
1091
|
# {
|
1098
1092
|
# "E": 1690214529432,
|
@@ -1105,7 +1099,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1105
1099
|
# "t": "57903921"
|
1106
1100
|
# }
|
1107
1101
|
#
|
1108
|
-
# swap
|
1102
|
+
# ws linear swap
|
1109
1103
|
#
|
1110
1104
|
# {
|
1111
1105
|
# "q": "0.0421",
|
@@ -1115,6 +1109,19 @@ class bingx(Exchange, ImplicitAPI):
|
|
1115
1109
|
# "s": "BTC-USDT"
|
1116
1110
|
# }
|
1117
1111
|
#
|
1112
|
+
# ws inverse swap
|
1113
|
+
#
|
1114
|
+
# {
|
1115
|
+
# "e": "trade",
|
1116
|
+
# "E": 1722920589665,
|
1117
|
+
# "s": "BTC-USD",
|
1118
|
+
# "t": "39125001",
|
1119
|
+
# "p": "55360.0",
|
1120
|
+
# "q": "1",
|
1121
|
+
# "T": 1722920589582,
|
1122
|
+
# "m": False
|
1123
|
+
# }
|
1124
|
+
#
|
1118
1125
|
# inverse swap fetchMyTrades
|
1119
1126
|
#
|
1120
1127
|
# {
|
@@ -2399,13 +2406,17 @@ class bingx(Exchange, ImplicitAPI):
|
|
2399
2406
|
tpRequest['quantity'] = self.parse_to_numeric(self.amount_to_precision(symbol, tkQuantity))
|
2400
2407
|
request['takeProfit'] = self.json(tpRequest)
|
2401
2408
|
positionSide = None
|
2402
|
-
|
2403
|
-
|
2409
|
+
hedged = self.safe_bool(params, 'hedged', False)
|
2410
|
+
if hedged:
|
2411
|
+
if reduceOnly:
|
2412
|
+
positionSide = 'SHORT' if (side == 'buy') else 'LONG'
|
2413
|
+
else:
|
2414
|
+
positionSide = 'LONG' if (side == 'buy') else 'SHORT'
|
2404
2415
|
else:
|
2405
|
-
positionSide = '
|
2416
|
+
positionSide = 'BOTH'
|
2406
2417
|
request['positionSide'] = positionSide
|
2407
2418
|
request['quantity'] = amount if (market['inverse']) else self.parse_to_numeric(self.amount_to_precision(symbol, amount)) # precision not available for inverse contracts
|
2408
|
-
params = self.omit(params, ['reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
|
2419
|
+
params = self.omit(params, ['hedged', 'reduceOnly', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId'])
|
2409
2420
|
return self.extend(request, params)
|
2410
2421
|
|
2411
2422
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
@@ -2435,6 +2446,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
2435
2446
|
:param dict [params.stopLoss]: *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
2436
2447
|
:param float [params.stopLoss.triggerPrice]: stop loss trigger price
|
2437
2448
|
:param boolean [params.test]: *swap only* whether to use the test endpoint or not, default is False
|
2449
|
+
:param boolean [params.hedged]: *swap only* whether the order is in hedged mode or one way mode
|
2438
2450
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2439
2451
|
"""
|
2440
2452
|
await self.load_markets()
|
@@ -3426,6 +3438,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3426
3438
|
:see: https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
|
3427
3439
|
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
|
3428
3440
|
:see: https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
|
3441
|
+
:param str id: the order id
|
3429
3442
|
:param str symbol: unified symbol of the market the order was made in
|
3430
3443
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3431
3444
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bit2c.py
CHANGED
@@ -478,6 +478,7 @@ class bit2c(Exchange, ImplicitAPI):
|
|
478
478
|
"""
|
479
479
|
fetches information on an order made by the user
|
480
480
|
:see: https://bit2c.co.il/home/api#getoid
|
481
|
+
:param str id: the order id
|
481
482
|
:param str symbol: unified market symbol
|
482
483
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
483
484
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitbank.py
CHANGED
@@ -699,6 +699,7 @@ class bitbank(Exchange, ImplicitAPI):
|
|
699
699
|
"""
|
700
700
|
fetches information on an order made by the user
|
701
701
|
:see: https://github.com/bitbankinc/bitbank-api-docs/blob/38d6d7c6f486c793872fd4b4087a0d090a04cd0a/rest-api.md#fetch-order-information
|
702
|
+
:param str id: the order id
|
702
703
|
:param str symbol: unified symbol of the market the order was made in
|
703
704
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
704
705
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -1272,6 +1272,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1272
1272
|
"""
|
1273
1273
|
fetches information on an order made by the user
|
1274
1274
|
:see: https://docs.bitfinex.com/v1/reference/rest-auth-order-status
|
1275
|
+
:param str id: the order id
|
1275
1276
|
:param str symbol: not used by bitfinex fetchOrder
|
1276
1277
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1277
1278
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitfinex2.py
CHANGED
@@ -397,6 +397,25 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
397
397
|
'withdraw': {
|
398
398
|
'includeFee': False,
|
399
399
|
},
|
400
|
+
'networks': {
|
401
|
+
'BTC': 'BITCOIN',
|
402
|
+
'LTC': 'LITECOIN',
|
403
|
+
'ERC20': 'ETHEREUM',
|
404
|
+
'OMNI': 'TETHERUSO',
|
405
|
+
'LIQUID': 'TETHERUSL',
|
406
|
+
'TRC20': 'TETHERUSX',
|
407
|
+
'EOS': 'TETHERUSS',
|
408
|
+
'AVAX': 'TETHERUSDTAVAX',
|
409
|
+
'SOL': 'TETHERUSDTSOL',
|
410
|
+
'ALGO': 'TETHERUSDTALG',
|
411
|
+
'BCH': 'TETHERUSDTBCH',
|
412
|
+
'KSM': 'TETHERUSDTKSM',
|
413
|
+
'DVF': 'TETHERUSDTDVF',
|
414
|
+
'OMG': 'TETHERUSDTOMG',
|
415
|
+
},
|
416
|
+
'networksById': {
|
417
|
+
'TETHERUSE': 'ERC20',
|
418
|
+
},
|
400
419
|
},
|
401
420
|
'exceptions': {
|
402
421
|
'exact': {
|
@@ -791,7 +810,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
791
810
|
networkId = self.safe_string(pair, 0)
|
792
811
|
currencyId = self.safe_string(self.safe_value(pair, 1, []), 0)
|
793
812
|
if currencyId == cleanId:
|
794
|
-
network = self.
|
813
|
+
network = self.network_id_to_code(networkId)
|
795
814
|
networks[network] = {
|
796
815
|
'info': networkId,
|
797
816
|
'id': networkId.lower(),
|
@@ -814,26 +833,6 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
814
833
|
result[code]['networks'] = networks
|
815
834
|
return result
|
816
835
|
|
817
|
-
def safe_network(self, networkId):
|
818
|
-
networksById: dict = {
|
819
|
-
'BITCOIN': 'BTC',
|
820
|
-
'LITECOIN': 'LTC',
|
821
|
-
'ETHEREUM': 'ERC20',
|
822
|
-
'TETHERUSE': 'ERC20',
|
823
|
-
'TETHERUSO': 'OMNI',
|
824
|
-
'TETHERUSL': 'LIQUID',
|
825
|
-
'TETHERUSX': 'TRC20',
|
826
|
-
'TETHERUSS': 'EOS',
|
827
|
-
'TETHERUSDTAVAX': 'AVAX',
|
828
|
-
'TETHERUSDTSOL': 'SOL',
|
829
|
-
'TETHERUSDTALG': 'ALGO',
|
830
|
-
'TETHERUSDTBCH': 'BCH',
|
831
|
-
'TETHERUSDTKSM': 'KSM',
|
832
|
-
'TETHERUSDTDVF': 'DVF',
|
833
|
-
'TETHERUSDTOMG': 'OMG',
|
834
|
-
}
|
835
|
-
return self.safe_string(networksById, networkId, networkId)
|
836
|
-
|
837
836
|
async def fetch_balance(self, params={}) -> Balances:
|
838
837
|
"""
|
839
838
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
@@ -2249,7 +2248,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
2249
2248
|
currencyId = self.safe_string(transaction, 1)
|
2250
2249
|
code = self.safe_currency_code(currencyId, currency)
|
2251
2250
|
networkId = self.safe_string(transaction, 2)
|
2252
|
-
network = self.
|
2251
|
+
network = self.network_id_to_code(networkId)
|
2253
2252
|
timestamp = self.safe_integer(transaction, 5)
|
2254
2253
|
updated = self.safe_integer(transaction, 6)
|
2255
2254
|
status = self.parse_transaction_status(self.safe_string(transaction, 9))
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -687,6 +687,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
687
687
|
"""
|
688
688
|
fetches information on an order made by the user
|
689
689
|
:see: https://lightning.bitflyer.com/docs?lang=en#list-orders
|
690
|
+
:param str id: the order id
|
690
691
|
:param str symbol: unified symbol of the market the order was made in
|
691
692
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
692
693
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitget.py
CHANGED
@@ -3847,7 +3847,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3847
3847
|
if feeCostString is not None:
|
3848
3848
|
# swap
|
3849
3849
|
fee = {
|
3850
|
-
'cost': self.parse_number(Precise.
|
3850
|
+
'cost': self.parse_number(Precise.string_neg(feeCostString)),
|
3851
3851
|
'currency': market['settle'],
|
3852
3852
|
}
|
3853
3853
|
feeDetail = self.safe_value(order, 'feeDetail')
|
@@ -3861,7 +3861,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3861
3861
|
feeObject = feeValue
|
3862
3862
|
break
|
3863
3863
|
fee = {
|
3864
|
-
'cost': self.parse_number(Precise.
|
3864
|
+
'cost': self.parse_number(Precise.string_neg(self.safe_string(feeObject, 'totalFee'))),
|
3865
3865
|
'currency': self.safe_currency_code(self.safe_string(feeObject, 'feeCoinCode')),
|
3866
3866
|
}
|
3867
3867
|
postOnly = None
|
@@ -4771,6 +4771,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
4771
4771
|
fetches information on an order made by the user
|
4772
4772
|
:see: https://www.bitget.com/api-doc/spot/trade/Get-Order-Info
|
4773
4773
|
:see: https://www.bitget.com/api-doc/contract/trade/Get-Order-Details
|
4774
|
+
:param str id: the order id
|
4774
4775
|
:param str symbol: unified symbol of the market the order was made in
|
4775
4776
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4776
4777
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitmart.py
CHANGED
@@ -3209,7 +3209,10 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3209
3209
|
parts = chain.split('-')
|
3210
3210
|
partsLength = len(parts)
|
3211
3211
|
networkId = self.safe_string(parts, partsLength - 1)
|
3212
|
-
|
3212
|
+
if networkId == self.safe_string(currency, 'name'):
|
3213
|
+
network = self.safe_string(currency, 'code')
|
3214
|
+
else:
|
3215
|
+
network = self.network_id_to_code(networkId)
|
3213
3216
|
self.check_address(address)
|
3214
3217
|
return {
|
3215
3218
|
'info': depositAddress,
|
@@ -3219,13 +3222,6 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3219
3222
|
'network': network,
|
3220
3223
|
}
|
3221
3224
|
|
3222
|
-
def safe_network_code(self, networkId, currency=None):
|
3223
|
-
name = self.safe_string(currency, 'name')
|
3224
|
-
if networkId == name:
|
3225
|
-
code = self.safe_string(currency, 'code')
|
3226
|
-
return code
|
3227
|
-
return self.network_id_to_code(networkId)
|
3228
|
-
|
3229
3225
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
3230
3226
|
"""
|
3231
3227
|
make a withdrawal
|
ccxt/async_support/bitmex.py
CHANGED
@@ -861,6 +861,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
861
861
|
"""
|
862
862
|
fetches information on an order made by the user
|
863
863
|
:see: https://www.bitmex.com/api/explorer/#not /Order/Order_getOrders
|
864
|
+
:param str id: the order id
|
864
865
|
:param str symbol: unified symbol of the market the order was made in
|
865
866
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
866
867
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitopro.py
CHANGED
@@ -1118,6 +1118,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1118
1118
|
"""
|
1119
1119
|
fetches information on an order made by the user
|
1120
1120
|
:see: https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_an_order_data.md
|
1121
|
+
:param str id: the order id
|
1121
1122
|
:param str symbol: unified symbol of the market the order was made in
|
1122
1123
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1123
1124
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitrue.py
CHANGED
@@ -356,6 +356,67 @@ class bitrue(Exchange, ImplicitAPI):
|
|
356
356
|
'networks': {
|
357
357
|
'ERC20': 'ETH',
|
358
358
|
'TRC20': 'TRX',
|
359
|
+
'AETERNITY': 'Aeternity',
|
360
|
+
'AION': 'AION',
|
361
|
+
'ALGO': 'Algorand',
|
362
|
+
'ASK': 'ASK',
|
363
|
+
'ATOM': 'ATOM',
|
364
|
+
'AVAXC': 'AVAX C-Chain',
|
365
|
+
'BCH': 'BCH',
|
366
|
+
'BEP2': 'BEP2',
|
367
|
+
'BEP20': 'BEP20',
|
368
|
+
'Bitcoin': 'Bitcoin',
|
369
|
+
'BRP20': 'BRP20',
|
370
|
+
'ADA': 'Cardano',
|
371
|
+
'CASINOCOIN': 'CasinoCoin',
|
372
|
+
'CASINOCOIN-XRPL': 'CasinoCoin XRPL',
|
373
|
+
'CONTENTOS': 'Contentos',
|
374
|
+
'DASH': 'Dash',
|
375
|
+
'DECOIN': 'Decoin',
|
376
|
+
'DFI': 'DeFiChain',
|
377
|
+
'DGB': 'DGB',
|
378
|
+
'DIVI': 'Divi',
|
379
|
+
'DOGE': 'dogecoin',
|
380
|
+
'EOS': 'EOS',
|
381
|
+
'ETC': 'ETC',
|
382
|
+
'FILECOIN': 'Filecoin',
|
383
|
+
'FREETON': 'FREETON',
|
384
|
+
'HBAR': 'HBAR',
|
385
|
+
'HEDERA': 'Hedera Hashgraph',
|
386
|
+
'HRC20': 'HRC20',
|
387
|
+
'ICON': 'ICON',
|
388
|
+
'ICP': 'ICP',
|
389
|
+
'IGNIS': 'Ignis',
|
390
|
+
'INTERNETCOMPUTER': 'Internet Computer',
|
391
|
+
'IOTA': 'IOTA',
|
392
|
+
'KAVA': 'KAVA',
|
393
|
+
'KSM': 'KSM',
|
394
|
+
'LTC': 'LiteCoin',
|
395
|
+
'LUNA': 'Luna',
|
396
|
+
'MATIC': 'MATIC',
|
397
|
+
'MOBILECOIN': 'Mobile Coin',
|
398
|
+
'MONACOIN': 'MonaCoin',
|
399
|
+
'XMR': 'Monero',
|
400
|
+
'NEM': 'NEM',
|
401
|
+
'NEP5': 'NEP5',
|
402
|
+
'OMNI': 'OMNI',
|
403
|
+
'PAC': 'PAC',
|
404
|
+
'DOT': 'Polkadot',
|
405
|
+
'RAVEN': 'Ravencoin',
|
406
|
+
'SAFEX': 'Safex',
|
407
|
+
'SOL': 'SOLANA',
|
408
|
+
'SGB': 'Songbird',
|
409
|
+
'XML': 'Stellar Lumens',
|
410
|
+
'XYM': 'Symbol',
|
411
|
+
'XTZ': 'Tezos',
|
412
|
+
'theta': 'theta',
|
413
|
+
'THETA': 'THETA',
|
414
|
+
'VECHAIN': 'VeChain',
|
415
|
+
'WANCHAIN': 'Wanchain',
|
416
|
+
'XINFIN': 'XinFin Network',
|
417
|
+
'XRP': 'XRP',
|
418
|
+
'XRPL': 'XRPL',
|
419
|
+
'ZIL': 'ZIL',
|
359
420
|
},
|
360
421
|
'defaultType': 'spot',
|
361
422
|
'timeframes': {
|
@@ -522,77 +583,6 @@ class bitrue(Exchange, ImplicitAPI):
|
|
522
583
|
#
|
523
584
|
return self.safe_integer(response, 'serverTime')
|
524
585
|
|
525
|
-
def safe_network(self, networkId):
|
526
|
-
uppercaseNetworkId = networkId.upper()
|
527
|
-
networksById: dict = {
|
528
|
-
'Aeternity': 'Aeternity',
|
529
|
-
'AION': 'AION',
|
530
|
-
'Algorand': 'Algorand',
|
531
|
-
'ASK': 'ASK',
|
532
|
-
'ATOM': 'ATOM',
|
533
|
-
'AVAX C-Chain': 'AVAX C-Chain',
|
534
|
-
'bch': 'bch',
|
535
|
-
'BCH': 'BCH',
|
536
|
-
'BEP2': 'BEP2',
|
537
|
-
'BEP20': 'BEP20',
|
538
|
-
'Bitcoin': 'Bitcoin',
|
539
|
-
'BRP20': 'BRP20',
|
540
|
-
'Cardano': 'ADA',
|
541
|
-
'CasinoCoin': 'CasinoCoin',
|
542
|
-
'CasinoCoin XRPL': 'CasinoCoin XRPL',
|
543
|
-
'Contentos': 'Contentos',
|
544
|
-
'Dash': 'Dash',
|
545
|
-
'Decoin': 'Decoin',
|
546
|
-
'DeFiChain': 'DeFiChain',
|
547
|
-
'DGB': 'DGB',
|
548
|
-
'Divi': 'Divi',
|
549
|
-
'dogecoin': 'DOGE',
|
550
|
-
'EOS': 'EOS',
|
551
|
-
'ERC20': 'ERC20',
|
552
|
-
'ETC': 'ETC',
|
553
|
-
'Filecoin': 'Filecoin',
|
554
|
-
'FREETON': 'FREETON',
|
555
|
-
'HBAR': 'HBAR',
|
556
|
-
'Hedera Hashgraph': 'Hedera Hashgraph',
|
557
|
-
'HRC20': 'HRC20',
|
558
|
-
'ICON': 'ICON',
|
559
|
-
'ICP': 'ICP',
|
560
|
-
'Ignis': 'Ignis',
|
561
|
-
'Internet Computer': 'Internet Computer',
|
562
|
-
'IOTA': 'IOTA',
|
563
|
-
'KAVA': 'KAVA',
|
564
|
-
'KSM': 'KSM',
|
565
|
-
'LiteCoin': 'LiteCoin',
|
566
|
-
'Luna': 'Luna',
|
567
|
-
'MATIC': 'MATIC',
|
568
|
-
'Mobile Coin': 'Mobile Coin',
|
569
|
-
'MonaCoin': 'MonaCoin',
|
570
|
-
'Monero': 'Monero',
|
571
|
-
'NEM': 'NEM',
|
572
|
-
'NEP5': 'NEP5',
|
573
|
-
'OMNI': 'OMNI',
|
574
|
-
'PAC': 'PAC',
|
575
|
-
'Polkadot': 'Polkadot',
|
576
|
-
'Ravencoin': 'Ravencoin',
|
577
|
-
'Safex': 'Safex',
|
578
|
-
'SOLANA': 'SOL',
|
579
|
-
'Songbird': 'Songbird',
|
580
|
-
'Stellar Lumens': 'Stellar Lumens',
|
581
|
-
'Symbol': 'Symbol',
|
582
|
-
'Tezos': 'XTZ',
|
583
|
-
'theta': 'theta',
|
584
|
-
'THETA': 'THETA',
|
585
|
-
'TRC20': 'TRC20',
|
586
|
-
'VeChain': 'VeChain',
|
587
|
-
'VECHAIN': 'VECHAIN',
|
588
|
-
'Wanchain': 'Wanchain',
|
589
|
-
'XinFin Network': 'XinFin Network',
|
590
|
-
'XRP': 'XRP',
|
591
|
-
'XRPL': 'XRPL',
|
592
|
-
'ZIL': 'ZIL',
|
593
|
-
}
|
594
|
-
return self.safe_string_2(networksById, networkId, uppercaseNetworkId, networkId)
|
595
|
-
|
596
586
|
async def fetch_currencies(self, params={}) -> Currencies:
|
597
587
|
"""
|
598
588
|
fetches all available currencies on an exchange
|
@@ -1942,6 +1932,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1942
1932
|
:see: https://github.com/Bitrue-exchange/Spot-official-api-docs#query-order-user_data
|
1943
1933
|
:see: https://www.bitrue.com/api-docs#query-order-user_data-hmac-sha256
|
1944
1934
|
:see: https://www.bitrue.com/api_docs_includes_file/delivery.html#query-order-user_data-hmac-sha256
|
1935
|
+
:param str id: the order id
|
1945
1936
|
:param str symbol: unified symbol of the market the order was made in
|
1946
1937
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1947
1938
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitso.py
CHANGED
@@ -1129,6 +1129,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1129
1129
|
"""
|
1130
1130
|
fetches information on an order made by the user
|
1131
1131
|
:see: https://docs.bitso.com/bitso-api/docs/look-up-orders
|
1132
|
+
:param str id: the order id
|
1132
1133
|
:param str symbol: not used by bitso fetchOrder
|
1133
1134
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1134
1135
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitstamp.py
CHANGED
@@ -1466,6 +1466,7 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1466
1466
|
"""
|
1467
1467
|
fetches information on an order made by the user
|
1468
1468
|
:see: https://www.bitstamp.net/api/#tag/Orders/operation/GetOrderStatus
|
1469
|
+
:param str id: the order id
|
1469
1470
|
:param str symbol: unified symbol of the market the order was made in
|
1470
1471
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1471
1472
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bitvavo.py
CHANGED
@@ -1255,6 +1255,7 @@ class bitvavo(Exchange, ImplicitAPI):
|
|
1255
1255
|
"""
|
1256
1256
|
fetches information on an order made by the user
|
1257
1257
|
:see: https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/get
|
1258
|
+
:param str id: the order id
|
1258
1259
|
:param str symbol: unified symbol of the market the order was made in
|
1259
1260
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1260
1261
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1036,6 +1036,7 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
1036
1036
|
"""
|
1037
1037
|
fetches information on an order made by the user
|
1038
1038
|
:see: https://api.blockchain.com/v3/#getorderbyid
|
1039
|
+
:param str id: the order id
|
1039
1040
|
:param str symbol: not used by blockchaincom fetchOrder
|
1040
1041
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1041
1042
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/btcalpha.py
CHANGED
@@ -760,6 +760,7 @@ class btcalpha(Exchange, ImplicitAPI):
|
|
760
760
|
"""
|
761
761
|
:see: https://btc-alpha.github.io/api-docs/#retrieve-single-order
|
762
762
|
fetches information on an order made by the user
|
763
|
+
:param str id: the order id
|
763
764
|
:param str symbol: not used by btcalpha fetchOrder
|
764
765
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
765
766
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/btcbox.py
CHANGED
@@ -549,6 +549,7 @@ class btcbox(Exchange, ImplicitAPI):
|
|
549
549
|
"""
|
550
550
|
fetches information on an order made by the user
|
551
551
|
:see: https://blog.btcbox.jp/en/archives/8762#toc16
|
552
|
+
:param str id: the order id
|
552
553
|
:param str symbol: unified symbol of the market the order was made in
|
553
554
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
554
555
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/btcmarkets.py
CHANGED
@@ -1018,6 +1018,7 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
1018
1018
|
"""
|
1019
1019
|
fetches information on an order made by the user
|
1020
1020
|
:see: https://docs.btcmarkets.net/v3/#operation/getOrderById
|
1021
|
+
:param str id: the order id
|
1021
1022
|
:param str symbol: not used by btcmarkets fetchOrder
|
1022
1023
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1023
1024
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/bybit.py
CHANGED
@@ -4494,6 +4494,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4494
4494
|
"""
|
4495
4495
|
fetches information on an order made by the user *classic accounts only*
|
4496
4496
|
:see: https://bybit-exchange.github.io/docs/v5/order/order-list
|
4497
|
+
:param str id: the order id
|
4497
4498
|
:param str symbol: unified symbol of the market the order was made in
|
4498
4499
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4499
4500
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -4521,6 +4522,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4521
4522
|
"""
|
4522
4523
|
*classic accounts only/ spot not supported* fetches information on an order made by the user *classic accounts only*
|
4523
4524
|
:see: https://bybit-exchange.github.io/docs/v5/order/order-list
|
4525
|
+
:param str id: the order id
|
4524
4526
|
:param str symbol: unified symbol of the market the order was made in
|
4525
4527
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4526
4528
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/cex.py
CHANGED
@@ -1149,6 +1149,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1149
1149
|
"""
|
1150
1150
|
:see: https://docs.cex.io/?python#get-order-details
|
1151
1151
|
fetches information on an order made by the user
|
1152
|
+
:param str id: the order id
|
1152
1153
|
:param str symbol: not used by cex fetchOrder
|
1153
1154
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1154
1155
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1047,6 +1047,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1047
1047
|
"""
|
1048
1048
|
:see: https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getorder
|
1049
1049
|
fetches information on an order made by the user
|
1050
|
+
:param str id: the order id
|
1050
1051
|
:param str symbol: not used by coinbaseexchange fetchOrder
|
1051
1052
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1052
1053
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -754,11 +754,12 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
754
754
|
currencyId = self.safe_string(network, 'asset_name')
|
755
755
|
currencyCode = self.safe_currency_code(currencyId)
|
756
756
|
networkId = self.safe_string(network, 'network_arn_id')
|
757
|
+
networkIdForCode = self.safe_string_n(network, ['network_name', 'display_name', 'network_arn_id'], '')
|
757
758
|
return self.safe_network({
|
758
759
|
'info': network,
|
759
760
|
'id': networkId,
|
760
761
|
'name': self.safe_string(network, 'display_name'),
|
761
|
-
'network': self.network_id_to_code(
|
762
|
+
'network': self.network_id_to_code(networkIdForCode, currencyCode),
|
762
763
|
'active': None,
|
763
764
|
'deposit': None,
|
764
765
|
'withdraw': None,
|
ccxt/async_support/coinex.py
CHANGED
@@ -3559,24 +3559,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3559
3559
|
options = self.safe_dict(self.options, 'fetchDepositAddress', {})
|
3560
3560
|
fillResponseFromRequest = self.safe_bool(options, 'fillResponseFromRequest', True)
|
3561
3561
|
if fillResponseFromRequest:
|
3562
|
-
depositAddress['network'] = self.
|
3562
|
+
depositAddress['network'] = self.network_id_to_code(network, currency).upper()
|
3563
3563
|
return depositAddress
|
3564
3564
|
|
3565
|
-
def safe_network(self, networkId, currency: Currency = None):
|
3566
|
-
networks = self.safe_value(currency, 'networks', {})
|
3567
|
-
networksCodes = list(networks.keys())
|
3568
|
-
networksCodesLength = len(networksCodes)
|
3569
|
-
if networkId is None and networksCodesLength == 1:
|
3570
|
-
return networks[networksCodes[0]]
|
3571
|
-
return {
|
3572
|
-
'id': networkId,
|
3573
|
-
'network': None if (networkId is None) else networkId.upper(),
|
3574
|
-
}
|
3575
|
-
|
3576
|
-
def safe_network_code(self, networkId, currency: Currency = None):
|
3577
|
-
network = self.safe_network(networkId, currency)
|
3578
|
-
return network['network']
|
3579
|
-
|
3580
3565
|
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
3581
3566
|
#
|
3582
3567
|
# {
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -1673,18 +1673,6 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
1673
1673
|
keys = list(depositAddresses.keys())
|
1674
1674
|
return depositAddresses[keys[0]]
|
1675
1675
|
|
1676
|
-
def safe_network(self, networkId):
|
1677
|
-
networksById: dict = {
|
1678
|
-
'BTC': 'BTC',
|
1679
|
-
'ETH': 'ETH',
|
1680
|
-
'SOL': 'SOL',
|
1681
|
-
'BNB': 'BNB',
|
1682
|
-
'CRONOS': 'CRONOS',
|
1683
|
-
'MATIC': 'MATIC',
|
1684
|
-
'OP': 'OP',
|
1685
|
-
}
|
1686
|
-
return self.safe_string(networksById, networkId, networkId)
|
1687
|
-
|
1688
1676
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1689
1677
|
"""
|
1690
1678
|
fetch all deposits made to an account
|
ccxt/async_support/hitbtc.py
CHANGED