Skip to content

4SEC Market Data APIMulti-DEX Aggregated Crypto Prices

Real-time prices, arbitrage detection, and risk metrics from 8+ DEXes. Pay per request with USDC on Base via x402.

Quick Example

Install the x402 client and start fetching data in under 5 minutes.

python
from x402.client import X402Client
from eth_account import Account

wallet = Account.from_key("0x...your_private_key...")
client = X402Client(wallet=wallet)

response = client.get("https://api.foursec.xyz/price/ETH")
data = response.json()
print(f"ETH: ${data['price_usd']}")  # ETH: $2450.32

Pricing

EndpointCostNotes
GET /price/:symbol$0.01Real-time aggregated price
GET /price/history/:symbol$0.02Historical OHLCV data
GET /volume/:symbol$0.0124h volume data
GET /spread/:pair$0.01Bid/ask spread
GET /arbitrage-opportunity$0.03Cross-DEX arbitrage scanner
GET /volatility-index/:symbol$0.02Risk metrics
POST /price-alert$0.05Create webhook alert
GET /healthFreeHealth check

All payments in USDC on Base via x402 protocol. No subscriptions, no API keys.

Supported DEXes

DEXChainPairs
Uniswap V3Base, EthereumETH/USDC, BTC/USDC
SushiSwapBase, EthereumETH/USDC, ETH/USDT
CurveEthereum3pool, ETH/stETH
BaseSwapBaseETH/USDC, BASE/ETH
AerodromeBaseETH/USDC, AERO/ETH
PancakeSwap V3Base, BSCETH/USDC, BNB/USDC
Balancer V2EthereumETH/USDC, WBTC/ETH
CamelotArbitrumETH/USDC, ARB/ETH

Released under the MIT License.