Docs

meta - HyperCore Info Endpoint

Get perpetual market metadata for Hyperliquid and HIP3 perp DEXs, including leverage limits, decimal precision, margin tables, and platform-level market state flags.

Get metadata for all available perpetual futures trading pairs on Hyperliquid, including leverage limits, decimal precision, margin requirements, and additional platform-level state such as open-interest cap markers and external pricing hints.

Perpetual Futures Metadata

This endpoint returns metadata for perpetual futures markets. For spot trading metadata, see spotMeta.

Example Perpetual Market Entry

The live meta response currently returns the same core fields for mainnet perpetual markets, including size precision, leverage limits, and the associated margin table:

JSON
{
  "szDecimals": 5,
  "name": "BTC",
  "maxLeverage": 40,
  "marginTableId": 56
}

Why Hyperliquid? Build on the trading-focused EVM and HyperCore ecosystem built for onchain perpetuals and market data with HyperCore market structure, sub-second finality, and direct access to trading-focused data services.

Authenticate HyperCore Info requests by sending your Dwellir API key in the x-api-key header to https://api-hyperliquid-mainnet-info.n.dwellir.com/info.

When to Use This Endpoint

The meta endpoint is essential for derivatives traders, trading platforms, and market data providers who need to:

  • Validate Order Parameters — Ensure orders comply with leverage and size requirements
  • Build Trading Interfaces — Display available markets with correct decimal precision
  • Market Discovery — List all tradeable perpetual contracts
  • Risk Management — Monitor leverage limits and margin requirements
  • Platform State Awareness — Detect markets that are at open-interest caps or have external pricing metadata attached

Common Use Cases

1. Validate Order Leverage

Check if an order's leverage is within allowed limits:

JavaScript
async function validateLeverage(asset, leverage) {
  const meta = await getMeta();
  const assetMeta = meta.universe.find(m => m.name === asset);

  if (!assetMeta) {
    throw new Error(`Asset ${asset} not found`);
  }

  if (leverage > assetMeta.maxLeverage) {
    throw new Error(
      `Leverage ${leverage}x exceeds maximum ${assetMeta.maxLeverage}x for ${asset}`
    );
  }

  return true;
}

2. Format Position Sizes

Format position sizes with correct decimal precision:

JavaScript
function formatSize(asset, size, meta) {
  const assetMeta = meta.universe.find(m => m.name === asset);
  if (!assetMeta) return size.toString();

  return size.toFixed(assetMeta.szDecimals);
}

// Usage
const meta = await getMeta();
console.log(formatSize('BTC', 0.123456, meta)); // "0.12345"
console.log(formatSize('ETH', 1.23456, meta));  // "1.2346"

3. Build Market Selector UI

Create a market selector with leverage information:

JavaScript
async function getMarketList() {
  const meta = await getMeta();

  return meta.universe.map(market => ({
    symbol: market.name,
    maxLeverage: market.maxLeverage,
    marginType: market.onlyIsolated ? 'Isolated Only' : 'Cross/Isolated',
    decimals: market.szDecimals
  }));
}

// Usage
const markets = await getMarketList();
markets.forEach(m => {
  console.log(`${m.symbol}: ${m.maxLeverage}x leverage (${m.marginType})`);
});

4. Cache Metadata

Cache metadata to reduce API calls:

JavaScript
class MetaCache {
  constructor(ttl = 3600000) { // 1 hour default
    this.cache = null;
    this.timestamp = 0;
    this.ttl = ttl;
  }

  async get() {
    const now = Date.now();

    if (this.cache && (now - this.timestamp) < this.ttl) {
      return this.cache;
    }

    this.cache = await getMeta();
    this.timestamp = now;
    return this.cache;
  }

  invalidate() {
    this.cache = null;
    this.timestamp = 0;
  }
}

const metaCache = new MetaCache();

Best Practices

  1. Cache metadata for at least 1 hour as it changes infrequently
  2. Validate leverage before submitting orders to avoid rejections
  3. Use correct decimals when formatting position sizes
  4. Handle errors gracefully with retry logic and fallbacks
  5. Monitor rate limits to avoid service interruptions
  6. Treat the payload as extensible because additional metadata fields can appear when Hyperliquid exposes more market state

Access real-time Hyperliquid market metadata with Dwellir's HyperCore Info Endpoint. Get your API key →