Expand description
HTTP client and request execution with rate limiting and finite retry HTTP client and request execution for the IG Markets API.
This module owns all outbound HTTP I/O: the shared reqwest client, rate
limiting, finite retry with backoff, and the automatic token
refresh-and-replay contract. It lives in the application layer because it
depends on Auth, Session, Config and RateLimiter — the pure model
layer must not perform I/O.
Structs§
- Http
Client - Simplified client for IG Markets API with automatic authentication
- Pacing
- The two budgets every physical request has to pass.
Functions§
- make_
http_ request - Makes an HTTP request with automatic rate limiting and retry on rate limit errors
- make_
http_ request_ paced - The one place a request is actually sent, and so the one place both budgets are charged.
- make_
http_ request_ reserved - Same as
make_http_request, but told whether the first send already owns a token. - make_
http_ request_ with_ account - Same as
make_http_request, but paced against a key budget and the account budget its keys share.