Skip to content
Solar Swap

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

ThingHow it's written
AmountsDecimal strings in whole coins: "0.25", "1200". Up to 18 decimals. Never floats, never base units.
TimesUnix seconds, as integers.
CoinsA lowercase ticker and a lowercase network code, together: usdt on trx. Both come from GET /coins.
Nothing yetnull. A field is never missing from an answer; it's null until it applies.
ErrorsAn HTTP status outside 2xx and a JSON body {"error": "..."} written for the developer reading it.
Versionsv1 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.

  1. Find the codes of the two coins

    Every coin is a ticker and a network. Read the list once and keep it; it changes about hourly.

    GET /api/v1/coins
    curl "https://solarswap.io/api/v1/coins"
  2. 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/quote
    curl "https://solarswap.io/api/v1/quote?coin_start=eth&chain_start=eth&amount_start=0.1&coin_end=sol&chain_end=sol"
  3. 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/swap
    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"
      }'
  4. Send the deposit and follow the swap

    Send exactly deposit_amount to deposit_address (with deposit_memo when there is one), then read the swap every 10 to 20 seconds until its status is finished. The person can follow it at url too.

    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.

Making a key
# 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.

GET /api/v1/quote · with a member key
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.

HeaderMeaning
X-RateLimit-LimitThe limit that applied to this call: the member key's, or the standard one.
X-RateLimit-RemainingHow many more calls the current window allows.
X-RateLimit-ResetIn how many seconds the window ends.
X-Solar-Key-StatusOnly 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

EndpointLimit
GET /coins30 per minute
GET /quote4 per 10 seconds
POST /swap10 per 10 minutes
GET /swap/{id}60 per minute
POST /swap/{id}/run6 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.

Response · 400
{
  "error": "the amount is below our minimum of $1 (about 0.0003 ETH)"
}
StatusMeaning
400The 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.
403Deleting a swap without the X-Client-Key it was opened with.
404No swap has this id, or it was deleted. Also any path that isn't an endpoint.
409Deleting a swap coins have arrived for.
413A body over 8 KB.
415A body not sent as application/json.
429Too many requests from your address, or for your member key. Wait the seconds in the Retry-After header.
502, 503The 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:

CodeNetwork
btcBitcoin
ethEthereum
bscBNB Chain
arbitrumArbitrum
baseBase
opOptimism
maticPolygon
cchainAvalanche
solSolana
trxTron
tonTON
xmrMonero
zecZcash
ltcLitecoin
dogeDogecoin
bchBitcoin Cash
xrpXRP Ledger
xlmStellar
adaCardano
suiSui
hyperevmHyperEVM
hoodRobinhood Chain
arcArc
zksynczkSync Era
lnaLinea
monMonad

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.

statusMeaning
waitingFor 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.
sendingThe exchange is paying payout_address.
finishedPaid. payout_tx is the transaction and amount_sent the final amount.
failedThe 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_attentionSomeone 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.

id
string

Solar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.

url
string

The swap's page on solarswap.io, which follows it live. Show it to the person swapping.

status
string

waiting, sending, finished, failed or needs_attention. See Swap lifecycle.

coin_start, chain_start, amount_start
string

What the swap sends.

coin_end, chain_end, amount_end
string

What it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.

deposit_address
string

Where to send exactly deposit_amount of coin_start on chain_start.

deposit_memo
string | null

The memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.

deposit_amount
string

What to send, in whole coins.

deposit_until
integer | null

When set, the deposit must arrive before this (unix seconds); the rate holds until then.

deposit_received
string | null

What has arrived for the swap, once the service can tell.

short_deposit_until
integer | null

While part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).

payout_address
string

Where the coins received are paid.

payout_tx
string | null

The transaction that pays payout_address, once it's sent.

amount_sent
string | null

What that transaction sends: the final amount.

order_id
string | null

The exchange's own id for the order. Quote it, with id, when asking support about a swap.

can_delete
boolean

Whether 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

GET/api/v1/coins

Every 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-Key
string

Optional. 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

coins
array

The coins, each with the fields below.

updated_at
integer

When the list was last read from the exchange, in unix seconds.

coins[].ticker
string

The coin's code, lowercase. Use it as coin_start or coin_end.

coins[].network
string

The network's code, lowercase. Use it as chain_start or chain_end.

coins[].name
string

The coin's name, for display.

coins[].contract
string | null

The token's contract, or its mint on Solana. null for a network's own coin.

coins[].image
string | null

The logo's URL on solarswap.io, or null.

coins[].send
boolean

Whether it can be swapped from.

coins[].receive
boolean

Whether it can be swapped to.

coins[].featured
boolean

One of the most-used coins, worth showing first.

GET /api/v1/coins
curl "https://solarswap.io/api/v1/coins"
Response · 200
{
  "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

GET/api/v1/quote

What 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_start
stringrequired

Ticker of the coin sent, as /coins lists it: eth, usdt, btc.

chain_start
stringrequired

Network code of the coin sent: eth, trx, btc.

coin_end
stringrequired

Ticker of the coin received.

chain_end
stringrequired

Network code of the coin received.

amount_start
string

What is sent, in whole coins: 0.1. Exactly one of the four amounts is given.

amount_end
string

What should be received: the answer says what to send for it.

amount_start_usd
string

What is sent, in dollars at market price.

amount_end_usd
string

What should be received, in dollars at market price.

Headers

X-Solar-Key
string

Optional. 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_start
string

The pair, as asked.

coin_end, chain_end
string
amount_start
string

What to send, in whole coins. The amount asked, or the one worked out from amount_end or a dollar amount.

amount_end
string

What the receiving address gets for it, Solar Swap's fee already out.

fee
object

Solar 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_usd
number | null

Both amounts at market prices, when known.

amount_end_usd
number | null
quoted_at
integer

When the quote was made, in unix seconds. Rates float until a swap's deposit arrives.

Errors

StatusWhen
400A 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.
429More than the limit in its window. Wait the Retry-After seconds.
503The exchange didn't answer in time. Try again in a moment.
GET /api/v1/quote
curl "https://solarswap.io/api/v1/quote?coin_start=eth&chain_start=eth&amount_start=0.1&coin_end=sol&chain_end=sol"
Response · 200
{
  "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

POST/api/v1/swap

Opens 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-Key
string

Optional. 64 hex characters you generated and keep secret. Marks the swap as yours to delete.

X-Solar-Key
string

Optional. 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_start
stringrequired

Ticker of the coin sent, as /coins lists it: eth, usdt, btc.

chain_start
stringrequired

Network code of the coin sent: eth, trx, btc.

coin_end
stringrequired

Ticker of the coin received.

chain_end
stringrequired

Network code of the coin received.

amount_start
stringrequired

What is sent, in whole coins, as a string: "0.1". A JSON number is accepted too.

payout_address
stringrequired

The 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_memo
string

The memo or destination tag payout_address needs, on networks that have them (XRP, Stellar, TON exchanges). Leave out otherwise.

refund_address
stringrequired

The sender's own address on chain_start: where the exchange refunds a swap it can't complete.

refund_memo
string

The memo refund_address needs, if any.

Response 201

id
string

Solar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.

url
string

The swap's page on solarswap.io, which follows it live. Show it to the person swapping.

status
string

waiting, sending, finished, failed or needs_attention. See Swap lifecycle.

coin_start, chain_start, amount_start
string

What the swap sends.

coin_end, chain_end, amount_end
string

What it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.

deposit_address
string

Where to send exactly deposit_amount of coin_start on chain_start.

deposit_memo
string | null

The memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.

deposit_amount
string

What to send, in whole coins.

deposit_until
integer | null

When set, the deposit must arrive before this (unix seconds); the rate holds until then.

deposit_received
string | null

What has arrived for the swap, once the service can tell.

short_deposit_until
integer | null

While part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).

payout_address
string

Where the coins received are paid.

payout_tx
string | null

The transaction that pays payout_address, once it's sent.

amount_sent
string | null

What that transaction sends: the final amount.

order_id
string | null

The exchange's own id for the order. Quote it, with id, when asking support about a swap.

can_delete
boolean

Whether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.

Errors

StatusWhen
400A 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.
413The body is over 8 KB.
415The body isn't sent as application/json.
429More than the limit in its window.
503No exchange could open the order right now. Try again in a moment; nothing was opened.
POST /api/v1/swap
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"
  }'
Response · 201
{
  "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

GET/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

id
stringrequired

The swap's id, from the answer that opened it.

Headers

X-Client-Key
string

Optional. With the key the swap was opened with, can_delete says whether it can still be deleted.

X-Solar-Key
string

Optional. 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

id
string

Solar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.

url
string

The swap's page on solarswap.io, which follows it live. Show it to the person swapping.

status
string

waiting, sending, finished, failed or needs_attention. See Swap lifecycle.

coin_start, chain_start, amount_start
string

What the swap sends.

coin_end, chain_end, amount_end
string

What it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.

deposit_address
string

Where to send exactly deposit_amount of coin_start on chain_start.

deposit_memo
string | null

The memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.

deposit_amount
string

What to send, in whole coins.

deposit_until
integer | null

When set, the deposit must arrive before this (unix seconds); the rate holds until then.

deposit_received
string | null

What has arrived for the swap, once the service can tell.

short_deposit_until
integer | null

While part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).

payout_address
string

Where the coins received are paid.

payout_tx
string | null

The transaction that pays payout_address, once it's sent.

amount_sent
string | null

What that transaction sends: the final amount.

order_id
string | null

The exchange's own id for the order. Quote it, with id, when asking support about a swap.

can_delete
boolean

Whether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.

Errors

StatusWhen
404No swap has this id, or the swap was deleted by whoever opened it.
429More than the limit in its window.
GET /api/v1/swap/{id}
curl "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8"
Response · 200
{
  "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

POST/api/v1/swap/{id}/run

A 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

id
stringrequired

The swap's id.

Headers

X-Solar-Key
string

Optional. 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

id
string

Solar Swap's id for the swap: 32 hex characters. Keep it; it's how the swap is read.

url
string

The swap's page on solarswap.io, which follows it live. Show it to the person swapping.

status
string

waiting, sending, finished, failed or needs_attention. See Swap lifecycle.

coin_start, chain_start, amount_start
string

What the swap sends.

coin_end, chain_end, amount_end
string

What it receives: amount_end is what was quoted when it opened, so the final amount can differ a little.

deposit_address
string

Where to send exactly deposit_amount of coin_start on chain_start.

deposit_memo
string | null

The memo or destination tag the deposit must carry, on networks that have them. Without it the coins are lost.

deposit_amount
string

What to send, in whole coins.

deposit_until
integer | null

When set, the deposit must arrive before this (unix seconds); the rate holds until then.

deposit_received
string | null

What has arrived for the swap, once the service can tell.

short_deposit_until
integer | null

While part of the deposit has arrived and the rest is waited for: when the swap goes on with what arrived (unix seconds).

payout_address
string

Where the coins received are paid.

payout_tx
string | null

The transaction that pays payout_address, once it's sent.

amount_sent
string | null

What that transaction sends: the final amount.

order_id
string | null

The exchange's own id for the order. Quote it, with id, when asking support about a swap.

can_delete
boolean

Whether this call could delete the swap: nothing has arrived for it, and the call carries the X-Client-Key it was opened with.

Errors

StatusWhen
404No swap has this id, or the swap was deleted by whoever opened it.
429More than the limit in its window.
POST /api/v1/swap/{id}/run
curl -X POST "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8/run"
Response · 200
{
  "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

DELETE/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

id
stringrequired

The swap's id.

Headers

X-Client-Key
stringrequired

The key the swap was opened with.

X-Solar-Key
string

Optional. 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

deleted
boolean

true.

Errors

StatusWhen
403No X-Client-Key, or not the one the swap was opened with (or the swap was opened without one).
404No swap has this id, or the swap was deleted by whoever opened it.
409Coins have arrived for the swap, so it goes on.
429More than the limit in its window.
DELETE /api/v1/swap/{id}
curl -X DELETE "https://solarswap.io/api/v1/swap/3f9a1c2b4d5e6f708192a3b4c5d6e7f8" \
  -H "X-Client-Key: $CLIENT_KEY"
Response · 200
{
  "deleted": true
}

Changelog

DateChange
2026-11-04Member keys (X-Solar-Key) with limits of their own, and the X-RateLimit-* headers on every answer.
2026-11-04v1 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.