3 #include "../../include/nicehash-api.hpp" 16 this->throwExceptionIfAlgorithmInvalid(algorithm_id);
17 this->throwExceptionIfLocationInvalid(location_id);
20 std::string endpoint =
"https://api.nicehash.com/api?method=orders.get";
21 std::string url = endpoint +
"&location=" + std::to_string(location_id) +
"&algo=" + std::to_string(algorithm_id);
23 std::string response = this->client->
get(url);
virtual std::string get(std::string const url)
GET request the provided url and return the response body as a string.
std::string getOrdersByAlgorithm(int algorithm_id, int location_id)
Get all orders for a given algorithm id.
int algorithmNameToId(std::string algorithm_name)
Convert an algorithm name to its id.