RealiaX API Reference

Build anything on RealiaX.

RealiaX is an on-chain exchange for Realia — real, redeemable things — tokenized and traded on a live central-limit order book with peer-to-peer perpetuals. This reference documents the complete REST API for programmatic trading, market making, and data.

Market data
Tickers, order books, trades, OHLCV. Public, keyless, JSON.
Trading & bots
Orders, margin, inventory — one API key, full control.
Self-custody
On-chain settlement; you hold the keys, sign your trades.
Base URL
https://commodities.gocube.org/api/v2/commodity
5 minutes

Quick start.

Every market-data endpoint is public. Fetch the market list, then a book and candles:

# 1. all markets
curl https://commodities.gocube.org/api/v2/commodity/series

# 2. order book + candles
curl "https://commodities.gocube.org/api/v2/commodity/markets/egotv55usdt/orderbook"
curl "https://commodities.gocube.org/api/v2/commodity/ohlcv?symbol=egotv55usdt&interval=1h&limit=100"

To trade, generate an API key and send it as X-API-Key. That’s the whole model — no request signing, no nonces.

Read first

Conventions.

ConceptRule
symbolLowercase market id used by trading endpoints, e.g. egotv55usdt. Get the list from /series.
ticker_idAggregator pair id, uppercase BASE_TARGET for spot (EGOTV55_USDT) and BASE-PERP for perps.
NumbersAll prices, sizes and amounts are decimal strings — never floats — to preserve precision. Parse with a decimal library.
TimestampsUnix time. OHLCV bucket times are seconds; trade & book timestamps are milliseconds.
Base / targetBase = the Realia token; target = the settlement currency (USDT). Price is target per 1 base.
FeesA flat 0.15% trading fee applies to every fill, maker and taker.
ErrorsNon-2xx responses return { "errors": ["code"] }. See the error reference.
Reference

Enumerations.

FieldValuesNotes
sidebuy · sellOrder direction.
typelimit · market · stop_loss · take_profitLimit/stop require price; stop/take require stop_price.
statewait · done · cancelwait = open/resting, done = fully filled, cancel = cancelled.
interval1m 5m 15m 30m 1h 4h 1d 1wOHLCV bucket sizes.
product_typePerpetualDerivatives contract type.
Access

Authentication.

Market data is public — no key required. Trading requires an API key issued to your RealiaX (Cubemail) account. Send it on every trading request:

header
X-API-Key: cdx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keys are shown once at creation and stored only as a salted hash — RealiaX cannot recover a lost key. A key inherits your account’s balances and permissions. Never embed a key in client-side code; keep it server-side and rotate on any suspicion of exposure.
Credentials

API keys.

Manage keys from your account or the generator below. Programmatic key management is also available with an existing session:

POST/keys
session

Issue a new key. Body { "label": "my-bot" }. Returns the plaintext key once plus its id and prefix.

GET/keys
session

List your keys (prefixes and labels only — never the secret).

POST/keys/:id/revoke
session

Permanently revoke a key.

Sign in with your Cubemail account to generate an API key.

Sign in
Fair use

Rate limits.

Limits are generous and designed for real-time bots and minutely aggregator polling.

SurfaceGuidance
Market dataPoll as often as once per second per endpoint. Books and candles update continuously; there is no benefit to tighter polling.
Data pollingMinutely snapshot polling of market data is fully supported; no key or sign-up required.
TradingSustained order placement/cancel is fine for market making. Burst-cancel-and-replace loops of a few seconds are the intended pattern.
AbuseExcessive traffic may be throttled per key/IP. If you need higher throughput, contact the team.
Public REST

Markets & tickers.

GET/series
weight 1public

Every listed market with live price, 24h statistics and top-of-book. This is the canonical market list.

Response — array of

FieldTypeDescription
symbolstringTrading symbol, e.g. egotv55usdt.
market_idstringInternal market identifier.
token_currency_idstringBase (Realia token) code.
settlement_currency_idstringTarget (settlement) code, e.g. usdt.
oraclestringReference/index price.
laststringLast trade price.
best_bid / best_askstringTop of book.
volume24hstring24h quote volume.
high_24h / low_24hstring24h high / low.
change24hstring24h change (percent).
statestringactive · redemption_open · settling · closed.
GET/series/:symbol
weight 1public

A single market by symbol, e.g. /series/egotv55usdt.

GET/rates
weight 1public

Reference/settlement FX rates used across the exchange.

Public REST

Order book.

GET/markets/:symbol/orderbook
weight 1public

Aggregated depth for a market — resting bids and asks by price level.

response json
{
  "bids": [ ["388.10", "42.5"], ["388.05", "18.0"] ],
  "asks": [ ["389.40", "31.2"], ["389.55", "12.8"] ]
}
Public REST

Trades.

GET/markets/:symbol/trades
weight 1public

Recent completed trades — the tape. Each trade carries price, amount, side and time.

Public REST

OHLCV / klines.

GET/ohlcv
weight 1public

Candlesticks aggregated from trades — the charting feed for any client.

Query parameters

ParamTypeReqDescription
symbolstringone ofMarket symbol, e.g. egotv55usdt.
ticker_idstringone ofAggregator id, e.g. EGOTV55_USDT.
intervalenumnoBucket size (default 1h).
from / tointnoUnix seconds range.
limitintnoMax candles (default 1000, cap 5000).
response json
{ "market": "egotv55usdt", "interval": "1h", "candles": [
  { "time": 1720008000, "open": "388.1", "high": "389.4",
    "low": "387.6", "close": "388.9", "volume": "142.5" }
] }
X-API-Key

Account.

GET/me
weight 1API key

Your account and tradeable balances (available + locked) per currency.

X-API-Key

Orders.

POST/orders
weight 1API key

Place an order.

Body

FieldTypeReqDescription
symbolstringyesMarket symbol.
sideenumyesbuy or sell.
typeenumyeslimit · market · stop_loss · take_profit.
pricestringlimit/stopLimit price.
volumestringyesOrder size in base units.
stop_pricestringstop/tpTrigger price.
curl -X POST https://commodities.gocube.org/api/v2/commodity/orders \
  -H "X-API-Key: $REALIAX_KEY" \
  -H "content-type: application/json" \
  -d '{"symbol":"egotv55usdt","side":"buy","type":"limit","price":"388.50","volume":"2"}'

Response 201

json
{ "id": 5231, "uuid": "…", "market": "egotv55usdt",
  "side": "buy", "type": "limit", "price": "388.50",
  "volume": "2", "locked": "777.00", "state": "wait" }
GET/orders
weight 1API key

Your open (resting) orders.

POST/orders/:id/cancel
weight 1API key

Cancel a resting order and release its lock.

GET/positions
weight 1API key

Your holdings and unrealised P&L per market.

X-API-Key

Margin & perpetuals.

POST/margin/open
weight 1API key

Open an isolated-margin perpetual position. Body: symbol, side, leverage, collateral, size.

POST/margin/:id/close
weight 1API key

Close a position; realises P&L to your balance.

GET/margin/positions
weight 1API key

Your open margin positions with entry, size, leverage and liquidation price.

Markets whose token is settled on-chain (a deployed ERC-20) require an EIP-712 order signature (signed_order + order_signature). Off-chain markets — where most bots operate — take orders with no signature.
Guide

Build a market-making bot.

A minimal two-sided quoter — read the reference price, lay a bid and an ask around it, and cancel-and-replace on a loop so your book is always fresh. This is the shape RealiaX’s own market maker uses.

const BASE = "https://commodities.gocube.org/api/v2/commodity";
const H = { "content-type": "application/json", "X-API-Key": process.env.REALIAX_KEY };
const SYMBOL = "egotv55usdt";
const SPREAD = 0.002, SIZE = "0.5";              // 20 bps each side
const j = (u, o) => fetch(BASE + u, o).then(r => r.json());

async function tick() {
  const m = (await j("/series")).find(x => x.symbol === SYMBOL);
  const ref = parseFloat(m.last) || parseFloat(m.oracle);
  if (!ref) return;

  const open = await j("/orders", { headers: H });               // clear our quotes
  await Promise.all(open.map(o =>
    fetch(`${BASE}/orders/${o.id}/cancel`, { method: "POST", headers: H })));

  const bid = (ref * (1 - SPREAD)).toFixed(4);                    // re-quote both sides
  const ask = (ref * (1 + SPREAD)).toFixed(4);
  for (const [side, price] of [["buy", bid], ["sell", ask]])
    await fetch(BASE + "/orders", { method: "POST", headers: H,
      body: JSON.stringify({ symbol: SYMBOL, side, type: "limit", price, volume: SIZE }) });
  console.log("quoted", bid, "/", ask);
}
setInterval(tick, 5000);

Extend it with multiple ladder levels, inventory skew, protective stop_loss orders and perp hedges via /margin/open. Use /ohlcv for signals and /me to track inventory.

Reference

Error reference.

Errors return a non-2xx HTTP status with a body of { "errors": ["code"] }.

HTTPCodeMeaning
400server.method.invalid_message_bodyMalformed JSON body.
401auth.required · api_key.invalidMissing or invalid X-API-Key.
404unknown ticker_id · record.not_foundNo such market / ticker / order.
422market.order.invalid_price · invalid_volumeBad price or size.
422market.account.insufficient_balanceNot enough balance to lock the order.
422commodity.order.signature_requiredOn-chain market needs an EIP-712 signature.
429rate_limitedSlow down; retry after a short backoff.
Versioning

Changelog.

The API is versioned in the path (/api/v2/commodity). Additive changes ship without a version bump; breaking changes get a new version.

2026-07API keys for programmatic trading; public OHLCV / klines feed.
2026-06Peer-to-peer perpetuals, isolated margin, stop-loss / take-profit order types.
2026-05Public spot market-data endpoints and the central-limit order book API.
Ready to build?
Fund your account, generate a key, ship your first bot.
Open the exchange