Inquiry regarding Position Requests

Hello Tradovate, recently, I have been exploring your API and I have a question about retrieving previous positions. Is there a specific command available to access my account’s historical and current positions? If so, can you please provide guidance on how to use this command?

Additionally, I am interested in knowing if it’s possible to request different time frames and specify the number of previous positions I want to retrieve using this command.

Lastly, could you also explain how to reset or clear the command, if needed? I appreciate your assistance in clarifying these questions.

1 Like

You can use the reporting API to retrieve historic data about your own positions/accounts. The best way to see how it works is to go to the Trader application and pull a report on one of your accounts while watching the network tab - this will give you a really good idea of how to make these calls yourself.

Start with rpt-demo.tradovateapi.com/v1/reports/requestReportDefinitions, this will give you a list of the available reports you could pull - they are available in CSV format as well if you use representationType: "csv" in the /reports/requestReport body.

As far as time frames, that should be no problem - every report definition (*maybe not account balance history) has some combination of startTime, startDate, endTime and endDate params that can help you select the period you want to pull info from.