Skip to main content
The Swap API lets you exchange one stablecoin for another directly from a Blockradar wallet. Swaps can be initiated from a master wallet or a child address.

What you can do

  • Get a quote for a swap before committing
  • Quote by source amount or target amount with amountSide
  • Execute a swap between supported assets
  • Swap from both master wallets and child addresses
  • Route supported Stellar USDC destinations with the generic recipientRouting contract

Endpoints

Recipient parameters

Stellar recipient routing

recipientRouting is supported only when the destination chain is Stellar. Existing EVM, Solana, and Tron swap requests are unchanged and must not send recipientRouting; requests that supply it are rejected. There is no separate recipient memo parameter. For supported Stellar USDC destinations:
  1. Muxed M... recipient: omit recipientRouting. Its routing ID is already embedded in the address; sending routing data is rejected.
  2. Base G... recipient with a routing ID: send recipientRouting: { type: "memo_id", value: "123" }. The value must be a non-empty numeric string from 0 through 18446744073709551615. Blockradar normalizes the destination to an M... address before requesting quote or execution.
  3. Base G... recipient without a routing ID: send recipientRouting: { type: "none" } with no value. A G... recipient without recipientRouting is rejected. The destination base account must already have a Stellar USDC trustline before quote and execution.
  4. Default Blockradar Stellar wallet: callers must explicitly send recipientRouting: { type: "none" }.
Stellar base account with a routing ID
Stellar base account without a routing ID

Quote response metadata

Quote responses can include data.recipientRouting to explain the routing result. Execute responses do not include this metadata.

Migrating from Stellar-only fields

Full API Reference

View all swap endpoints in the API Reference tab.