API для кошельков и приложений
Wallets, apps and aggregators can offer Silent.Exchange swaps to their users through our API: no accounts, no ID, a deposit address per swap and a status you can follow. Every swap made with your key counts for your partner share.
Get a key: we make it for you. Write to support@silent.exchange or use the Support page, with the name of your app. Each integrator gets its own key.
Basics
- Base address:
https://silent.exchange/api/v1/ - Over Tor:
http://silentxwxzkwpftbscmuwy5yuxbfvgzb2nlpzgc26rd4sdmimtujblid.onion/api/v1/(keys are made per site: tell us if you want one for the onion address). - Every call needs your key in the header
X-Api-Key: sx_…. Keep it on your server, never in an app or a web page. - Answers are JSON. Amounts are strings (
"0.05"), times are unix seconds (UTC). - Before a user creates a swap, show them our Terms of use and AML policy and get their OK.
Limits
- Requests per minute per key: 60 unless agreed otherwise.
- 100 new swaps per key per hour.
- Over a limit: HTTP
429withRetry-After: 60.
GET currencies
The coins we offer. extra_id: the receiving address may need a memo or tag. fixed: fixed rate possible.
{"currencies": [{"ticker": "btc", "name": "Bitcoin", "extra_id": false, "fixed": true}, …]}
GET range
range?from=btc&to=xmr&rate=float (or rate=fixed). max: null means no maximum.
{"from": "btc", "to": "xmr", "rate": "float", "min": "0.0011", "max": null}
GET estimate
estimate?from=btc&to=xmr&amount=0.05&rate=fixed
{"from": "btc", "to": "xmr", "rate": "fixed", "amount_from": "0.05", "amount_to": "8.123",
"rate_id": "…", "valid_until": 1764160000}
- Floating:
amount_tois an estimate; the final amount follows the market when the coins arrive. - Fixed: create the swap with this
rate_idbeforevalid_until, and the user gets exactlyamount_to.
POST create
JSON body:
{"from": "btc", "to": "xmr", "amount": "0.05", "rate": "fixed", "rate_id": "…",
"address": "4…", "extra_id": "", "refund_address": "bc1…"}
rate_idis needed for the fixed rate.refund_addressis needed for some coins (the errorrefund_requiredsays so) and recommended for all.
Answer:
{"id": "a1b2c3d4e5f6a7", "status": "waiting", "from": "btc", "to": "xmr", "rate": "fixed",
"amount_from": "0.05", "amount_to": "8.123", "deposit_address": "bc1…", "deposit_extra_id": null,
"track_url": "https://silent.exchange/trade/a1b2c3d4e5f6a7"}
The user sends amount_from to deposit_address (with deposit_extra_id when it is not null). track_url is the swap's page on our site.
GET status
status?id=a1b2c3d4e5f6a7
{"id": "a1b2c3d4e5f6a7", "status": "exchanging", "from": "btc", "to": "xmr", "amount_from": "0.05",
"amount_to": "8.12", "deposit_address": "bc1…", "deposit_extra_id": null, "deposit_hash": "…",
"payout_hash": null, "updated_at": 1764160000}
Statuses: waiting, confirming, exchanging, sending, finished, failed, refunded, expired, verifying. verifying means the swap is held for a check: the user follows the swap's page or writes to our support.
Errors
{"error": "<code>", "message": "<English text>"} with an HTTP status:
bad_key(401): missing, unknown or switched-off key.rate_limited(429): over a limit.unknown_coin,bad_rate,bad_amount,bad_id(400): bad input.below_minwithmin,above_maxwithmax(400): amount outside the range.pair_unavailable(400): the pair or the fixed rate is not available right now.address_required,bad_address,refund_required,bad_refund_address(400): address problems.rate_id_required,create_failed(400): fixed rate without arate_id, an expired rate, or a refused swap.not_found(404): no such swap or endpoint.method(405): wrong method (GET or POST).unavailable(502 / 503),server(500): try again shortly.
Earnings and privacy
- Swaps made with your key count for your partner code, the same as a partner link, and show on your partner page. We share 30% of our earnings, 35% above $25k a month and 40% above $100k, paid monthly in Monero (XMR). More on our partner page.
- We never ask for or keep your users' IP addresses, emails or accounts. Our API log keeps only the key, the type of request, the result and the time, for 30 days. See our Privacy policy.