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.