This document describes the available API endpoints for the HyperDAG platform. All endpoints are relative to the base URL: https://api.hyperdag.com/v1 (production) or http://localhost:5000/api/v1 (development).
All API requests require authentication. You can authenticate using one of the following methods:
- Bearer Token Authentication: Include an API key in the
X-API-Keyheader. - Web3 Authentication: Include a
Authorization: Web3 {wallet_address}header, where{wallet_address}is your Ethereum wallet address.
All responses are returned in JSON format with the following structure:
{
"success": true,
"data": {},
"message": "Operation completed successfully"
}Or in case of an error:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Error description"
}
}GET /projects
Returns a list of all projects.
Response:
{
"success": true,
"data": {
"projects": [
{
"id": 1,
"title": "Project Title",
"description": "Project Description",
"type": "rfp",
"categories": ["dapp", "finance"],
"creatorId": 123,
"createdAt": "2025-05-01T12:00:00Z"
}
]
}
}GET /projects/{projectId}
Returns details of a specific project.
Response:
{
"success": true,
"data": {
"project": {
"id": 1,
"title": "Project Title",
"description": "Project Description",
"type": "rfp",
"categories": ["dapp", "finance"],
"teamRoles": ["developer", "designer"],
"fundingGoal": 1000,
"durationDays": 30,
"currentFunding": 500,
"creatorId": 123,
"createdAt": "2025-05-01T12:00:00Z"
}
}
}POST /projects
Creates a new project.
Request Body:
{
"title": "New Project",
"description": "Project Description",
"type": "rfp",
"categories": ["dapp", "finance"],
"teamRoles": ["developer", "designer"],
"fundingGoal": 1000,
"durationDays": 30,
"stakeTokens": true
}Response:
{
"success": true,
"data": {
"id": 1
}
}GET /projects/{projectId}/teams/match
Returns potential teams for a specific project.
Response:
{
"success": true,
"data": {
"teams": [
{
"id": "team-1",
"members": [
{
"id": 1,
"username": "dev1",
"skills": ["javascript", "react", "blockchain"],
"experience": 5,
"persona": "developer",
"reputation": 85
},
{
"id": 2,
"username": "designer1",
"skills": ["ui", "ux", "figma"],
"experience": 3,
"persona": "designer",
"reputation": 78
}
],
"matchScore": 0.87,
"requiredRoles": ["developer", "designer", "marketer"],
"completedRoles": ["developer", "designer"],
"missingRoles": ["marketer"]
}
]
}
}GET /network/metrics
Returns metrics about the HyperDAG network.
Response:
{
"success": true,
"data": {
"tps": 9876,
"averageLatency": 138,
"confirmedTxs": 24156789,
"pendingTxs": 162,
"activeNodes": 347
}
}POST /transactions
Submits a transaction to the HyperDAG network.
Request Body:
{
"to": "0x1234...",
"value": 10,
"data": "0x..."
}Response:
{
"success": true,
"data": {
"txHash": "0x1234..."
}
}GET /tokens/balance
Returns the token balance for the authenticated user.
Response:
{
"success": true,
"data": {
"balance": 100
}
}| Code | Description |
|---|---|
UNAUTHORIZED |
Authentication required or invalid authentication credentials |
VALIDATION_ERROR |
Invalid request parameters |
NOT_FOUND |
Requested resource not found |
INSUFFICIENT_TOKENS |
Insufficient token balance for the requested operation |
SERVER_ERROR |
Internal server error |