
Build trading bots that place price predictions programmatically. All amounts are in USDT.
Authorization: Bearer cpx_your_api_key_hereKeys grant access to your account only (balance, your bets, placing bets). They cannot withdraw, deposit, or access other users. Keep your key secret; revoke it anytime in your Profile.
Exceeding a limit returns 429 with a Retry-After header (in seconds). The rounds endpoint is cached for ~2s, so polling it frequently is fine.
Base URL: https://cryprex.com
/api/v1/accountYour account: id, username, balance.
/api/v1/roundsCurrent rounds and period info (start/end, betting deadline, whether betting is open).
Query (optional): period (5m|15m|1h|1d|1w|1m|1y), exchange (futures|spot, default futures), symbol (e.g. BTCUSDT).
/api/v1/betsYour bets, newest first.
Query (optional): status (active|won|lost|cancelled), limit (1–200, default 50), offset.
/api/v1/betPlace a prediction. Body (JSON):
{
"symbol": "BTCUSDT",
"period": "1h",
"direction": "UP",
"amount": 5,
"exchange": "futures"
}direction: UP or DOWN. amount: min 1 USDT. exchange optional (default futures). The start price, round and betting deadline are determined by the server — you cannot bet after a round's deadline.
Supported symbols: BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, XRPUSDT, ADAUSDT, DOGEUSDT, AVAXUSDT, DOTUSDT, LINKUSDT, and 40+ more. Call /api/v1/rounds to see them live.
You predict whether a coin price will be UP or DOWN at the end of a period (1 hour, day, week, month, year). Each period has a betting window; after the deadline no new bets are accepted, but the round runs until it ends. Winners split the losing pool proportionally (a 20% commission applies to the losing pool). /api/v1/bets?status=won
import requests
BASE = "https://cryprex.com"
API_KEY = "cpx_your_api_key_here"
headers = {"Authorization": f"Bearer {API_KEY}"}
# 1. Check balance
acc = requests.get(f"{BASE}/api/v1/account", headers=headers).json()
print("Balance:", acc["account"]["balance"])
# 2. Look at the 1h round for BTC and bet if betting is open
r = requests.get(f"{BASE}/api/v1/rounds",
params={"period": "1h", "symbol": "BTCUSDT"},
headers=headers).json()
can_bet = r["periods"][0]["canBet"]
if can_bet:
resp = requests.post(f"{BASE}/api/v1/bet", headers=headers, json={
"symbol": "BTCUSDT",
"period": "1h",
"direction": "UP",
"amount": 5,
}).json()
print("Bet result:", resp)
else:
print("Betting window for this round is closed")
# 3. Review recent bets
bets = requests.get(f"{BASE}/api/v1/bets",
params={"limit": 5}, headers=headers).json()
for b in bets["bets"]:
print(b["symbol"], b["direction"], b["amount"], b["status"])const BASE = "https://cryprex.com";
const API_KEY = "cpx_your_api_key_here";
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
async function main() {
// 1. Balance
const acc = await fetch(`${BASE}/api/v1/account`, { headers }).then(r => r.json());
console.log("Balance:", acc.account.balance);
// 2. Check the 1h BTC round
const r = await fetch(`${BASE}/api/v1/rounds?period=1h&symbol=BTCUSDT`, { headers })
.then(r => r.json());
if (r.periods[0].canBet) {
const resp = await fetch(`${BASE}/api/v1/bet`, {
method: "POST",
headers,
body: JSON.stringify({
symbol: "BTCUSDT",
period: "1h",
direction: "UP",
amount: 5,
}),
}).then(r => r.json());
console.log("Bet result:", resp);
} else {
console.log("Betting window is closed");
}
}
main();Every response is JSON with a success boolean. On error, error holds a message.
401 — invalid or missing API key400 — bad parameters (see error message)429 — rate limit exceeded (retry after header)503 — start price temporarily unavailable, retryThe API is provided as-is for building bots on CRYPREX. We may adjust limits to keep the platform stable. Abuse or attempts to overload the service will result in key revocation.