You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
[Live Mode] After Submitting an order Jeese tries to Submit Stop Loss and get this Error.
[INFO | 2023-01-12T00:00:00] SUBMITTED order: ETH-USDT, MARKET, buy, 1.76, $1388.8
[INFO | 2023-01-12T00:00:04] EXECUTED order: ETH-USDT, MARKET, buy, 1.76, $1388.6
[INFO | 2023-01-12T00:00:04] Traceback (most recent call last):
File "jesse_live/exchanges/LiveExchange.py", line 421, in jesse_live.exchanges.LiveExchange.LiveExchange._connect_ws._on_message
File "jesse_live/exchanges/Bybit/BybitUSDTPerpetualMain.py", line 464, in jesse_live.exchanges.Bybit.BybitUSDTPerpetualMain.BybitUSDTPerpetualMain.on_ws_message
File "jesse_live/exchanges/Bybit/BybitUSDTPerpetualMain.py", line 551, in jesse_live.exchanges.Bybit.BybitUSDTPerpetualMain.BybitUSDTPerpetualMain.prepare_order_stream
File "jesse_live/exchanges/LiveExchange.py", line 929, in jesse_live.exchanges.LiveExchange.LiveExchange.handle_order_stream
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Order.py", line 252, in execute
p._on_executed_order(self)
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Position.py", line 393, in _on_executed_order
self._close()
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Position.py", line 301, in _close
store.completed_trades.close_trade(self)
File "/usr/local/lib/python3.8/dist-packages/jesse/store/state_completed_trades.py", line 91, in close_trade
f"CLOSED a {t.type} trade for {t.exchange}-{t.symbol}: qty: {t.qty}, entry_price: {round(t.entry_price, 2)}, exit_price: {round(t.exit_price, 2)}, PNL: {round(t.pnl, 2)} ({round(t.pnl_percentage, 2)}%)"
File "/usr/local/lib/python3.8/dist-packages/jesse/models/ClosedTrade.py", line 100, in pnl
fee = config['env']['exchanges'][self.exchange]['fee']
KeyError: None
[ERROR | 2023-01-12T00:00:04] Traceback (most recent call last):
File "jesse_live/exchanges/LiveExchange.py", line 421, in jesse_live.exchanges.LiveExchange.LiveExchange._connect_ws._on_message
File "jesse_live/exchanges/Bybit/BybitUSDTPerpetualMain.py", line 464, in jesse_live.exchanges.Bybit.BybitUSDTPerpetualMain.BybitUSDTPerpetualMain.on_ws_message
File "jesse_live/exchanges/Bybit/BybitUSDTPerpetualMain.py", line 551, in jesse_live.exchanges.Bybit.BybitUSDTPerpetualMain.BybitUSDTPerpetualMain.prepare_order_stream
File "jesse_live/exchanges/LiveExchange.py", line 929, in jesse_live.exchanges.LiveExchange.LiveExchange.handle_order_stream
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Order.py", line 252, in execute
p._on_executed_order(self)
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Position.py", line 393, in _on_executed_order
self._close()
File "/usr/local/lib/python3.8/dist-packages/jesse/models/Position.py", line 301, in _close
store.completed_trades.close_trade(self)
File "/usr/local/lib/python3.8/dist-packages/jesse/store/state_completed_trades.py", line 91, in close_trade
f"CLOSED a {t.type} trade for {t.exchange}-{t.symbol}: qty: {t.qty}, entry_price: {round(t.entry_price, 2)}, exit_price: {round(t.exit_price, 2)}, PNL: {round(t.pnl, 2)} ({round(t.pnl_percentage, 2)}%)"
File "/usr/local/lib/python3.8/dist-packages/jesse/models/ClosedTrade.py", line 100, in pnl
fee = config['env']['exchanges'][self.exchange]['fee']
KeyError: None
[INFO | 2023-01-12T00:00:04] AttributeError: 'NoneType' object has no attribute '__name__'
[ERROR | 2023-01-12T00:00:04] AttributeError: 'NoneType' object has no attribute '__name__'
[INFO | 2023-01-12T00:00:04] Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/dist-packages/timeloop/job.py", line 19, in run
self.execute(*self.args, **self.kwargs)
File "jesse_live/live_mode.py", line 130, in jesse_live.live_mode.run.update_dashboard
File "jesse_live/services/dashboard.py", line 12, in jesse_live.services.dashboard.realtime
File "/usr/local/lib/python3.8/dist-packages/jesse/services/report.py", line 101, in livetrade
df = pd.DataFrame.from_records([t.to_dict for t in store.completed_trades.trades])
File "/usr/local/lib/python3.8/dist-packages/jesse/services/report.py", line 101, in <listcomp>
df = pd.DataFrame.from_records([t.to_dict for t in store.completed_trades.trades])
File "/usr/local/lib/python3.8/dist-packages/jesse/models/ClosedTrade.py", line 73, in to_dict
'strategy_name': jh.get_class_name(self.strategy_name),
File "/usr/local/lib/python3.8/dist-packages/jesse/helpers.py", line 992, in get_class_name
return cls.__name__
AttributeError: 'NoneType' object has no attribute '__name__'
[INFO | 2023-01-12T00:00:04] Session terminated as the result of an uncaught exception
[ERROR | 2023-01-12T00:00:04] Session terminated as the result of an uncaught exception
To Reproduce
Steps to reproduce the behavior:
2 routes: Bybit USDT Perpetual-ETH-USDT-2h, Bybit USDT Perpetual-ETH-USDT-6h (Extra)
Local candle generation mode is DISABLED
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
[Live Mode] After Submitting an order Jeese tries to Submit Stop Loss and get this Error.
To Reproduce
Steps to reproduce the behavior:
2 routes: Bybit USDT Perpetual-ETH-USDT-2h, Bybit USDT Perpetual-ETH-USDT-6h (Extra)
Local candle generation mode is DISABLED
Just wait for Order trigger.
Go Long code:
Expected behavior
Stop Loss order should be done
Screenshots
If applicable, add screenshots to help explain your problem.
Enviroment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: