Getting Started

Getting Started

Base URL

https://api.conyr.ai

Authentication

All /v1/* endpoints require a Bearer token in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.conyr.ai/v1/wallets/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU/performance

The following endpoints are public and require no authentication:

  • GET /health — liveness probe
  • GET /ready — readiness probe (checks core services)
  • GET /metrics — Prometheus metrics
  • WS /ws — WebSocket connection

Your First Request

Let’s check a wallet’s 7-day trading performance:

cURL

curl -s -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.conyr.ai/v1/wallets/7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU/performance?window=7d" \
  | python3 -m json.tool

Python

import requests
 
API_KEY = "YOUR_API_KEY"
BASE = "https://api.conyr.ai/v1"
 
wallet = "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
resp = requests.get(
    f"{BASE}/wallets/{wallet}/performance",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"window": "7d"},
)
data = resp.json()
print(f"Win rate: {data['win_rate']:.1%}, PnL: ${data['total_pnl_usd']:,.2f}")

TypeScript

const API_KEY = "YOUR_API_KEY";
const BASE = "https://api.conyr.ai/v1";
 
const wallet = "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU";
const resp = await fetch(
  `${BASE}/wallets/${wallet}/performance?window=7d`,
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const data = await resp.json();
console.log(`Win rate: ${(data.win_rate * 100).toFixed(1)}%, PnL: $${data.total_pnl_usd.toFixed(2)}`);

Response

{
  "wallet_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "total_trades": 142,
  "wins": 89,
  "losses": 53,
  "win_rate": 0.6267,
  "total_pnl_usd": 12450.32,
  "total_volume_usd": 98230.50,
  "total_fees_usd": 142.80,
  "avg_hold_time_seconds": 3420.5,
  "cash_pnl_usd": 11200.00
}

Error Handling

All errors return a consistent JSON format:

{"error": "Invalid window. Use 1d, 7d, or 30d", "code": 400}

Always check the HTTP status code. Possible values: 200, 400, 401, 500, 503.

Next Steps