luno / luno-python

Python SDK for the Luno API
MIT License
64 stars 36 forks source link

How to detect pending order of stop limit order? #39

Closed uyin85 closed 2 years ago

uyin85 commented 2 years ago

Hi,

I already have a pending/open stop-limit order. Then I try to use list_orders(state='PENDING'). But it return None.

If i open limit order, then list_orders(state='PENDING'), it is working.

This list_orders(state='PENDING') is not working for stop limit order. Do you know why?

adamhicks commented 2 years ago

Hello! stop limit orders are in a different state when they haven't been triggered. If you use list_orders_v2 then you'll see your stop limit orders in "AWAITING" status. Unfortunately we don't offer state filtering on _v2 so you'll need to filter the result yourself if you're only interested in "AWAITING" orders.