I have place live trade in delta exchange (India) server, trade is visible but while fetching trade from api am getting empty response, code shared below.
One Catch
If order are place with stoploss and targetprice we get 2 orders, but active trade is not capture in api request.
method = 'GET'
timestamp = str(int(time.time()))
path = '/v2/orders'
url = f'{base_url}{path}'
query_string = '?states=open'
payload = ''
signature_data = method + timestamp + path + query_string + payload
signature = generate_signature(api_secret, signature_data)
req_headers = {
'api-key': api_key,
'timestamp': timestamp,
'signature': signature,
'User-Agent': 'python-rest-client',
'Content-Type': 'application/json'
}
query = { "states": 'open'}
response = requests.request(method, url, data=payload,params=query, timeout=(3, 27), headers=req_headers)
return response.json()
Getting Below Response
{'meta': {'after': None, 'before': None, 'limit': 10, 'total_count': 0},
'result': [],
'success': True}