API Reference
Welcome to the Nefarious Labs API reference. Here you'll find detailed documentation for all available endpoints.
Base URL
bash
https://api.nefariouslabs.dev
Authentication
All API requests require an API key. Include it in the request header:
bash
X-API-Key: your-api-key
Warning: Never expose your API key in client-side code. Always make API calls from your backend.
Rate Limiting
Rate limits are applied per API key. When you exceed your rate limit, you'll receive a 429 Too Many Requests response.
Response headers include:
X-RateLimit-Limit: Your rate limitX-RateLimit-Remaining: Remaining requestsX-RateLimit-Reset: Unix timestamp when the limit resets
Error Handling
All errors follow a consistent format:
json
{"error": {"code": "INVALID_WALLET","message": "The provided wallet address is invalid","details": {}}}
Common Error Codes
| Field | Type | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Invalid or missing API key |
| RATE_LIMITED | 429 | Rate limit exceeded |
| INVALID_PARAMS | 400 | Invalid request parameters |
| NOT_FOUND | 404 | Resource not found |
| INTERNAL_ERROR | 500 | Internal server error |
SDKs
Endpoints
Positions
Get DeFi positions for a Solana or EVM wallet across 115+ supported protocols.
Funding Rates
Get current and historical funding rates from perpetual exchanges.
Ready to start building?
Get your API key in seconds. Free tier included.
Get Started — freeNo credit card required