You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [full examples](./examples/rest/) for more details on how to use this client effectively.
65
65
To run these examples from the command line, first check out this project and run ```npm i``` in the root directory to install dependencies, then run ```POLY_API_KEY=yourAPIKey node examples/rest/crypto-aggregates_bars.js```, replacing yourAPIKey with your Polygon API Key.
66
66
67
+
## Pagination
68
+
69
+
The client can handle pagination for you through the `globalFetchOptions` by turning on the `pagination: true` option. The feature will automatically fetch all `next_url` pages of data when the API response indicates more data is available.
If there is a `next_url` field in the API response, the client will recursively fetch the next page for you, and then pass along the accumulated data.
87
+
88
+
## Debugging
89
+
90
+
Sometimes you may find it useful to see the actual request and response details while working with the API. The client allows for this through the `globalFetchOptions` by turning on the `trace: true` option.
When debug mode is enabled, the client will print out useful debugging information for each API request. This includes: the request URL, the headers sent in the request, and the headers received in the response.
114
+
115
+
### Example Output
116
+
117
+
For instance, if you made a request for `TSLA` data for the date `2023-08-01`, you would see debug output similar to the following:
This can be an invaluable tool for debugging issues or understanding how the client interacts with the API.
138
+
67
139
## Launchpad Usage
68
140
69
141
Users of the Launchpad product will need to pass in certain headers in order to make API requests. Example can be found [here](./examples/rest/launchpad/README.md).
0 commit comments