Swap: build the transactions to sign
swap_buildBuild a swap for your own wallet to sign and send, on Robinhood Chain, Base, Ethereum, Arbitrum or Solana. Returns a firm quote (amount out, minimum, every fee) and the unsigned transactions in order. EVM chains: an exact-amount approval when needed, then the swap. Solana: one versioned transaction (base64) your wallet pays for and signs. Fivebar's 0.5% fee is paid inside the swap; Fivebar never sees your keys or holds your funds. Wallets on the US sanctions list are refused. xStocks are coming soon.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buy | Yes | Token to buy, same forms as sell | |
| sell | Yes | Token to sell: ETH, WETH, USDG (Robinhood Chain), USDC or USDT (Base, Ethereum, Arbitrum), SOL, USDC, USDT or a mint (Solana), or a token address | |
| chain | No | Default robinhood (solana when given Solana tokens) | |
| taker | Yes | Your wallet address (0x..., or a Solana wallet): it signs and sends the transactions and receives the tokens | |
| amount | Yes | How much of the sell token, in whole units, e.g. '100' or '0.25' | |
| slippage_pct | No | Max slippage in percent, default 1 |