Skip to main content

Module credential

Module credential 

Source
Expand description

CoinAPI API key resolution and validation.

REST and WebSocket requests send the same key in the X-CoinAPI-Key header.

Constants§

COINAPI_API_KEY
Environment variable read when no API key is configured.

Functions§

is_valid_api_key
Returns whether an API key is non-empty visible ASCII, as HTTP headers require.
resolve_api_key
Resolves the API key from api_key, or from COINAPI_API_KEY when it is None.