curl -X GET "https://api.strike.markets/markets"
{
"markets" : [
{
"symbol" : "BTC-USD"
},
{
"symbol" : "ETH-USD"
},
{
"symbol" : "SOL-USD"
},
{
"symbol" : "BNB-USD"
},
{
"symbol" : "XRP-USD"
},
{
"symbol" : "HYPE-USD"
}
],
"count" : 6
}
Overview
Get comprehensive data for all active trading markets on Strike Protocol, including current prices, funding rates, open interest, and volume metrics. This endpoint provides everything needed to understand market conditions and make informed trading decisions.
This endpoint does NOT require authentication and provides real-time market data for all users.
Response Fields
Array of available trading markets Trading pair identifier (e.g., “BTC-USD”, “ETH-USD”, “SOL-USD”, “BNB-USD”, “XRP-USD”, “HYPE-USD”)
Total number of available markets
Market Data Details
Mark Price
The mark price is derived from HyperLiquid’s price feed and used for:
PnL calculations : Determining unrealized profit/loss
Liquidation triggers : Comparing against liquidation prices
Position sizing : Calculating position values
Fee calculations : Basis for trading fees
Asymmetric Funding Rates
Strike Protocol uses an innovative asymmetric funding system:
How It Works
Different rates : Long and short positions may have different funding rates
OI-based : Rates determined by open interest imbalance
Balancing mechanism : Encourages balance between long/short positions
Zero gas : Completely off-chain, no transaction costs
Rate Interpretation
Positive rate : Position pays funding to the other side
Negative rate : Position receives funding from the other side
Magnitude : Higher absolute values indicate greater imbalance
Example Scenarios
Long-Heavy Market (More long than short OI):
Long Rate: +0.000125 (longs pay funding)
Short Rate: -0.000075 (shorts receive funding)
Short-Heavy Market (More short than long OI):
Long Rate: -0.000050 (longs receive funding)
Short Rate: +0.000100 (shorts pay funding)
Open Interest Analysis
Market Balance
OI Imbalance = |Long OI - Short OI| / Total OI
Balanced market : Imbalance < 20%
Moderate imbalance : 20% - 40%
High imbalance : > 40%
Liquidity Indicators
High total OI : Indicates active, liquid market
Balanced OI : Suggests healthy two-sided interest
Growing OI : May indicate increasing volatility
Volume Metrics
24-hour volume provides insights into:
Market activity : Higher volume = more active trading
Liquidity depth : Volume relative to OI
Interest trends : Growing or declining activity
Volatility potential : High volume often precedes price moves
Use Cases
Trading Strategy
Market selection : Choose markets with good liquidity and volume
Trend analysis : Identify markets with growing interest
Funding optimization : Select positions based on favorable funding rates
Risk assessment : Avoid highly imbalanced or low-volume markets
Risk Management
Liquidity assessment : Ensure adequate volume for position sizes
Funding cost planning : Factor funding rates into position planning
Market health monitoring : Track OI and volume trends
Diversification : Spread positions across multiple active markets
Analytics and Research
Market comparison : Compare metrics across different assets
Historical trends : Track changes in OI, volume, and funding
Arbitrage opportunities : Identify funding rate arbitrage
Market timing : Use funding and OI data for entry/exit timing
Error Responses
Market data service temporarily unavailable {
"error" : 503 ,
"message" : "Market data service temporarily unavailable"
}
Usage Examples
Market Overview Dashboard
async function getMarketOverview () {
const response = await fetch ( 'https://api.strike.markets/markets' );
const markets = await response . json ();
return markets . map ( market => ({
symbol: market . symbol ,
price: parseFloat ( market . markPrice ),
volume24h: parseFloat ( market . volume24h ),
totalOI: parseFloat ( market . openInterest . total ),
imbalance: calculateOIImbalance ( market . openInterest ),
fundingBalance: calculateFundingBalance ( market . fundingRate )
}));
}
function calculateOIImbalance ( oi ) {
const longOI = parseFloat ( oi . long );
const shortOI = parseFloat ( oi . short );
const total = parseFloat ( oi . total );
return Math . abs ( longOI - shortOI ) / total * 100 ;
}
function calculateFundingBalance ( funding ) {
const longRate = parseFloat ( funding . longRate );
const shortRate = parseFloat ( funding . shortRate );
// Negative values mean receiving funding
if ( longRate < 0 && shortRate > 0 ) return 'LONG_FAVORED' ;
if ( longRate > 0 && shortRate < 0 ) return 'SHORT_FAVORED' ;
return 'BALANCED' ;
}
Best Markets for Trading
async function findBestTradingMarkets () {
const response = await fetch ( 'https://api.strike.markets/markets' );
const markets = await response . json ();
// Score markets based on multiple factors
const scoredMarkets = markets . map ( market => {
const volume = parseFloat ( market . volume24h );
const totalOI = parseFloat ( market . openInterest . total );
const imbalance = calculateOIImbalance ( market . openInterest );
// Scoring criteria (higher is better)
const volumeScore = Math . min ( volume / 1000000 , 50 ); // Cap at 50M
const liquidityScore = Math . min ( totalOI / 100000 , 50 ); // Cap at 100M
const balanceScore = Math . max ( 0 , 50 - imbalance ); // Penalize imbalance
const totalScore = volumeScore + liquidityScore + balanceScore ;
return {
symbol: market . symbol ,
score: totalScore ,
volume: volume ,
openInterest: totalOI ,
imbalance: imbalance ,
recommendation: getRecommendation ( totalScore )
};
});
return scoredMarkets . sort (( a , b ) => b . score - a . score );
}
function getRecommendation ( score ) {
if ( score > 120 ) return 'EXCELLENT' ;
if ( score > 80 ) return 'GOOD' ;
if ( score > 40 ) return 'FAIR' ;
return 'CAUTION' ;
}
Funding Rate Opportunities
async function findFundingOpportunities () {
const response = await fetch ( 'https://api.strike.markets/markets' );
const markets = await response . json ();
const opportunities = [];
markets . forEach ( market => {
const longRate = parseFloat ( market . fundingRate . longRate );
const shortRate = parseFloat ( market . fundingRate . shortRate );
// Look for significant funding arbitrage opportunities
const longAnnualized = longRate * 8760 ; // 24 * 365 (hourly to annual)
const shortAnnualized = shortRate * 8760 ;
if ( longAnnualized < - 0.1 ) { // Longs receive > 10% annually
opportunities . push ({
symbol: market . symbol ,
side: 'LONG' ,
hourlyRate: longRate ,
annualizedRate: longAnnualized ,
description: `Long positions receive ${ Math . abs ( longAnnualized * 100 ). toFixed ( 2 ) } % annually`
});
}
if ( shortAnnualized < - 0.1 ) { // Shorts receive > 10% annually
opportunities . push ({
symbol: market . symbol ,
side: 'SHORT' ,
hourlyRate: shortRate ,
annualizedRate: shortAnnualized ,
description: `Short positions receive ${ Math . abs ( shortAnnualized * 100 ). toFixed ( 2 ) } % annually`
});
}
});
return opportunities . sort (( a , b ) => a . annualizedRate - b . annualizedRate );
}
Market Health Monitor
class MarketHealthMonitor {
constructor () {
this . previousData = null ;
this . alerts = [];
}
async checkMarketHealth () {
const response = await fetch ( 'https://api.strike.markets/markets' );
const currentData = await response . json ();
if ( this . previousData ) {
this . compareAndAlert ( this . previousData , currentData );
}
this . previousData = currentData ;
return this . generateHealthReport ( currentData );
}
compareAndAlert ( previous , current ) {
current . forEach (( market , index ) => {
const prevMarket = previous [ index ];
if ( ! prevMarket || prevMarket . symbol !== market . symbol ) return ;
const volumeChange = ( parseFloat ( market . volume24h ) - parseFloat ( prevMarket . volume24h )) / parseFloat ( prevMarket . volume24h );
const oiChange = ( parseFloat ( market . openInterest . total ) - parseFloat ( prevMarket . openInterest . total )) / parseFloat ( prevMarket . openInterest . total );
if ( volumeChange > 0.5 ) { // 50% volume increase
this . alerts . push ({
type: 'VOLUME_SPIKE' ,
symbol: market . symbol ,
change: volumeChange ,
message: ` ${ market . symbol } volume increased by ${ ( volumeChange * 100 ). toFixed ( 1 ) } %`
});
}
if ( Math . abs ( oiChange ) > 0.3 ) { // 30% OI change
this . alerts . push ({
type: 'OI_CHANGE' ,
symbol: market . symbol ,
change: oiChange ,
message: ` ${ market . symbol } open interest ${ oiChange > 0 ? 'increased' : 'decreased' } by ${ Math . abs ( oiChange * 100 ). toFixed ( 1 ) } %`
});
}
});
}
generateHealthReport ( markets ) {
const totalVolume = markets . reduce (( sum , m ) => sum + parseFloat ( m . volume24h ), 0 );
const totalOI = markets . reduce (( sum , m ) => sum + parseFloat ( m . openInterest . total ), 0 );
const avgImbalance = markets . reduce (( sum , m ) => sum + calculateOIImbalance ( m . openInterest ), 0 ) / markets . length ;
return {
timestamp: new Date (). toISOString (),
summary: {
totalMarkets: markets . length ,
totalVolume: totalVolume ,
totalOpenInterest: totalOI ,
averageImbalance: avgImbalance
},
markets: markets . map ( m => ({
symbol: m . symbol ,
health: this . assessMarketHealth ( m ),
metrics: {
price: parseFloat ( m . markPrice ),
volume: parseFloat ( m . volume24h ),
openInterest: parseFloat ( m . openInterest . total ),
imbalance: calculateOIImbalance ( m . openInterest )
}
})),
alerts: this . alerts . splice ( 0 ) // Return and clear alerts
};
}
assessMarketHealth ( market ) {
const volume = parseFloat ( market . volume24h );
const oi = parseFloat ( market . openInterest . total );
const imbalance = calculateOIImbalance ( market . openInterest );
let score = 0 ;
if ( volume > 5000000 ) score += 3 ; // High volume
else if ( volume > 1000000 ) score += 2 ; // Medium volume
else if ( volume > 100000 ) score += 1 ; // Low volume
if ( oi > 1000000 ) score += 3 ; // High OI
else if ( oi > 500000 ) score += 2 ; // Medium OI
else if ( oi > 100000 ) score += 1 ; // Low OI
if ( imbalance < 20 ) score += 2 ; // Well balanced
else if ( imbalance < 40 ) score += 1 ; // Moderate imbalance
if ( score >= 7 ) return 'EXCELLENT' ;
if ( score >= 5 ) return 'GOOD' ;
if ( score >= 3 ) return 'FAIR' ;
return 'POOR' ;
}
}
Integration Patterns
Real-time Market Data Feed
class MarketDataFeed {
constructor ( updateInterval = 5000 ) {
this . updateInterval = updateInterval ;
this . subscribers = [];
this . isRunning = false ;
this . currentData = null ;
}
subscribe ( callback ) {
this . subscribers . push ( callback );
// Send current data immediately if available
if ( this . currentData ) {
callback ( this . currentData );
}
return () => {
this . subscribers = this . subscribers . filter ( cb => cb !== callback );
};
}
async start () {
if ( this . isRunning ) return ;
this . isRunning = true ;
await this . fetchAndNotify ();
this . timer = setInterval (() => {
this . fetchAndNotify ();
}, this . updateInterval );
}
stop () {
this . isRunning = false ;
if ( this . timer ) {
clearInterval ( this . timer );
}
}
async fetchAndNotify () {
try {
const response = await fetch ( 'https://api.strike.markets/markets' );
const data = await response . json ();
this . currentData = data ;
this . notifySubscribers ( data );
} catch ( error ) {
console . error ( 'Failed to fetch market data:' , error );
this . notifySubscribers ({ error: 'Failed to fetch market data' });
}
}
notifySubscribers ( data ) {
this . subscribers . forEach ( callback => {
try {
callback ( data );
} catch ( error ) {
console . error ( 'Error in market data subscriber:' , error );
}
});
}
}
// Usage
const marketFeed = new MarketDataFeed ();
marketFeed . subscribe (( data ) => {
if ( data . error ) {
console . error ( 'Market data error:' , data . error );
return ;
}
console . log ( 'Market data updated:' , data . length , 'markets' );
updateMarketDisplay ( data );
});
marketFeed . start ();
Caching Strategy
Market data changes frequently but not constantly:
class MarketDataCache {
constructor ( ttl = 5000 ) { // 5 second TTL
this . data = null ;
this . timestamp = 0 ;
this . ttl = ttl ;
}
async getMarkets () {
const now = Date . now ();
if ( this . data && ( now - this . timestamp ) < this . ttl ) {
return this . data ;
}
const response = await fetch ( 'https://api.strike.markets/markets' );
const data = await response . json ();
this . data = data ;
this . timestamp = now ;
return data ;
}
invalidate () {
this . data = null ;
this . timestamp = 0 ;
}
}
Best Practices
Data Usage
Regular updates : Refresh market data every 5-30 seconds for active applications
Error handling : Gracefully handle service unavailability
Caching : Implement appropriate caching to reduce API load
Selective updates : Only update UI elements that have actually changed
Trading Applications
Price validation : Use mark prices for accurate position valuation
Funding awareness : Factor funding rates into trading decisions
Liquidity checks : Ensure adequate volume for planned position sizes
Market health : Avoid markets with concerning metrics
Risk Management
OI monitoring : Track open interest changes for market stress indicators
Volume alerts : Monitor for unusual volume spikes or drops
Funding extremes : Be cautious of markets with extreme funding rates
Market diversification : Don’t concentrate risk in markets with poor health scores
Use this endpoint as your primary market data source. The consolidated view makes it perfect for market overviews, trading dashboards, and market selection algorithms.
Market data is updated in real-time from HyperLiquid price feeds. Funding rates and open interest are calculated continuously based on current protocol state.
Markets retrieved successfully