Skip to content

GET /spread/:pair

Bid/ask spread analysis across DEXes.

Cost: $0.01 USDC

Parameters

ParameterTypeRequiredDescription
pairstringYesTrading 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

FieldTypeDescription
pairstringTrading pair
best_bidfloatHighest bid price across DEXes
best_bid_dexstringDEX with highest bid
best_askfloatLowest ask price across DEXes
best_ask_dexstringDEX with lowest ask
spread_pctfloatSpread as percentage
spread_usdfloatSpread in USD
mid_pricefloatMidpoint between best bid and ask
depth_analysisarrayPer-DEX spread and depth

Spread Interpretation

SpreadMeaningAction
< 0.05%Very tightExcellent liquidity
0.05-0.1%NormalGood for trading
0.1-0.5%WidePotential arbitrage
> 0.5%Very wideCaution: low liquidity or manipulation

Released under the MIT License.