{
"PublicKey": "base58_string", // Wallet address
"Limit": 100 // List of tokens separated by a comma
"Offset": 0 // Which transaction to start counting from
}
Request Parameters
string: PublicKey - Wallet address (public key) in Base58
optional line: Limit - The range of transactions on the wallet, the range of values from 0 to 100, also an optional line Offset, transmits the number of the initial transaction for selection. By default, displays the last 10 transactions
Response
JSON output depends on the request type and its success.
If there’s an error, request returns to the node basic Result:
Success: False
Message:
If successful, requested information is returned.
Response Structure
Response when requesting a Limit of :1
{
"transactions": [
{
"id": "String", // TransactionID
"fromAccount": "Base58_String", // Publickey of the Sender
"toAccount": "Base58_String", //Publickey of the Receiver
"time": "Datetime_String", // Storetime of Transaction in String Value
"sum": "Decimal_String", // Amount of currency transfered in String Value
"fee": "Decimal_String", // Amount Fee it needed for transaction in String Value
"currency": "String", // Type of currency in String Value
"innerId": "Integer", // innerID of a transaction in Integer Value
"type": "Integer_String", // Transaction type in String Value
"status": "String" // Shows status of the Transaction in String Value
}
],
"success": "bool", // Shows if request was Succes or False Boolean Value
"message": "String" // Shows if a problem occurred in String Value
}
#include <iostream>
#include <cpprest/http_client.h>
#include <cpprest/filestream.h>
using namespace utility; // Common utilities like string conversions
using namespace web; // Common features like URIs.
using namespace web::http; // Common HTTP functionality
using namespace web::http::client; // HTTP client features
using namespace concurrency::streams; // Asynchronous streams
using namespace web::json;
int main(int argc, char* argv[])
{
web::json::value json_v;
web::json::value json_return;
json_v[L"authKey"] = web::json::value::string(L"");
json_v[L"NetworkAlias"] = web::json::value::string(L"Mainnet");
json_v[L"PublicKey"] = web::json::value::string(L"QTRbkssQSGLdKs94khX7i858YcBAhjg6wj48F7FTr8H");
json_v[L"Limit"] = web::json::value::number(10);
http_client client(U("http://176.113.80.7:62000"));
client.request(web::http::methods::POST, U("/api/monitor/gettransactionsbywallet"), json_v)
.then([](const web::http::http_response& response) {
return response.extract_json();
})
.then([&json_return](const pplx::task<web::json::value>& task) {
try {
json_return = task.get();
}
catch (const web::http::http_exception& e) {
std::cout << "error " << e.what() << std::endl;
}
})
.wait();
std::wcout << json_return.serialize() << std::endl;
return 0;
}
C#
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Program.Getinfo
{
public class gettransactionsbywallet
{
static readonly HttpClient client = new HttpClient();
public class body
{
public string authKey { get; set; }
public string networkAlias { get; set; }
public string PublicKey { get; set; }
public int Limit { get; set; }
}
public static async Task Main()
{
try
{
var body = new body
{
authKey = "",
networkAlias = "Mainnet",
PublicKey = "QTRbkssQSGLdKs94khX7i858YcBAhjg6wj48F7FTr8H",
Limit = 100
};
var httpContent = new StringContent(JsonConvert.SerializeObject(body),
Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://176.113.80.7:62000/api/monitor/gettransactionsbywallet",
httpContent);
Console.WriteLine("RESPONSE=" +
await response.Content.ReadAsStringAsync());
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
}
}