81trust / 100

Trade Rail Quote

by APEX Honeypot-safe Swap Quote in Onchain & crypto

x402 APIPassing, checked 2 h ago

Honeypot check before a swap: a simulated buy AND sell at your size on Arc, BNB Chain or X1, then an unsigned transaction; honeypots refused. APEX 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.

GET https://apexfaucet.xyz/api/x402/trade-rail-quote

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
70 ms typical, 70 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://apexfaucet.xyz/api/x402/trade-rail-quote?amount=1&chain=arc&from=0x024b82335C29Fa5606a8ea5c1D24FC9eAD50700C&side=buy&token=0x59933f316417c89d9dc5107b30f08c99b774ea9d"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapexfaucet.xyz%2Fapi%2Fx402%2Ftrade-rail-quote
const res = await pay("https://apexfaucet.xyz/api/x402/trade-rail-quote?amount=1&chain=arc&from=0x024b82335C29Fa5606a8ea5c1D24FC9eAD50700C&side=buy&token=0x59933f316417c89d9dc5107b30f08c99b774ea9d");
console.log(await res.json());

Example input

{
  "amount": "1",
  "chain": "arc",
  "from": "0x024b82335C29Fa5606a8ea5c1D24FC9eAD50700C",
  "side": "buy",
  "token": "0x59933f316417c89d9dc5107b30f08c99b774ea9d"
}

Example output

{
  "data": {
    "chainId": 5042,
    "check": {},
    "expectedOut": "40224.637460059",
    "ok": true,
    "pool": {},
    "router": "0x4fcA4a51Ab4F23A7447b32…",
    "routerNote": "Uniswap Universal Router…",
    "side": "buy",
    "slippagePct": 3,
    "token": {},
    "warning": "a round trip costs 13.19…",
    "youPay": {}
  },
  "ok": true,
  "paid": 0.003
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402227 ms$0.003
7 h agoPassed40270 ms$0.003