polygon-io / feature-requests

Feature requests for the Polgon.io Platform. Any bug reports should be opened in polygon-io/issues/issuess
0 stars 0 forks source link

Additional Flag On Aggregate Bars To Include Bars With No Trades #26

Open neoform opened 3 years ago

neoform commented 3 years ago

Is your feature request related to a problem? Please describe. Add an additional flag for the aggregate bars API endpoint to allow for the inclusion of bars that have no eligible trades – which would incidentally cause the OHLC to have no value. The purpose of this would be to have accurate volume data provided for each bar in the time-range (when summed for a given day, would add up the daily volume).

My suggestion would be to send NULL values for the OHLC to indicate a lack of eligible trades (and avoid confusion with the actual value price being zero dollars).

Alternatively, an additional field could be added to the bar record containing a count of trades during that period, which would be 0, letting the user know to skip that bar when doing certain calculations.

Being that this flag would default to false (not sending empty bars – the current behavior) this would be backwards compatible and not blow up existing logic using this endpoint.

Describe the solution you'd like Currently it is not possible to get an accurate daily volume when requesting one-minute bars for a given day and summing the volumes. In order to do certain calculations, accurate per-bar volume is required (eg, VWAP, Volume Oscillators, etc)

Describe alternatives you've considered The only other way to fetch the volume data for a given day is via the Daily Open / Close endpoint which lacks one-minute granularity.

Additional context Related to https://github.com/polygon-io/issues/issues/70