Prepare a buy or a sell (non-custodial)
prepare_tradePrepares a buy or a sell of a Robinhood Chain token through The Desk's router and returns (1) a signing link on nlyra.xyz where the user reviews it and signs with their own wallet, valid 30 minutes, and (2) when a wallet is given, the unsigned transactions for an agent wallet that signs by itself (valid ~5 minutes). NLYRA never holds funds or keys. Same risk gate as The Desk: buys of tokens that fail the sell test are refused; Critical tokens need acknowledge_high_risk=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| unit | No | buy: "quote" (ETH/USDG, default) or "usd"; sell: "token" (default), "usd" or "percent" (needs wallet) | |
| token | Yes | ||
| amount | Yes | a plain number, e.g. "0.05" | |
| wallet | No | the wallet that will sign; with it you also get the raw transactions | |
| slippage_bps | No | max slippage in basis points, default 300 (3%) | |
| acknowledge_high_risk | No | required for tokens rated Critical, only after telling the user the risk |