Expand description
Module containing global constants used throughout the library
Constantsยง
- BASE_
DELAY_ MS - Base delay in milliseconds used for proximity-based delays in the rate limiter This value is used to calculate wait times when approaching rate limits
- DAYS_
TO_ BACK_ LOOK - Default number of days to look back when fetching historical data
- DEFAULT_
ORDER_ BUY_ LEVEL - A constant representing the default buy level for orders.
- DEFAULT_
ORDER_ SELL_ LEVEL - A constant representing the default sell level for orders.
- DEFAULT_
PAGE_ SIZE - Default page size for API requests
- DEFAULT_
SLEEP_ TIME - Default sleep time in hours if not specified in environment (24 hours)
- ERROR_
COOLDOWN_ SECONDS - Cooldown time in seconds when hitting max errors (5 minutes)
- MAX_
CONSECUTIVE_ ERRORS - Maximum number of consecutive errors before forcing a cooldown
- SAFETY_
BUFFER_ MS - Additional safety buffer in milliseconds added to wait times This provides extra margin to ensure rate limits are not exceeded
- USER_
AGENT - User agent string used in HTTP requests to identify this client to the IG Markets API