Skip to main content
POST
/
quote
/
swap
Get quote
curl --request POST \
  --url https://processor-prod.up.railway.app/quote/swap \
  --header 'Content-Type: application/json' \
  --header 'x-service-key: <api-key>' \
  --data '{
  "wallet_id": "68bb7d8399900e253084e6f9",
  "from_amount": -1,
  "to_amount": 100,
  "receiver": "0x4ad21FA456Bb297f505B2718ba87ad63D8a95E6B",
  "from_asset": "solana:usdc",
  "to_asset": "base:usdc"
}'
{
  "success": true,
  "status": 200,
  "message": "Swap quote fetched successfully",
  "timestamp": "2025-09-09T21:09:46.572Z",
  "data": {
    "input_amount": 4,
    "output_amount": 3.997592,
    "min_output_amount": 3.993592,
    "price_impact": 0.06,
    "duration": 22,
    "rate": 0.9993,
    "input_amount_usd": 3.9996,
    "output_amount_usd": 3.9972
  }
}

Authorizations

x-service-key
string
header
required

Body

application/json
wallet_id
string
required

The wallet ID to swap from

Example:

"68bb7d8399900e253084e6f9"

receiver
string
required

The recipient address for the swapped assets

Example:

"0x4ad21FA456Bb297f505B2718ba87ad63D8a95E6B"

from_asset
enum<string>
required

The asset to swap from

Available options:
ethereum:usdc,
base:usdc,
arbitrum:usdc,
solana:usdc,
bsc:usdc,
polygon:usdc,
optimism:usdc,
avalanche:usdc,
ethereum:usdt,
arbitrum:usdt,
solana:usdt,
polygon:usdt,
bsc:usdt,
optimism:usdt,
avalanche:usdt,
base:cngn,
bsc:cngn
Example:

"solana:usdc"

to_asset
enum<string>
required

The asset to swap to

Available options:
ethereum:usdc,
base:usdc,
arbitrum:usdc,
solana:usdc,
bsc:usdc,
polygon:usdc,
optimism:usdc,
avalanche:usdc,
ethereum:usdt,
arbitrum:usdt,
solana:usdt,
polygon:usdt,
bsc:usdt,
optimism:usdt,
avalanche:usdt,
base:cngn,
bsc:cngn
Example:

"base:usdc"

from_amount
number

Amount to swap. Use -1 to swap all available balance.

Use this for EXACT INPUT swaps.

Example:

-1

to_amount
number

Amount of the to_asset you want to receive.

Use this for EXACT OUTPUT swaps.

Example:

100

Response

200 - application/json

Swap quote fetched successfully

success
boolean
Example:

true

status
integer
Example:

200

message
string
Example:

"Swap quote fetched successfully"

timestamp
string<date-time>
Example:

"2025-09-09T21:09:46.572Z"

data
object
I