Skip to content

Commit

Permalink
Merge pull request #273 from utekaravinash/historic-trades-limited-to…
Browse files Browse the repository at this point in the history
…-20k-with-duplicates

Bug Fix: historic trades limited to 20k with duplicates
  • Loading branch information
umitanuki authored Dec 12, 2019
2 parents 4e2fd27 + 37dac49 commit 18cfb44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/polygon/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func GetHistoricTrades(symbol, date string) (totalTrades *HistoricTrades, err er
resp *http.Response
u *url.URL
q url.Values
trades = &HistoricTrades{}
)

for {
Expand Down Expand Up @@ -206,6 +205,7 @@ func GetHistoricTrades(symbol, date string) (totalTrades *HistoricTrades, err er
return nil, fmt.Errorf("status code %v", resp.StatusCode)
}

trades := &HistoricTrades{}
if err = unmarshal(resp, trades); err != nil {
return nil, err
}
Expand Down

0 comments on commit 18cfb44

Please sign in to comment.