IG API error code
IG API error: invalid.input.too.many.markets
What does invalid.input.too.many.markets mean on the IG API?
The request asked for too many markets in one call. IG's reference lists this code for GET /client-sentiment, which takes a comma separated list of market identifiers. 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 invalid.input.too.many.markets?
Send fewer market identifiers in the request, splitting a long list across several calls. The vendor's page gives no figure for the maximum.