Skip to main content

Module client

Module client 

Source
Expand description

The authorized HTTP client: token handling, the 401 repeat of reads and the mapping of error replies.

The generic methods are here (AlorHttpClient::read, AlorHttpClient::command). The endpoint methods (get_order_book, create_limit_order, …) are in super::endpoints.

Structs§

AlorHttpClient
The authorized HTTP client of the ALOR OpenAPI.
Method
The Request Method (VERB)

Constants§

ACCESS_TOKEN_REUSE
How long an access token is used before a new one is asked for. The broker recommends a new token every 20-25 minutes of the 30 that a token lives.

Functions§

jwt_claims
The claims of a JWT (the middle part), if token is one.
token_lifetime
How long to use an access token: ACCESS_TOKEN_REUSE, or 80% of what is left of its own life if that is shorter. A token that is not a JWT gets the 20 minutes.