nokey.finance_and_crypto package
Submodules
nokey.finance_and_crypto.coinmap module
- class nokey.finance_and_crypto.coinmap.Coinmap(use_caching=False, cache_name='coinmap_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class for interacting with the Coinmap API.
- base_url
The base URL of the Coinmap API.
- about
A short description of the API.
- get_atm_operators()[source]
Returns a list of ATM operators.
- Parameters:
None –
- Returns:
A dictionary containing a list of ATM operators.
- Return type:
dict
- get_coins()[source]
Returns a list of coins.
- Parameters:
None –
- Returns:
A dictionary containing a list of coins.
- Return type:
dict
- get_comments_by_venue_id(venue_id)[source]
Returns a list of comments about the venue matching the given id.
- Parameters:
venue_id (str) – A unique number identifying a specific venue.
- Returns:
A dictionary containing a list of comments about the venue matching the given id.
- Return type:
dict
- get_docs_url()[source]
Returns the URL for the Coinmap API documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_ratings_by_venue_id(venue_id)[source]
Returns ratings about the venue matching the given id.
- Parameters:
venue_id (str) – A unique number identifying a specific venue.
- Returns:
A dictionary containing ratings about the venue matching the given id.
- Return type:
dict
- get_venue_by_id(venue_id)[source]
Returns a venue matching the given id.
- Parameters:
venue_id (str) – A unique number identifying a specific venue.
- Returns:
A dictionary containing information about the venue matching the given id.
- Return type:
dict
- get_venues(min_lat: float | None = None, max_lat: float | None = None, min_lon: float | None = None, max_lon: float | None = None, query: str | None = None, category: str | None = None, owner: str | None = None, upvoter: str | None = None, before: date | None = None, after: date | None = None, promoted: bool | None = None, limit: int | None = None, offset: int | None = None)[source]
Returns a list of venues with crypto ATMs.
- Parameters:
min_lat (float) – Minimum latitude (>=)
max_lat (float) – Maximum latitude (<=)
min_lon (float) – Minimum longitude (>=)
max_lon (float) – Maximum longitude (<=)
query (str) – Substring search in venue names
category (str) – Filter category
owner (str) – Venue owner (userhash)
upvoter (str) – User who upvoted the venue (userhash)
before (date) – Only show venues created before YYYY-MM-DD
after (date) – Only show venues created after YYYY-MM-DD
promoted (bool) – Show promoted venues (unset = both)
limit (int) – Limit number of results
offset (int) – Skip first N results
- Returns:
A dictionary containing a list of venues with crypto ATMs.
- Return type:
dict
nokey.finance_and_crypto.exchange_api module
- class nokey.finance_and_crypto.exchange_api.ExchangeAPI(use_caching=False, cache_name='exchange_api_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class for interacting with Exchange API.
- base_url
The base URL of the API.
- about
A short description of the API.
- get_available_currencies(minified_version=False)[source]
Returns all the available currencies in the API.
- Parameters:
minified_version (bool) – An optional parameter for getting a minified version of the currency list. Default is false.
- Returns:
A dictionary containing a list of the available currencies.
- Return type:
dict
- get_docs_url()[source]
Returns the URL for the ExchangeAPI documentation.
- Parameters:
None –
- Returns:
The URL for the API docs.
- Return type:
string
- get_rates_from_base(currency_code, date='latest', minified_version=False)[source]
Returns exchange rates list for the given currency code on the given date.
- Parameters:
currency_code (str) – The code for the base currency used to get exchange rates.
date (str) – Date for the exchange rates. Default is latest, but other values must be in YYYY-MM-DD format.
minified_version (bool) – An optional parameter for getting a minified version of the currency list. Default is false.
- Returns:
A dictionary containing a list of exchange rates.
- Return type:
dict
nokey.finance_and_crypto.wallstreet_bets module
- class nokey.finance_and_crypto.wallstreet_bets.WallstreetBets(use_caching=False, cache_name='wallstree_bets_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class to interact with the Wallstreet Bets API.
- base_url
The base URL of the Wallstreet Bets API.
- about
A short description of the API.