1 · Environment

Key Value
Base URL (DEV) https://api.dev0.lightrium.io
Auth None required
API docs (openapi) https://api.dev0.lightrium.io/rabbit-swap-api-docs
Rate limit 20 req/sec per IP

Moving to production? Contact [email protected] or the live chat and we’ll send you the prod base URL plus your x-api-key token.


2 · Lifecycle at a glance

0. GET /asset               → fetch asset list (prettyTicker, protocol, etc.)
1. GET /estimateSwap        → get quote & estimationId
2. POST /swap               → obtain payToAddress
3. Send coins               → on-chain transfer
4. GET /swap                → poll until status is 'completed'

3 · Endpoints you’ll call

Purpose Method & Path Notes
Asset picker GET /asset Build UI dropdowns; response gives prettyTicker and protocol. (Want a ready to use React JS swap form? contact us at [email protected])
Quote GET /estimateSwap Ticker rule: use prettyTicker+protocol if protocol differs (e.g. USDTERC20, USDCSOL), otherwise just prettyTicker (e.g. BTC, ETH TRX).
Create swap POST /swap Same ticker rule, plus the estimationId from quoting step.
Track swap GET /swap?swapIds= Accepts one or many swapIds.

All parameters/fields: see api docs.


4 · Swap status values

Code Meaning
waiting_for_payment Swap created; coins not detected yet.
confirming Payment tx seen; awaiting confirmations.
payment_received Confirmations reached.
verifying Compliance/risk review — contact support in chat (< 0.3 % of swaps).
exchanging Our side is converting assets.
completed Exchange done; payout tx sent.
refunded Funds returned.
expired Payment never arrived before expiresAt.
failed Terminal error - contact the support.

5 · Minimal examples

bash
# 0. Fetch assets
curl "$BASE/asset?count=100" | jq .

# 1. Quote 0.5 BTC → ETH
curl "$BASE/estimateSwap?tickerFrom=BTC&tickerTo=ETH&amountCoins=0.5&ipAddress=1.1.1.1"

# 2. Create swap (estimationId=EST123)
curl -X POST "$BASE/swap" -H 'Content-Type: application/json' -d '{
  "estimationId":"EST123",
  "tickerFrom":"BTC",
  "tickerTo":"ETH",
  "amountCoins":"0.5",
  "ipAddress":"203.0.113.5",
  "recipientAddress":"0x92C…"
}'

# 3. Poll status
curl "$BASE/swap?swapIds=SWAP456"


6 · Going live

Step Detail
Get credentials Email [email protected] or use live chat.
Base URL Replace with the production URL we provide.
Auth header x-api-key: <YOUR_TOKEN>
Everything else Same endpoints & payloads.