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
File "nautilus_trader/risk/engine.pyx", line 593, in nautilus_trader.risk.engine.RiskEngine._check_orders_risk
File "nautilus_trader/risk/engine.pyx", line 593, in nautilus_trader.risk.engine.RiskEngine._check_orders_risk
File "nautilus_trader/risk/engine.pyx", line 666, in nautilus_trader.risk.engine.RiskEngine._check_orders_risk
File "nautilus_trader/model/instruments/base.pyx", line 570, in nautilus_trader.model.instruments.base.Instrument.notional_value
File "nautilus_trader/model/objects.pyx", line 946, in nautilus_trader.model.objects.Money.__init__
ValueError: invalid `value` greater than `MONEY_MAX` 9_223_372_036.0, was 881_778_000_000.0
Encountering an issue when submitting a market buy order with a quote quantity
the multiplication of order.quantity and last_px results in quote_currency^2, which is incorrect.
Am I missing something, or is this a bug?
Why the engine change order's quantity quote to base when order.is_quote_quantity = true?
if not instrument.is_inverse and order.is_quote_quantity:
last_px = self._last_px_for_conversion(order.instrument_id, order.side)
if last_px is None:
self._deny_order(order, f"no-price-to-convert-quote-qty {order.instrument_id}")
return # Denied
base_qty = instrument.calculate_base_quantity(order.quantity, last_px)
self._set_order_base_qty(order, base_qty)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
notional = instrument.notional_value(order.quantity, last_px, use_quote_for_inverse=True)
order.is_quote_quantity
is trueorder.quantity
andlast_px
results inquote_currency^2
, which is incorrect.order.is_quote_quantity = true?
Beta Was this translation helpful? Give feedback.
All reactions