Developer's Hub
v1.0
API Reference
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
GetNodeInfo()
Copy Markdown
Open in ChatGPT
Open in Claude
Summary
| Route | Type | Example |
|---|---|---|
| /monitor/getnodeinfo | POST | http://apinode.credits.com/api/Monitor/GetNodeInfo |
Description
Get statistical information about the specified network node. Note that any node owner can block the node from providing this information upon request
Request
IP address and port of the node, information about which is requested
Request Structure
The following set of parameters is used for request:
JSON
x
{ // Parameters common for all requests// IP address of the node"networkIp": "ip v4 address",// Port on a remote node, if it differs from the default value"networkPort": u16_value}Request Parameters
The pair networkIp and networkPort define the node, information about which is requested by the client. if networkAlias is set instead of these 2 parameters or simultaneously with them, networkAlias will be used, and the information will be received from the current default node in the network.
Response
JSON output depends on request type and its success.
If there’s an error accessing the node, request returns basic Result:
- Success: False
- Message:
If successful, requested information is returned
Response Structure
JSON
{// Node identifier (public key of the node account) "Id": "base58_value",// Platform OS: 0 - Linux, 1 - Mac OS, 2 - Windows, 3 - Android, ост. - Unknown "Platform": u8_value, // Software version build "Version": "text", // Number of top block in blockchain "TopBlock": u64_value, // Network round when the node was launched "StartRound": u64_value,// Current network round "CurrentRound": u64_value,// Average round time in milliseconds calculated for the period between start round and current round "AveRoundMs": u64_value,// Node uptime from the time of its launch in milliseconds "UptimeMs": u64_value,// List of the nodes in the gray list "GrayList":[ // Node identifier in the Graylist (list) "base58_value", ... ],// List of the nodes in the blacklist (list) "BlackList":[ // Node identifier in the blacklist “base58_value”, ...]}Example Code
C#
Python
C++
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;using Newtonsoft.Json;namespace Program.Getinfo{ public class Getinfo { static readonly HttpClient client = new HttpClient(); public class body { public string authKey { get; set; } public string networkAlias { get; set; } } public static async Task Main() { try { var body = new body { authKey = "1a577a1f-d683-4a20-ab95-2cd31bf9844d", networkAlias = "Mainnet", }; var httpContent = new StringContent(JsonConvert.SerializeObject(body), Encoding.UTF8, "application/json"); var response = await client.PostAsync("http://apinode.credits.com/api/Monitor/GetNodeInfo", httpContent); Console.WriteLine("RESPONSE=" + await response.Content.ReadAsStringAsync()); } catch (Exception e) { Console.WriteLine(e); } } }}Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
GetBalance()Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message