Complete reference for the Clodds HTTP and WebSocket APIs.
The gateway binds to loopback by default on port 18789:
http://127.0.0.1:18789
For the Compute API (agent marketplace):
https://api.cloddsbot.com
By default, HTTP endpoints do not require authentication. For production deployments:
- WebChat Token: Set
WEBCHAT_TOKENenvironment variable - Webhook Signatures: HMAC-SHA256 signatures required by default
- Network Controls: Use a reverse proxy with TLS for public exposure
Two authentication methods:
1. Bearer Token (API Key)
Authorization: Bearer clodds_apikey_xxxxx2. Wallet Address in Body
{
"wallet": "0x1234...5678",
"payload": { ... }
}| Scope | Limit |
|---|---|
| Per-wallet | 60 requests/minute |
| Per-IP | 100 requests/minute |
Rate limit headers:
X-RateLimit-Remaining: Requests remaining in windowRetry-After: Seconds to wait when rate limited
The HTTP API turns Clodds from a CLI chatbot into a headless trading platform that any software can control. Skills and agents running inside Clodds call services directly in-process — the HTTP API is for everything external.
Build a React, Next.js, or mobile frontend on top of Clodds. Show live positions, PnL charts, and portfolio stats. Let users manage TP/SL visually, monitor whale activity, and act on arbitrage opportunities — all powered by the REST endpoints below.
Write a Python or Node script that chains endpoints together:
GET /api/feeds/price/polymarket/:id → get current price
POST /api/risk/assess → check if trade is safe
POST /api/routing/quote → find best execution route
POST /api/positions/managed/:id/stop-loss → set risk controls
Run multiple Clodds instances. A master controller queries each one via HTTP — one instance scans for opportunities, another executes trades, a third monitors risk.
Build a lightweight bot that proxies user commands to the API. User types /whales in Telegram, bot calls GET /api/whales/activity, formats the response, and sends it back.
Build a social trading site: users browse the whale leaderboard (GET /api/whales/leaderboard), pick leaders to follow (POST /api/copy-trading/leaders), and monitor copied positions (GET /api/copy-trading/positions).
Scrape GET /api/monitoring/health and GET /api/monitoring/process for system metrics. Set up alerts on memory usage, provider outages, or queue backlogs. Wire price alerts via POST /api/alerts/price.
Other AI agents (AutoGPT, CrewAI, LangChain, etc.) can use Clodds as a "trading tool" by calling the REST API. Wrap endpoints as MCP tools so Claude or other LLMs can trade, check positions, and manage risk through function calling.
Use the Cron API (POST /api/cron/jobs) to schedule recurring tasks: daily portfolio rebalancing, periodic market scans, automated stop-loss sweeps, or daily digest reports — all without writing external cron jobs.
Health check endpoint.
Response:
{
"status": "ok",
"timestamp": 1706500000000
}API info and available endpoints.
Response:
{
"name": "clodds",
"version": "0.3.10",
"description": "AI assistant for prediction markets",
"endpoints": {
"websocket": "/ws",
"webchat": "/chat",
"health": "/health"
}
}Returns the WebChat HTML client that connects to /chat WebSocket.
List webchat sessions for a user.
Query: ?userId=<string>
Response:
{
"sessions": [
{ "id": "abc", "title": "Market analysis", "updatedAt": 1707400000, "messageCount": 42, "lastMessage": "BTC is up 3%..." }
]
}Load a session with its full message history.
Query: ?limit=500&before=<timestamp> (optional, for pagination)
Response:
{
"id": "abc",
"title": "Market analysis",
"messages": [
{ "id": "msg-1", "role": "user", "content": "What's BTC at?", "timestamp": 1707400000 }
],
"updatedAt": 1707400000
}Create a new webchat session.
Body: { "userId": "web-123" }
Response: { "session": { "id": "abc", "title": null, "updatedAt": 1707400000, "messageCount": 0 } }
Rename a session.
Body: { "title": "New title" }
Delete a session and all its messages.
Search markets across platforms.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
q |
string | Yes | Search text |
platform |
string | No | Filter: polymarket|kalshi|manifold|metaculus |
limit |
number | No | Max results |
maxCandidates |
number | No | Max candidates to consider |
minScore |
number | No | Minimum relevance score |
platformWeights |
JSON | No | Platform weighting |
Response:
{
"results": [
{
"score": 0.8421,
"market": {
"platform": "polymarket",
"id": "0x123abc",
"slug": "will-x-happen",
"question": "Will X happen by 2026?",
"description": "Resolution criteria...",
"url": "https://polymarket.com/...",
"status": "open",
"endDate": "2026-01-01T00:00:00.000Z",
"resolved": false,
"volume24h": 125000,
"liquidity": 50000,
"openInterest": 75000,
"predictions": 1250
}
}
]
}Market index statistics.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
platforms |
string | No | Comma-separated platform list |
Trigger manual market index sync.
Request Body:
{
"platforms": ["polymarket", "kalshi"],
"limitPerPlatform": 500,
"status": "open",
"excludeSports": true,
"minVolume24h": 1000,
"minLiquidity": 500,
"excludeResolved": true,
"prune": true,
"staleAfterMs": 86400000
}Response:
{
"result": {
"indexed": 450,
"byPlatform": {
"polymarket": 300,
"kalshi": 150
}
}
}Get historical tick data.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
outcomeId |
string | No | Filter by outcome |
startTime |
number | No | Unix timestamp ms (default: 24h ago) |
endTime |
number | No | Unix timestamp ms (default: now) |
limit |
number | No | Max results (default: 1000) |
Response:
{
"ticks": [
{
"time": "2026-02-02T12:00:00.000Z",
"platform": "polymarket",
"marketId": "0x123",
"outcomeId": "yes",
"price": 0.55,
"prevPrice": 0.54
}
]
}Get OHLC candle data.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
outcomeId |
string | Yes | Outcome ID |
interval |
string | No | 1m|5m|15m|1h|4h|1d (default: 1h) |
startTime |
number | No | Unix timestamp ms (default: 7d ago) |
endTime |
number | No | Unix timestamp ms (default: now) |
Response:
{
"candles": [
{
"time": 1706500000000,
"open": 0.50,
"high": 0.56,
"low": 0.49,
"close": 0.55,
"tickCount": 42
}
]
}Historical orderbook snapshots.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
outcomeId |
string | No | Filter by outcome |
startTime |
number | No | Unix timestamp ms (default: 1h ago) |
endTime |
number | No | Unix timestamp ms (default: now) |
limit |
number | No | Max results (default: 100) |
Response:
{
"snapshots": [
{
"time": "2026-02-02T12:00:00.000Z",
"platform": "polymarket",
"marketId": "0x123",
"outcomeId": "yes",
"bids": [[0.54, 1000], [0.53, 500]],
"asks": [[0.56, 800], [0.57, 1200]],
"spread": 0.02,
"midPrice": 0.55
}
]
}Tick recorder statistics.
Response:
{
"stats": {
"ticksRecorded": 150000,
"orderbooksRecorded": 50000,
"ticksInBuffer": 45,
"orderbooksInBuffer": 12,
"lastFlushTime": 1706500000000,
"dbConnected": true,
"platforms": ["polymarket", "kalshi"]
}
}Get computed trading features.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
outcomeId |
string | No | Specific outcome |
Response:
{
"features": {
"timestamp": 1706500000000,
"platform": "polymarket",
"marketId": "0x123",
"outcomeId": "yes",
"tick": {
"price": 0.55,
"priceChange": 0.01,
"priceChangePct": 1.85,
"momentum": 0.03,
"velocity": 0.001,
"volatility": 0.015,
"volatilityPct": 1.5,
"tickCount": 150,
"tickIntensity": 2.5,
"vwap": null
},
"orderbook": {
"spread": 0.02,
"spreadPct": 3.6,
"midPrice": 0.55,
"bidDepth": 5000,
"askDepth": 4500,
"totalDepth": 9500,
"imbalance": 0.053,
"imbalanceRatio": 1.11,
"bestBid": 0.54,
"bestAsk": 0.56,
"bestBidSize": 1000,
"bestAskSize": 800,
"weightedBidPrice": 0.535,
"weightedAskPrice": 0.565,
"bidDepthAt1Pct": 2000,
"askDepthAt1Pct": 1800,
"bidDepthAt5Pct": 4500,
"askDepthAt5Pct": 4000
},
"signals": {
"buyPressure": 0.62,
"sellPressure": 0.38,
"trendStrength": 0.15,
"liquidityScore": 0.72
}
}
}Get all computed features for tracked markets.
Feature engineering service statistics.
On-chain Solana perpetual futures. Requires PERCOLATOR_ENABLED=true.
Market state: oracle price, open interest, funding rate, LP bid/ask spread.
User's open positions with PnL, entry price, capital.
Execute long/short trade. Body: { "direction": "long"|"short", "size": <usd> }
Deposit USDC collateral. Body: { "amount": <usd> }
Withdraw USDC collateral. Body: { "amount": <usd> }
Scan code for malicious patterns (75 rules, 9 categories). Body: { "code": "..." }
Check address safety (auto-detects Solana/EVM). Body: { "address": "..." }
Pre-flight transaction validation. Body: { "destination": "...", "amount": 100, "token": "USDC" }
Scanner statistics — code scans, address checks, threats blocked, scam DB size.
GoPlus-powered token security analysis. Auto-detects chain (base58 = Solana, 0x = EVM).
Query: ?chain=ethereum (optional override)
Returns: risk score (0-100), 16 risk flags, honeypot detection, liquidity, holder concentration.
Quick boolean safety check. Returns { "address": "...", "chain": "...", "safe": true|false }.
List active DCA orders across all platforms. Query: ?userId=default
Get a single DCA order by ID.
Create DCA order. Body: { "platform": "polymarket", "marketId": "...", "totalAmount": 1000, "amountPerCycle": 50, "intervalSec": 3600, "side": "buy" }
Pause a running DCA order.
Resume a paused DCA order.
Cancel and delete a DCA order.
Generic webhook for automation.
Headers:
| Header | Description |
|---|---|
x-webhook-signature |
HMAC-SHA256 hex digest of body |
x-hub-signature-256 |
Alternative signature header |
Signature Calculation:
const crypto = require('crypto');
const signature = crypto
.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');Responses:
| Status | Description |
|---|---|
| 200 | { "ok": true } |
| 401 | Invalid/missing signature |
| 404 | Unknown webhook path |
| 429 | Rate limited |
Set CLODDS_WEBHOOK_REQUIRE_SIGNATURE=0 to disable signature checks.
Channel-specific webhook entrypoint for Teams, Google Chat, etc.
Development WebSocket endpoint.
Message Format:
{
"type": "res",
"id": "<client-id>",
"ok": true,
"payload": { "echo": "<message>" }
}WebChat WebSocket for the browser client.
Client Messages:
Auth:
{
"type": "auth",
"token": "<WEBCHAT_TOKEN>",
"userId": "web-123"
}Message:
{
"type": "message",
"text": "What's the price of BTC?",
"attachments": []
}Edit:
{
"type": "edit",
"messageId": "<id>",
"text": "Updated text"
}Delete:
{
"type": "delete",
"messageId": "<id>"
}Server Messages:
connected- Connection establishedauthenticated- Auth successfulack- Message receivedmessage- Response from agentedit- Edit confirmationdelete- Delete confirmationerror- Error occurred
Attachment Fields:
| Field | Type | Description |
|---|---|---|
type |
string | image|video|audio|document|voice|sticker |
url |
string | URL to file |
data |
string | Base64-encoded data |
mimeType |
string | MIME type |
filename |
string | File name |
size |
number | File size in bytes |
width |
number | Image/video width |
height |
number | Image/video height |
duration |
number | Audio/video duration |
caption |
string | Caption text |
Real-time tick data streaming.
Subscribe:
{
"type": "subscribe",
"platform": "polymarket",
"marketId": "0x123",
"ticks": true,
"orderbook": true
}Unsubscribe:
{
"type": "unsubscribe",
"platform": "polymarket",
"marketId": "0x123"
}Ping (keepalive):
{ "type": "ping" }Server Messages:
Subscribed:
{
"type": "subscribed",
"platform": "polymarket",
"marketId": "0x123",
"ticks": true,
"orderbook": true
}Tick:
{
"type": "tick",
"platform": "polymarket",
"marketId": "0x123",
"outcomeId": "yes",
"price": 0.55,
"prevPrice": 0.54,
"timestamp": 1706500000000
}Orderbook:
{
"type": "orderbook",
"platform": "polymarket",
"marketId": "0x123",
"outcomeId": "yes",
"bids": [[0.54, 1000]],
"asks": [[0.56, 800]],
"spread": 0.02,
"midPrice": 0.55,
"timestamp": 1706500000000
}Pong:
{
"type": "pong",
"timestamp": 1706500000000
}Error:
{
"type": "error",
"message": "Max subscriptions reached",
"code": "MAX_SUBSCRIPTIONS"
}JavaScript Example:
const ws = new WebSocket('ws://localhost:18789/api/ticks/stream');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'subscribe',
platform: 'polymarket',
marketId: '0x123abc',
ticks: true,
orderbook: true
}));
};
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === 'tick') {
console.log(`Price: ${msg.price}`);
} else if (msg.type === 'orderbook') {
console.log(`Spread: ${msg.spread}`);
}
};Health check.
Response:
{
"status": "ok",
"service": "clodds-compute",
"version": "v1",
"uptime": 123456,
"activeJobs": 2
}Service pricing.
Response:
{
"llm": {
"service": "llm",
"basePrice": 0,
"unit": "token",
"pricePerUnit": 0.000003,
"minCharge": 0.001,
"maxCharge": 10
},
"code": {
"service": "code",
"basePrice": 0.01,
"unit": "second",
"pricePerUnit": 0.001,
"minCharge": 0.01,
"maxCharge": 1
},
"web": {
"service": "web",
"basePrice": 0.005,
"unit": "request",
"pricePerUnit": 0.005,
"minCharge": 0.005,
"maxCharge": 0.1
},
"trade": {
"service": "trade",
"basePrice": 0.01,
"unit": "call",
"pricePerUnit": 0.01,
"minCharge": 0.01,
"maxCharge": 0.5
},
"data": {
"service": "data",
"basePrice": 0.001,
"unit": "request",
"pricePerUnit": 0.001,
"minCharge": 0.001,
"maxCharge": 0.1
},
"storage": {
"service": "storage",
"basePrice": 0,
"unit": "mb",
"pricePerUnit": 0.0001,
"minCharge": 0.001,
"maxCharge": 1
}
}Check wallet balance.
Response:
{
"wallet": "0x...",
"available": 10.50,
"pending": 0.25,
"totalDeposited": 15.00,
"totalSpent": 4.25
}Deposit credits.
Request:
{
"wallet": "0x...",
"paymentProof": {
"txHash": "0x...",
"network": "base",
"amountUsd": 10.00,
"token": "USDC",
"timestamp": 1706500000000
}
}Response:
{
"success": true,
"credits": 10.00,
"txHash": "0x..."
}Submit compute request.
Services: llm, code, web, trade, data, storage, gpu, ml, security
Request:
{
"wallet": "0x...",
"payload": { ... },
"paymentProof": { ... },
"callbackUrl": "https://your-server.com/webhook"
}Response:
{
"id": "req_123",
"jobId": "job_456",
"service": "llm",
"status": "pending",
"cost": 0.05,
"timestamp": 1706500000000
}Streaming LLM inference via Server-Sent Events.
Request:
{
"wallet": "0x...",
"payload": {
"model": "claude-opus-4-6",
"messages": [
{ "role": "user", "content": "Write a poem" }
],
"maxTokens": 1000
}
}Response (SSE):
data: {"type": "start", "requestId": "req_123"}
data: {"type": "text", "text": "In the "}
data: {"type": "text", "text": "realm of code..."}
data: {"type": "usage", "usage": {"inputTokens": 25, "outputTokens": 150}}
data: {"type": "done", "response": {...}}
Get job status.
Response:
{
"id": "req_123",
"jobId": "job_456",
"service": "llm",
"status": "completed",
"result": {
"content": "The weather is sunny.",
"model": "claude-opus-4-6",
"usage": { "inputTokens": 10, "outputTokens": 5 },
"stopReason": "end_turn"
},
"cost": 0.05,
"timestamp": 1706500000000
}Status Values: pending, processing, completed, failed
Cancel a pending job.
Headers:
X-Wallet-Address(required): Wallet address for ownership verification
{
"wallet": "0x...",
"payload": {
"model": "claude-opus-4-6",
"messages": [
{ "role": "user", "content": "What's the weather?" }
],
"system": "You are a helpful assistant",
"maxTokens": 1000,
"temperature": 0.7
}
}Available Models:
claude-opus-4-6(latest, most capable)claude-sonnet-4-5-20250929claude-haiku-4-5-20251001gpt-4ogpt-4o-minillama-3.1-70bllama-3.1-8bmixtral-8x7b
{
"wallet": "0x...",
"payload": {
"language": "python",
"code": "print('Hello World')",
"stdin": "",
"timeout": 30000,
"memoryMb": 256
}
}Supported Languages: python, javascript, typescript, rust, go, bash
{
"wallet": "0x...",
"payload": {
"url": "https://example.com",
"method": "GET",
"headers": {},
"javascript": false,
"extract": {
"title": "title",
"heading": "h1"
}
}
}{
"wallet": "0x...",
"payload": {
"type": "price",
"query": {
"asset": "bitcoin"
}
}
}Data Types: price, orderbook, candles, trades, markets, positions, balance, news, sentiment, percolator_state
{
"wallet": "0x...",
"payload": {
"operation": "put",
"key": "my-file.txt",
"content": "Hello World",
"contentType": "text/plain",
"ttl": 3600
}
}Operations: put, get, delete, list
List all TWAP orders.
Get a specific TWAP order by ID.
Create a new TWAP order.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
tokenId |
string | Yes | Token identifier |
side |
string | Yes | buy or sell |
totalSize |
number | Yes | Total order size |
slices |
number | Yes | Number of slices |
intervalSec |
number | Yes | Seconds between slices |
priceLimit |
number | No | Max/min price limit |
Pause a running TWAP order.
Resume a paused TWAP order.
Cancel a TWAP order.
List all bracket orders.
Get a specific bracket order by ID.
Create a bracket order (entry + take-profit + stop-loss).
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
tokenId |
string | Yes | Token identifier |
side |
string | Yes | buy or sell |
size |
number | Yes | Order size |
entryPrice |
number | Yes | Entry price |
takeProfit |
number | Yes | Take-profit price |
stopLoss |
number | Yes | Stop-loss price |
Cancel a bracket order.
Get bracket order statistics.
List all trigger orders.
Get a specific trigger order by ID.
Create a trigger order.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
tokenId |
string | Yes | Token identifier |
side |
string | Yes | buy or sell |
size |
number | Yes | Order size |
triggerPrice |
number | Yes | Price to trigger at |
triggerCondition |
string | Yes | above or below |
expiresAt |
string | No | ISO 8601 expiry time |
Cancel a trigger order.
Pause a trigger order.
Resume a paused trigger order.
List tracked leader wallets.
Add a leader wallet to track.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | Yes | Leader wallet address |
platform |
string | Yes | Platform to track on |
allocation |
number | No | Max allocation |
maxPositionSize |
number | No | Max per-position size |
Remove a leader wallet.
List all copied positions.
List positions copied from a specific leader.
Get copy performance stats for a leader.
Start copy trading.
Stop copy trading.
Get copy trading service status.
Get aggregate copy trading statistics.
Update copy trading configuration.
List detected cross-platform arbitrage opportunities.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
minSpread |
number | Minimum spread filter |
platforms |
string | Comma-separated platform filter |
limit |
number | Max results |
Get a specific opportunity by ID.
Get historical opportunities.
Get opportunity finder statistics.
Get linked markets across platforms.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
marketKey |
string | Yes | Market key to look up |
Trigger a manual opportunity scan.
Start continuous opportunity scanning.
Stop opportunity scanning.
Update opportunity finder configuration.
Get available platform information.
Execute an arbitrage opportunity.
Simulate executing an opportunity.
Get past execution results.
Start auto-execution of opportunities.
List all tracked wallets.
Add a wallet to track.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | Yes | Wallet address |
label |
string | No | Display label |
platforms |
string[] | No | Platforms to track |
Remove a tracked wallet.
Get positions for a specific wallet.
Get transaction history for a wallet.
Record a closed position for a wallet.
Get whale tracker statistics.
Get whale performance leaderboard.
Start whale tracking.
Stop whale tracking.
Get whale tracker service status.
Update whale tracker configuration.
Get recent whale activity across all wallets.
Assess risk for a proposed trade.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | User identifier |
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
side |
string | Yes | buy or sell |
size |
number | Yes | Order size |
price |
number | Yes | Order price |
Get risk limits for a user.
Update risk limits for a user.
Record a PnL entry.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | User identifier |
pnlUsd |
number | Yes | PnL in USD |
pnlPct |
number | Yes | PnL percentage |
Get a full risk report for a user.
Get risk engine statistics.
Find the best route for an order.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Source platform |
marketId |
string | Yes | Market identifier |
side |
string | Yes | buy or sell |
size |
number | Yes | Order size |
Get quotes from all available routes.
Compare routes across platforms.
Update smart router configuration.
Get feed cache statistics.
Clear the feed cache.
Search for markets across feeds.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
q |
string | Yes | Search query |
limit |
number | No | Max results |
Get latest news from all feeds.
Search news articles.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
q |
string | Yes | Search query |
limit |
number | No | Max results |
Get market data from feeds.
Get current price for a market.
Get orderbook for a market.
Analyze edge for a market opportunity.
Calculate Kelly criterion for a bet.
System health check (hostname, memory, CPU, uptime).
LLM provider health status.
Node.js process info (pid, uptime, memory, CPU usage).
Get recent alternative data signals.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
limit |
number | Max results |
Get market-specific sentiment data.
Get alt data service statistics.
List alerts for a user.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
userId |
string | User ID (default: default) |
Get a specific alert.
Create a price alert (above/below threshold).
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
type |
string | Yes | price_above or price_below |
threshold |
number | Yes | Price threshold |
userId |
string | No | User ID |
deliveryChannel |
string | No | http, telegram, etc. |
oneTime |
boolean | No | Delete after triggered |
Create a price change alert (% change in time window).
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
platform |
string | Yes | Trading platform |
marketId |
string | Yes | Market identifier |
changePct |
number | Yes | Change percentage threshold |
timeWindowSecs |
number | Yes | Time window in seconds |
Create a volume spike alert.
Enable an alert.
Disable an alert.
Delete an alert.
Start alert monitoring.
Stop alert monitoring.
Get status of a queued execution job.
Wait for a job to complete (with timeout).
Request Body:
| Field | Type | Description |
|---|---|---|
timeoutMs |
number | Max wait time (default: 30000) |
List all registered webhooks.
Get a specific webhook.
Enable a webhook.
Disable a webhook.
Delete a webhook.
Regenerate the HMAC secret for a webhook.
Check if payments are configured.
Get payment history.
Get balance for a network (base, base-sepolia, solana, solana-devnet).
Get wallet address for a network.
Generate embedding for a single text.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Text to embed |
Generate embeddings for multiple texts.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
texts |
string[] | Yes | Texts to embed |
Compute cosine similarity between two vectors.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
a |
number[] | Yes | First vector |
b |
number[] | Yes | Second vector |
Semantic search over a list of items.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
query |
string | Yes | Search query |
items |
string[] | Yes | Items to search |
topK |
number | No | Max results |
Clear the embedding cache.
Get cron service status (running, job count, next job).
List all scheduled jobs.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
includeDisabled |
boolean | Include disabled jobs |
Get a specific scheduled job.
Create a new scheduled job.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Job name |
schedule |
object | Yes | Schedule config ({ kind: 'every', everyMs: 60000 } or { kind: 'cron', expr: '*/5 * * * *' }) |
payload |
object | Yes | Job payload ({ kind: 'systemEvent', text: '...' }, etc.) |
enabled |
boolean | No | Enabled (default: true) |
Update a scheduled job.
Remove a scheduled job.
Run a job immediately.
Request Body:
| Field | Type | Description |
|---|---|---|
mode |
string | force (default) or due |
List all managed positions with stats.
Get a specific managed position.
Get managed positions filtered by platform.
Create or update a managed position.
Close a managed position.
Request Body:
| Field | Type | Description |
|---|---|---|
price |
number | Close price (default: current price) |
Set stop-loss on a position.
Request Body:
| Field | Type | Description |
|---|---|---|
price |
number | Absolute stop-loss price |
percentFromEntry |
number | Stop-loss as % from entry |
trailingPercent |
number | Trailing stop percentage |
Set take-profit on a position.
Request Body:
| Field | Type | Description |
|---|---|---|
price |
number | Absolute take-profit price |
percentFromEntry |
number | Take-profit as % from entry |
partialLevels |
array | Partial TP levels [{ percent, sizePercent }] |
Remove stop-loss from a position.
Remove take-profit from a position.
Update current price for a position (triggers TP/SL checks).
Batch update prices for multiple positions.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
updates |
array | Yes | [{ positionId, price }] |
Start position monitoring (TP/SL checker).
Stop position monitoring.
| Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST |
400 | Malformed request body |
MISSING_WALLET |
400 | Wallet address required |
INVALID_SIGNATURE |
401 | Webhook signature invalid |
INSUFFICIENT_BALANCE |
402 | Not enough credits |
UNAUTHORIZED |
403 | Access denied |
NOT_FOUND |
404 | Resource not found |
RATE_LIMITED |
429 | Too many requests |
MAX_SUBSCRIPTIONS |
429 | WebSocket subscription limit |
INTERNAL_ERROR |
500 | Server error |
SERVICE_UNAVAILABLE |
503 | Service temporarily down |
Error Response Format:
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Need $0.05, have $0.00"
}
}When you provide a callbackUrl in compute requests, results are POSTed:
{
"id": "req_123",
"jobId": "job_456",
"service": "llm",
"status": "completed",
"result": { ... },
"cost": 0.05,
"timestamp": 1706500000000
}Verification Header:
X-Clodds-Signature: HMAC-SHA256 of body using webhook secret
Full OpenAPI 3.0 spec available at:
/docs/openapi.yaml
Or view interactively:
/docs/swagger