List of endpoints useful in work with ADAMANT blockchain in general.
GET /api/peers-
Description
Get list of connected peer nodes using endpoint
/api/peers.Node's information includes:
-
ipβ IPv4 address of node -
portβ port number of ADAMANT node. 36666 for mainnet or 36667 for testnet. -
stateβ state of the peer.Available values:
2β Connected1β Disconnected0β Banned
-
osβ node's operating system -
versionβ ADAMANT node software version -
broadhashβ broadhash on the peer node. Broadhash is established as an aggregated rolling hash of the past five blocks present in the database. -
heightβ current node's blockchain height -
updatedβ Unix timestamp based in ms, when peer updated -
nonceβ unique Identifier for the peer. Random string. -
syncProtocolβ"http"if the node is subscribed to the peer using HTTP only."ws"if the node is subscribed to the peer using WebSocket (which also allows receiving transactions via both WebSocket and HTTP). -
isBroadcastingViaSocketβtrueif the node can send transactions to the peer over WebSocket.
Available parameters:
limitβ how many nodes to retrieveoffsetβ offset value for results- You can use
os,ip, and other parameters for filtering results
-
-
Example
Request:
GET https://endless.adamant.im/api/peers
Response:
{ "success": true, "nodeTimestamp": 58052600, "peers": [ { "ip": "194.32.79.175", "port": 36666, "state": 2, "os": "linux4.15.0-36-generic", "version": "0.4.0", "broadhash": "3dfdf6c7bbaf7537eac9c70432f7ba1cae835b9b15e4ecd97e147616dde67e62", "height": 10146365, "clock": null, "updated": 1562424199553, "nonce": "jxXV6g0sHJhmDubq", "isBroadcastingViaSocket": false, "syncProtocol": "ws" }, { "ip": "144.217.93.8", "port": 36666, "state": 2, "os": "linux4.4.0-141-generic", "version": "0.4.0", "broadhash": "febfb2ac6fbf0a456fdb6a22d08e37dbe514e547ec7772a1f46c2d2595c89baa", "height": 10146364, "clock": null, "updated": 1562424195742, "nonce": "YngSDjA5MeUNk2iZ", "isBroadcastingViaSocket": false, "syncProtocol": "http" } ] }
GET /api/peers/count-
Description
Endpoint
/api/peers/countreturns count of connected, disconnected and banned peers for the requested node.::: warning Each node maintains its own states for peers and may have discovered a different set of peers, so results can vary between nodes. :::
-
Example
Request:
GET https://endless.adamant.im/api/peers/count
Response:
{ "success": true, "nodeTimestamp": 239414812, "connected": 136, "disconnected": 3, "banned": 0 }
GET /api/peers/get-
Description
Finds and returns the known peer of the node. See Get Peers List to learn peer's properties.
Required parameters:
ipβ peer's IPv4 addressportβ peer's port
-
Example
Request:
GET https://endless.adamant.im/api/peers/get?ip=138.201.152.191&port=36666
Response:
{ "success": true, "nodeTimestamp": 239415353, "peer": { "ip": "138.201.152.191", "port": 36666, "state": 1, "os": "linux5.15.0-86-generic", "version": "0.8.3", "dappid": null, "broadhash": "15f6beddb5f68854618f0e06f35addadaeee067efd3cdaaae90f5beaf15cd370", "height": 38723235, "clock": null, "updated": 1713630137277, "nonce": "YWXG1LsX0QUw4tFD", "isBroadcastingViaSocket": false, "syncProtocol": "ws" } }
GET /api/loader/status-
Description
Endpoint
/api/loader/statusreturns information on node's loading process.loadedβfalsewhile the node is verifying blocks during startup.syncingβtrueif the node is currently syncing with the network.blocksβ Target blockchain height the node is trying to reach during sync. Set to0when syncing is complete.blocksCountβ Number of blocks the node needs to verify (e.g. during a full blockchain rebuild).nowβ Height of the last block loaded at startup. This is not the same as the current blockchain height.
-
Example
Request:
GET https://endless.adamant.im/api/loader/status
Response for node on actual blockchain height:
{ "success": true, "nodeTimestamp": 58052355, "loaded": true, "now": 10144343, "blocksCount": 0 }Response for node in sync process:
{ "success": true, "nodeTimestamp": 66424794, "loaded": true, "now": 1, "blocksCount": 1 }
GET /api/loader/status/sync-
Description
Endpoint
/api/loader/status/syncreturns information on node's sync process with other peers:syncingβtrueif node is still in sync processblocksβ current blockchain height to achieve if in sync process;0if syncing is doneheightβ node's blockchain heightbroadhashβ broadhash on the peer node. Broadhash is established as an aggregated rolling hash of the past five blocks present in the database.consensusβ consensus percentage with other nodes
-
Example
Request:
GET https://endless.adamant.im/api/loader/status/sync
Response:
{ "success": true, "nodeTimestamp": 58052432, "syncing": false, "blocks": 0, "height": 10146332, "broadhash": "09f2f5614cf7209979dc1df2dd92d16aade904dae6c9b68bccaeb234647b3c18", "consensus": 94.32 }
GET /api/loader/status/ping-
Description
Ping
/api/loader/status/pingto check if the node is alive. -
Example
Request:
GET https://endless.adamant.im/api/loader/status/ping
Response:
{ "success": true }
GET /api/peers/version-
Description
Endpoint
/api/peers/versionreturns node's software information:version,build, andcommit. -
Example
Request:
GET https://endless.adamant.im/api/peers/version
Response:
{ "success": true, "nodeTimestamp": 58052984, "build": "", "commit": "b07aaf9580dffb5cc95cc65f303f6f1e5fca7d9c", "version": "0.5.2" }
GET /api/blocks/getBroadhash-
Description
Endpoint
/api/blocks/getBroadhashreturnsbroadhashon the node. Broadhash is established as an aggregated rolling hash of the past five blocks present in the database. -
Example
Request:
GET https://endless.adamant.im/api/blocks/getBroadhash
Response:
{ "success": true, "nodeTimestamp": 58645139, "broadhash": "e1aedd2818679c174e3f6e31891c34f4069927f33f145e1b81fe5d978733e794" }
GET /api/blocks/getEpoch-
Description
Endpoint
/api/blocks/getEpochreturns the time when blockchain epoch starts. Value2017-09-02T17:00:00.000Zis for ADAMANT mainnet. -
Example
Request:
GET https://endless.adamant.im/api/blocks/getEpoch
Response:
{ "success": true, "nodeTimestamp": 58646306, "epoch": "2017-09-02T17:00:00.000Z" }
GET /api/blocks/getHeight-
Description
Endpoint
/api/blocks/getHeightreturns current node's blockchain height. -
Example
Request:
GET https://endless.adamant.im/api/blocks/getHeight
Response:
{ "success": true, "nodeTimestamp": 58047354, "height": 10145318 }
GET /api/blocks/getFee-
Description
Endpoint
/api/blocks/getFeereturns the current fee value fortype 0(token transfer) transactions. Integer amount of 1/10^8 ADM tokens (1 ADM = 100000000). -
Example
Request:
GET https://endless.adamant.im/api/blocks/getFee
Response:
{ "success": true, "nodeTimestamp": 58046803, "fee": 50000000 }
GET /api/blocks/getFees-
Description
Endpoint
/api/blocks/getFeesreturns current fee values for different transaction types:sendβ token transfer, type 0voteβ voting for delegate, type 3delegateβ registration of a new delegate, type 2old_chat_messageβ sending a message (not used for now)chat_messageβ sending a message, type 8state_storeβ storing data in KVS, type 9profile_updateβ not used for nowavatar_uploadβ not used for now
All values are integer amounts of 1/10^8 ADM tokens (1 ADM = 100000000).
More information about blockchain fees: Transaction Fees.
-
Example
Request:
GET http://endless.adamant.im/api/blocks/getFees
Response:
{ "success": true, "nodeTimestamp": 58046908, "fees": { "send": 50000000, "vote": 5000000000, "delegate": 300000000000, "old_chat_message": 500000, "chat_message": 100000, "state_store": 100000, "profile_update": 5000000, "avatar_upload": 10000000 } }
GET /api/blocks/getNethash-
Description
Endpoint
/api/blocks/getNethashdescribes the network. The nethash describes e.g. the Mainnet or the Testnet, that the node is connecting to. -
Example
Request:
GET https://endless.adamant.im/api/blocks/getNethash
Response:
{ "success": true, "nodeTimestamp": 58047702, "nethash": "bd330166898377fb28743ceef5e43a5d9d0a3efd9b3451fb7bc53530bb0a6d64" }
GET /api/blocks/getMilestone-
Description
Endpoint
/api/blocks/getMilestonereturnsmilestoneβ current slot height, which determines the reward a delegate will get for forging a block.More information about blockchain milestones: Milestones.
-
Example
Request:
GET https://endless.adamant.im/api/blocks/getMilestone
Response:
{ "success": true, "nodeTimestamp": 58047777, "milestone": 1 }
GET /api/blocks/getReward-
Description
Endpoint
/api/blocks/getRewardreturnsrewardβ the reward a delegate will get for forging a block. Integer amount of 1/10^8 ADM tokens (1 ADM = 100000000). Depends on the current slot height (milestone). -
Example
Request:
GET https://endless.adamant.im/api/blocks/getReward
Response:
{ "success": true, "nodeTimestamp": 58047028, "reward": 45000000 }
GET /api/blocks/getSupply-
Description
Endpoint
/api/blocks/getSupplyreturns total current supply of ADM tokens in the network. Integer amount of 1/10^8 ADM tokens (1 ADM = 100000000). Total supply increases with every new forged block. -
Example
Request:
GET https://endless.adamant.im/api/blocks/getSupply
Response:
{ "success": true, "nodeTimestamp": 58047218, "supply": 10198038140000000 }
GET /api/blocks/getStatus-
Description
Integrative endpoint
/api/blocks/getStatusreturns ADAMANT blockchain network information with a single request: -
Example
Request:
GET https://endless.adamant.im/api/blocks/getStatus
Response:
{ "success": true, "nodeTimestamp": 58047435, "broadhash": "4a28272c915f74d118120bb47db547a18a7512e1d48092c48be86939a6d45b89", "epoch": "2017-09-02T17:00:00.000Z", "height": 10145334, "fee": 50000000, "milestone": 1, "nethash": "bd330166898377fb28743ceef5e43a5d9d0a3efd9b3451fb7bc53530bb0a6d64", "reward": 45000000, "supply": 10198040075000000 }
GET /api/node/status-
Description
Integrative endpoint
/api/node/statusreturns both ADAMANT blockchain network information and Node information with a single request. Result includesnetwork,version,loaderandwsClientinfo.wsClientdescribes if node allows socket connections and port to connect. -
Example
Request:
GET https://endless.adamant.im/api/node/status
Response:
{ "success": true, "nodeTimestamp": 230021386, "loader": { "loaded": true, "now": 1031082, "syncing": false, "consensus": 100, "blocks": 0, "blocksCount": 0 }, "network": { "broadhash": "2d94f9070fe4ca236aaee9fd9a6863fd0b9291a80b96ac9e470408a852f0f3d8", "epoch": "2017-09-02T17:00:00.000Z", "height": 1034307, "fee": 50000000, "milestone": 0, "nethash": "38f153a81332dea86751451fd992df26a9249f0834f72f58f84ac31cceb70f43", "reward": 0, "supply": 9800000000000000 }, "version": { "build": "", "commit": "c32e740a83ef3ac6fdf7e579f7175b21be5c95e5", "version": "0.8.4" }, "wsClient": { "enabled": true, "port": 36668 } }