Skip to content

GET /arbitrage-opportunity

Cross-DEX arbitrage opportunities with profit calculations.

Cost: $0.03 USDC

Parameters

ParameterTypeDefaultDescription
min_profit_usdfloat1.0Minimum net profit filter
symbolstring-Filter by symbol (optional)
limitint10Max results

Request

response = client.get("https://api.foursec.xyz/arbitrage-opportunity?min_profit_usd=1.0")
data = response.json()

Response

{
  "total_opportunities": 3,
  "scanned_pairs": 25,
  "opportunities": [
    {
      "symbol": "ETH",
      "pair": "ETH/USDC",
      "buy_dex": "SushiSwap",
      "buy_price": 2450.28,
      "buy_liquidity_usd": 4200000,
      "sell_dex": "BaseSwap",
      "sell_price": 2450.35,
      "sell_liquidity_usd": 3100000,
      "spread_pct": 0.07,
      "gross_profit_per_unit": 0.07,
      "gas_estimate_usd": 0.02,
      "net_profit_per_unit": 0.05,
      "max_trade_size_usd": 50000,
      "estimated_net_profit_usd": 2.50,
      "roi_pct": 0.005,
      "timestamp": "2026-07-04T15:30:00Z"
    }
  ]
}

Response Fields

FieldTypeDescription
total_opportunitiesintNumber of opportunities found
scanned_pairsintTotal pairs scanned
opportunitiesarrayList of arbitrage opportunities

Opportunity Object

FieldTypeDescription
symbolstringToken symbol
pairstringTrading pair
buy_dexstringDEX to buy (lowest price)
buy_pricefloatBuy price
buy_liquidity_usdfloatAvailable liquidity at buy DEX
sell_dexstringDEX to sell (highest price)
sell_pricefloatSell price
sell_liquidity_usdfloatAvailable liquidity at sell DEX
spread_pctfloatPrice spread percentage
gross_profit_per_unitfloatProfit per unit before gas
gas_estimate_usdfloatEstimated gas cost
net_profit_per_unitfloatProfit per unit after gas
max_trade_size_usdfloatMax trade size (limited by liquidity)
estimated_net_profit_usdfloatTotal estimated profit at max size
roi_pctfloatReturn on investment percentage

How It Works

  1. Scans all supported DEX pairs for price differences
  2. Calculates gross profit (sell_price - buy_price)
  3. Subtracts estimated gas costs (buy tx + sell tx)
  4. Filters by min_profit_usd threshold
  5. Returns sorted by net profit (highest first)

WARNING

Arbitrage opportunities are time-sensitive. Prices may change between detection and execution. Always verify prices before trading.

Released under the MIT License.