# Has anyone else had this issue with the polygon based REST.historic\_agg\_v2 function?

**URL:** <https://forum.alpaca.markets/t/has-anyone-else-had-this-issue-with-the-polygon-based-rest-historic-agg-v2-function/1126>\
**Category:** Alpaca Market Data\
**Created:** [April 7, 2020, 1:48pm UTC](https://forum.alpaca.markets/t/has-anyone-else-had-this-issue-with-the-polygon-based-rest-historic-agg-v2-function/1126 "2020-04-07T13:48:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benanstrom](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@benanstrom](https://forum.alpaca.markets/u/benanstrom)\
**Post date:** [April 7, 2020, 1:48pm UTC](https://forum.alpaca.markets/t/has-anyone-else-had-this-issue-with-the-polygon-based-rest-historic-agg-v2-function/1126/1 "2020-04-07T13:48:33Z")

</div>

Here is a quote from Alpaca github about the historic\_agg\_v2 polygon function:

“Specify the `_from` parameter if you specify the `to` parameter since when `to` is specified `_from` is assumed to be the beginning of history. Otherwise, when you use only the `limit` or no parameters, the result is returned from the latest point.”

But, if i leave out the “\_from” or “to” parameter and just request the “limit” parameter, i get an error that says “\_from” and “to” are required parameters.

---

<div class="post-metadata">

**Author:** ![hitoshi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/hitoshi/32/69_2.png) [@hitoshi](https://forum.alpaca.markets/u/hitoshi)\
**Post date:** [April 9, 2020, 7:19pm UTC](https://forum.alpaca.markets/t/has-anyone-else-had-this-issue-with-the-polygon-based-rest-historic-agg-v2-function/1126/2 "2020-04-09T19:19:34Z")

</div>

Those two `_from` and `to` are required parameters in Polygon API, so you cannot omit them.
