For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Use

Guide for the DART public endpoint — free, no API key, 1 req/sec, JSON responses.

The DART API is a standard JSON REST API — no MessagePack, no WebSocket. Just HTTP requests. Free to use without an API key, or pass a key for higher rate limits (see Get API Access).

Base URL: https://api.titan.exchange/dart


GET /health

Health check.

curl https://api.titan.exchange/dart/health
{ "status": "ok" }

GET /markets

Returns the list of supported trading pairs.

curl https://api.titan.exchange/dart/markets
{
  "markets": [
    {
      "name": "SOL/USDC",
      "tokenA": "So11111111111111111111111111111111111111112",
      "tokenB": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    }
  ]
}

POST /swap

Get a swap quote with transaction-ready instructions. Compute budget instructions are pre-configured for optimal execution.

Request body (JSON):

  • inputMint (string, required) — Input token mint address (base58).

  • outputMint (string, required) — Output token mint address (base58).

  • amount (string, required) — Raw amount in smallest unit (e.g. lamports).

  • userPublicKey (string, required) — Wallet public key (base58). Must be on-curve.

  • slippageBps (number, optional) — Slippage tolerance in basis points. Default: 50.

  • computeUnitPrice (number, optional) — Compute unit price in microLamports. Default: 10000.

  • includeDexes (string[], optional) — Only use these DEX venues.

  • excludeDexes (string[], optional) — Exclude these DEX venues.

Example:

Response:

Response fields:

  • outputAmount — Expected output in smallest unit.

  • inputAmount — Input amount in smallest unit.

  • provider — Always Titan-DART.

  • slippageBps — Slippage tolerance applied.

  • instructions — Swap instructions with compute budget pre-configured. programId and pubkey are base58, data is base64.

  • addressLookupTables — Base58 address lookup table keys for V0 transaction compilation.

Compute budget (prepended automatically):

  • requestHeapFrame — 256 KB

  • setComputeUnitLimit — 1,400,000 CUs

  • setComputeUnitPrice — configurable (default 10,000 microLamports)

Errors:

  • 400 — Missing required fields or invalid JSON.

  • 404 — No routes found for the given pair.

  • 429 — Rate limit exceeded.


Building a transaction

The response includes all instructions ready to go — deserialize, build a V0 transaction, sign, and send:


Last updated