dydxprotocol / dydx-v3-python

Python client for dYdX (API v3)
Apache License 2.0
304 stars 174 forks source link

get_orders DOES NOT WORK FOR FILLED! #205

Open mcelia2324 opened 1 year ago

mcelia2324 commented 1 year ago

Can this please be fixed... FILLED is not a valid parameter to be passed but in your own code you show that it is. This was also working last year not sure why all of a sudden it has not been working this year. I submitted this ticket a while ago like january I am resubmitting the same issue for visibility. Cannot market make reliably without knowing what orders filled and its details (I know I can download the trade history via csv but it is cumbersome). PLEASE FIX Screenshot 2023-04-10 at 8 44 26 PM

mcelia2324 commented 1 year ago

Just made a quick fix using get_order_by_id but either way, this should be an easy fix on your end and does not require the order id on the back end by the user below. This works for open orders it should also work for filled.

def get_filled_orders(self, instrument):
    """Instrument example BTC-USD"""
    api = self.connect()
    orders_response = api.private.get_orders(
        market=instrument,
        status=constants.ORDER_STATUS_FILLED,
    )

    return orders_response.data