Thanks to visit codestin.com
Credit goes to github.com

Skip to content

check order results, check win,get active orders are not doing what the docs are saying  #35

@Crazy4electrons

Description

@Crazy4electrons

Good day all.

I having trouble to get order results or to check win. i want to check if my order was a successfull win or not to intergrade a martingale strategy

basically checking results or get active order both show the same thing. the active status always shows active even thou the trade has finished and at profit it just shows the profit that is being obtained if trade is successfull and not actual trade winnings.

here is a traceback:

check_order_results:
Order Result: order_id='027965fb-c120-4947-968f-a40216957634' asset='EURUSD_otc' amount=1.0 direction=<OrderDirection.PUT: 'put'> duration=60 status=<OrderStatus.ACTIVE: 'active'> placed_at=datetime.datetime(2025, 7, 22, 16, 13, 28, 367905) expires_at=datetime.datetime(2025, 7, 22, 16, 14, 28, 367909) profit=0.92 payout=None error_message=None

get_active_orders:
Active Orders:
order_id='027965fb-c120-4947-968f-a40216957634' asset='EURUSD_otc' amount=1.0 direction=<OrderDirection.PUT: 'put'> duration=60 status=<OrderStatus.ACTIVE: 'active'> placed_at=datetime.datetime(2025, 7, 22, 16, 13, 28, 367905) expires_at=datetime.datetime(2025, 7, 22, 16, 14, 28, 367909) profit=0.92 payout=None error_message=None

check_win just hangs and i have to manually stop the script. but as you can see above that the active and get results show the same things. so i cant determine if the order was a win or not.

for now i will just use check balance to determine win or loss.

but please if anyone has a fix for this, it will be really helpfull.

thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions