nicehash-api-cpp  0.0.1
getDetailedProviderStats.cpp
Go to the documentation of this file.
1 #include <string>
2 
3 #include "../../include/nicehash-api.hpp"
4 
5 
6 /**
7  * \brief Get detailed current stats for provider for all algorithms.
8  *
9  * Get the detailed current stats for provider for all algorithms (data refreshed every 30 seconds).
10  * It (GET) requests https://api.nicehash.com/api?method=stats.provider&addr=...
11  * where the addr param is a wallet address.
12  * The past 56 payments are also returned in the response.
13  *
14  */
15 std::string NiceHashApi::getDetailedProviderStats (std::string address){
16 
17  // Construct the query params (&addr=)
18  std::string endpoint = "https://api.nicehash.com/api?method=stats.provider.ex&addr=";
19  std::string url = endpoint + address;
20 
21  std::string response = this->client->get(url);
22 
23  return response;
24 }
virtual std::string get(std::string const url)
GET request the provided url and return the response body as a string.
Definition: get.cpp:14
std::string getDetailedProviderStats(std::string address)
Get detailed current stats for provider for all algorithms.