Open maxthilen opened 4 years ago
Same problem here.
I found some data using this :
axios.get(
${BASE_URL}/v1/meta/symbols/${symbol}/company?apiKey=${this.apikey}).then(( data ) => {
But some data are missing, like "first_intraday"
Same problem, We informed polygon to this error 6 months ago ! with no solution until now. @qrpike @stacho Can you please Fix this ?
So as far as I can tell that code snippet above solves the issue - not sure if those fields are required or if it's possible to make it work without? Separately (and forgive me if this is a noob question), the comments in this code say it only supports 1 minute polling. Looking at the chart pre-market here, it doesn't appear to be grabbing the data immediately as its streamed in. Any suggestions on what needs to be changed to get this to stream as real time as possible?
They are making some API changes again.
This code allows the adapter to work correctly:
axios.get(`${BASE_URL}/v1/meta/symbols/${symbol}/company?apiKey=${this.apikey}`).then(( data ) => {
console.log('Polygon Resolve Data:', data.data)
let c = data.data;
let intFirst = false
let dayFirst = false
cb({
name: c.name,
ticker: c.symbol,
type: TickerTypeMap[ c.type ] || 'stocks',
exchange: c.exchange,
timezone: 'America/New_York',
first_intraday: intFirst,
has_intraday: true,
first_daily: dayFirst,
has_daily: true,
supported_resolutions: SUPPORTED_RESOLUTIONS,
})
})
}
Not sure if Polygon changed data format since this was built but I was having some issues integrating the adapter into tradingview charts. Updating resolveSymbol as follows solved the problem for me. Figured I'd share in case anyone else is having the same problem.