Skip to content

Commit

Permalink
Fix a bug that limits the historic trades to 20k with duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
utekaravinash committed Dec 11, 2019
1 parent 4e2fd27 commit 37dac49
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 37dac49

Please sign in to comment.