Every time I am trying to fetch tradebook from url https://api.dhan.co/trades using GET request, I am getting following error
{āerrorCodeā: āTRADE_RESOURCE_ERRORā, āhttpStatusā: āBAD_REQUESTā, āinternalErrorCodeā: āā, āinternalErrorMessageā: āā}
same error in dhan.get_trade_book() method using dhanhq python module
Can anyone help me on this? Still I have not been able to get any response from URL https://api.dhan.co/trades.
Also Dhan orderbook from API does not contain any average price field. There is an Price field, but it shows the price at which order is placed. Still there is no way to get average price of an order through API.
We tried at our end and it is working fine. Hope you are not trying this on weekend (off trading day) , as on weekend there are not trades available in tradebook.
Request you to try now and if you still see any issue, let us know with the error message.
I am using the above. here is the json output of above code -
{āerrorCodeā: āTRADE_RESOURCE_ERRORā, āhttpStatusā: āBAD_REQUESTā, āinternalErrorCodeā: āā, āinternalErrorMessageā: āā}
Same code is working fine for other users. But not for me.
I am able to access orderbook. But everytime I try fetching tradebook, same error is coming.
I think this is client specific problem. Please let me know what to do.
Requesting you to kindly try this today during market hours and in case you are facing the same issue, we can take a look at the system logs for the same. You can send your User ID on api@dhan.co.