Build on CDR.fun

REST API for Solana trading signals, custom algorithms, and the algo marketplace. Authenticate with an API key, pay with SOL via x402, and automate your trading stack.

Base URL https://cdr.fun/api/ai/

Quick Start

01

Get an API Key

Open @PFgod_bot on Telegram and send /apikey

02

Make a Request

Pass your key in the X-API-Key header with every request

03

Build

Create algos, browse the marketplace, fetch signals, and automate your strategy

cURL
# List your custom algorithms
curl -H "X-API-Key: cdr_your_key_here" \
  https://cdr.fun/api/ai/algos

# Create a new algo with filters
curl -X POST -H "X-API-Key: cdr_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Sniper", "filters": {"min_mc": 5000, "require_twitter": true}}' \
  https://cdr.fun/api/ai/algos

# Browse marketplace (no auth needed)
curl https://cdr.fun/api/ai/marketplace

API Products

📊

Custom Algos

Create and manage custom trading algorithms with 44 configurable filters across 3 tiers. Full CRUD via REST.

API Key CDR Holder (write)
🛒

Algo Marketplace

Browse, subscribe to, and sell trading algorithms. SOL payments with 75/25 revenue split. 30-day subscriptions.

Public Browse Auth Subscribe
📡

Trading Signals

Access 8,000+ historical algorithm signals with full token metadata. Pay-per-request via x402 SOL payments.

x402 / $1 per signal
🔍

Filter Reference

Query all 44 filter definitions with types, defaults, and tier classification. Build algo configs programmatically.

Public
💹

Market Data

Price history, viewer history, token discovery, and spike detection. Bulk export for AI training and backtesting.

Public
🤖

AI Tools

Natural language token analysis, shilling detection, and PnL reports. Powered by DeepSeek via the Telegram bot.

Bot Commands

Authentication

API Key Format

Keys are 52 characters: cdr_ prefix + 48 hex characters. Generate via /apikey in the Telegram bot. Max 3 keys per account.

Public

No API key needed. Browse marketplace, query filters, view market data.

Authenticated

Valid API key. List your algos, view subscriptions, read algo detail.

CDR Holder

API key + hold 1% CDR supply (10M tokens). Create, edit, delete algos. List on marketplace.

x402 Paid

Pay $1 per request in SOL. Access full trading signal dataset with token metadata.

Endpoint Reference

Custom Algos

Method Path Auth Description
GET /api/ai/algos/filters Public All 44 filters with types, defaults, tiers
GET /api/ai/algos Key List your algos with stats
GET /api/ai/algos/:id Key Full algo detail + filters + marketplace status
POST /api/ai/algos CDR Create new algo
PATCH /api/ai/algos/:id CDR Update name, filters, or enable/disable
DELETE /api/ai/algos/:id CDR Delete algo (cascades marketplace listing)

Marketplace

Method Path Auth Description
GET /api/ai/marketplace Public Browse listings (sort, paginate)
GET /api/ai/marketplace/:id Public Listing detail + 7d performance
POST /api/ai/algos/:id/list CDR List algo on marketplace
PATCH /api/ai/marketplace/:id CDR Update price, description, active status
GET /api/ai/marketplace/subscriptions Key Your active subscriptions
POST /api/ai/marketplace/:id/subscribe Key Initiate subscription (returns 402)
POST /api/ai/marketplace/:id/confirm Key Confirm SOL payment, activate sub

Signals & Market Data

Method Path Auth Description
GET /api/ai/bot-calls/count Public Total signal count + pricing
GET /api/ai/bot-calls x402 Full signal dataset with token metadata
GET /api/ai/token-discovery Public Token discovery data (paginated)
GET /api/ai/price-history Public Historical price snapshots
GET /api/ai/viewer-history Public Viewer count history
GET /api/ai/sync Public Incremental token updates since timestamp
GET /api/ai/spike-calls Public Spike detection signals

Response Format

Success
{
    "success": true,
    "data": { ... }
}
Error
{
    "success": false,
    "error": "Description of what went wrong"
}
x402 Payment Required
{
    "error": "Payment Required",
    "payment": {
        "total_sol": 0.011628,
        "recipient": "CTLtMdpNartRuzVzETi2LpWFQQvqTU7mWXmSvGiCZTYx",
        "blockchain": "solana"
    }
}

Limits

LimitValue
Requests per minute100
Max algos per user25
Max API keys per user3
Algo name length30 characters
Listing description500 characters
Marketplace price range$1 - $10,000 / month
Subscription duration30 days per payment

Ready to build?

Generate your API key in seconds via Telegram and start building.