Skip to content

Commit

Permalink
Merge pull request #99 from alpacahq/fix/set-poly
Browse files Browse the repository at this point in the history
apply polygon api settings
  • Loading branch information
rocketbitz authored Jun 26, 2018
2 parents 5c13467 + ef8f7a2 commit 8c7d63b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contrib/polygon/polygon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8c7d63b

Please sign in to comment.