Overview
Getting Started
Quick start guide to integrate Dritan
Dritan is a low-latency Solana market data platform.
Base URLs#
| Environment | REST | WebSocket |
|---|---|---|
| US East | https://us-east.dritan.dev | wss://us-east.dritan.dev |
Authentication#
All endpoints require an API key.
| Method | Header/Param |
|---|---|
| REST | x-api-key: <your_key> |
| WebSocket (browser) | ?apiKey=<your_key> |
Create keys in the dashboard.
SDK (TypeScript)#
npm i dritan-sdk
import { DritanClient } from "dritan-sdk";
const client = new DritanClient({
apiKey: process.env.DRITAN_API_KEY!,
baseUrl: "https://us-east.dritan.dev",
wsBaseUrl: "wss://us-east.dritan.dev"
});
const price = await client.getTokenPrice("So11111111111111111111111111111111111111112");
console.log(price);
REST (no SDK)#
curl -H "x-api-key: YOUR_KEY" \
https://us-east.dritan.dev/token/price/So11111111111111111111111111111111111111112
WebSocket (no SDK)#
const ws = new WebSocket("wss://us-east.dritan.dev/damm1?apiKey=YOUR_KEY");
ws.onmessage = (m) => console.log(m.data);