Accessing tracker history inside a template

Hello,

I would like to access history of tracker location inside a template. I found out that it’s able to access it through RESTapi but it feels a bit silly to query HA itself - i. e. using REST integration from HA to ask the very same instance, having to create a separate token etc.

Can someone please advise a better/recommended approach?

Thanks, jose