DeveloperAPI Overview

API Overview

Cupdiction exposes a public REST API for reading market data. All endpoints return JSON.

⚠️

The Cupdiction API is in alpha. Endpoints and response shapes may change without notice. Breaking changes will be communicated in release notes.


Base URL

https://cupdiction.com/api

All requests are HTTPS. No authentication is required for read endpoints.


Authentication

Write endpoints (placing orders, withdrawing) require a Privy bearer token.

Authorization: Bearer <privy_access_token>

Obtain a token via Privy’s getAccessToken() method in the Cupdiction frontend SDK.


Response format

All endpoints return JSON. Successful responses have HTTP status 2xx.

Errors return a JSON object with an error field:

{
  "error": "Market not found"
}

Rate limits

Read endpoints: 100 requests/minute per IP. Write endpoints: 12 requests/minute per authenticated user.


Available endpoints

MethodPathDescription
GET/api/marketsList markets
GET/api/markets/{id}Get market by ID
GET/api/markets/{id}/historyPrice history (OHLCV candles)
GET/api/bags/tokensList Bags.fm tokens
GET/api/bags/tokens/{mint}Token detail + markets
GET/api/bags/receiptsRecent resolved Bags markets
GET/api/bags/fee-racesActive fee race markets
GET/api/wallet/balancesYour balances (auth required)
GET/api/wallet/positionsYour positions (auth required)
POST/api/ordersPlace a trade (auth required)
POST/api/orders/quoteGet a trade quote (no auth)
GET/api/queueYour trade queue (auth required)
POST/api/queueAdd to queue (auth required)
DELETE/api/queue/{id}Cancel queue entry (auth required)