API
The Darkfibre API provides REST endpoints for non-custodial Solana DEX trading. You build transactions via the API, sign them locally with your private key and submit them for fast execution.
Base URL
Section titled “Base URL”https://api.darkfibre.dev/v1All endpoints are versioned under /v1. This ensures backwards compatibility when we introduce new features or breaking changes under future versions.
How It Works
Section titled “How It Works”Every trade follows the same pattern:
- Build - Request an unsigned transaction (buy/sell/swap)
- Sign - Sign the transaction locally with your private key
- Submit - Send the signed transaction for broadcasting
Your private key never leaves your device. We build transactions, you maintain complete custody.
Authentication
Section titled “Authentication”All REST endpoints (except register and ping) require authentication:
Authorization: Bearer api_your_key_hereGet your API key by registering at darkfibre.dev/register or via the POST /v1/auth/register endpoint.
Endpoints
Section titled “Endpoints”POST /v1/auth/registerGET /v1/auth/profilePOST /v1/tx/buyPOST /v1/tx/sellPOST /v1/tx/swapPOST /v1/tx/submitGET /v1/ping