Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RestExchange] handle None args for create_order #869

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions octobot_trading/exchanges/types/rest_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ async def _create_specific_order(self, order_type, symbol, quantity: decimal.Dec
side: enums.TradeOrderSide = None, current_price: decimal.Decimal = None,
stop_price: decimal.Decimal = None, reduce_only: bool = False, params=None) -> dict:
created_order = None
float_quantity = float(quantity)
float_price = float(price)
float_stop_price = float(stop_price)
float_current_price = float(current_price)
float_quantity = float(quantity) if quantity else None
float_price = float(price) if price else None
float_stop_price = float(stop_price) if stop_price else None
float_current_price = float(current_price) if current_price else None
side = None if side is None else side.value
params = {} if params is None else params
params.update(self.exchange_manager.exchange_backend.get_orders_parameters(None))
Expand Down