Polygon is a neat company that ties into financial markets and meters usage to the rest of us. Some of it is free. This repository does not do anything particularly practical with Polygon since its REST API and SDK do it all so well. It is simply for practice.
This repository has packages that call Polygon in 3 different ways:
| Package | Location |
|---|---|
| REST | pkg/rest |
| SDK | pkg/sdk |
| WebSockets | pkg/websocket |
Use the Makefile to run make test
make test
go test -cover -v ./...
? github.com/jaysonhurd/polygon/pkg/polygon [no test files]
github.com/jaysonhurd/polygon coverage: 0.0% of statements
github.com/jaysonhurd/polygon/pkg/polygon/polygonfakes coverage: 0.0% of statements
=== RUN TestNew
--- PASS: TestNew (0.00s)
=== RUN Test_rest_PreviousCloseSuccess
--- PASS: Test_rest_PreviousCloseSuccess (0.00s)
=== RUN Test_rest_PreviousCloseFailToGet
--- PASS: Test_rest_PreviousCloseFailToGet (0.00s)
=== RUN Test_rest_PreviousCloseFailToReadBody
--- PASS: Test_rest_PreviousCloseFailToReadBody (0.00s)
=== RUN Test_rest_PreviousCloseFailHttpRequestCreation
--- PASS: Test_rest_PreviousCloseFailHttpRequestCreation (0.00s)
=== RUN Test_rest_StockPriceNowSuccess
--- PASS: Test_rest_StockPriceNowSuccess (0.00s)
=== RUN Test_rest_StockPriceNowFailToGet
--- PASS: Test_rest_StockPriceNowFailToGet (0.00s)
=== RUN Test_rest_StockPriceNowFailToReadBody
--- PASS: Test_rest_StockPriceNowFailToReadBody (0.00s)
=== RUN Test_rest_StockPriceNowFailHttpRequestCreation
--- PASS: Test_rest_StockPriceNowFailHttpRequestCreation (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/jaysonhurd/polygon/pkg/rest (cached) coverage: 100.0% of statements
? github.com/jaysonhurd/polygon/pkg/websocket [no test files]
? github.com/jaysonhurd/polygon/pkg/sdk [no test files]