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

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

@AminSaqi

Description

@AminSaqi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions