I want to do some stats analysis, so I want to fetch all the past orders(using “https://api.dhan.co/v2/trades”), but only the one which were placed using the api, is there any field that can be used to identify api orders?
@Vishal_Singh Use correlationId as order tag to set your unique order id.
Reference - Orders - DhanHQ Ver 2.0 / API Document
i want to query the past trades(https://api.dhan.co/v2/trades), corelation id is only present in todays orders.
There’s a parameter called algoId that may help:
Considering “Trade History“ Statement - DhanHQ Ver 2.0 / API Document , only way to map API orders is to save them locally on your algo server for now. FYI, all “Orders” APIs Orders - DhanHQ Ver 2.0 / API Document , are for intraday only.
i guess, because the fetching orders using orderid only works for the same day.