This document provides a comprehensive overview of the Nexus Protocol's Application Programming Interface (API), detailing the available endpoints, request parameters, and response structures. Understanding these elements will allow for seamless integration and efficient utilization of the Nexus Protocol's advanced functionalities.
These are the fundamental endpoints for interacting with the Nexus Protocol.
GET /v1/statusRetrieves the current operational status of the Nexus Protocol network.
No parameters required.
{
"status": "active",
"network_height": 1587654,
"last_block_hash": "a1b2c3d4e5f67890...",
"timestamp": "2023-10-27T10:30:00Z"
}
Example Response: Check network health.
Manage and query information related to Nexus Protocol's native tokens.
GET /v1/tokens/{tokenId}Retrieves detailed information about a specific token.
| Name | Type | Required | Description |
|---|---|---|---|
tokenId |
String | Yes | The unique identifier of the token. |
{
"token_id": "NXUS",
"name": "Nexus Token",
"symbol": "NXUS",
"decimals": 8,
"total_supply": "10000000000000000",
"contract_address": "0xabc123..."
}
Example Response: Get details for the main Nexus Token.
Interact with staking mechanisms and governance proposals.
POST /v1/stake/delegateDelegates stake to a validator node.
| Name | Type | Required | Description |
|---|---|---|---|
delegatorAddress |
String | Yes | The address of the delegator. |
validatorAddress |
String | Yes | The address of the validator to delegate to. |
amount |
BigInt | Yes | The amount of tokens to delegate (in smallest unit). |
signature |
String | Yes | Transaction signature. |
{
"transaction_hash": "0xfedcba0987654321...",
"message": "Delegation request accepted for processing."
}
Example Response: Submit a staking delegation.