SSolace PlatformDOCS
Open console →
API reference

Swaps

Exchange one coin for another inside Solace: quote, then execute within the quote's life.

Quote a swap

POST/platform/v1/swaps/quotes

What amount of from buys of to for the end user (or for your business balance, with business), held until expires_at. The fee is already out of to.amount. Swaps use live market prices and move balances, not coins on chain. Scope: swaps.

Body parameters

end_userrequiredstring
The end user's eu_ id, or business to swap your business balance.
fromrequiredstring
torequiredstring
amountrequireddecimal string
How much of from to swap.

Returns

  • 201 The quote.
Request
curl -X POST https://sandbox-api.solacefi.co/platform/v1/swaps/quotes \
  -H "Authorization: Bearer $SOLACE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_user":"eu_4kPq9Zm2xV7b","from":"USDC","to":"ETH","amount":"50"}'
Response · 201
JSON
{
  "id": "quote_2Rb8Kx4Nq7Vw",
  "object": "swap_quote",
  "end_user": "eu_4kPq9Zm2xV7b",
  "from": {
    "asset": "USDC",
    "amount": "50"
  },
  "to": {
    "asset": "ETH",
    "amount": "0.0195804"
  },
  "fee": {
    "asset": "ETH",
    "amount": "0.0000196"
  },
  "rate": "0.00039200",
  "expires_at": "2026-10-03T15:36:40.482Z",
  "created_at": "2026-10-03T15:36:10.482Z"
}

Execute a quote

POST/platform/v1/swaps

Moves the end user's balance from one coin to the other at once, at the quote's price, before it expires. Also sent as swap.completed. Scope: swaps.

Headers

Idempotency-Keyrequiredstring
Makes a retry safe; see Idempotency.

Body parameters

quoterequiredstring

Returns

  • 201 The swap.
Request
curl -X POST https://sandbox-api.solacefi.co/platform/v1/swaps \
  -H "Authorization: Bearer $SOLACE_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"quote":"quote_2Rb8Kx4Nq7Vw"}'
Response · 201
JSON
{
  "id": "swap_5Tz1Mv8Qc3Lp",
  "object": "swap",
  "end_user": "eu_4kPq9Zm2xV7b",
  "quote": "quote_2Rb8Kx4Nq7Vw",
  "from": {
    "asset": "USDC",
    "amount": "50"
  },
  "to": {
    "asset": "ETH",
    "amount": "0.0195804"
  },
  "fee": {
    "asset": "ETH",
    "amount": "0.0000196"
  },
  "created_at": "2026-10-03T15:36:10.482Z"
}