POST
/
4f8d8f4040bdacd1577bff8058438274
/
info
info (activeAssetData)
curl --request POST \
  --url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/info \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "activeAssetData",
  "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
  "coin": "BTC"
}'
{
  "position": {
    "size": "<string>",
    "entryPx": "<string>",
    "unrealizedPnl": "<string>",
    "leverage": "<string>",
    "marginUsed": "<string>"
  },
  "maxLeverage": "<string>",
  "funding": {
    "fundingRate": "<string>",
    "nextFundingTime": 123
  },
  "dayPnl": "<string>",
  "totalPnl": "<string>"
}
Retrieves active asset data for a specific user and coin, including leverage settings, trading limits, and current market price.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • type (string, required) — Must be "activeAssetData"
  • user (string, required) — Address in 42-character hexadecimal format
  • coin (string, required) — Asset symbol (e.g., “BTC”, “ETH”, “SOL”)

Returns

  • user (string) — User address
  • coin (string) — Asset symbol
  • leverage (object) — Leverage configuration:
    • type (string) — Leverage type (“cross” or “isolated”)
    • value (number) — Current leverage value
  • maxTradeSzs (array) — Maximum trade sizes [long, short]
  • availableToTrade (array) — Available amounts to trade [long, short]
  • markPx (string) — Current mark price

JavaScript example

const getActiveAssetData = async (user, coin) => {
  const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_API_KEY/info', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      type: 'activeAssetData',
      user: user,
      coin: coin
    })
  });
  
  const data = await response.json();
  return data;
};

// Usage
const assetData = await getActiveAssetData(
  '0xb65822a30bbaaa68942d6f4c43d78704faeabbbb',
  'APT'
);

console.log('Asset data:', assetData);
console.log('Current leverage:', assetData.leverage.value);
console.log('Mark price:', assetData.markPx);
console.log('Max long trade size:', assetData.maxTradeSzs[0]);
console.log('Max short trade size:', assetData.maxTradeSzs[1]);

Trading limits analysis

const analyzeTradingLimits = (assetData) => {
  const [maxLong, maxShort] = assetData.maxTradeSzs;
  const [availableLong, availableShort] = assetData.availableToTrade;
  
  return {
    coin: assetData.coin,
    markPrice: parseFloat(assetData.markPx),
    leverage: assetData.leverage,
    limits: {
      maxLongSize: parseFloat(maxLong),
      maxShortSize: parseFloat(maxShort),
      availableLongSize: parseFloat(availableLong),
      availableShortSize: parseFloat(availableShort)
    },
    utilizationRates: {
      long: (parseFloat(maxLong) - parseFloat(availableLong)) / parseFloat(maxLong),
      short: (parseFloat(maxShort) - parseFloat(availableShort)) / parseFloat(maxShort)
    }
  };
};

// Usage
const analysis = analyzeTradingLimits(assetData);
console.log('Trading analysis:', analysis);

Use cases

  • Trading interface — Display current leverage and trading limits to users
  • Risk management — Monitor available trading capacity and leverage settings
  • Position sizing — Calculate optimal position sizes based on available limits
  • Market analysis — Track mark prices and leverage utilization across assets

Body

application/json

Response

200 - application/json

Active asset data for the specified user and coin

Detailed active asset information for the user and specified coin