API reference · v1
Solar Swap API
The same swaps as solarswap.io, from your own code: a quote for any pair the exchange supports, a swap opened at the best exchange for it, and its progress until the receiving address is paid. Every call goes through Solar Swap's own swap service and answers at once.
- Base URL
- https://solarswap.io/api/v1
- Auth
- None needed; a member key raises limits
- Format
- JSON in and out, over HTTPS
- Version
- v1, fields only ever added
On this page⌄
Introduction
Solar Swap is a cross-chain swap service with no accounts: a person picks a pair and an amount, sends their coins to a one-time deposit address, and an exchange pays the swapped coins straight to the address they gave. The API gives your code the same three things the site does: the coins that can be swapped, a quote, and a swap to open and follow.
There is nothing to sign up for. Call it from a server, a script or a browser (any origin may call it). Each call is handled by Solar Swap's swap service, which asks the exchange it works with and answers in the same request. Solar Swap never holds the coins: the exchange pays your payout_address directly, and Solar Swap's fee is taken by the exchange out of the swap and shown on every quote.
Conventions
| Thing | How it's written |
|---|---|
| Amounts | Decimal strings in whole coins: "0.25", "1200". Up to 18 decimals. Never floats, never base units. |
| Times | Unix seconds, as integers. |
| Coins | A lowercase ticker and a lowercase network code, together: usdt on trx. Both come from GET /coins. |
| Nothing yet | null. A field is never missing from an answer; it's null until it applies. |
| Errors | An HTTP status outside 2xx and a JSON body {"error": "..."} written for the developer reading it. |
| Versions | v1 in the path. Fields may be added to v1's answers; none is renamed or removed. Anything else is a v2. |
Quickstart
A swap from start to finish takes four calls. Run them as they are: the quote and the coin list are free, and nothing moves until coins are sent to the deposit address.
Find the codes of the two coins
Every coin is a
tickerand anetwork. Read the list once and keep it; it changes about hourly.GET /api/v1/coinscurl "https://solarswap.io/api/v1/coins"Get a quote
Give the pair and the amount sent. The answer says what the receiving address gets, with Solar Swap's fee already out, and both amounts in dollars.
GET /api/v1/quotecurl "https://solarswap.io/api/v1/quote?coin_start=eth&chain_start=eth&amount_start=0.1&coin_end=sol&chain_end=sol"Open the swap
Add the address that receives the coins and the sender's refund address. Send a client key if you want to be able to delete the swap later. The answer is the deposit address and the exact amount to send to it.
POST /api/v1/swapcurl -X POST "https://solarswap.io/api/v1/swap" \ -H "Content-Type: application/json" \ -H "X-Client-Key: $CLIENT_KEY" \ -d '{ "coin_start": "eth", "chain_start": "eth", "amount_start": "0.1", "coin_end": "sol", "chain_end": "sol", "payout_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "refund_address": "0x6b3a9c2e8f1d4a7b0c5e2f9a1b8d3c4e5f6a7b8c" }'Send the deposit and follow the swap
Send exactly
deposit_amounttodeposit_address(withdeposit_memowhen there is one), then read the swap every 10 to 20 seconds until itsstatusisfinished. The person can follow it aturltoo.GET /api/v1/swap/{id}curl "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8"
Client key
The API has no accounts, so a swap belongs to whoever opened it only if they say who they are. That is the X-Client-Key header: 64 hexadecimal characters you generate once and keep secret, sent when you open a swap and when you delete one. A swap opened with a key can only be deleted with the same key. Opened without one, it can't be deleted by anyone, which is fine when you never need to.
The key says nothing about who you are: Solar Swap stores only a hash of it, to tell your swaps apart from everyone else's. Use one key per integration, or one per user if each of them should only be able to delete their own.
# A key, once. Keep it on your server, never in a page.
CLIENT_KEY=$(openssl rand -hex 32)Reading a swap needs no key
Knowing a swap's id is what lets a caller read it: ids are long and random. Treat them as private to the person the swap is for. With the key,GET /swap/{id} also says whether the swap can still be deleted (can_delete).Member key
The standard limits suit a wallet or a script serving a few people. An integration that needs more can be given a member key by Solar Swap: a string starting with solar_, sent as the X-Solar-Key header on any call. When it's a key we issued and it's still active, the limits set for it apply instead of the standard ones, and they're counted per key rather than per address: your servers' calls pool under your key and never share a limit with anyone else behind the same address.
Nothing else changes. The key isn't required and carries no account. A key we don't recognise, because it was never issued or has been revoked, simply gets the standard limits; the answer then says X-Solar-Key-Status: unknown, so a typo shows up at once. Ask for a key, or for higher limits on one, through the Support link in the footer.
curl "https://solarswap.io/api/v1/quote?coin_start=eth&chain_start=eth&amount_start=0.1&coin_end=sol&chain_end=sol" \
-H "X-Solar-Key: $SOLAR_KEY"Reading your limits
Every answer, with or without a key, says which limit applied and how much of it is left.
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | The limit that applied to this call: the member key's, or the standard one. |
| X-RateLimit-Remaining | How many more calls the current window allows. |
| X-RateLimit-Reset | In how many seconds the window ends. |
| X-Solar-Key-Status | Only when a key was sent: ok, or unknown when it isn't a key we recognise (never issued, or revoked). |
Rate limits
Limits are per endpoint, and per calling address, or per member key when one is sent (see Member key). A quote and a swap each reach the exchange, which is why those are the tight ones; a swap's status comes from Solar Swap's own records and can be polled freely within its limit. Past a limit the answer is 429 with a Retry-After header saying how many seconds to wait.
Standard limits
| Endpoint | Limit |
|---|---|
| GET /coins | 30 per minute |
| GET /quote | 4 per 10 seconds |
| POST /swap | 10 per 10 minutes |
| GET /swap/{id} | 60 per minute |
| POST /swap/{id}/run | 6 per minute |
| DELETE /swap/{id} | 20 per 10 minutes |
A member key has a count of its own for each endpoint, in the same windows. Quote when the person changes the pair or the amount, and refresh a quote they're looking at every 20 seconds or so rather than continuously. Read the coin list once and keep it. If an integration needs more than the standard limits, ask for a member key through the Support link in the footer.
Errors
Every error is an HTTP status outside 2xx with a JSON body of one field, error: a sentence saying what went wrong, naming the field when one is at fault. A 4xx means the request itself: fix it rather than retrying it. A 5xx means Solar Swap or the exchange didn't answer; nothing was changed, so retry after a few seconds.
{
"error": "the amount is below our minimum of $1 (about 0.0003 ETH)"
}| Status | Meaning |
|---|---|
| 400 | The request is wrong: a missing or malformed field, an unsupported pair, an invalid address, an amount below the minimum. The message says what; fix the request rather than retrying it. |
| 403 | Deleting a swap without the X-Client-Key it was opened with. |
| 404 | No swap has this id, or it was deleted. Also any path that isn't an endpoint. |
| 409 | Deleting a swap coins have arrived for. |
| 413 | A body over 8 KB. |
| 415 | A body not sent as application/json. |
| 429 | Too many requests from your address, or for your member key. Wait the seconds in the Retry-After header. |
| 502, 503 | The swap service or the exchange didn't answer. Nothing was changed; retry after a few seconds, backing off if it goes on. |
Coins and networks
A coin is identified by its ticker and its network together, because the same token lives on several: usdt on trx and usdt on eth are different coins to a swap, with different addresses and fees. Every endpoint takes the pair as coin_start, chain_start, coin_end and chain_end, all lowercase, exactly as GET /coins lists them.
The list says which coins can be sent (send) and which received (receive). Any sendable coin can be swapped to any receivable one; a pair the exchange can't do right now answers 400 from the quote. The network codes seen most often:
| Code | Network |
|---|---|
| btc | Bitcoin |
| eth | Ethereum |
| bsc | BNB Chain |
| arbitrum | Arbitrum |
| base | Base |
| op | Optimism |
| matic | Polygon |
| cchain | Avalanche |
| sol | Solana |
| trx | Tron |
| ton | TON |
| xmr | Monero |
| zec | Zcash |
| ltc | Litecoin |
| doge | Dogecoin |
| bch | Bitcoin Cash |
| xrp | XRP Ledger |
| xlm | Stellar |
| ada | Cardano |
| sui | Sui |
| hyperevm | HyperEVM |
| hood | Robinhood Chain |
| arc | Arc |
| zksync | zkSync Era |
| lna | Linea |
| mon | Monad |
Addresses are checked before anything opens: EVM, Solana and TON addresses in full, others by their shape, and the exchange checks the rest before the order exists. On networks with memos or destination tags, payout_memo is part of the address: a payout without it can be lost at the receiving end.
Amounts and fees
Amounts are decimal strings in whole coins, with up to 18 decimals. A quote values the pair at market prices, in the coin and in dollars. Solar Swap's fee of 1% is shown on every quote as fee and is already out of amount_end: nothing is added on top. The exchange's own fees and the network fee of paying the receiving address are in the quote too. The sender pays only the usual network fee of their own deposit transaction.
There is a minimum, a few dollars at market price. Below it the quote and the swap answer 400 with the minimum and roughly how much of the coin that is. Above it, any amount the exchange can take is fine.
Quotes float
amount_end is what the exchange pays at the moment of the quote. A swap opens at the rate of that moment, and when a deposit window (deposit_until) is given the rate holds until then. Otherwise the final amount, in amount_sent, follows the market until the deposit arrives and can differ a little from the quote.Swap lifecycle
A swap is a real order at an exchange from the moment it's opened. Its status is one of five words, and a swap only ever moves forward through them.
| status | Meaning |
|---|---|
| waiting | For the deposit to arrive, then for the exchange to swap it. The only status a swap can be deleted in, and only before anything arrives. |
| sending | The exchange is paying payout_address. |
| finished | Paid. payout_tx is the transaction and amount_sent the final amount. |
| failed | The exchange gave up: the deposit didn't arrive in time, or it couldn't complete the swap and refunds the deposit to refund_address under its own rules. |
| needs_attention | Someone at Solar Swap has to look at the swap. Ask support with the id and order_id if it stays there. |
The deposit
Send exactly deposit_amount of coin_start on chain_start to deposit_address, in one transaction, with deposit_memo when it isn't null. If less arrives, the swap waits for the rest until short_deposit_until and then goes on with what arrived, swapped at the rate of that moment; POST /swap/{id}/run has it go on at once. If more arrives, the exchange swaps what arrived. A deposit that arrives after deposit_until, when one was given, is handled by the exchange under its own rules, which may mean a refund to refund_address.
Following it
Read GET /swap/{id} every 10 to 20 seconds while the status is waiting or sending, and stop at finished, failed or needs_attention. deposit_received shows the deposit landing, payout_tx and amount_sent the payment going out. The swap's page at url shows the same to the person, so you can hand them the link instead of building a status screen.
Deleting and housekeeping
A swap nothing has arrived for can be deleted by whoever opened it with a client key; its id and page answer 404 from then on. One that never receives anything is deleted on its own 12 hours after it was opened. A swap coins have arrived for can't be deleted: it goes on to its end, whatever happens on your side.
The swap object
Every endpoint that answers a swap answers these fields.
idSolar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.
urlThe swap's page on solarswap.io, which follows it live. Show it to the person swapping.
statuswaiting, sending, finished, failed or needs_attention. See Swap lifecycle.
coin_start, chain_start, amount_startWhat the swap sends.
coin_end, chain_end, amount_endWhat it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.
deposit_addressWhere to send exactly deposit_amount of coin_start on chain_start.
deposit_memoThe memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.
deposit_amountWhat to send, in whole coins.
deposit_untilWhen set, the deposit must arrive before this (unix seconds); the rate holds until then.
deposit_receivedWhat has arrived for the swap, once the service can tell.
short_deposit_untilWhile part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).
payout_addressWhere the coins received are paid.
payout_txThe transaction that pays payout_address, once it's sent.
amount_sentWhat that transaction sends: the final amount.
order_idThe exchange's own id for the order. Quote it, with id, when asking support about a swap.
can_deleteWhether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.
List coins
/api/v1/coinsEvery coin that can be swapped right now, with the codes the other endpoints take. A coin is identified by its ticker and its network together: usdt on trx and usdt on eth are two entries.
The list is refreshed from the exchange about once an hour. Cache it for a minute or more; don't fetch it for every quote.
Headers
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Response 200
coinsThe coins, each with the fields below.
updated_atWhen the list was last read from the exchange, in unix seconds.
coins[].tickerThe coin's code, lowercase. Use it as coin_start or coin_end.
coins[].networkThe network's code, lowercase. Use it as chain_start or chain_end.
coins[].nameThe coin's name, for display.
coins[].contractThe token's contract, or its mint on Solana. null for a network's own coin.
coins[].imageThe logo's URL on solarswap.io, or null.
coins[].sendWhether it can be swapped from.
coins[].receiveWhether it can be swapped to.
coins[].featuredOne of the most-used coins, worth showing first.
curl "https://solarswap.io/api/v1/coins"{
"coins": [
{
"ticker": "btc",
"network": "btc",
"name": "Bitcoin",
"contract": null,
"image": "https://solarswap.io/api/coin-logo/btc/btc",
"send": true,
"receive": true,
"featured": true
},
{
"ticker": "eth",
"network": "eth",
"name": "Ethereum",
"contract": null,
"image": "https://solarswap.io/api/coin-logo/eth/eth",
"send": true,
"receive": true,
"featured": true
},
{
"ticker": "usdt",
"network": "trx",
"name": "Tether",
"contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"image": "https://solarswap.io/api/coin-logo/usdt/trx",
"send": true,
"receive": true,
"featured": true
}
],
"updated_at": 1793640000
}Get a quote
/api/v1/quoteWhat the receiving address gets for an amount sent, with Solar Swap's fee shown and already taken out. Give the pair and exactly one amount: what is sent, what should be received, or either one in dollars.
A quote is an estimate at market prices now. The rate floats until a swap's deposit arrives, and the swap you open is quoted again at that moment.
Every quote asks the exchange, which is why this endpoint has the tightest limit. Quote when the person changes the pair or the amount, and refresh at most every 20 seconds or so.
Query parameters
coin_startTicker of the coin sent, as /coins lists it: eth, usdt, btc.
chain_startNetwork code of the coin sent: eth, trx, btc.
coin_endTicker of the coin received.
chain_endNetwork code of the coin received.
amount_startWhat is sent, in whole coins: 0.1. Exactly one of the four amounts is given.
amount_endWhat should be received: the answer says what to send for it.
amount_start_usdWhat is sent, in dollars at market price.
amount_end_usdWhat should be received, in dollars at market price.
Headers
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Response 200
coin_start, chain_startThe pair, as asked.
coin_end, chain_endamount_startWhat to send, in whole coins. The amount asked, or the one worked out from amount_end or a dollar amount.
amount_endWhat the receiving address gets for it, Solar Swap's fee already out.
feeSolar Swap's fee: amount (string), coin and network (the coin received) and usd (number, or null when the price is unknown). Already out of amount_end.
amount_start_usdBoth amounts at market prices, when known.
amount_end_usdquoted_atWhen the quote was made, in unix seconds. Rates float until a swap's deposit arrives.
Errors
| Status | When |
|---|---|
| 400 | A code isn't in /coins, the pair can't be swapped, an amount is missing or malformed, or the amount is below Solar Swap's minimum. The message says which, and how much the minimum is in that coin. |
| 429 | More than the limit in its window. Wait the Retry-After seconds. |
| 503 | The exchange didn't answer in time. Try again in a moment. |
curl "https://solarswap.io/api/v1/quote?coin_start=eth&chain_start=eth&amount_start=0.1&coin_end=sol&chain_end=sol"{
"coin_start": "eth",
"chain_start": "eth",
"amount_start": "0.1",
"coin_end": "sol",
"chain_end": "sol",
"amount_end": "2.0318",
"fee": {
"amount": "0.0205",
"coin": "sol",
"network": "sol",
"usd": 3.28
},
"amount_start_usd": 330.12,
"amount_end_usd": 325.09,
"quoted_at": 1793640253
}Open a swap
/api/v1/swapOpens the swap at the best exchange for the pair right now and answers where to send the coins. It's a real order: once deposit_amount arrives at deposit_address, the exchange pays payout_address, and nothing can be changed.
Send the X-Client-Key header if you may want to delete the swap later (see Client key). Without it the swap can't be deleted by anyone, which is fine for many integrations.
Show the person deposit_address, deposit_amount and deposit_memo exactly as answered, or send the deposit yourself. The exchange pays the coins received straight to payout_address: Solar Swap never holds them.
Headers
X-Client-KeyOptional. 64 hex characters you generated and keep secret. Marks the swap as yours to delete.
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Body
coin_startTicker of the coin sent, as /coins lists it: eth, usdt, btc.
chain_startNetwork code of the coin sent: eth, trx, btc.
coin_endTicker of the coin received.
chain_endNetwork code of the coin received.
amount_startWhat is sent, in whole coins, as a string: "0.1". A JSON number is accepted too.
payout_addressThe address that receives coin_end on chain_end. Checked in full where the format is known (EVM networks, Solana, TON) and by shape elsewhere; the exchange checks the rest before the order opens.
payout_memoThe memo or destination tag payout_address needs, on networks that have them (XRP, Stellar, TON exchanges). Leave out otherwise.
refund_addressThe sender's own address on chain_start: where the exchange refunds a swap it can't complete.
refund_memoThe memo refund_address needs, if any.
Response 201
idSolar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.
urlThe swap's page on solarswap.io, which follows it live. Show it to the person swapping.
statuswaiting, sending, finished, failed or needs_attention. See Swap lifecycle.
coin_start, chain_start, amount_startWhat the swap sends.
coin_end, chain_end, amount_endWhat it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.
deposit_addressWhere to send exactly deposit_amount of coin_start on chain_start.
deposit_memoThe memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.
deposit_amountWhat to send, in whole coins.
deposit_untilWhen set, the deposit must arrive before this (unix seconds); the rate holds until then.
deposit_receivedWhat has arrived for the swap, once the service can tell.
short_deposit_untilWhile part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).
payout_addressWhere the coins received are paid.
payout_txThe transaction that pays payout_address, once it's sent.
amount_sentWhat that transaction sends: the final amount.
order_idThe exchange's own id for the order. Quote it, with id, when asking support about a swap.
can_deleteWhether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.
Errors
| Status | When |
|---|---|
| 400 | A field is missing or malformed, an address isn't valid on its network, the pair can't be swapped, or the amount is below the minimum. The message names the field. |
| 413 | The body is over 8 KB. |
| 415 | The body isn't sent as application/json. |
| 429 | More than the limit in its window. |
| 503 | No exchange could open the order right now. Try again in a moment; nothing was opened. |
curl -X POST "https://solarswap.io/api/v1/swap" \
-H "Content-Type: application/json" \
-H "X-Client-Key: $CLIENT_KEY" \
-d '{
"coin_start": "eth",
"chain_start": "eth",
"amount_start": "0.1",
"coin_end": "sol",
"chain_end": "sol",
"payout_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"refund_address": "0x6b3a9c2e8f1d4a7b0c5e2f9a1b8d3c4e5f6a7b8c"
}'{
"id": "3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"url": "https://solarswap.io/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"status": "waiting",
"coin_start": "eth",
"chain_start": "eth",
"amount_start": "0.1",
"coin_end": "sol",
"chain_end": "sol",
"amount_end": "2.0318",
"deposit_address": "0x2f4c9e1a7b3d5e6f8a9b0c1d2e3f4a5b6c7d8e9f",
"deposit_memo": null,
"deposit_amount": "0.1",
"deposit_until": 1793654400,
"deposit_received": null,
"short_deposit_until": null,
"payout_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"payout_tx": null,
"amount_sent": null,
"order_id": "MX7Q2K",
"can_delete": true
}Swap status
/api/v1/swap/{id}Where a swap is at. Knowing the id is what lets a caller read the swap, so treat ids as private to the person they belong to.
Poll every 10 to 20 seconds while status is waiting or sending, and stop at finished, failed or needs_attention. The swap's page at url shows the same to the person, live.
Path
idThe swap's id, from the answer that opened it.
Headers
X-Client-KeyOptional. With the key the swap was opened with, can_delete says whether it can still be deleted.
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Response 200
idSolar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.
urlThe swap's page on solarswap.io, which follows it live. Show it to the person swapping.
statuswaiting, sending, finished, failed or needs_attention. See Swap lifecycle.
coin_start, chain_start, amount_startWhat the swap sends.
coin_end, chain_end, amount_endWhat it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.
deposit_addressWhere to send exactly deposit_amount of coin_start on chain_start.
deposit_memoThe memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.
deposit_amountWhat to send, in whole coins.
deposit_untilWhen set, the deposit must arrive before this (unix seconds); the rate holds until then.
deposit_receivedWhat has arrived for the swap, once the service can tell.
short_deposit_untilWhile part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).
payout_addressWhere the coins received are paid.
payout_txThe transaction that pays payout_address, once it's sent.
amount_sentWhat that transaction sends: the final amount.
order_idThe exchange's own id for the order. Quote it, with id, when asking support about a swap.
can_deleteWhether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.
Errors
| Status | When |
|---|---|
| 404 | No swap has this id, or the swap was deleted by whoever opened it. |
| 429 | More than the limit in its window. |
curl "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8"{
"id": "3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"url": "https://solarswap.io/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"status": "finished",
"coin_start": "eth",
"chain_start": "eth",
"amount_start": "0.1",
"coin_end": "sol",
"chain_end": "sol",
"amount_end": "2.0318",
"deposit_address": "0x2f4c9e1a7b3d5e6f8a9b0c1d2e3f4a5b6c7d8e9f",
"deposit_memo": null,
"deposit_amount": "0.1",
"deposit_until": 1793654400,
"deposit_received": "0.1",
"short_deposit_until": null,
"payout_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"payout_tx": "4Zq1k8G2xW9vR3tY7uJ5nM6pL2sH8dF1aB3cE5gK9hN4mQ7rT6wX2yV8zU1oP3iL5kJ9fD7sA2gH4jK6lM8nB1vC3xZ",
"amount_sent": "2.0291",
"order_id": "MX7Q2K",
"can_delete": false
}Swap what arrived
/api/v1/swap/{id}/runA swap that got less than deposit_amount waits for the rest until short_deposit_until, then goes on with what arrived. This has it go on now instead. The answer is the swap as it is after.
No body is needed. A swap that isn't waiting for the rest of a deposit is left as it is.
Path
idThe swap's id.
Headers
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Response 200
idSolar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.
urlThe swap's page on solarswap.io, which follows it live. Show it to the person swapping.
statuswaiting, sending, finished, failed or needs_attention. See Swap lifecycle.
coin_start, chain_start, amount_startWhat the swap sends.
coin_end, chain_end, amount_endWhat it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.
deposit_addressWhere to send exactly deposit_amount of coin_start on chain_start.
deposit_memoThe memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.
deposit_amountWhat to send, in whole coins.
deposit_untilWhen set, the deposit must arrive before this (unix seconds); the rate holds until then.
deposit_receivedWhat has arrived for the swap, once the service can tell.
short_deposit_untilWhile part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).
payout_addressWhere the coins received are paid.
payout_txThe transaction that pays payout_address, once it's sent.
amount_sentWhat that transaction sends: the final amount.
order_idThe exchange's own id for the order. Quote it, with id, when asking support about a swap.
can_deleteWhether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.
Errors
| Status | When |
|---|---|
| 404 | No swap has this id, or the swap was deleted by whoever opened it. |
| 429 | More than the limit in its window. |
curl -X POST "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8/run"{
"id": "3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"url": "https://solarswap.io/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8",
"status": "waiting",
"coin_start": "eth",
"chain_start": "eth",
"amount_start": "0.1",
"coin_end": "sol",
"chain_end": "sol",
"amount_end": "2.0318",
"deposit_address": "0x2f4c9e1a7b3d5e6f8a9b0c1d2e3f4a5b6c7d8e9f",
"deposit_memo": null,
"deposit_amount": "0.1",
"deposit_until": 1793654400,
"deposit_received": "0.08",
"short_deposit_until": null,
"payout_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"payout_tx": null,
"amount_sent": null,
"order_id": "MX7Q2K",
"can_delete": true
}Delete a swap
/api/v1/swap/{id}Deletes a swap nothing has arrived for, from the caller's end: its id and page answer 404 from then on. Only with the X-Client-Key the swap was opened with. A swap coins have arrived for goes on whatever happens and can't be deleted.
Not needed for housekeeping: a swap that never receives anything is deleted on its own 12 hours after it was opened.
Path
idThe swap's id.
Headers
X-Client-KeyThe key the swap was opened with.
X-Solar-KeyOptional. A member key, for the limits set for it (see Member key). Without one, or with one that isn't recognised, the standard limits apply.
Response 200
deletedtrue.
Errors
| Status | When |
|---|---|
| 403 | No X-Client-Key, or not the one the swap was opened with (or the swap was opened without one). |
| 404 | No swap has this id, or the swap was deleted by whoever opened it. |
| 409 | Coins have arrived for the swap, so it goes on. |
| 429 | More than the limit in its window. |
curl -X DELETE "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8" \
-H "X-Client-Key: $CLIENT_KEY"{
"deleted": true
}Changelog
| Date | Change |
|---|---|
| 2026-11-04 | Member keys (X-Solar-Key) with limits of their own, and the X-RateLimit-* headers on every answer. |
| 2026-11-04 | v1 published: coins, quote, swap, swap status, swap what arrived, delete. |
Support
Questions about a swap reach the team through the Support link in the footer: give the swap's id and order_id. Questions about the API, higher limits or an integration are welcome the same way. What a swap involves, what it costs and the terms it runs under are on the legal page; by opening swaps through the API you accept them on behalf of the people you open them for.