GET /spread/:pair
Bid/ask spread analysis across DEXes.
Cost: $0.01 USDC
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pair | string | Yes | Trading pair (e.g., ETH/USDC) |
Request
response = client.get("https://api.foursec.xyz/spread/ETH/USDC")
data = response.json()
Response
{
"pair": "ETH/USDC",
"best_bid": 2450.28,
"best_bid_dex": "SushiSwap",
"best_ask": 2450.35,
"best_ask_dex": "BaseSwap",
"spread_pct": 0.07,
"spread_usd": 0.07,
"mid_price": 2450.315,
"depth_analysis": [
{
"dex": "SushiSwap",
"bid_price": 2450.28,
"ask_price": 2450.34,
"spread_pct": 0.06,
"bid_depth_usd": 250000,
"ask_depth_usd": 280000
},
{
"dex": "Uniswap V3",
"bid_price": 2450.29,
"ask_price": 2450.33,
"spread_pct": 0.04,
"bid_depth_usd": 500000,
"ask_depth_usd": 520000
},
{
"dex": "BaseSwap",
"bid_price": 2450.27,
"ask_price": 2450.35,
"spread_pct": 0.08,
"bid_depth_usd": 180000,
"ask_depth_usd": 200000
}
],
"timestamp": "2026-07-04T15:30:00Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| pair | string | Trading pair |
| best_bid | float | Highest bid price across DEXes |
| best_bid_dex | string | DEX with highest bid |
| best_ask | float | Lowest ask price across DEXes |
| best_ask_dex | string | DEX with lowest ask |
| spread_pct | float | Spread as percentage |
| spread_usd | float | Spread in USD |
| mid_price | float | Midpoint between best bid and ask |
| depth_analysis | array | Per-DEX spread and depth |
Spread Interpretation
| Spread | Meaning | Action |
|---|---|---|
| < 0.05% | Very tight | Excellent liquidity |
| 0.05-0.1% | Normal | Good for trading |
| 0.1-0.5% | Wide | Potential arbitrage |
| > 0.5% | Very wide | Caution: low liquidity or manipulation |