Brokex Public API (Multi-Network Ready)

https://base.brokex.trade
High-performance REST and SSE endpoints for Brokex Protocol. Supports Base Sepolia (Testnet) and Base (Mainnet) via ?network=testnet|mainnet.
Oracle & Real-Time Price Streams
GET /stream SSE Live Price Stream

Subscribes to live price updates for Gold (XAU/USD).

curl -N "https://base.brokex.trade/stream"
GET /oracle Current Oracle Spot Price

Returns live Supra DORA spot price and decimals.

curl "https://base.brokex.trade/oracle"
GET /proof Supra DORA Binary Oracle Proof

Returns latest signed binary price update data for smart contract execution.

curl "https://base.brokex.trade/proof"
Protocol & Trades
GET /protocol-info Global Protocol State & 24h Volume

Returns global Brokex protocol state (vault balance, locked capital, owner, security mode, 24h volume analytics, active assets, and assets config snapshot).

curl "https://base.brokex.trade/protocol-info"
GET /assets All Listed Assets Parameters & Spreads

Returns full parameters (min/max leverage, spreads, borrow rates, max OI, dynamic OI, locked capital) for all active listed assets.

curl "https://base.brokex.trade/assets"
GET /trades Recent Trades Feed & Pagination

Returns most recent trades across the entire protocol with pagination (limit, offset / skip) and optional status filter (status=OPEN|CLOSED|CREATED|CANCELLED).

curl "https://base.brokex.trade/trades?limit=50&offset=0"
GET /trader/:address Trader Portfolio & History

Returns all open, closed, created and cancelled trades for a trader address, including transactions and events history.

curl "https://base.brokex.trade/trader/0xca30CD2760E48af1Be32C8420e71803DA6735142"
GET /trade/:id Single Trade Full Details & Audit Trail

Returns full details for a specific trade (creationTxHash, openingTxHash, closingTxHash, all txHashes & event audit trail).

curl "https://base.brokex.trade/trade/1"
GET /protocol-info Protocol Global Stats

Returns latest Lens snapshot (?network=testnet|mainnet).

curl "https://base.brokex.trade/protocol-info?network=testnet"
GET /liquidations Open Positions & Liquidations

Returns exact calculated liquidation prices for open trades.

curl "https://base.brokex.trade/liquidations"
GET /average-prices Weighted Average Open Prices

Calculates weighted average open prices for Long and Short.

curl "https://base.brokex.trade/average-prices"
Chart & Market Data
GET /chart/history Candlestick Chart (OHLCV Candles)

Returns historical candlesticks (open, high, low, close, volume, time) for TradingView and custom charts. Supports resolutions: 1 (1m), 5 (5m), 15 (15m), 30 (30m), 60 (1h), 240 (4h), 1440 (1d).

curl "https://base.brokex.trade/chart/history?resolution=15&limit=200"
GET /chart/sparkline 120-Point Sparkline & Multi-Period Stats

Returns 1h, 24h, 7d and 30d percentage variations along with a 120-point sampled sparkline array for lightweight mini-charts.

curl "https://base.brokex.trade/chart/sparkline"
GET /chart/24h 24h High, Low, Variations & Sparkline

Returns 24h lowest price (low_24h), 24h highest price (high_24h), 24h open, price variations and 120-pt sparkline.

curl "https://base.brokex.trade/chart/24h"
GET /markets Multi-Asset Market Variations & Prices

Returns 1h, 24h and 7d percentage variations and spot prices for Top Forex, Metals (Gold, Silver, Platinum), Commodities (Crude Oil), Cryptos (BTC, ETH, SOL...) and US Equities (AAPL, TSLA, NVDA...).

curl "https://base.brokex.trade/markets"
GET /markets/refresh Force Refresh Pyth Market Differences

Forces a live re-fetch from Pyth Benchmarks and updates data/marketsSummary.json on disk immediately.

curl "https://base.brokex.trade/markets/refresh"