Trade rail quote
trade_rail_quoteAPEX Trade Rail: before a bot buys a token on Arc, X1 or BNB Chain, simulate the buy AND the sell back at its size; a token you could not sell, or whose round trip costs more than maxLossPct (15 at most), is refused with the reason; otherwise the real pool, expected and minimum out, and UNSIGNED transactions for your own wallet (nothing is signed, held or sent by us). $0.003 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"token": "<token>",
"side": "<side>",
"amount": "<amount>"
},
"name": "trade_rail_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | your wallet (needed for the transaction and for sells) | |
| side | Yes | buy or sell | |
| chain | Yes | arc, x1 or bnb | |
| token | Yes | token address | |
| amount | Yes | buy: what you spend (USDC on Arc, XNT on X1, BNB on BNB); sell: tokens | |
| payment | No | a signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call. | |
| maxLossPct | No | 0.5 to 15, default 15 |