Skip to content
← Back to documentation

API v1

API v1 lets external systems fetch rates and create exchanges programmatically: your own widgets, bots, mobile apps, partner storefronts. The API follows the platform’s on-demand model: a rate is returned at the moment of the request, with no cached feeds.

General information

base_url     = https://your-domain.com/api/v1
protocol     = HTTPS only
format       = JSON
auth         = API key in header:  X-API-Key: <your_key>

  • API keys are created in the admin panel, a separate key per integration (see Security Basics).
  • Responses are JSON; errors return an HTTP code and a machine-readable error.code.

Fetching rates (on-demand)

Request the current rate for a direction. The rate is calculated at call time: market → platform spread → your markup (see Rate Formation).

GET /api/v1/rates?from=BTC&to=USDT.TRC20&amount=0.5
Example response:

{
“from”: “BTC”,
“to”: “USDT.TRC20”,
“amount_from”: 0.5,
“rate”: 98507.39,
“amount_to”: 49253.69,
“min_amount”: 0.002,
“max_amount”: 2.0,
“reserve”: 150000,
“rate_ttl_sec”: 30
}

  • rate_ttl_sec — the period during which the quote is valid for order creation; after it expires, request the rate again.
  • Without amount, the endpoint returns the direction’s rate and limits.

Creating an exchange

POST /api/v1/exchanges
Request body:

{
“from”: “BTC”,
“to”: “USDT.TRC20”,
“amount_from”: 0.5,
“payout_address”: “TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”,
“payout_extra”: “”,
“client_email”: “[email protected]”,
“ref_id”: “my-internal-id-123”
}
Response:

{
“exchange_id”: “EX-8F31KQ”,
“status”: “waiting_payment”,
“rate_fixed”: 98507.39,
“amount_from”: 0.5,
“amount_to”: 49253.69,
“deposit_address”: “bc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“deposit_extra”: “”,
“payment_deadline”: “2026-07-31T12:30:00Z”
}
The rate is fixed (rate_fixed) until payment_deadline: if the client pays on time, the order executes at the fixed rate. Late payment — recalculation at the current rate or refund per regulations.

Exchange status

GET /api/v1/exchanges/EX-8F31KQ
{
“exchange_id”: “EX-8F31KQ”,
“status”: “paid”,
“amount_from”: 0.5,
“amount_to”: 49253.69,
“deposit_tx”: “a1b2c3…”,
“payout_tx”: “d4e5f6…”,
“updated_at”: “2026-07-31T12:11:42Z”
}
Typical statuses: waiting_payment → confirming → paid → payout_sent → completed; terminal: expired, refunded, failed.

Errors and limits

{ “error”: { “code”: “amount_below_min”, “message”: “Amount is below direction minimum” } }
Common codes: invalid_direction, amount_below_min, amount_above_max, invalid_payout_address, rate_expired, insufficient_reserve.

Rate limits apply per API key; on exceeding — HTTP 429 with a Retry-After header. For high-frequency scenarios (your own monitoring bots), use a sensible polling interval or the monitoring export.

See also