A gold price WebSocket API
The live bid and ask of gold against the dollar and the euro, and its candles as they close, from one second to one day, on one WebSocket you open from your server or straight from a browser, with silver, platinum and palladium on the same connection.
- Why a WebSocket for gold
- A gold price that matters to a dealer's shop, a hedge or a trading screen changes many times a minute in active hours. Polling a REST endpoint for it either misses moves or spends requests on prices that did not change. A stream sends each new bid and ask as it arrives, and nothing in between.
- What you subscribe to
- quote:XAUUSD for the live bid and ask of gold in dollars, quote:XAUEUR for gold in euros, and candle:XAUUSD:TIMEFRAME for bars as they close, on S1, M1, M5, M15, H1, H4, D1. Up to 64 channels in one subscribe frame, the other metals and the 46 currency pairs among them.
- Opening the stream
- Your server exchanges the API key for a token that lives 12 hours. With the token, POST /v1/ws-ticket gives a single-use ticket, offered as the second subprotocol next to adona.data.v1, never in the URL. Then one subscribe frame names the channels.
- The chart behind the live price
- On subscribe, each candle channel first sends its recent bars, so a chart has its past before the first live bar closes; a longer history is read by REST. Gold against the dollar has one-minute bars since 16.05.2025 and one-second bars since 06.09.2026.
- Gold in euros
- XAUEUR is a symbol of its own, so a European shop or report shows gold in euros without computing it from gold in dollars and the euro.
- When the connection drops
- A close with code 1008 and a reason, such as a revoked key or an ended trial, is an answer: do not reconnect in a loop on it. Any other close is temporary: reconnect after a pause, and the candle channels send their recent bars again, billed in slices like a REST page.
- Showing it to your customers
- Display gold in your product, relay it to your clients and keep it, on every paid plan. A metal your connections follow live for more than 80% of its open hours in a month adds CHF 150 to the next invoice, on top of the plan.
- What it costs, and the trial
- Sold by capacity, from CHF 500 a month: the monthly peak of simultaneous connections, and slices of 1 000 bars. The free trial carries EURUSD · XAUUSD, gold against the dollar among them, for 7 days, with 3 simultaneous connections.
Facts as of 06.10.2026.
First call
# 1. your server exchanges the key for a short-lived token
export ADONA_API_KEY="${ADONA_API_KEY:-adk_live_...}"
RESP=$(curl -s https://api.adona-robot.com/v1/tokens \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ADONA_API_KEY" \
-d '{"end_user_id":"u-42"}')
TOKEN=$(echo "$RESP" | grep -o '"access_token":"[^"]*' | cut -d'"' -f4)
[ -n "$TOKEN" ] || echo "refused: $RESP"
# 2. the token reads candles
curl -s 'https://api.adona-robot.com/v1/candles?symbol=XAUUSD&timeframe=S1&limit=1000' \
-H "Authorization: Bearer $TOKEN"The quickstart: from the key to the live stream, step by step