Skip to content

Pricing

Pay-as-you-go. No subscriptions, no API keys. Pay only for what you use.

Payment Protocols

4SEC supports two payment protocols:

ProtocolBlockchainTokenDiscovery
x402 v2Base (Coinbase)USDC on Basex402scan.com
MPPTempo (Stripe)USDC on Tempomppscan.com

Both protocols are supported automatically — your client library handles the negotiation.

Endpoint Pricing

DEX Endpoints

EndpointPrice (USDC)Description
GET /price/:symbol0.01Real-time aggregated price from 8+ DEXes
GET /price/history/:symbol0.02Historical OHLCV candlestick data
GET /volume/:symbol0.0224h trading volume across all DEXes
GET /spread/:pair0.02Bid/ask spread analysis
GET /arbitrage-opportunity0.05Cross-DEX arbitrage scanner
GET /volatility-index/:symbol0.03Risk metrics: VaR, Sharpe, volatility
POST /price-alert0.04Create webhook price alert
POST /price-alert/:id/extend0.02Extend price alert duration

Funding Rate Endpoints

EndpointPrice (USDC)Description
GET /funding-rate/:symbol0.02Current perpetual funding rate with signal
GET /funding-rate/history/:symbol0.03Historical funding rate data
GET /funding-rate/extreme0.02Extreme funding rates scanner across markets

Liquidation Endpoints

EndpointPrice (USDC)Description
GET /liquidation/heatmap/:symbol0.05Liquidation heatmap with cascade risk levels
GET /liquidation/recent0.03Recent liquidations with long/short breakdown
POST /liquidation/alert0.06Create liquidation cascade alert webhook
POST /liquidation/alert/:id/extend0.03Extend liquidation alert duration

Futures Analytics

EndpointPrice (USDC)Description
GET /futures/funding-compare/:symbol0.03Cross-exchange funding rate comparison
GET /futures/open-interest/:symbol0.03Aggregated open interest across 3 exchanges
GET /futures/long-short/:symbol0.02Top traders long/short ratio
GET /futures/basis/:symbol0.02Spot vs perpetual basis (carry-trade signal)
GET /futures/predicted-funding/:symbol0.02Predicted next funding rate

CEX Market Data (v1)

EndpointPrice (USDC)Description
GET /api/v1/prices0.005Batch CEX prices (e.g. ?symbols=btc,eth,sol)
GET /api/v1/market/:id0.005Market details by CoinGecko ID
GET /api/v1/market/:id/history0.01Historical market data from CEX sources

Free Endpoints

EndpointDescription
GET /healthHealth check
GET /api/v1/statusDetailed system status
GET /price-alert/:idCheck price alert status
DELETE /price-alert/:idCancel a price alert
GET /price-alertsList all active price alerts
GET /liquidation/alertsList all active liquidation alerts
GET /liquidation/alert/:idCheck liquidation alert status
DELETE /liquidation/alert/:idCancel a liquidation alert
GET /API info and available endpoints
GET /openapi.jsonOpenAPI specification
GET /.well-known/x402.jsonx402 payment discovery
GET /metricsTransaction metrics

Free Cache Window

Same request within 30 seconds returns cached data — no charge.

bash
# First request: 0.01 USDC
curl -i https://api.foursec.xyz/price/ETH

# Same request within 30s: FREE (cached)
curl -i https://api.foursec.xyz/price/ETH

JavaScript Example (x402)

javascript
import { wrapFetchWithPayments } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
import { createWalletClient, http } from "viem";
import { base } from "viem/chains";

const account = privateKeyToAccount("0x_YOUR_KEY");
const walletClient = createWalletClient({
  account,
  chain: base,
  transport: http("https://mainnet.base.org"),
});

const fetchWithPayment = wrapFetchWithPayments(fetch, {
  client: walletClient,
});

// Auto-pays 0.01 USDC per unique request
const res = await fetchWithPayment("https://api.foursec.xyz/price/ETH");
const data = await res.json();
console.log("ETH: $" + data.price_usd);

Rate Limits

  • 500 requests/minute per IP address
  • Cached responses (within 30s TTL) do not count toward rate limit
  • For higher volume needs, contact: support@foursec.xyz

Payment Details

x402 Protocol (Base USDC)

  • Token: USDC on Base (Chain ID 8453)
  • Contract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
  • Protocol: x402 v2
  • No API key required — your wallet address is your identity

MPP Protocol (Tempo USDC)

  • Token: USDC on Tempo (Stripe's blockchain)
  • Protocol: MPP (Machine Payment Protocol)
  • Discovery: mppscan.com
  • No API key required — compatible with MPP-enabled wallets

Built with x402 protocol on Base