IG API error code
IG API error: error.public-api.too-many-epics
What does error.public-api.too-many-epics mean on the IG API?
The request named more epics than the endpoint accepts in one call. IG's reference lists this code for GET /markets, where the epics parameter is described as limited to 50. It is about the size of one request, not about how often you call.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
How do I fix error.public-api.too-many-epics?
Send fewer epics in the request. IG's reference says to reduce the number of epics provided, so split a long list across several calls.