mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Update order_parse online test
This commit is contained in:
@@ -58,8 +58,10 @@ class TestCCXTExchange:
|
|||||||
def test_ccxt_order_parse(self, exchange: EXCHANGE_FIXTURE_TYPE):
|
def test_ccxt_order_parse(self, exchange: EXCHANGE_FIXTURE_TYPE):
|
||||||
exch, exchange_name = exchange
|
exch, exchange_name = exchange
|
||||||
if orders := EXCHANGES[exchange_name].get('sample_order'):
|
if orders := EXCHANGES[exchange_name].get('sample_order'):
|
||||||
|
pair = 'SOL/USDT'
|
||||||
for order in orders:
|
for order in orders:
|
||||||
po = exch._api.parse_order(order)
|
market = exch._api.markets[pair]
|
||||||
|
po = exch._api.parse_order(order, market)
|
||||||
assert isinstance(po['id'], str)
|
assert isinstance(po['id'], str)
|
||||||
assert po['id'] is not None
|
assert po['id'] is not None
|
||||||
if len(order.keys()) < 5:
|
if len(order.keys()) < 5:
|
||||||
@@ -74,7 +76,7 @@ class TestCCXTExchange:
|
|||||||
if po['average'] is not None:
|
if po['average'] is not None:
|
||||||
assert isinstance(po['average'], float)
|
assert isinstance(po['average'], float)
|
||||||
assert po['average'] == 15.5
|
assert po['average'] == 15.5
|
||||||
assert po['symbol'] == 'SOL/USDT'
|
assert po['symbol'] == pair
|
||||||
assert isinstance(po['amount'], float)
|
assert isinstance(po['amount'], float)
|
||||||
assert po['amount'] == 1.1
|
assert po['amount'] == 1.1
|
||||||
assert isinstance(po['status'], str)
|
assert isinstance(po['status'], str)
|
||||||
|
|||||||
Reference in New Issue
Block a user