nicehash-api-cpp
0.0.1
|
#include <nicehash-api.hpp>
Public Member Functions | |
std::string | getCurrentGlobalStats () |
Get current global stats. More... | |
std::string | getAverageGlobalStats () |
Get average (24h) global stats. More... | |
std::string | getProviderStats (std::string address) |
Get current stats for provider for all algorithms. More... | |
std::string | getDetailedProviderStats (std::string address) |
Get detailed current stats for provider for all algorithms. More... | |
std::string | getProviderWorkerStats (std::string address, int algorithm_id) |
Get detailed stats for a provider's workers by algorithm id. More... | |
std::string | getProviderWorkerStats (std::string address, std::string algorithm_name) |
Get detailed stats for a provider's workers by algorithm name. More... | |
std::string | getOrdersByAlgorithm (int algorithm_id, int location_id) |
Get all orders for a given algorithm id. More... | |
std::string | getOrdersByAlgorithm (std::string algorithm_name, int location_id) |
Get all orders for a given algorithm by name. More... | |
std::string | getMultiAlgorithmInfo () |
std::string | getSimpleMultiAlgorithmInfo () |
int | algorithmNameToId (std::string algorithm_name) |
Convert an algorithm name to its id. More... | |
std::string | algorithmIdToName (int algorithm_id) |
std::string | getApiVersion () |
Get API version. More... | |
NiceHashApi () | |
NiceHashApi (Client *new_client) | |
Definition at line 8 of file nicehash-api.hpp.
|
inline |
Definition at line 36 of file nicehash-api.hpp.
|
inline |
Definition at line 39 of file nicehash-api.hpp.
std::string NiceHashApi::algorithmIdToName | ( | int | algorithm_id | ) |
int NiceHashApi::algorithmNameToId | ( | std::string | algorithm_name | ) |
Convert an algorithm name to its id.
See https://www.nicehash.com/?p=api for name->id mappings
Definition at line 16 of file algorithmNameToId.cpp.
References strToUpper().
Referenced by getOrdersByAlgorithm(), and getProviderWorkerStats().
std::string NiceHashApi::getApiVersion | ( | ) |
Get API version.
Query this to detect any changes of API.
Gets the API version by (GET) requesting https://api.nicehash.com/api
Definition at line 12 of file getApiVersion.cpp.
References Client::get().
std::string NiceHashApi::getAverageGlobalStats | ( | ) |
Get average (24h) global stats.
Gets the average (24h) global stats by (GET) requesting https://api.nicehash.com/api?method=stats.global.24h
Definition at line 12 of file getAverageGlobalStats.cpp.
References Client::get().
std::string NiceHashApi::getCurrentGlobalStats | ( | ) |
Get current global stats.
Gets the current global stats by (GET) requesting https://api.nicehash.com/api?method=stats.global.current
Definition at line 12 of file getCurrentGlobalStats.cpp.
References Client::get().
std::string NiceHashApi::getDetailedProviderStats | ( | std::string | address | ) |
Get detailed current stats for provider for all algorithms.
Get the detailed current stats for provider for all algorithms (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=stats.provider&addr=... where the addr param is a wallet address. The past 56 payments are also returned in the response.
Definition at line 15 of file getDetailedProviderStats.cpp.
References Client::get().
std::string NiceHashApi::getMultiAlgorithmInfo | ( | ) |
std::string NiceHashApi::getOrdersByAlgorithm | ( | int | algorithm_id, |
int | location_id | ||
) |
Get all orders for a given algorithm id.
Get all orders for a given algorithm (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=orders.get&location=...&algo=... where the algo is an algorithm id and location is a location id (see https://www.nicehash.com/?p=api).
Definition at line 14 of file getOrdersByAlgorithm.cpp.
References Client::get().
Referenced by getOrdersByAlgorithm().
std::string NiceHashApi::getOrdersByAlgorithm | ( | std::string | algorithm_name, |
int | location_id | ||
) |
Get all orders for a given algorithm by name.
Get all orders for a given algorithm (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=orders.get&location=...&algo=... where the algo is an algorithm id and location is a location id (see https://www.nicehash.com/?p=api).
Definition at line 36 of file getOrdersByAlgorithm.cpp.
References algorithmNameToId(), and getOrdersByAlgorithm().
std::string NiceHashApi::getProviderStats | ( | std::string | address | ) |
Get current stats for provider for all algorithms.
Get current stats for provider for all algorithms (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=stats.provider&addr=... where the addr param is a wallet address. The past 56 payments are also returned in the response.
Definition at line 15 of file getProviderStats.cpp.
References Client::get().
std::string NiceHashApi::getProviderWorkerStats | ( | std::string | address, |
int | algorithm_id | ||
) |
Get detailed stats for a provider's workers by algorithm id.
Get current stats for provider for all algorithms (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=stats.provider&addr=... where the addr param is a wallet address. The past 56 payments are also returned in the response.
Definition at line 15 of file getProviderWorkerStats.cpp.
References Client::get().
Referenced by getProviderWorkerStats().
std::string NiceHashApi::getProviderWorkerStats | ( | std::string | address, |
std::string | algorithm_name | ||
) |
Get detailed stats for a provider's workers by algorithm name.
Get current stats for provider for all algorithms (data refreshed every 30 seconds). It (GET) requests https://api.nicehash.com/api?method=stats.provider&addr=... where the addr param is a wallet address. The past 56 payments are also returned in the response.
Definition at line 36 of file getProviderWorkerStats.cpp.
References algorithmNameToId(), and getProviderWorkerStats().
std::string NiceHashApi::getSimpleMultiAlgorithmInfo | ( | ) |