You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
orders = coinbase_client.list_orders()
order_ids = [(x['order_id']) for x in orders['orders'] if x['status'] == "OPEN" and x['product_id'] == product_id]
action = coinbase_client.cancel_orders(order_ids)
`
I placed this right before the Execute strategy code in the lambda_function in AWS. Confirmed it works.
There is a created time so it could be timed to cancel only old orders after a set number of days.
Another helpful filter would be limiting BUY or SELL side orders, default to both.
No description provided.
The text was updated successfully, but these errors were encountered: