Skip to content

Commit 7b5378a

Browse files
committed
ci
1 parent 8cc2fa5 commit 7b5378a

79 files changed

Lines changed: 360 additions & 142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

python/ccxt/__init__.py

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@
4747
from ccxt.base.errors import PermissionDenied # noqa: F401
4848
from ccxt.base.errors import AccountNotEnabled # noqa: F401
4949
from ccxt.base.errors import AccountSuspended # noqa: F401
50+
from ccxt.base.errors import OBIPWhitelistError # noqa: F401
5051
from ccxt.base.errors import ArgumentsRequired # noqa: F401
5152
from ccxt.base.errors import BadRequest # noqa: F401
5253
from ccxt.base.errors import BadSymbol # noqa: F401
54+
from ccxt.base.errors import OBUntradableSymbol # noqa: F401
5355
from ccxt.base.errors import OperationRejected # noqa: F401
5456
from ccxt.base.errors import NoChange # noqa: F401
5557
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
@@ -81,6 +83,10 @@
8183
from ccxt.base.errors import BadResponse # noqa: F401
8284
from ccxt.base.errors import NullResponse # noqa: F401
8385
from ccxt.base.errors import CancelPending # noqa: F401
86+
from ccxt.base.errors import OBClosedPositionError # noqa: F401
87+
from ccxt.base.errors import OBOrderUncancellableError # noqa: F401
88+
from ccxt.base.errors import OBInternalSyncError # noqa: F401
89+
from ccxt.base.errors import OBMaxOpenOrdersReached # noqa: F401
8490
from ccxt.base.errors import UnsubscribeError # noqa: F401
8591
from ccxt.base.errors import error_hierarchy # noqa: F401
8692

@@ -172,39 +178,39 @@
172178
from ccxt.myokx import myokx # noqa: F401
173179
from ccxt.ndax import ndax # noqa: F401
174180
from ccxt.novadax import novadax # noqa: F401
175-
from ccxt.ob_ascendex import ob_ascendex # noqa: F401
176-
from ccxt.ob_binance import ob_binance # noqa: F401
177-
from ccxt.ob_binanceus import ob_binanceus # noqa: F401
178-
from ccxt.ob_bingx import ob_bingx # noqa: F401
179-
from ccxt.ob_bitfinex import ob_bitfinex # noqa: F401
180-
from ccxt.ob_bitget import ob_bitget # noqa: F401
181-
from ccxt.ob_bitmart import ob_bitmart # noqa: F401
182-
from ccxt.ob_bitmex import ob_bitmex # noqa: F401
183-
from ccxt.ob_bitso import ob_bitso # noqa: F401
184-
from ccxt.ob_bitstamp import ob_bitstamp # noqa: F401
185-
from ccxt.ob_bybit import ob_bybit # noqa: F401
186-
from ccxt.ob_coinbase import ob_coinbase # noqa: F401
187-
from ccxt.ob_coinex import ob_coinex # noqa: F401
188-
from ccxt.ob_cryptocom import ob_cryptocom # noqa: F401
189-
from ccxt.ob_gateio import ob_gateio # noqa: F401
190-
from ccxt.ob_hitbtc import ob_hitbtc # noqa: F401
191-
from ccxt.ob_hollaex import ob_hollaex # noqa: F401
192-
from ccxt.ob_htx import ob_htx # noqa: F401
193-
from ccxt.ob_hyperliquid import ob_hyperliquid # noqa: F401
194-
from ccxt.ob_kraken import ob_kraken # noqa: F401
195-
from ccxt.ob_kucoin import ob_kucoin # noqa: F401
196-
from ccxt.ob_kucoinfutures import ob_kucoinfutures # noqa: F401
197-
from ccxt.ob_lbank import ob_lbank # noqa: F401
198-
from ccxt.ob_mexc import ob_mexc # noqa: F401
199-
from ccxt.ob_myokx import ob_myokx # noqa: F401
200-
from ccxt.ob_ndax import ob_ndax # noqa: F401
201-
from ccxt.ob_okx import ob_okx # noqa: F401
202-
from ccxt.ob_okxus import ob_okxus # noqa: F401
203-
from ccxt.ob_phemex import ob_phemex # noqa: F401
204-
from ccxt.ob_poloniex import ob_poloniex # noqa: F401
205-
from ccxt.ob_upbit import ob_upbit # noqa: F401
206-
from ccxt.ob_wavesexchange import ob_wavesexchange # noqa: F401
207-
from ccxt.ob_wizardswap import ob_wizardswap # noqa: F401
181+
from ccxt.ob_ascendex import ob_ascendex # noqa: F401
182+
from ccxt.ob_binance import ob_binance # noqa: F401
183+
from ccxt.ob_binanceus import ob_binanceus # noqa: F401
184+
from ccxt.ob_bingx import ob_bingx # noqa: F401
185+
from ccxt.ob_bitfinex import ob_bitfinex # noqa: F401
186+
from ccxt.ob_bitget import ob_bitget # noqa: F401
187+
from ccxt.ob_bitmart import ob_bitmart # noqa: F401
188+
from ccxt.ob_bitmex import ob_bitmex # noqa: F401
189+
from ccxt.ob_bitso import ob_bitso # noqa: F401
190+
from ccxt.ob_bitstamp import ob_bitstamp # noqa: F401
191+
from ccxt.ob_bybit import ob_bybit # noqa: F401
192+
from ccxt.ob_coinbase import ob_coinbase # noqa: F401
193+
from ccxt.ob_coinex import ob_coinex # noqa: F401
194+
from ccxt.ob_cryptocom import ob_cryptocom # noqa: F401
195+
from ccxt.ob_gateio import ob_gateio # noqa: F401
196+
from ccxt.ob_hitbtc import ob_hitbtc # noqa: F401
197+
from ccxt.ob_hollaex import ob_hollaex # noqa: F401
198+
from ccxt.ob_htx import ob_htx # noqa: F401
199+
from ccxt.ob_hyperliquid import ob_hyperliquid # noqa: F401
200+
from ccxt.ob_kraken import ob_kraken # noqa: F401
201+
from ccxt.ob_kucoin import ob_kucoin # noqa: F401
202+
from ccxt.ob_kucoinfutures import ob_kucoinfutures # noqa: F401
203+
from ccxt.ob_lbank import ob_lbank # noqa: F401
204+
from ccxt.ob_mexc import ob_mexc # noqa: F401
205+
from ccxt.ob_myokx import ob_myokx # noqa: F401
206+
from ccxt.ob_ndax import ob_ndax # noqa: F401
207+
from ccxt.ob_okx import ob_okx # noqa: F401
208+
from ccxt.ob_okxus import ob_okxus # noqa: F401
209+
from ccxt.ob_phemex import ob_phemex # noqa: F401
210+
from ccxt.ob_poloniex import ob_poloniex # noqa: F401
211+
from ccxt.ob_upbit import ob_upbit # noqa: F401
212+
from ccxt.ob_wavesexchange import ob_wavesexchange # noqa: F401
213+
from ccxt.ob_wizardswap import ob_wizardswap # noqa: F401
208214
from ccxt.okx import okx # noqa: F401
209215
from ccxt.okxus import okxus # noqa: F401
210216
from ccxt.onetrading import onetrading # noqa: F401

python/ccxt/async_support/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
from ccxt.base.errors import PermissionDenied # noqa: F401
2727
from ccxt.base.errors import AccountNotEnabled # noqa: F401
2828
from ccxt.base.errors import AccountSuspended # noqa: F401
29+
from ccxt.base.errors import OBIPWhitelistError # noqa: F401
2930
from ccxt.base.errors import ArgumentsRequired # noqa: F401
3031
from ccxt.base.errors import BadRequest # noqa: F401
3132
from ccxt.base.errors import BadSymbol # noqa: F401
33+
from ccxt.base.errors import OBUntradableSymbol # noqa: F401
3234
from ccxt.base.errors import OperationRejected # noqa: F401
3335
from ccxt.base.errors import NoChange # noqa: F401
3436
from ccxt.base.errors import MarginModeAlreadySet # noqa: F401
@@ -39,12 +41,6 @@
3941
from ccxt.base.errors import InvalidAddress # noqa: F401
4042
from ccxt.base.errors import AddressPending # noqa: F401
4143
from ccxt.base.errors import InvalidOrder # noqa: F401
42-
from ccxt.base.errors import OBIPWhitelistError # noqa: F401
43-
from ccxt.base.errors import OBClosedPositionError # noqa: F401
44-
from ccxt.base.errors import OBOrderUncancellableError # noqa: F401
45-
from ccxt.base.errors import OBInternalSyncError # noqa: F401
46-
from ccxt.base.errors import OBMaxOpenOrdersReached # noqa: F401
47-
from ccxt.base.errors import OBUntradableSymbol # noqa: F401
4844
from ccxt.base.errors import OrderNotFound # noqa: F401
4945
from ccxt.base.errors import OrderNotCached # noqa: F401
5046
from ccxt.base.errors import OrderImmediatelyFillable # noqa: F401
@@ -66,6 +62,10 @@
6662
from ccxt.base.errors import BadResponse # noqa: F401
6763
from ccxt.base.errors import NullResponse # noqa: F401
6864
from ccxt.base.errors import CancelPending # noqa: F401
65+
from ccxt.base.errors import OBClosedPositionError # noqa: F401
66+
from ccxt.base.errors import OBOrderUncancellableError # noqa: F401
67+
from ccxt.base.errors import OBInternalSyncError # noqa: F401
68+
from ccxt.base.errors import OBMaxOpenOrdersReached # noqa: F401
6969
from ccxt.base.errors import UnsubscribeError # noqa: F401
7070
from ccxt.base.errors import error_hierarchy # noqa: F401
7171

python/ccxt/async_support/ob_binance.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class ob_binance(binance, ImplicitAPI):
2020
def describe(self) -> Any:
2121
return self.deep_extend(super(ob_binance, self).describe(), {
2222
'id': 'ob_binance',
23+
'name': 'Binance',
24+
'certified': False,
25+
'urls': {
26+
},
2327
'exceptions': {
2428
'exact': {
2529
'Order would immediately trigger.': OrderImmediatelyFillable,
@@ -98,9 +102,7 @@ def uses_demo_trading_instead_of_sandbox(self, exchangeType: Str) -> Bool:
98102
"""
99103
Binance futures use demo trading instead of classic sandbox(OctoBot binance tentacle); accept `futures` spelling too.
100104
"""
101-
if exchangeType is None or exchangeType == None:
102-
return False
103-
normalized = str(exchangeType).lower()
105+
normalized = str(exchangeType or '').lower()
104106
return(normalized == 'future') or (normalized == 'futures')
105107

106108
async def fetch_permissions(self, params={}) -> List[str]:

python/ccxt/async_support/ob_bingx.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from ccxt.base.errors import ExchangeError
1111
from ccxt.base.errors import AuthenticationError
1212
from ccxt.base.errors import PermissionDenied
13-
from ccxt.base.errors import OrderNotFound
1413
from ccxt.base.errors import OBIPWhitelistError
14+
from ccxt.base.errors import OrderNotFound
1515
from ccxt.base.errors import OBOrderUncancellableError
1616

1717

@@ -20,6 +20,10 @@ class ob_bingx(bingx, ImplicitAPI):
2020
def describe(self) -> Any:
2121
return self.deep_extend(super(ob_bingx, self).describe(), {
2222
'id': 'ob_bingx',
23+
'name': 'BingX',
24+
'certified': False,
25+
'urls': {
26+
},
2327
'exceptions': {
2428
'exact': {
2529
'100419': OBIPWhitelistError,
@@ -125,8 +129,7 @@ def adapt_bingx_stop_order_or_trade_type_and_price(self, parsed: dict, logContex
125129
currentType = self.safe_string_lower(parsed, 'type')
126130
# Step 3: take_stop_limit cannot be classified vs TP here
127131
if currentType == 'take_stop_limit':
128-
# unsupported: no way to figure out if self order is a stop loss or a take profit
129-
#(trigger above or bellow)
132+
# unsupported: no way to tell stop loss vs take profit from take_stop_limit(trigger above or below)
130133
parsed['type'] = 'unsupported'
131134
self.log(logContext, 'Unsupported order fetched: ' + self.json(parsed))
132135
return

python/ccxt/async_support/ob_bybit.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
from ccxt.abstract.ob_bybit import ImplicitAPI
88
from ccxt.base.types import Any, Market, Ticker
99
from typing import List
10-
from ccxt.base.errors import OrderNotFound
1110

1211

1312
class ob_bybit(bybit, ImplicitAPI):
1413

1514
def describe(self) -> Any:
1615
return self.deep_extend(super(ob_bybit, self).describe(), {
1716
'id': 'ob_bybit',
17+
'name': 'Bybit',
18+
'certified': False,
19+
'urls': {
20+
},
1821
'has': {
1922
'CORS': True,
2023
'spot': True,
@@ -44,9 +47,10 @@ def describe(self) -> Any:
4447
'fundingInTicker': True,
4548
'requiresSymbolForEmptyPosition': True,
4649
'requireOrderFeesFromTrades': True,
47-
'expectPossibleOrderNotFoundDuringOrderCreation': True,
50+
'expectPossibleNotFoundOrderDuringOrderCreation': True,
4851
'canHaveDelayedCancelledOrders': True,
4952
'adjustForTimeDifference': True,
53+
'hasBroker': True,
5054
},
5155
},
5256
})

python/ccxt/async_support/ob_cryptocom.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
from ccxt.abstract.ob_cryptocom import ImplicitAPI
88
from ccxt.base.types import Any
99
from typing import List
10-
from ccxt.base.errors import OrderNotFound
1110

1211

1312
class ob_cryptocom(cryptocom, ImplicitAPI):
1413

1514
def describe(self) -> Any:
1615
return self.deep_extend(super(ob_cryptocom, self).describe(), {
1716
'id': 'ob_cryptocom',
17+
'name': 'Crypto.com',
18+
'certified': False,
19+
'urls': {
20+
},
1821
'has': {
1922
'CORS': False,
2023
'spot': True,
@@ -39,7 +42,7 @@ def describe(self) -> Any:
3942
},
4043
},
4144
'fixMarketStatus': True,
42-
'expectPossibleOrderNotFoundDuringOrderCreation': True,
45+
'expectPossibleNotFoundOrderDuringOrderCreation': True,
4346
'supportFetchingCancelledOrders': False,
4447
'hasBroker': True,
4548
},

python/ccxt/async_support/ob_hyperliquid.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
from ccxt.abstract.ob_hyperliquid import ImplicitAPI
88
from ccxt.base.types import Any, Market, Ticker
99
from typing import List
10-
from ccxt.base.errors import OrderNotFound
1110

1211

1312
class ob_hyperliquid(hyperliquid, ImplicitAPI):
1413

1514
def describe(self) -> Any:
1615
return self.deep_extend(super(ob_hyperliquid, self).describe(), {
1716
'id': 'ob_hyperliquid',
17+
'name': 'Hyperliquid',
18+
'certified': False,
19+
'urls': {
20+
},
1821
'has': {
1922
'CORS': None,
2023
'spot': True,
@@ -40,7 +43,7 @@ def describe(self) -> Any:
4043
},
4144
'fixMarketStatus': True,
4245
'requireOrderFeesFromTrades': True,
43-
'expectPossibleOrderNotFoundDuringOrderCreation': True,
46+
'expectPossibleNotFoundOrderDuringOrderCreation': True,
4447
},
4548
},
4649
})

python/ccxt/async_support/ob_kucoin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from ccxt.base.types import Any, Bool, Int, Market, Order, Str, FundingRate, Trade
99
from typing import List
1010
from ccxt.base.errors import PermissionDenied
11-
from ccxt.base.errors import OperationFailed
1211
from ccxt.base.errors import OBIPWhitelistError
12+
from ccxt.base.errors import OperationFailed
1313
from ccxt.base.errors import OBClosedPositionError
1414
from ccxt.base.errors import OBOrderUncancellableError
1515

@@ -19,6 +19,10 @@ class ob_kucoin(kucoin, ImplicitAPI):
1919
def describe(self) -> Any:
2020
return self.deep_extend(super(ob_kucoin, self).describe(), {
2121
'id': 'ob_kucoin',
22+
'name': 'KuCoin',
23+
'certified': False,
24+
'urls': {
25+
},
2226
'exceptions': {
2327
'exact': {
2428
'order_not_exist_or_not_allow_to_cancel': OBOrderUncancellableError,
@@ -224,7 +228,7 @@ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
224228
def parse_funding_rate(self, data, market: Market = None) -> FundingRate:
225229
# override the standard parseFundingRate to apply OctoBot's KucoinCCXTAdapter.parse_funding_rate:
226230
# kucoin's parseFundingRate reports the previous funding timestamp under nextFundingTimestamp
227-
#(the actual next is not provided), so swap it to previousFundingTimestamp and derive the
231+
# the actual next funding time is not provided, so swap it to previousFundingTimestamp and derive the
228232
# real next by adding the default 8h funding interval
229233
parsed = super(ob_kucoin, self).parse_funding_rate(data, market)
230234
previousFundingTimestamp = self.safe_integer(parsed, 'nextFundingTimestamp')

python/ccxt/async_support/ob_kucoinfutures.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from ccxt.base.types import Any, Bool, Int, Market, Order, Str, FundingRate, Trade
99
from typing import List
1010
from ccxt.base.errors import PermissionDenied
11-
from ccxt.base.errors import OperationFailed
1211
from ccxt.base.errors import OBIPWhitelistError
12+
from ccxt.base.errors import OperationFailed
1313
from ccxt.base.errors import OBClosedPositionError
1414
from ccxt.base.errors import OBOrderUncancellableError
1515

@@ -19,6 +19,10 @@ class ob_kucoinfutures(kucoinfutures, ImplicitAPI):
1919
def describe(self) -> Any:
2020
return self.deep_extend(super(ob_kucoinfutures, self).describe(), {
2121
'id': 'ob_kucoinfutures',
22+
'name': 'KuCoin Futures',
23+
'certified': False,
24+
'urls': {
25+
},
2226
'exceptions': {
2327
'exact': {
2428
'order_not_exist_or_not_allow_to_cancel': OBOrderUncancellableError,
@@ -195,7 +199,7 @@ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
195199
def parse_funding_rate(self, data, market: Market = None) -> FundingRate:
196200
# override the standard parseFundingRate to apply OctoBot's KucoinCCXTAdapter.parse_funding_rate:
197201
# kucoin's parseFundingRate reports the previous funding timestamp under nextFundingTimestamp
198-
#(the actual next is not provided), so swap it to previousFundingTimestamp and derive the
202+
# the actual next funding time is not provided, so swap it to previousFundingTimestamp and derive the
199203
# real next by adding the default 8h funding interval
200204
parsed = super(ob_kucoinfutures, self).parse_funding_rate(data, market)
201205
previousFundingTimestamp = self.safe_integer(parsed, 'nextFundingTimestamp')

0 commit comments

Comments
 (0)