diff --git a/contrib/polygon/polygon.go b/contrib/polygon/polygon.go index 38778ca45..d039e2ad9 100644 --- a/contrib/polygon/polygon.go +++ b/contrib/polygon/polygon.go @@ -57,6 +57,14 @@ func NewBgWorker(conf map[string]interface{}) (bgworker.BgWorker, error) { func (pf *PolygonFetcher) Run() { api.SetAPIKey(pf.config.APIKey) + if pf.config.BaseURL != "" { + api.SetBaseURL(pf.config.BaseURL) + } + + if pf.config.NatsServers != "" { + api.SetNatsServers(pf.config.NatsServers) + } + go pf.workBackfill() if err := api.Stream(pf.streamHandler, pf.config.Symbols); err != nil {