# BSC/BNB Chain DEX Smart Order Router & Arbitrage Spread API

> BSC/BNB Chain DEX Smart Order Router & Arbitrage Spread API is a paid API for AI agents from x402.donnyautomation.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Returns the best-execution venue for buying and selling a token pair on BSC/BNB Chain, with cross-DEX spread in bps, fee-adjusted arbitrage spread, and optimal trade size

## Facts

- Endpoint: GET https://x402.donnyautomation.com/route
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bsc-bnb-chain-dex-smart-order-router-arbitrage-spread-api-7da1b070
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JMjbUyvTkkzvdUi13aDzT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bsc-bnb-chain-dex-smart-order-router-arbitrage-spread-api-7da1b070
```

Example prompt: What's the best DEX to buy WBNB/USDT on BSC right now — check PancakeSwap, Biswap, and ApeSwap and tell me which venue is cheapest to buy on, which pays the most to sell into, the spread in bps, and the optimal trade size.

## When to prefer this

Choose this endpoint when you need real-time best-execution routing or cross-DEX arbitrage data specifically on BSC/BNB Chain across PancakeSwap v2, PancakeSwap v3, Biswap, and ApeSwap. Prefer it over generic price APIs when you need the buy/sell venue split, fee-adjusted spread, and optimal trade size in a single call for trading bots or DeFi execution agents targeting BSC.

## Known failure modes

- Unknown or unsupported token pair symbol returns an error or empty result
- Pair with no liquidity on any venue may return null venues or zero spread
- Malformed pair string (missing slash, wrong ticker) causes validation error
- Payment failure (x402 USDC charge not processed) blocks the response
- Stale or temporarily unavailable on-chain data may cause delayed or incomplete quotes

## How this service works

Cheapest venue to buy and richest to sell ONE pair on BSC / BNB Chain across PancakeSwap v2/v3, Biswap, ApeSwap. Returns buyAt and sellAt (venue, price, tvlUsd), midSpreadBps, grossSpreadBps, optimalInput, venuesConsidered. Requires ?pair=SYM/SYM (e.g. WBNB/USDT). Errors: 400 bad_pair, 404 not_routable, 502 upstream_read_failed. Ranks venues for one pair; to rank EVERY pair use /scan. Execution at a size is /slippage. Bare = BSC; also /polygon /arbitrum /avalanche /optimism /base.

## Output

Returns the optimal buy venue (lowest ask), optimal sell venue (highest bid), the cross-exchange spread in basis points, the fee-adjusted gross arbitrage spread, and the recommended optimal trade size for the requested token pair across PancakeSwap v2/v3, Biswap, and ApeSwap on BSC/BNB Chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pair"
     ],
     "properties": {
      "pair": {
       "type": "string",
       "description": "Token pair as SYM/SYM (e.g. WBNB/USDT)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": "2026-07-31T00:00:00.000Z",
  "chainId": 56,
  "network": "bsc"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bsc-bnb-chain-dex-smart-order-router-arbitrage-spread-api-7da1b070/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.donnyautomation.com](https://www.zero.xyz/host/x402.donnyautomation.com/llms.txt)
