Get Order by client oid

The API is not behaving the way as it is documented Delta Exchange Api

GET /orders/client_order_id/{client_oid}
Order was created successfully with the client_order_id

def get_order_by_client_id(self, client_order_id):
    """
    Retrieve order details using the client_order_id via GET /v2/orders/client_order_id/{client_order_id}.
    """
    #query={'client_oid': int(client_order_id)}
    path = f"/v2/orders/client_order_id/{client_order_id}"
    return self.api_request("GET", path)


def api_request(self, method, path, body=None, query=None):
    # Create a query string from query parameters if provided.
    qs = ''
    if query:
        qs = '?' + urlencode(query)
    
    # The full path to sign includes the query-string
    full_path_to_sign = path + qs

    timestamp = str(int(time.time()))
    # Build the message as: method + timestamp + full_path + (JSON encoded body) if any.
    message = method + timestamp + full_path_to_sign + (json.dumps(body) if body else "")
    signature = self.generate_signature(self.apisecret, message)
    
    # Build headers; these are the ones the API requires.
    headers = {
        "api-key": self.apikey,
        "signature": signature,
        "timestamp": timestamp,
        "Content-Type": "application/json"
    }
    
    # Construct the base url; note we pass query parameters separately using 'params'
    url = self.base_url + path
    logging.info(f"Making API request: {method} {url} with query: {query} and body: {body}")
    
    response = self.session.request(method, url, headers=headers, json=body, params=query)
    response.raise_for_status()
    return response.json()

[2025-03-08 03:53:06] {connectionpool.py:547} DEBUG - https://cdn-ind.testnet.deltaex.org:443 “GET /v2/orders/client_order_id/3851839836 HTTP/1.1” 404 9

Getting 404 not found (response: b’Not Found’): Can you please help? All the authorisations are sent correctly and working fine.
Thank you.

Hi @nagesh.yellapu , We’re currently investigating this issue and will provide a resolution shortly.

Hi @nagesh.yellapu , The issue is resolved. You can check now.

@manku.pathak I still see the issue in demo server, havent tested in live server

image

@nagesh.yellapu We had fixed it in the demo server.
I can see that the above response is not same as earlier as it says that order with the provided client_order_id is not found. Can you please check if you had placed orders using same client_order_id? Let me know your user_id in that case.
Earlier the issue was that the endpoint was not found which yielded 404 not found error.

Hi @manku.pathak my user id is 83009381. This particular order was sell limit_order which got cancelled. You are correct the error message is different here. I was expecting it to behave like get_order_by_id which returns unfilled_size as request size in case the order was not unfilled for what ever reason. But in client order id it is returning order not found