Module constants

Module constants 

Source
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