Back Home

Nexus Protocol API Reference

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.

Core Endpoints

These are the fundamental endpoints for interacting with the Nexus Protocol.

1. GET /v1/status

Retrieves the current operational status of the Nexus Protocol network.

Request:

No parameters required.

Response (200 OK):

{
  "status": "active",
  "network_height": 1587654,
  "last_block_hash": "a1b2c3d4e5f67890...",
  "timestamp": "2023-10-27T10:30:00Z"
}
            

Example Response: Check network health.

Token Management Endpoints

Manage and query information related to Nexus Protocol's native tokens.

2. GET /v1/tokens/{tokenId}

Retrieves detailed information about a specific token.

Request Parameters:

Name Type Required Description
tokenId String Yes The unique identifier of the token.

Response (200 OK):

{
  "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.

Staking and Governance Endpoints

Interact with staking mechanisms and governance proposals.

3. POST /v1/stake/delegate

Delegates stake to a validator node.

Request Parameters:

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.

Response (202 Accepted):

{
  "transaction_hash": "0xfedcba0987654321...",
  "message": "Delegation request accepted for processing."
}
            

Example Response: Submit a staking delegation.

Other Resources