EN

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:

  1. 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.
  2. 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.
  3. Create exchange (POST /exchanges). You confirm the quote — the API opens an order and returns a deposit address the client must send funds to.
  4. 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

  1. A partner cabinet account.
  2. An approved API access request (submitted in the cabinet, reviewed by an administrator).
  3. 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.120131 7008.325891 $101 $7000
btc Bitcoin BTC 0.00016838 0.11785901 $10 $7000
trx TRON TRX 328.325023 22755.199563 $101 $7000
gram TON GRAM 10.76261756 7533.83228828 $10 $7000
doge Dogecoin DOGE 182.11950683 127483.65477426 $10 $7000
sol Solana SOL 0.14411299 100.87908921 $10 $7000
eth Ethereum ETH 0.00600338 4.20236173 $10 $7000
zec Zcash ZEC 0.01363996 9.54797174 $10 $7000
ltc Litecoin LTC 0.24618415 172.32890202 $10 $7000
usdt_eth Ethereum USDT 10.011895 7008.325891 $10 $7000
dash Dash DASH 0.29205608 204.43925234 $10 $7000
zec_sol Solana ZEC 0.01363996 9.54797174 $10 $7000
usdc_eth Ethereum USDC 10.004863 7003.403654 $10 $7000
aurora_eth Ethereum AURORA 364.77020207 255339.14144767 $10 $7000
sui Sui SUI 15.5368285 10875.77994879 $10 $7000
cbbtc_eth Ethereum CBBTC 0.00016849 0.11793844 $10 $7000
arb Arbitrum ARB 90.88265232 63617.85662353 $10 $7000
xrp XRP XRP 10.87291 7611.036873 $10 $7000
knc_eth Ethereum KNC 109.05006489 76335.04541935 $10 $7000
turbo_eth Ethereum TURBO 18268.17683596 12787723.78516624 $10 $7000
wif_sol Solana $WIF 82.962079 58073.454624 $10 $7000
bome_sol Solana BOME 22521.000834 15764700.583294 $10 $7000
trump_sol Solana TRUMP 12.039142 8427.39916 $10 $7000
dai_eth Ethereum DAI 10 7000 $10 $7000
gno_gnosis Gnosis GNO 0.11609009 81.26306013 $10 $7000
cow_gnosis Gnosis COW 105.81898605 74073.29022973 $10 $7000
safe_eth Ethereum SAFE 141.32877313 98930.14118744 $10 $7000
aave_eth Ethereum AAVE 0.10699765 74.89835224 $10 $7000
uni_eth Ethereum UNI 2.14132763 1498.92933619 $10 $7000
link_eth Ethereum LINK 1.14025086 798.17559863 $10 $7000
strk Starknet STRK 338.16595021 236716.16514402 $10 $7000
bera Berachain BERA 125.93982596 88157.87816581 $10 $7000
mon Monad MON 1069.37918261 748565.42782653 $10 $7000
okb X Layer OKB 0.12367055 86.56937917 $10 $7000
kaito_base Base KAITO 65.15676719 45609.73702729 $10 $7000
op Optimism OP 147.01342233 102909.39562782 $10 $7000
wbtc_eth Ethereum WBTC 0.00016808 0.11765101 $10 $7000
ada Cardano ADA 69.748626 48824.038166 $10 $7000
apt Aptos APT 27.55587643 19289.1134999 $10 $7000
spx_eth Ethereum SPX 37.24020304 26068.14212351 $10 $7000
bch Bitcoin Cash BCH 0.0507537 35.52758463 $10 $7000
adi_eth Ethereum ADI 1.38888889 972.22222222 $10 $7000
shib_eth Ethereum SHIB 2832861.1898017 1983002832.8611898 $10 $7000
pepe_eth Ethereum PEPE 2890173.41040463 2023121387.28323699 $10 $7000
inx_eth Ethereum INX 2597.1192753 1817983.49270989 $10 $7000
pengu_sol Solana PENGU 2385.109286 1669576.499995 $10 $7000
titn_base Base TITN 677.38607552 474170.25286145 $10 $7000
aleo Aleo ALEO 354.290691 248003.483386 $10 $7000
usdt_sol Solana USDT 10.011895 7008.325891 $10 $7000
xbtc_sol Solana XBTC 0.00016838 0.11785901 $10 $7000
eth_arb Arbitrum ETH 0.00600338 4.20236173 $10 $7000
usdc_arb Arbitrum USDC 10.004863 7003.403654 $10 $7000
usdt0_arb Arbitrum USDT0 10.013639 7009.547003 $10 $7000
eth_base Base ETH 0.00600338 4.20236173 $10 $7000
usdc_base Base USDC 10.004863 7003.403654 $10 $7000
usdc_sol Solana USDC 10.004863 7003.403654 $10 $7000
xdai Gnosis XDAI 10 7000 $10 $7000
usdc_gnosis Gnosis USDC 10.004863 7003.403654 $10 $7000
weth_gnosis Gnosis WETH 0.00600338 4.20236173 $10 $7000
usdt_gnosis Gnosis USDT 10.011895 7008.325891 $10 $7000
hapi_eth Ethereum HAPI 72.1542369 50507.96582775 $10 $7000
cbbtc_base Base CBBTC 0.00016849 0.11793844 $10 $7000
usdt_aptos Aptos USDT 10.011895 7008.325891 $10 $7000
usdc_aptos Aptos USDC 10.004863 7003.403654 $10 $7000
eth_op Optimism ETH 0.00600338 4.20236173 $10 $7000
usdt_op Optimism USDT 10.011895 7008.325891 $10 $7000
usdc_op Optimism USDC 10.004863 7003.403654 $10 $7000
usdt_ton TON USDT 10.011895 7008.325891 $10 $7000
usdc_sui Sui USDC 10.004863 7003.403654 $10 $7000
public_sol Solana PUBLIC 3305.63213604 2313942.49522336 $10 $7000
spx_sol Solana SPX 37.24020304 26068.14212351 $10 $7000
usdt0_monad Monad USDT0 10.013639 7009.547003 $10 $7000
usdc_monad Monad USDC 10.004863 7003.403654 $10 $7000
usdt0_bera Berachain USDT0 10.013639 7009.547003 $10 $7000
usdt0_xlayer X Layer USDT0 10.013639 7009.547003 $10 $7000
usdc_xlayer X Layer USDC 10.004863 7003.403654 $10 $7000
adi ADI ADI 1.38888889 972.22222222 $10 $7000
usad_aleo Aleo USAD 10.004863 7003.403654 $10 $7000
usdcx_aleo Aleo USDCX 10.004863 7003.403654 $10 $7000
eth_scroll Scroll ETH 0.00600338 4.20236173 $10 $7000
usdt_scroll Scroll USDT 10.011895 7008.325891 $10 $7000
eure_gnosis Gnosis EURE 9.10746813 6375.2276867 $10 $7000
usd1_eth Ethereum USD1 10.00202041 7001.41428569 $10 $7000
cfi_base Base CFI 24074.34156676 16852039.0967307 $10 $7000
xaut_eth Ethereum XAUT 0.002836 1.984616 $10 $7000
usd1_sol Solana USD1 10.002021 7001.414286 $10 $7000
kvgtsolb_sol Solana KV-GTSOLB 0.13619812 95.33867788 $10 $7000
zec_starknet Starknet ZEC 0.01363996 9.54797174 $10 $7000
xrp_starknet Starknet XRP 10.87291 7611.036873 $10 $7000
vvv_base Base VVV 0.40600894 284.20625254 $10 $7000
xpl Plasma XPL 227.04996031 158934.97221022 $10 $7000
usdt0_plasma Plasma USDT0 10.013639 7009.547003 $10 $7000
coca_pol Polygon COCA 12.19272802 8534.90960921 $10 $7000
coca_base Base COCA 12.19272802 8534.90960921 $10 $7000
fogo FOGO FOGO 7034.82237074 4924375.6595146 $10 $7000
tlo_eth Ethereum TLO 9.70362519 6792.53762889 $10 $7000
zec_aptos Aptos ZEC 0.01363996 9.54797174 $10 $7000
xrp_aptos Aptos XRP 10.87291 7611.036873 $10 $7000
btc_aptos Aptos BTC 0.00016838 0.11785901 $10 $7000
eth_aptos Aptos ETH 0.00600338 4.20236173 $10 $7000
link_aptos Aptos LINK 1.14025086 798.17559863 $10 $7000
uni_aptos Aptos UNI 2.14132763 1498.92933619 $10 $7000
aave_aptos Aptos AAVE 0.10699765 74.89835224 $10 $7000
doge_aptos Aptos DOGE 182.11950683 127483.65477426 $10 $7000
sol_aptos Aptos SOL 0.14411299 100.87908921 $10 $7000
aster_bsc BNB Chain ASTER 20.86872321 14608.10624684 $10 $7000
aurora_bsc BNB Chain AURORA 364.77020207 255339.14144767 $10 $7000
avax Avalanche AVAX 1.52905199 1070.33639144 $10 $7000
bnb BNB Chain BNB 0.01836177 12.85323442 $10 $7000
cashcat_hood HOOD CASHCAT 251.33970346 175937.79241804 $10 $7000
eth_hood HOOD ETH 0.00600338 4.20236173 $10 $7000
pol Polygon POL 132.7615735 92933.10144312 $10 $7000
pons_hood HOOD PONS 117.49914814 82249.40369182 $10 $7000
prl PRL PRL 4.57409652 3201.86756336 $10 $7000
qtc QTC QTC 0.30907901 216.35530324 $10 $7000
qtc_sol Solana QTC 0.30907901 216.35530324 $10 $7000
rhea_bsc BNB Chain RHEA 397.46101902 278222.71330739 $10 $7000
rhea_sol Solana RHEA 397.46101902 278222.71330739 $10 $7000
sol_starknet Starknet SOL 0.14411299 100.87908921 $10 $7000
strk_sol Solana STRK 338.16595021 236716.16514402 $10 $7000
sweat_bsc BNB Chain SWEAT 200762.89901627 140534029.31138326 $10 $7000
tauwethbase_base Base TAUWETHBASE 0.00598552 4.18985883 $10 $7000
usdc_avax Avalanche USDC 10.004863 7003.403654 $10 $7000
usdc_bsc BNB Chain USDC 10.00486237 7003.40365418 $10 $7000
usdc_pol Polygon USDC 10.004863 7003.403654 $10 $7000
usdg_hood HOOD USDG 10 7000 $10 $7000
usdt_avax Avalanche USDT 10.011895 7008.325891 $10 $7000
usdt_bsc BNB Chain USDT 10.01189414 7008.32589116 $10 $7000
usdt_pol Polygon USDT 10.011895 7008.325891 $10 $7000
usdt0_op Optimism USDT0 10.013639 7009.547003 $10 $7000
weth_pol Polygon WETH 0.00600338 4.20236173 $10 $7000
wsteth_eth Ethereum WSTETH 0.00480573 3.3640099 $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

  1. The API finds your quote and checks it has not expired.
  2. 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).
  3. An order is opened and a deposit address is allocated.
  4. 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.

$200 giveaway

To a random member.

Subscribe @snapex_pay