Relay
Keyless Solana swaps, quotes, prices, and token search through Relay, with the platform fee inside the swap.
Relay (relay.link) is a swap and bridge venue. The Relay node trades on Solana without any API key: prices, quotes, and token search need nothing connected, and swaps sign with your Privy wallet. Solaris AI's own apps trade on it. Bridging and other chains are not part of this version.
Prerequisites
- No API key. Relay serves every operation without a credential. Canvas workflows run on Relay's public limits; Solaris AI's own key is used only by its apps, whose usage is metered.
- Connected Privy wallet for
swap(live mode).
Operations
| Operation | Description | Requires API key | Requires wallet |
|---|---|---|---|
| getPrice | USD price for one or more mints | No | No |
| getQuote | Preview a swap: output amount, minimum received, price impact | No | No |
| searchTokens | Find tokens by symbol, name, or mint, fresh launches included | No | No |
| swap | Execute a swap from your wallet, platform fee inside the route | No | Yes |
getPrice
Give one or more mint addresses, comma-separated, up to 50 per node (a longer list is refused rather than cut short). The output is keyed by mint, the same shape the Jupiter node uses, so {relayResponse.data.<mint>.usdPrice} works either way. SOL is addressed by the wrapped-SOL mint So11111111111111111111111111111111111111112. A mint Relay cannot price returns null for that mint rather than failing the node.
getQuote
Quotes the exact trade a swap would run: from your wallet when the run has one, with the platform fee in the route, so the preview matches what a live swap fills at. data.priceImpact is a non-negative fraction of the trade lost to impact, so a Condition rule of less_than_or_equal 0.1 means "at most 10% impact". data.minOutAmount is the least you receive after slippage; data.appFee is the platform fee the route would take, in the input token's smallest unit.
searchTokens
Searches Relay's currency list, including tokens it has not verified, by symbol, name, or mint. Each row carries mint, symbol, name, decimals, and verified. Verified is a trust signal, not a tradability gate: an unverified mint can still be quoted and swapped.
swap
amount is the gross amount in the input token's smallest unit. The platform fee (0.4% of the input, less for SOLARIS holders) is a Relay app fee inside the same transaction, so there is no separate fee transfer and nothing to refund. Relay returns instructions rather than a landing service: the node builds the transaction with a fresh blockhash and a live priority fee, measures its compute by simulation, signs once, simulates the signed bytes, and resends those exact bytes until the chain confirms or the transaction expires. A swap that is still unconfirmed when the run's budget ends is reported with its signature and is never resent under a new signature: the node records every broadcast before sending it, and its next run checks that record against the chain before signing anything new, refusing while the earlier swap is still settling.
For very small orders in tokens other than SOL or USDC, Relay may be unable to collect the fee. The trade still executes; platformFeeCollected reports 0 in that case.
Dry run. With dryRun on, the node quotes and simulates without signing or broadcasting and routes no fee. Rehearsals always run swaps as dry runs.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Response Name | text | Yes | Name used by downstream nodes, such as {relayResponse.data} |
| inputMint | template | For getQuote and swap | Token to sell, as a mint address |
| outputMint | template | For getQuote and swap | Token to buy, as a mint address |
| amount | template | For getQuote and swap | Gross amount in the input token's smallest unit |
| slippageBps | number | No | Slippage in basis points, 0-10000; default 100 |
| tokenQuery | template | For getPrice and searchTokens | Mint list for price, or free text for search |
| dryRun | boolean or template | No | Simulate the swap instead of executing it |
Output
getPrice:data.<mint>.usdPricegetQuote:data.inAmount,data.outAmount,data.minOutAmount,data.priceImpact,data.slippageBps,data.requestId,data.appFeesearchTokens:data[]rows withmint,symbol,name,decimals,verifiedswap:signature,requestId,inAmount,outAmount,priceImpact,platformFeeCollected(what Relay's own request record says it credited; empty withfeeAccountingPending: trueonly while Relay has not yet reached a terminal state for the request; a terminal success, failure, or refund is reported as-is inrelayStatuswith whatever was credited),platformFeeQuoted,platformFeeBps, plusdryRunandplatformFeeWouldCollecton simulations
Fills are confirmed from the chain, so inAmount and outAmount on a live swap are what actually moved, not the quote. If the confirmed transaction cannot be read back within a few seconds, the node returns status: ConfirmedAccountingPending with the signature and empty amounts rather than substituting quoted numbers.
