N.0.M.A.D API Reference
Welcome to the N.0.M.A.D API documentation! Our API allows you to integrate with N.0.M.A.D services, interact with our Telegram bot, and access wallet functionalities programmatically.
Beta API: The N.0.M.A.D API is currently in beta. Features and endpoints may change. Join our Telegram for the latest updates.
Base URL
https://api.n0mad.pro/v1Authentication
All API requests require authentication using an API key. Include your API key in the request headers:
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.n0mad.pro/v1/wallet/balanceGetting Your API Key
- Connect to Telegram Bot
Start a conversation with our Telegram Bot
- Request API Access
Send
/apicommand to request developer access - Verify Identity
Complete the verification process
- Receive API Key
Get your unique API key via secure message
Rate Limiting
API requests are rate limited to ensure fair usage:
- 100 requests/hour
- Basic wallet operations
- Community support
- 1,000 requests/hour
- Advanced features
- Priority support
- Webhook access
Response Format
All API responses follow a consistent JSON format:
{
"success": true,
"data": {
// Response data here
},
"message": "Operation completed successfully",
"timestamp": "2024-10-24T07:37:42Z"
}Error Responses
When an error occurs, the API returns:
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "The request parameters are invalid",
"details": "Missing required field: address"
},
"timestamp": "2024-10-24T07:37:42Z"
}Common Error Codes
| Code | Status | Description |
|---|---|---|
INVALID_API_KEY | 401 | API key is missing or invalid |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INVALID_REQUEST | 400 | Request format or parameters are invalid |
WALLET_NOT_FOUND | 404 | Specified wallet does not exist |
INSUFFICIENT_FUNDS | 422 | Not enough balance for transaction |
NETWORK_ERROR | 503 | Solana network is temporarily unavailable |
Core Endpoints
Wallet Operations
Retrieve wallet balance for SOL and SPL tokens
Send SOL or SPL tokens to another address
Get transaction history for a wallet
Generate a new Solana wallet
Trading & DeFi
Swap between SOL and SPL tokens
Stake SOL with validators
Real-time token price data
Liquidity pool information
Bot Integration
Send messages via Telegram bot
Handle user commands and interactions
Set up transaction notifications
Configure webhook endpoints
SDK Examples
JavaScript/TypeScript
import { N0MADAPI } from '@n0mad/api-sdk';
const n0mad = new N0MADAPI({
apiKey: 'your-api-key',
network: 'mainnet' // or 'devnet'
});
// Get wallet balance
const balance = await n0mad.wallet.getBalance('WALLET_ADDRESS');
console.log(`SOL Balance: ${balance.sol}`);
// Send transaction
const tx = await n0mad.wallet.sendTransaction({
from: 'SENDER_ADDRESS',
to: 'RECIPIENT_ADDRESS',
amount: 0.1, // SOL
token: 'SOL'
});Python
from n0mad_api import N0MADClient
client = N0MADClient(
api_key='your-api-key',
network='mainnet'
)
# Get wallet balance
balance = client.wallet.get_balance('WALLET_ADDRESS')
print(f"SOL Balance: {balance['sol']}")
# Send transaction
tx = client.wallet.send_transaction(
from_address='SENDER_ADDRESS',
to_address='RECIPIENT_ADDRESS',
amount=0.1,
token='SOL'
)curl
# Get wallet balance
curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
"https://api.n0mad.pro/v1/wallet/balance?address=WALLET_ADDRESS"
# Send transaction
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"SENDER_ADDRESS","to":"RECIPIENT_ADDRESS","amount":0.1,"token":"SOL"}' \
"https://api.n0mad.pro/v1/wallet/send"Webhooks
Set up webhooks to receive real-time notifications:
{
"url": "https://your-app.com/webhooks/n0mad",
"events": [
"transaction.confirmed",
"balance.updated",
"stake.reward"
],
"secret": "your-webhook-secret"
}Need Help?
Get instant help and support through our bot
Technical support for API integration
Join our developer community
Pro Tip: Use our Telegram Bot to test API functionality before integrating into your application!