Documentation
Partner Exchange API
REST JSON API for embedding crypto exchange into your site, bot, or service: asset catalog → quote → create exchange → track status.
Base URL
https://pay.snapex.pro/api/v1/partner
1. Overview
The Partner Exchange API lets you run crypto exchanges from your application with plain HTTP requests. You send JSON — the API returns the rate, a deposit address, and the exchange status. This section explains the overall flow; each step is covered in detail below.
How an exchange works
Every exchange follows the same four-step flow:
- Catalog (GET /assets). Find out which assets are available and within what limits. The catalog provides the short asset codes — usdt_tron, btc, eth, usdt_eth, etc.
- Quote (POST /quotes). You ask: "how much BTC will the client get for 20 USDT?" The API answers with the rate and exact amounts. A quote is non-binding and stays valid for 2 minutes.
- Create exchange (POST /exchanges). You confirm the quote — the API opens an order and returns a deposit address the client must send funds to.
- Status (GET /exchanges/{quote_id}). You poll the API to learn whether the deposit arrived and the payout was sent.
What you need to get started
- A partner cabinet account.
- An approved API access request (submitted in the cabinet, reviewed by an administrator).
- An API key starting with spx_… — issued in the cabinet after approval. The key is shown only once when issued or reissued: store it somewhere safe right away.
Methods
| Method | Path | Success HTTP code | Purpose |
|---|---|---|---|
| GET | /assets | 200 | Asset catalog and limits |
| POST | /quotes | 201 | Quote (rate and amounts) |
| POST | /exchanges | 201 | Create exchange, obtain a deposit address |
| GET | /exchanges/{quote_id} | 200 | Current quote or exchange status |
Data format
- All requests and responses are JSON, UTF-8.
- All monetary amounts are strings: "20", "0.000312". The decimal separator is a dot. Strings are intentional: floating-point numbers lose precision on crypto amounts.
- Dates use ISO-8601 with a timezone, e.g. 2026-07-27T13:02:00+00:00.
Headers for every request
X-API-Key: spx_your_key
Content-Type: application/json (POST requests only)
Accept: application/json
Key rules
- A quote is valid for 2 minutes (the expires_at field) — the exchange must be created before it expires.
- At most 1 request per IP address every 7 seconds across all methods; exceeding this returns HTTP 429 (see "Errors and limits").
- Retrying exchange creation with the same parameters is safe: no duplicate is created — the same exchange is returned.
2. Authentication
Every API request must include the X-API-Key header with your key. No tokens, signatures, or sessions — just this one header.
GET https://pay.snapex.pro/api/v1/partner/assets
X-API-Key: spx_your_key
Accept: application/json
Where to get the key
Partner cabinet → "API" tab → "Issue key". The key starts with spx_ and is shown once. Reissuing immediately invalidates the old key.
Authentication errors
| HTTP | error | Cause | What to do |
|---|---|---|---|
| 401 | unauthorized | X-API-Key header missing or key invalid | Check that the header is sent and the key was copied in full |
| 403 | api_access_pending | Access request still under review | Wait for admin approval |
| 403 | api_not_approved | API access not approved | Contact support |
3. Asset catalog — GET /assets
The directory of available assets and send-amount limits. Integration starts here: it provides the asset codes for quotes and the allowed amount ranges. Success response — HTTP 200.
The API accepts only the short codes from the code field of this catalog (usdt_tron, btc, eth, usdt_eth, etc.). Raw internal blockchain identifiers are not accepted. The catalog changes rarely — you can cache it on your side for 5–10 minutes.
Codes name the coin and its network. A coin on its own network is its ticker: btc, eth (Ethereum), sol (Solana), trx (TRON), xrp, doge, ltc. A token is ticker_network: usdt_tron, usdt_eth, usdt_bsc, usdt_sol, eth_arb. Older codes keep working: usdt is usdt_tron and is listed in its aliases. min_amount / min_usd is the minimum to send this coin right now: on some networks it is temporarily higher (e.g. $100 for USDT and TRX on TRON), and the catalog shows it. A quote below the minimum is refused with HTTP 422 that also carries min_amount and min_usd.
Request example
GET https://pay.snapex.pro/api/v1/partner/assets
X-API-Key: spx_your_key
Accept: application/json
Response example
{
"assets": [
{
"code": "usdt_tron",
"aliases": ["usdt"],
"network": "TRON",
"symbol": "USDT",
"name": "USDT TRON",
"min_amount": "10",
"max_amount": "5000",
"min_usd": "10",
"max_usd": "5000"
},
{
"code": "btc",
"aliases": [],
"network": "Bitcoin",
"symbol": "BTC",
"name": "BTC",
"min_amount": "0.000085",
"max_amount": "0.0425",
"min_usd": "10",
"max_usd": "5000"
}
]
}
Response fields
| Field | Description |
|---|---|
| assets[].code | Short asset code. This is exactly what you pass as from_asset_id and to_asset_id |
| assets[].aliases | Other codes accepted for the same asset (e.g. usdt for usdt_tron). Responses always use code |
| assets[].network | Blockchain network (TRON, Bitcoin, Ethereum, etc.) |
| assets[].symbol | Asset ticker (USDT, BTC…) |
| assets[].name | Human-readable name |
| assets[].min_amount / max_amount | Minimum and maximum send amount in asset units (converted from the USD limits at the current rate) |
| assets[].min_usd / max_usd | The same limits in US dollars |
USD limits by route type
Limits depend on whether Monero (XMR) is part of the exchange. The check applies to the USD value of the amount the client sends.
| Route | Min USD | Max USD |
|---|---|---|
| Regular exchange (TOKEN ↔ TOKEN) | $10 | $7000 |
| Sending XMR (XMR → TOKEN) | $10 | $1000 |
| Receiving XMR (TOKEN → XMR) | $10 | $1000 |
Current catalog
The table below shows the same data GET /assets returns, for quick reference.
| API code | Network | Asset | Min send | Max send | Min USD | Max USD |
|---|---|---|---|---|---|---|
usdt_tron |
TRON | USDT | 101.119119 | 7008.255725 | $101 | $7000 |
btc |
Bitcoin | BTC | 0.00016872 | 0.11809762 | $10 | $7000 |
trx |
TRON | TRX | 328.629485 | 22776.300934 | $101 | $7000 |
gram |
TON | GRAM | 10.77061604 | 7539.43122531 | $10 | $7000 |
doge |
Dogecoin | DOGE | 182.62505251 | 127837.53675329 | $10 | $7000 |
sol |
Solana | SOL | 0.14455045 | 101.18531367 | $10 | $7000 |
eth |
Ethereum | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
zec |
Zcash | ZEC | 0.0137022 | 9.59153752 | $10 | $7000 |
ltc |
Litecoin | LTC | 0.24642682 | 172.49876787 | $10 | $7000 |
usdt_eth |
Ethereum | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
dash |
Dash | DASH | 0.29256876 | 204.79812756 | $10 | $7000 |
zec_sol |
Solana | ZEC | 0.0137022 | 9.59153752 | $10 | $7000 |
usdc_eth |
Ethereum | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
aurora_eth |
Ethereum | AURORA | 365.49346918 | 255845.42842596 | $10 | $7000 |
sui |
Sui | SUI | 15.57060022 | 10899.42015085 | $10 | $7000 |
cbbtc_eth |
Ethereum | CBBTC | 0.00016885 | 0.11818934 | $10 | $7000 |
arb |
Arbitrum | ARB | 91.14440921 | 63801.08644136 | $10 | $7000 |
xrp |
XRP | XRP | 10.911873 | 7638.310711 | $10 | $7000 |
knc_eth |
Ethereum | KNC | 109.20487928 | 76443.4154918 | $10 | $7000 |
turbo_eth |
Ethereum | TURBO | 18276.18977996 | 12793332.84596827 | $10 | $7000 |
wif_sol |
Solana | $WIF | 83.272961 | 58291.072306 | $10 | $7000 |
bome_sol |
Solana | BOME | 22535.211268 | 15774647.887324 | $10 | $7000 |
trump_sol |
Solana | TRUMP | 12.063745 | 8444.621379 | $10 | $7000 |
dai_eth |
Ethereum | DAI | 10 | 7000 | $10 | $7000 |
gno_gnosis |
Gnosis | GNO | 0.11642799 | 81.4995925 | $10 | $7000 |
cow_gnosis |
Gnosis | COW | 105.77421437 | 74041.95005342 | $10 | $7000 |
safe_eth |
Ethereum | SAFE | 141.44671703 | 99012.70191519 | $10 | $7000 |
aave_eth |
Ethereum | AAVE | 0.10735374 | 75.14761138 | $10 | $7000 |
uni_eth |
Ethereum | UNI | 2.15053764 | 1505.37634409 | $10 | $7000 |
link_eth |
Ethereum | LINK | 1.14285715 | 800 | $10 | $7000 |
strk |
Starknet | STRK | 339.74984899 | 237824.89428683 | $10 | $7000 |
bera |
Berachain | BERA | 126.0843252 | 88259.02763768 | $10 | $7000 |
mon |
Monad | MON | 1081.86704287 | 757306.93000753 | $10 | $7000 |
okb |
X Layer | OKB | 0.12365525 | 86.55867442 | $10 | $7000 |
kaito_base |
Base | KAITO | 65.2047756 | 45643.34291844 | $10 | $7000 |
op |
Optimism | OP | 147.3296501 | 103130.75506446 | $10 | $7000 |
wbtc_eth |
Ethereum | WBTC | 0.00016843 | 0.11789474 | $10 | $7000 |
ada |
Cardano | ADA | 69.984884 | 48989.418286 | $10 | $7000 |
apt |
Aptos | APT | 27.5652953 | 19295.70670526 | $10 | $7000 |
spx_eth |
Ethereum | SPX | 37.25796296 | 26080.57407069 | $10 | $7000 |
bch |
Bitcoin Cash | BCH | 0.0508647 | 35.60528993 | $10 | $7000 |
adi_eth |
Ethereum | ADI | 1.38888889 | 972.22222222 | $10 | $7000 |
shib_eth |
Ethereum | SHIB | 2840909.0909091 | 1988636363.63636364 | $10 | $7000 |
pepe_eth |
Ethereum | PEPE | 2898550.72463769 | 2028985507.24637681 | $10 | $7000 |
inx_eth |
Ethereum | INX | 2596.48539737 | 1817539.77815629 | $10 | $7000 |
pengu_sol |
Solana | PENGU | 2393.191848 | 1675234.293482 | $10 | $7000 |
titn_base |
Base | TITN | 677.57287974 | 474301.01581726 | $10 | $7000 |
aleo |
Aleo | ALEO | 353.798827 | 247659.178515 | $10 | $7000 |
usdt_sol |
Solana | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
xbtc_sol |
Solana | XBTC | 0.00016872 | 0.11809762 | $10 | $7000 |
eth_arb |
Arbitrum | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
usdc_arb |
Arbitrum | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdt0_arb |
Arbitrum | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
eth_base |
Base | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
usdc_base |
Base | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdc_sol |
Solana | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
xdai |
Gnosis | XDAI | 10 | 7000 | $10 | $7000 |
usdc_gnosis |
Gnosis | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
weth_gnosis |
Gnosis | WETH | 0.0060269 | 4.21882439 | $10 | $7000 |
usdt_gnosis |
Gnosis | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
hapi_eth |
Ethereum | HAPI | 72.43122656 | 50701.85858527 | $10 | $7000 |
cbbtc_base |
Base | CBBTC | 0.00016885 | 0.11818934 | $10 | $7000 |
usdt_aptos |
Aptos | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
usdc_aptos |
Aptos | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
eth_op |
Optimism | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
usdt_op |
Optimism | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
usdc_op |
Optimism | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdt_ton |
TON | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
usdc_sui |
Sui | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
public_sol |
Solana | PUBLIC | 3307.65490575 | 2315358.43402386 | $10 | $7000 |
spx_sol |
Solana | SPX | 37.25796296 | 26080.57407069 | $10 | $7000 |
usdt0_monad |
Monad | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
usdc_monad |
Monad | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdt0_bera |
Berachain | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
usdt0_xlayer |
X Layer | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
usdc_xlayer |
X Layer | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
adi |
ADI | ADI | 1.38888889 | 972.22222222 | $10 | $7000 |
usad_aleo |
Aleo | USAD | 10.004593 | 7003.214475 | $10 | $7000 |
usdcx_aleo |
Aleo | USDCX | 10.004593 | 7003.214475 | $10 | $7000 |
eth_scroll |
Scroll | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
usdt_scroll |
Scroll | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
eure_gnosis |
Gnosis | EURE | 9.10746813 | 6375.2276867 | $10 | $7000 |
usd1_eth |
Ethereum | USD1 | 10.00121015 | 7000.8471025 | $10 | $7000 |
cfi_base |
Base | CFI | 24073.76200679 | 16851633.40475216 | $10 | $7000 |
xaut_eth |
Ethereum | XAUT | 0.002831 | 1.981549 | $10 | $7000 |
usd1_sol |
Solana | USD1 | 10.001211 | 7000.847102 | $10 | $7000 |
kvgtsolb_sol |
Solana | KV-GTSOLB | 0.13661155 | 95.6280841 | $10 | $7000 |
zec_starknet |
Starknet | ZEC | 0.0137022 | 9.59153752 | $10 | $7000 |
xrp_starknet |
Starknet | XRP | 10.911873 | 7638.310711 | $10 | $7000 |
vvv_base |
Base | VVV | 0.40783035 | 285.4812398 | $10 | $7000 |
xpl |
Plasma | XPL | 227.94308717 | 159560.161019 | $10 | $7000 |
usdt0_plasma |
Plasma | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
coca_pol |
Polygon | COCA | 12.19260909 | 8534.82635896 | $10 | $7000 |
coca_base |
Base | COCA | 12.19260909 | 8534.82635896 | $10 | $7000 |
fogo |
FOGO | FOGO | 7046.07427972 | 4932251.99580054 | $10 | $7000 |
tlo_eth |
Ethereum | TLO | 9.70335213 | 6792.34648877 | $10 | $7000 |
zec_aptos |
Aptos | ZEC | 0.0137022 | 9.59153752 | $10 | $7000 |
xrp_aptos |
Aptos | XRP | 10.911873 | 7638.310711 | $10 | $7000 |
btc_aptos |
Aptos | BTC | 0.00016872 | 0.11809762 | $10 | $7000 |
eth_aptos |
Aptos | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
link_aptos |
Aptos | LINK | 1.14285715 | 800 | $10 | $7000 |
uni_aptos |
Aptos | UNI | 2.15053764 | 1505.37634409 | $10 | $7000 |
aave_aptos |
Aptos | AAVE | 0.10735374 | 75.14761138 | $10 | $7000 |
doge_aptos |
Aptos | DOGE | 182.62505251 | 127837.53675329 | $10 | $7000 |
sol_aptos |
Aptos | SOL | 0.14455045 | 101.18531367 | $10 | $7000 |
aster_bsc |
BNB Chain | ASTER | 20.88641965 | 14620.49375496 | $10 | $7000 |
aurora_bsc |
BNB Chain | AURORA | 365.49346918 | 255845.42842596 | $10 | $7000 |
avax |
Avalanche | AVAX | 1.53374234 | 1073.6196319 | $10 | $7000 |
bnb |
BNB Chain | BNB | 0.01840672 | 12.88470034 | $10 | $7000 |
cashcat_hood |
HOOD | CASHCAT | 251.8228829 | 176276.01802548 | $10 | $7000 |
eth_hood |
HOOD | ETH | 0.0060269 | 4.21882439 | $10 | $7000 |
pol |
Polygon | POL | 133.1646581 | 93215.26066982 | $10 | $7000 |
pons_hood |
HOOD | PONS | 117.75650311 | 82429.55217202 | $10 | $7000 |
prl |
PRL | PRL | 4.62086388 | 3234.60471058 | $10 | $7000 |
qtc |
QTC | QTC | 0.30891617 | 216.24131577 | $10 | $7000 |
qtc_sol |
Solana | QTC | 0.30891617 | 216.24131577 | $10 | $7000 |
rhea_bsc |
BNB Chain | RHEA | 398.4292326 | 278900.4628154 | $10 | $7000 |
rhea_sol |
Solana | RHEA | 398.4292326 | 278900.4628154 | $10 | $7000 |
sol_starknet |
Starknet | SOL | 0.14455045 | 101.18531367 | $10 | $7000 |
strk_sol |
Solana | STRK | 339.74984899 | 237824.89428683 | $10 | $7000 |
sweat_bsc |
BNB Chain | SWEAT | 200762.89901627 | 140534029.31138326 | $10 | $7000 |
tauwethbase_base |
Base | TAUWETHBASE | 0.00600896 | 4.206271 | $10 | $7000 |
usdc_avax |
Avalanche | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdc_bsc |
BNB Chain | USDC | 10.00459211 | 7003.21447544 | $10 | $7000 |
usdc_pol |
Polygon | USDC | 10.004593 | 7003.214475 | $10 | $7000 |
usdg_hood |
HOOD | USDG | 10.000021 | 7000.014 | $10 | $7000 |
usdt_avax |
Avalanche | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
usdt_bsc |
BNB Chain | USDT | 10.0117939 | 7008.25572524 | $10 | $7000 |
usdt_pol |
Polygon | USDT | 10.011794 | 7008.255725 | $10 | $7000 |
usdt0_op |
Optimism | USDT0 | 10.013408 | 7009.385567 | $10 | $7000 |
weth_pol |
Polygon | WETH | 0.0060269 | 4.21882439 | $10 | $7000 |
wsteth_eth |
Ethereum | WSTETH | 0.00482449 | 3.37713966 | $10 | $7000 |
4. Quote — POST /quotes
Calculates the rate and exact exchange amounts. Creates nothing and commits you to nothing: no deposit address is allocated, no funds are reserved. Success response — HTTP 201. A quote is valid for 2 minutes.
Two modes: side=send and side=receive
The side parameter defines which of the two amounts is fixed:
side=send — "the client sends exactly X, how much will they get?" The amount is given in the send (from) asset.
side=receive — "the client wants to receive exactly Y, how much must they send?" The amount is given in the receive (to) asset.
| Mode | amount — in which asset | amount_usd |
|---|---|---|
| side=send | In the from_asset_id asset (what the client sends) | Allowed: the send amount in USD instead of amount |
| side=receive | In the to_asset_id asset (what the client receives) | Not allowed — amount only |
Pass either amount or amount_usd — one of the two. Sending both returns a 422 error.
Request example
POST https://pay.snapex.pro/api/v1/partner/quotes
Content-Type: application/json
X-API-Key: spx_your_key
{
"from_asset_id": "usdt",
"to_asset_id": "btc",
"side": "send",
"amount": "20",
"recipient_address": "bc1qexampleaddress"
}
Request parameters
| Field | Required | Description |
|---|---|---|
| from_asset_id | Yes | Code of the asset the client sends (from the GET /assets catalog) |
| to_asset_id | Yes | Code of the asset the client receives. Must differ from from_asset_id |
| side | Yes | send or receive — see the table above |
| amount | Yes, unless amount_usd is used | Amount as a string, e.g. "20" or "0.0005". For send — in the from asset, for receive — in the to asset |
| amount_usd | No | side=send only: the send amount in US dollars, e.g. "100". Mutually exclusive with amount |
| recipient_address | Yes | The client wallet address on the receive (to) asset network. Needed already at the quote stage — it validates the route. Alias: recipient |
Response example
{
"quote_id": "pq_abc123",
"status": "quoted",
"side": "send",
"from_symbol": "USDT",
"to_symbol": "BTC",
"from_network": "TRON",
"to_network": "Bitcoin",
"request_amount": "20",
"send_amount": "20",
"receive_amount": "0.000312",
"amount_in_usd": "20",
"amount_out_usd": "19.85",
"expires_at": "2026-07-27T13:02:00+00:00"
}
Response fields
| Field | Description |
|---|---|
| quote_id | Quote identifier (pq_…). Needed to create the exchange and check its status |
| status | quoted — the quote is active, no exchange created yet |
| side | The amount-fixing mode from your request |
| from_symbol / to_symbol | Send and receive asset tickers |
| from_network / to_network | Asset networks |
| request_amount | The amount from your request |
| send_amount | How much the client must send |
| receive_amount | How much the client will receive |
| amount_in_usd / amount_out_usd | USD estimates of the send and receive amounts |
| request_amount_usd | Present only if the request used amount_usd |
| expires_at | Quote expiry moment (ISO-8601). After it, this quote_id can no longer be used to create an exchange |
5. Create exchange — POST /exchanges
Turns a quote into a real exchange: an order is opened and a deposit address is returned for the client transfer. Call it before the quote expires (2 minutes). Success response — HTTP 201.
Request example
POST https://pay.snapex.pro/api/v1/partner/exchanges
Content-Type: application/json
X-API-Key: spx_your_key
{
"quote_id": "pq_abc123",
"recipient_address": "bc1qexampleaddress"
}
Request parameters
| Field | Required | Description |
|---|---|---|
| quote_id | Yes | Identifier from the POST /quotes response |
| recipient_address | Yes | Client payout address. Usually the same one used in the quote. Alias: recipient |
What happens on this call
- The API finds your quote and checks it has not expired.
- The rate is re-checked against the market. If it moved against the quote by more than 2%, no exchange is created and 422 is returned (simply request a new quote).
- An order is opened and a deposit address is allocated.
- The response includes the deposit block — the address and amount the client must transfer.
Response example
{
"quote_id": "pq_abc123",
"status": "awaiting_deposit",
"side": "send",
"from_symbol": "USDT",
"to_symbol": "BTC",
"from_network": "TRON",
"to_network": "Bitcoin",
"request_amount": "20",
"send_amount": "20",
"receive_amount": "0.000312",
"amount_in_usd": "20",
"amount_out_usd": "19.85",
"expires_at": "2026-07-27T13:02:00+00:00",
"deposit": {
"asset": "USDT",
"amount": "20",
"address": "TXyz…",
"amount_usd": "20"
},
"exchange": {
"public_id": "ex_…",
"status": "awaiting_deposit",
"recipient_address": "bc1qexampleaddress"
}
}
New fields compared to the quote
| Field | Description |
|---|---|
| status | Usually awaiting_deposit — waiting for the client transfer. quoting means the deposit address is still being prepared: poll the status again shortly |
| deposit.asset | The asset the client must transfer |
| deposit.amount | The exact transfer amount |
| deposit.address | The deposit address — show it to the client |
| deposit.amount_usd | USD equivalent (when available) |
| exchange.public_id | Public exchange identifier |
| exchange.status | Order status (matches the top-level status) |
| exchange.recipient_address | Client payout address |
Retries (idempotency)
If the connection dropped and you never got a response — just repeat the request with the same quote_id and recipient_address. No duplicate is created: the API returns the already existing exchange. The recipient_address cannot be changed after creation — attempting to do so returns 422.
Possible errors
- 409 quote_expired — the quote expired (more than 2 minutes passed). Request a new one via POST /quotes.
- 422 validation_error — invalid parameters; an attempt to change recipient_address on retry; or the rate moved by more than 2% — request a new quote.
- 404 not_found — the quote_id does not exist or belongs to another partner.
- 503 upstream_unavailable — temporary liquidity provider failure. Retry later with the same quote (if still valid) or a new one.
6. Status — GET /exchanges/{quote_id}
Returns the current state of a quote or exchange. The response format is identical to the create response. Success response — HTTP 200. Poll at most once every 7 seconds.
Request example
GET https://pay.snapex.pro/api/v1/partner/exchanges/pq_abc123
X-API-Key: spx_your_key
Accept: application/json
status values
| Value | Meaning | What to do |
|---|---|---|
| quoted | Only a quote exists, no exchange created | Create the exchange before expires_at or request a new quote |
| quoting | The exchange is being created, deposit address being prepared | Poll the status again in a few seconds |
| awaiting_deposit | Waiting for the client transfer to the deposit address | Show the client the address and amount from the deposit block |
| processing | Deposit received, exchange in progress | Keep polling |
| completed | Exchange finished, funds sent to the client | Terminal status — stop polling |
| error | Exchange failed | Terminal status. Contact support with the exchange.public_id |
| cancelled | Exchange cancelled | Terminal status |
| expired | The quote expired, no exchange was created | Terminal status. Request a new quote |
Terminal statuses: completed, error, cancelled, expired. The state no longer changes after them — further polling is unnecessary.
When status=completed, the exchange block may include partner_api_earning_usd — your earnings on the deal in USD.
completed means the payout has been sent. The exchange.payout block follows it on the recipient's network: state (sent → confirmed; resending or failed if a send did not go through and is being redone or checked by support), sent_at, confirmed_at and tx_url (the transaction on the recipient's network). Keep polling only if you need the confirmation.
Response example
{
"quote_id": "pq_abc123",
"status": "completed",
"side": "send",
"from_symbol": "USDT",
"to_symbol": "BTC",
"from_network": "TRON",
"to_network": "Bitcoin",
"request_amount": "20",
"send_amount": "20",
"receive_amount": "0.000312",
"amount_in_usd": "20",
"amount_out_usd": "19.85",
"expires_at": "2026-07-27T13:02:00+00:00",
"deposit": {
"asset": "USDT",
"amount": "20",
"address": "TXyz…",
"amount_usd": "20"
},
"exchange": {
"public_id": "ex_…",
"status": "completed",
"recipient_address": "bc1qexampleaddress",
"partner_api_earning_usd": "0.20",
"payout": {
"state": "sent",
"sent_at": "2026-07-27T13:14:05+00:00",
"tx_url": "https://mempool.space/tx/…"
}
}
}
7. Errors and limits
All errors share a single JSON format. The HTTP status code mirrors the meaning of the error field — rely on either one.
{
"ok": false,
"error": "validation_error",
"message": "Human-readable explanation in English"
}
Error reference
| HTTP | error | Cause | What to do |
|---|---|---|---|
| 401 | unauthorized | Missing or invalid X-API-Key | Check the header and the key |
| 403 | api_access_pending | Access request under review | Wait for approval |
| 403 | api_not_approved | API access not approved | Contact support |
| 404 | not_found | Unknown or foreign quote_id | Check the identifier |
| 409 | quote_expired | The quote is older than 2 minutes | Request a new quote |
| 422 | validation_error | Invalid parameters, limit violation, or rate move > 2% | Read the message, fix the request, or get a fresh quote |
| 429 | rate_limited | Request rate exceeded | Wait and retry |
| 503 | upstream_unavailable | Temporary liquidity provider failure | Retry later |
Rate limits
| Scope | Limit |
|---|---|
| All methods, per IP address | 1 request every 7 seconds |
| POST /quotes, per partner | 15 requests per minute |
| POST /exchanges, per partner | 10 requests per minute |
| GET /assets and GET /exchanges/{quote_id}, per partner | 120 requests per minute |
8. Example: an exchange from start to finish
Full scenario: the client sends 20 USDT (TRON network) and receives BTC at their Bitcoin address. Replace YOUR_KEY with your API key.
Step 1. Request a quote
curl -sS -X POST 'https://pay.snapex.pro/api/v1/partner/quotes' \
-H 'X-API-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"from_asset_id": "usdt",
"to_asset_id": "btc",
"side": "send",
"amount": "20",
"recipient_address": "bc1qexample"
}'
The response contains a quote_id (pq_…) and the amounts. Show the client receive_amount — that is how much BTC they will get. You have 2 minutes for the next step.
Step 2. Create the exchange
curl -sS -X POST 'https://pay.snapex.pro/api/v1/partner/exchanges' \
-H 'X-API-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"quote_id": "pq_FROM_STEP_1",
"recipient_address": "bc1qexample"
}'
The response now includes the deposit block with an address and amount. Show the client deposit.address and deposit.amount — they must transfer exactly that amount to that address.
Step 3. Track the status
curl -sS 'https://pay.snapex.pro/api/v1/partner/exchanges/pq_FROM_STEP_1' \
-H 'X-API-Key: YOUR_KEY' \
-H 'Accept: application/json'
Repeat the request with a 7–10 second pause. Once the client transfers the funds, the status changes to processing, then to completed — the payout has been sent. Terminal statuses: completed, error, cancelled, expired.
The same scenario in Python
import time
import requests
API = "https://pay.snapex.pro/api/v1/partner"
HEADERS = {
"X-API-Key": "YOUR_KEY",
"Content-Type": "application/json",
"Accept": "application/json",
}
# Step 1. Quote: the client sends 20 USDT, receives BTC
quote = requests.post(f"{API}/quotes", headers=HEADERS, json={
"from_asset_id": "usdt",
"to_asset_id": "btc",
"side": "send",
"amount": "20",
"recipient_address": "bc1qexample",
}).json()
print("Client receives:", quote["receive_amount"], quote["to_symbol"])
# Step 2. Create the exchange (within 2 minutes of the quote)
exchange = requests.post(f"{API}/exchanges", headers=HEADERS, json={
"quote_id": quote["quote_id"],
"recipient_address": "bc1qexample",
}).json()
deposit = exchange["deposit"]
print("Client must transfer:", deposit["amount"], deposit["asset"])
print("To address:", deposit["address"])
# Step 3. Poll the status until terminal
while True:
time.sleep(10) # at most 1 request every 7 seconds
state = requests.get(
f"{API}/exchanges/{quote['quote_id']}", headers=HEADERS
).json()
print("Status:", state["status"])
if state["status"] in ("completed", "error", "cancelled", "expired"):
break
Common beginner mistakes
- Sending the amount as a number instead of a string. Correct: "amount": "20", not "amount": 20.
- With side=receive, giving the amount in the send asset. For receive, amount is in the receive (to) asset.
- Creating the exchange more than 2 minutes after the quote — you get 409 quote_expired. Request the quote right before creating.
- Sending requests more often than once every 7 seconds — you get 429. Add a pause between requests.