Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

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

Open
AminSaqi opened this issue Feb 2, 2020 · 0 comments
Open

Comments

@AminSaqi
Copy link

AminSaqi commented Feb 2, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant