ccxt 4.4.75__py2.py3-none-any.whl → 4.4.78__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 -3
- ccxt/abstract/apex.py +31 -0
- ccxt/abstract/myokx.py +4 -0
- ccxt/abstract/okx.py +4 -0
- ccxt/abstract/upbit.py +51 -37
- ccxt/abstract/xt.py +3 -0
- ccxt/apex.py +1884 -0
- ccxt/ascendex.py +2 -2
- ccxt/async_support/__init__.py +3 -3
- ccxt/async_support/apex.py +1884 -0
- ccxt/async_support/ascendex.py +2 -2
- ccxt/async_support/base/exchange.py +2 -2
- ccxt/async_support/binance.py +39 -217
- ccxt/async_support/bingx.py +1 -1
- ccxt/async_support/bitfinex.py +2 -2
- ccxt/async_support/bitflyer.py +2 -2
- ccxt/async_support/bitget.py +135 -65
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +6 -6
- ccxt/async_support/bitrue.py +48 -0
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +29 -4
- ccxt/async_support/coincatch.py +66 -0
- ccxt/async_support/coinex.py +3 -1
- ccxt/async_support/coinlist.py +85 -2
- ccxt/async_support/cryptocom.py +2 -2
- ccxt/async_support/defx.py +1 -1
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/deribit.py +2 -2
- ccxt/async_support/derive.py +2 -2
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/hitbtc.py +5 -2
- ccxt/async_support/htx.py +2 -2
- ccxt/async_support/hyperliquid.py +13 -6
- ccxt/async_support/kraken.py +2 -2
- ccxt/async_support/krakenfutures.py +2 -2
- ccxt/async_support/kucoinfutures.py +2 -2
- ccxt/async_support/mexc.py +50 -52
- ccxt/async_support/okx.py +21 -9
- ccxt/async_support/oxfun.py +2 -2
- ccxt/async_support/paradex.py +5 -10
- ccxt/async_support/phemex.py +4 -3
- ccxt/async_support/poloniex.py +3 -3
- ccxt/async_support/probit.py +1 -0
- ccxt/async_support/tradeogre.py +2 -1
- ccxt/async_support/upbit.py +265 -89
- ccxt/async_support/vertex.py +2 -2
- ccxt/async_support/whitebit.py +1 -0
- ccxt/async_support/woo.py +5 -3
- ccxt/async_support/woofipro.py +2 -2
- ccxt/async_support/xt.py +115 -5
- ccxt/base/exchange.py +76 -3
- ccxt/binance.py +39 -217
- ccxt/bingx.py +1 -1
- ccxt/bitfinex.py +2 -2
- ccxt/bitflyer.py +2 -2
- ccxt/bitget.py +135 -65
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +6 -6
- ccxt/bitrue.py +48 -0
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +29 -4
- ccxt/coincatch.py +66 -0
- ccxt/coinex.py +3 -1
- ccxt/coinlist.py +85 -2
- ccxt/cryptocom.py +2 -2
- ccxt/defx.py +1 -1
- ccxt/delta.py +1 -1
- ccxt/deribit.py +2 -2
- ccxt/derive.py +2 -2
- ccxt/digifinex.py +2 -2
- ccxt/gate.py +1 -1
- ccxt/hitbtc.py +5 -2
- ccxt/htx.py +2 -2
- ccxt/hyperliquid.py +13 -6
- ccxt/kraken.py +2 -2
- ccxt/krakenfutures.py +2 -2
- ccxt/kucoinfutures.py +2 -2
- ccxt/mexc.py +50 -52
- ccxt/okx.py +21 -9
- ccxt/oxfun.py +2 -2
- ccxt/paradex.py +5 -10
- ccxt/phemex.py +4 -3
- ccxt/poloniex.py +3 -3
- ccxt/pro/__init__.py +5 -1
- ccxt/pro/apex.py +984 -0
- ccxt/pro/coinbase.py +4 -6
- ccxt/pro/gate.py +22 -2
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/hyperliquid.py +1 -1
- ccxt/pro/p2b.py +2 -2
- ccxt/pro/tradeogre.py +272 -0
- ccxt/probit.py +1 -0
- ccxt/test/tests_async.py +27 -0
- ccxt/test/tests_sync.py +27 -0
- ccxt/tradeogre.py +2 -1
- ccxt/upbit.py +265 -89
- ccxt/vertex.py +2 -2
- ccxt/whitebit.py +1 -0
- ccxt/woo.py +5 -3
- ccxt/woofipro.py +2 -2
- ccxt/xt.py +115 -5
- {ccxt-4.4.75.dist-info → ccxt-4.4.78.dist-info}/METADATA +4 -4
- {ccxt-4.4.75.dist-info → ccxt-4.4.78.dist-info}/RECORD +108 -106
- ccxt/abstract/ace.py +0 -15
- ccxt/ace.py +0 -1152
- ccxt/async_support/ace.py +0 -1152
- {ccxt-4.4.75.dist-info → ccxt-4.4.78.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.75.dist-info → ccxt-4.4.78.dist-info}/WHEEL +0 -0
- {ccxt-4.4.75.dist-info → ccxt-4.4.78.dist-info}/top_level.txt +0 -0
ccxt/mexc.py
CHANGED
@@ -1097,80 +1097,47 @@ class mexc(Exchange, ImplicitAPI):
|
|
1097
1097
|
id = self.safe_string(currency, 'coin')
|
1098
1098
|
code = self.safe_currency_code(id)
|
1099
1099
|
name = self.safe_string(currency, 'name')
|
1100
|
-
currencyActive = False
|
1101
|
-
currencyFee = None
|
1102
|
-
currencyWithdrawMin = None
|
1103
|
-
currencyWithdrawMax = None
|
1104
|
-
depositEnabled = False
|
1105
|
-
withdrawEnabled = False
|
1106
1100
|
networks: dict = {}
|
1107
1101
|
chains = self.safe_value(currency, 'networkList', [])
|
1108
1102
|
for j in range(0, len(chains)):
|
1109
1103
|
chain = chains[j]
|
1110
1104
|
networkId = self.safe_string_2(chain, 'netWork', 'network')
|
1111
1105
|
network = self.network_id_to_code(networkId)
|
1112
|
-
isDepositEnabled = self.safe_bool(chain, 'depositEnable', False)
|
1113
|
-
isWithdrawEnabled = self.safe_bool(chain, 'withdrawEnable', False)
|
1114
|
-
active = (isDepositEnabled and isWithdrawEnabled)
|
1115
|
-
currencyActive = active or currencyActive
|
1116
|
-
withdrawMin = self.safe_string(chain, 'withdrawMin')
|
1117
|
-
withdrawMax = self.safe_string(chain, 'withdrawMax')
|
1118
|
-
currencyWithdrawMin = withdrawMin if (currencyWithdrawMin is None) else currencyWithdrawMin
|
1119
|
-
currencyWithdrawMax = withdrawMax if (currencyWithdrawMax is None) else currencyWithdrawMax
|
1120
|
-
fee = self.safe_number(chain, 'withdrawFee')
|
1121
|
-
currencyFee = fee if (currencyFee is None) else currencyFee
|
1122
|
-
if Precise.string_gt(currencyWithdrawMin, withdrawMin):
|
1123
|
-
currencyWithdrawMin = withdrawMin
|
1124
|
-
if Precise.string_lt(currencyWithdrawMax, withdrawMax):
|
1125
|
-
currencyWithdrawMax = withdrawMax
|
1126
|
-
if isDepositEnabled:
|
1127
|
-
depositEnabled = True
|
1128
|
-
if isWithdrawEnabled:
|
1129
|
-
withdrawEnabled = True
|
1130
1106
|
networks[network] = {
|
1131
1107
|
'info': chain,
|
1132
1108
|
'id': networkId,
|
1133
1109
|
'network': network,
|
1134
|
-
'active':
|
1135
|
-
'deposit':
|
1136
|
-
'withdraw':
|
1137
|
-
'fee':
|
1110
|
+
'active': None,
|
1111
|
+
'deposit': self.safe_bool(chain, 'depositEnable', False),
|
1112
|
+
'withdraw': self.safe_bool(chain, 'withdrawEnable', False),
|
1113
|
+
'fee': self.safe_number(chain, 'withdrawFee'),
|
1138
1114
|
'precision': None,
|
1139
1115
|
'limits': {
|
1140
1116
|
'withdraw': {
|
1141
|
-
'min': withdrawMin,
|
1142
|
-
'max': withdrawMax,
|
1117
|
+
'min': self.safe_string(chain, 'withdrawMin'),
|
1118
|
+
'max': self.safe_string(chain, 'withdrawMax'),
|
1143
1119
|
},
|
1144
1120
|
},
|
1145
1121
|
}
|
1146
|
-
|
1147
|
-
networkKeysLength = len(networkKeys)
|
1148
|
-
if (networkKeysLength == 1) or ('NONE' in networks):
|
1149
|
-
defaultNetwork = self.safe_value_2(networks, 'NONE', networkKeysLength - 1)
|
1150
|
-
if defaultNetwork is not None:
|
1151
|
-
currencyFee = defaultNetwork['fee']
|
1152
|
-
result[code] = {
|
1122
|
+
result[code] = self.safe_currency_structure({
|
1153
1123
|
'info': currency,
|
1154
1124
|
'id': id,
|
1155
1125
|
'code': code,
|
1156
1126
|
'name': name,
|
1157
|
-
'active':
|
1158
|
-
'deposit':
|
1159
|
-
'withdraw':
|
1160
|
-
'fee':
|
1127
|
+
'active': None,
|
1128
|
+
'deposit': None,
|
1129
|
+
'withdraw': None,
|
1130
|
+
'fee': None,
|
1161
1131
|
'precision': None,
|
1162
1132
|
'limits': {
|
1163
1133
|
'amount': {
|
1164
1134
|
'min': None,
|
1165
1135
|
'max': None,
|
1166
1136
|
},
|
1167
|
-
'withdraw': {
|
1168
|
-
'min': currencyWithdrawMin,
|
1169
|
-
'max': currencyWithdrawMax,
|
1170
|
-
},
|
1171
1137
|
},
|
1138
|
+
'type': 'crypto',
|
1172
1139
|
'networks': networks,
|
1173
|
-
}
|
1140
|
+
})
|
1174
1141
|
return result
|
1175
1142
|
|
1176
1143
|
def fetch_markets(self, params={}) -> List[Market]:
|
@@ -3253,13 +3220,27 @@ class mexc(Exchange, ImplicitAPI):
|
|
3253
3220
|
|
3254
3221
|
def parse_order(self, order: dict, market: Market = None) -> Order:
|
3255
3222
|
#
|
3256
|
-
# spot
|
3223
|
+
# spot
|
3224
|
+
# createOrder
|
3257
3225
|
#
|
3258
|
-
#
|
3226
|
+
# {
|
3227
|
+
# "symbol": "FARTCOINUSDT",
|
3228
|
+
# "orderId": "C02__342252993005723644225",
|
3229
|
+
# "orderListId": "-1",
|
3230
|
+
# "price": "1.1",
|
3231
|
+
# "origQty": "6.3",
|
3232
|
+
# "type": "IMMEDIATE_OR_CANCEL",
|
3233
|
+
# "side": "SELL",
|
3234
|
+
# "transactTime": "1745852205223"
|
3235
|
+
# }
|
3236
|
+
#
|
3237
|
+
# unknown endpoint on spot
|
3238
|
+
#
|
3239
|
+
# {
|
3259
3240
|
# "symbol": "BTCUSDT",
|
3260
3241
|
# "orderId": "123738410679123456",
|
3261
3242
|
# "orderListId": -1
|
3262
|
-
#
|
3243
|
+
# }
|
3263
3244
|
#
|
3264
3245
|
# margin: createOrder
|
3265
3246
|
#
|
@@ -3421,6 +3402,10 @@ class mexc(Exchange, ImplicitAPI):
|
|
3421
3402
|
id = order
|
3422
3403
|
else:
|
3423
3404
|
id = self.safe_string_2(order, 'orderId', 'id')
|
3405
|
+
timeInForce = self.parse_order_time_in_force(self.safe_string(order, 'timeInForce'))
|
3406
|
+
typeRaw = self.safe_string(order, 'type')
|
3407
|
+
if timeInForce is None:
|
3408
|
+
timeInForce = self.get_tif_from_raw_order_type(typeRaw)
|
3424
3409
|
marketId = self.safe_string(order, 'symbol')
|
3425
3410
|
market = self.safe_market(marketId, market)
|
3426
3411
|
timestamp = self.safe_integer_n(order, ['time', 'createTime', 'transactTime'])
|
@@ -3442,8 +3427,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
3442
3427
|
'lastTradeTimestamp': None, # TODO: self might be 'updateTime' if order-status is filled, otherwise cancellation time. needs to be checked
|
3443
3428
|
'status': self.parse_order_status(self.safe_string_2(order, 'status', 'state')),
|
3444
3429
|
'symbol': market['symbol'],
|
3445
|
-
'type': self.parse_order_type(
|
3446
|
-
'timeInForce':
|
3430
|
+
'type': self.parse_order_type(typeRaw),
|
3431
|
+
'timeInForce': timeInForce,
|
3447
3432
|
'side': self.parse_order_side(self.safe_string(order, 'side')),
|
3448
3433
|
'price': self.safe_number(order, 'price'),
|
3449
3434
|
'triggerPrice': self.safe_number_2(order, 'stopPrice', 'triggerPrice'),
|
@@ -3472,6 +3457,9 @@ class mexc(Exchange, ImplicitAPI):
|
|
3472
3457
|
'MARKET': 'market',
|
3473
3458
|
'LIMIT': 'limit',
|
3474
3459
|
'LIMIT_MAKER': 'limit',
|
3460
|
+
# on spot, during submission below types are used only accepted order
|
3461
|
+
'IMMEDIATE_OR_CANCEL': 'limit',
|
3462
|
+
'FILL_OR_KILL': 'limit',
|
3475
3463
|
}
|
3476
3464
|
return self.safe_string(statuses, status, status)
|
3477
3465
|
|
@@ -3499,6 +3487,16 @@ class mexc(Exchange, ImplicitAPI):
|
|
3499
3487
|
}
|
3500
3488
|
return self.safe_string(statuses, status, status)
|
3501
3489
|
|
3490
|
+
def get_tif_from_raw_order_type(self, orderType: Str = None):
|
3491
|
+
statuses: dict = {
|
3492
|
+
'LIMIT': 'GTC',
|
3493
|
+
'LIMIT_MAKER': 'POST_ONLY',
|
3494
|
+
'IMMEDIATE_OR_CANCEL': 'IOC',
|
3495
|
+
'FILL_OR_KILL': 'FOK',
|
3496
|
+
'MARKET': 'IOC',
|
3497
|
+
}
|
3498
|
+
return self.safe_string(statuses, orderType, orderType)
|
3499
|
+
|
3502
3500
|
def fetch_account_helper(self, type, params):
|
3503
3501
|
if type == 'spot':
|
3504
3502
|
return self.spotPrivateGetAccount(params)
|
@@ -4849,7 +4847,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4849
4847
|
response = self.fetch_positions(None, self.extend(request, params))
|
4850
4848
|
return self.safe_value(response, 0)
|
4851
4849
|
|
4852
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
4850
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
4853
4851
|
"""
|
4854
4852
|
fetch all open positions
|
4855
4853
|
|
ccxt/okx.py
CHANGED
@@ -397,6 +397,7 @@ class okx(Exchange, ImplicitAPI):
|
|
397
397
|
'asset/subaccount/managed-subaccount-bills': 5 / 3,
|
398
398
|
'users/entrust-subaccount-list': 10,
|
399
399
|
'account/subaccount/interest-limits': 4,
|
400
|
+
'users/subaccount/apikey': 10,
|
400
401
|
# grid trading
|
401
402
|
'tradingBot/grid/orders-algo-pending': 1,
|
402
403
|
'tradingBot/grid/orders-algo-history': 1,
|
@@ -529,6 +530,9 @@ class okx(Exchange, ImplicitAPI):
|
|
529
530
|
'asset/subaccount/transfer': 10,
|
530
531
|
'users/subaccount/set-transfer-out': 10,
|
531
532
|
'account/subaccount/set-loan-allocation': 4,
|
533
|
+
'users/subaccount/create-subaccount': 10,
|
534
|
+
'users/subaccount/subaccount-apikey': 10,
|
535
|
+
'users/subaccount/delete-apikey': 10,
|
532
536
|
# grid trading
|
533
537
|
'tradingBot/grid/order-algo': 1,
|
534
538
|
'tradingBot/grid/amend-order-algo': 1,
|
@@ -939,6 +943,11 @@ class okx(Exchange, ImplicitAPI):
|
|
939
943
|
'59506': ExchangeError, # APIKey does not exist
|
940
944
|
'59507': ExchangeError, # The two accounts involved in a transfer must be two different sub accounts under the same parent account
|
941
945
|
'59508': AccountSuspended, # The sub account of {0} is suspended
|
946
|
+
'59515': ExchangeError, # You are currently not on the custody whitelist. Please contact customer service for assistance.
|
947
|
+
'59516': ExchangeError, # Please create the Copper custody funding account first.
|
948
|
+
'59517': ExchangeError, # Please create the Komainu custody funding account first.
|
949
|
+
'59518': ExchangeError, # You can’t create a sub-account using the API; please use the app or web.
|
950
|
+
'59519': ExchangeError, # You can’t use self function/feature while it's frozen, due to: {freezereason}
|
942
951
|
'59642': BadRequest, # Lead and copy traders can only use margin-free or single-currency margin account modes
|
943
952
|
'59643': ExchangeError, # Couldn’t switch account modes’re currently copying spot trades
|
944
953
|
# WebSocket error Codes from 60000-63999
|
@@ -1607,8 +1616,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1607
1616
|
swap = (type == 'swap')
|
1608
1617
|
option = (type == 'option')
|
1609
1618
|
contract = swap or future or option
|
1610
|
-
baseId = self.safe_string(market, 'baseCcy')
|
1611
|
-
quoteId = self.safe_string(market, 'quoteCcy')
|
1619
|
+
baseId = self.safe_string(market, 'baseCcy', '') # defaulting to '' because some weird preopen markets have empty baseId
|
1620
|
+
quoteId = self.safe_string(market, 'quoteCcy', '')
|
1612
1621
|
settleId = self.safe_string(market, 'settleCcy')
|
1613
1622
|
settle = self.safe_currency_code(settleId)
|
1614
1623
|
underlying = self.safe_string(market, 'uly')
|
@@ -1623,18 +1632,21 @@ class okx(Exchange, ImplicitAPI):
|
|
1623
1632
|
strikePrice = None
|
1624
1633
|
optionType = None
|
1625
1634
|
if contract:
|
1626
|
-
|
1635
|
+
if settle is not None:
|
1636
|
+
symbol = symbol + ':' + settle
|
1627
1637
|
if future:
|
1628
1638
|
expiry = self.safe_integer(market, 'expTime')
|
1629
|
-
|
1630
|
-
|
1639
|
+
if expiry is not None:
|
1640
|
+
ymd = self.yymmdd(expiry)
|
1641
|
+
symbol = symbol + '-' + ymd
|
1631
1642
|
elif option:
|
1632
1643
|
expiry = self.safe_integer(market, 'expTime')
|
1633
1644
|
strikePrice = self.safe_string(market, 'stk')
|
1634
1645
|
optionType = self.safe_string(market, 'optType')
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1646
|
+
if expiry is not None:
|
1647
|
+
ymd = self.yymmdd(expiry)
|
1648
|
+
symbol = symbol + '-' + ymd + '-' + strikePrice + '-' + optionType
|
1649
|
+
optionType = 'put' if (optionType == 'P') else 'call'
|
1638
1650
|
tickSize = self.safe_string(market, 'tickSz')
|
1639
1651
|
fees = self.safe_dict_2(self.fees, type, 'trading', {})
|
1640
1652
|
maxLeverage = self.safe_string(market, 'lever', '1')
|
@@ -5389,7 +5401,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5389
5401
|
return None
|
5390
5402
|
return self.parse_position(position, market)
|
5391
5403
|
|
5392
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
5404
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
5393
5405
|
"""
|
5394
5406
|
|
5395
5407
|
https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
ccxt/oxfun.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.oxfun import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, FundingRates, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -2129,7 +2129,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2129
2129
|
data['type'] = 'withdrawal'
|
2130
2130
|
return self.parse_transaction(data, currency)
|
2131
2131
|
|
2132
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
2132
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
2133
2133
|
"""
|
2134
2134
|
fetch all open positions
|
2135
2135
|
|
ccxt/paradex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.paradex import ImplicitAPI
|
8
|
-
from ccxt.base.types import Any, Balances, Currency, Int, Leverage, MarginMode, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
8
|
+
from ccxt.base.types import Any, Balances, Currency, Int, Leverage, MarginMode, Market, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import AuthenticationError
|
@@ -703,14 +703,9 @@ class paradex(Exchange, ImplicitAPI):
|
|
703
703
|
"""
|
704
704
|
self.load_markets()
|
705
705
|
symbols = self.market_symbols(symbols)
|
706
|
-
request: dict = {
|
707
|
-
|
708
|
-
|
709
|
-
request['market'] = self.market_id(symbols[0])
|
710
|
-
else:
|
711
|
-
request['market'] = self.market_id(symbols)
|
712
|
-
else:
|
713
|
-
request['market'] = 'ALL'
|
706
|
+
request: dict = {
|
707
|
+
'market': 'ALL',
|
708
|
+
}
|
714
709
|
response = self.publicGetMarketsSummary(self.extend(request, params))
|
715
710
|
#
|
716
711
|
# {
|
@@ -1820,7 +1815,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
1820
1815
|
positions = self.fetch_positions([market['symbol']], params)
|
1821
1816
|
return self.safe_dict(positions, 0, {})
|
1822
1817
|
|
1823
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
1818
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
1824
1819
|
"""
|
1825
1820
|
fetch all open positions
|
1826
1821
|
|
ccxt/phemex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.phemex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Any, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Any, Balances, Conversion, Currencies, Currency, DepositAddress, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, FundingRate, Trade, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1166,7 +1166,8 @@ class phemex(Exchange, ImplicitAPI):
|
|
1166
1166
|
},
|
1167
1167
|
},
|
1168
1168
|
'valueScale': valueScale,
|
1169
|
-
'networks':
|
1169
|
+
'networks': None,
|
1170
|
+
'type': 'crypto',
|
1170
1171
|
}
|
1171
1172
|
return result
|
1172
1173
|
|
@@ -3570,7 +3571,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
3570
3571
|
'fee': fee,
|
3571
3572
|
}
|
3572
3573
|
|
3573
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
3574
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
3574
3575
|
"""
|
3575
3576
|
fetch all open positions
|
3576
3577
|
|
ccxt/poloniex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.poloniex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, Leverage, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, Leverage, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, 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
|
@@ -1827,7 +1827,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1827
1827
|
isTrigger = self.safe_value_2(params, 'trigger', 'stop')
|
1828
1828
|
params = self.omit(params, ['trigger', 'stop'])
|
1829
1829
|
response = None
|
1830
|
-
if
|
1830
|
+
if marketType != 'spot':
|
1831
1831
|
raw = self.swapPrivateGetV3TradeOrderOpens(self.extend(request, params))
|
1832
1832
|
#
|
1833
1833
|
# {
|
@@ -3284,7 +3284,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
3284
3284
|
#
|
3285
3285
|
return response
|
3286
3286
|
|
3287
|
-
def fetch_positions(self, symbols: Strings = None, params={}):
|
3287
|
+
def fetch_positions(self, symbols: Strings = None, params={}) -> List[Position]:
|
3288
3288
|
"""
|
3289
3289
|
fetch all open positions
|
3290
3290
|
|
ccxt/pro/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.4.
|
7
|
+
__version__ = '4.4.78'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
@@ -13,6 +13,7 @@ from ccxt.async_support.base.exchange import Exchange # noqa: F401
|
|
13
13
|
# CCXT Pro exchanges (now this is mainly used for importing exchanges in WS tests)
|
14
14
|
|
15
15
|
from ccxt.pro.alpaca import alpaca # noqa: F401
|
16
|
+
from ccxt.pro.apex import apex # noqa: F401
|
16
17
|
from ccxt.pro.ascendex import ascendex # noqa: F401
|
17
18
|
from ccxt.pro.bequant import bequant # noqa: F401
|
18
19
|
from ccxt.pro.binance import binance # noqa: F401
|
@@ -76,6 +77,7 @@ from ccxt.pro.paradex import paradex # noqa
|
|
76
77
|
from ccxt.pro.phemex import phemex # noqa: F401
|
77
78
|
from ccxt.pro.poloniex import poloniex # noqa: F401
|
78
79
|
from ccxt.pro.probit import probit # noqa: F401
|
80
|
+
from ccxt.pro.tradeogre import tradeogre # noqa: F401
|
79
81
|
from ccxt.pro.upbit import upbit # noqa: F401
|
80
82
|
from ccxt.pro.vertex import vertex # noqa: F401
|
81
83
|
from ccxt.pro.whitebit import whitebit # noqa: F401
|
@@ -85,6 +87,7 @@ from ccxt.pro.xt import xt # noqa
|
|
85
87
|
|
86
88
|
exchanges = [
|
87
89
|
'alpaca',
|
90
|
+
'apex',
|
88
91
|
'ascendex',
|
89
92
|
'bequant',
|
90
93
|
'binance',
|
@@ -148,6 +151,7 @@ exchanges = [
|
|
148
151
|
'phemex',
|
149
152
|
'poloniex',
|
150
153
|
'probit',
|
154
|
+
'tradeogre',
|
151
155
|
'upbit',
|
152
156
|
'vertex',
|
153
157
|
'whitebit',
|