catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

TypeError: get_order() got an unexpected keyword argument 'return_price'

Open AminSaqi opened this issue 5 years ago • 0 comments

I'm trying to get the execution price of the recently placed order like the following:

orderId = order_target_percent(context.asset, 1)
order, execPrice = get_order(orderId, return_price=True)

But I get the error:

  File "C:/Users/Amin/source/python/catalyst/RF_BTC_H1.py", line 89, in handle_data
    order, execPrice = get_order(orderId, return_price=True)
  File "C:\Users\Amin\Anaconda3\envs\catalyst\lib\site-packages\catalyst\utils\api_support.py", line 57, in wrapped
    return getattr(algo_instance, f.__name__)(*args, **kwargs)
TypeError: get_order() got an unexpected keyword argument 'return_price'

I need execution price to calculate StopLoss/TakeProfit. Any alternative approach is welcome.

AminSaqi avatar Feb 02 '20 19:02 AminSaqi