Skip to main content
client.data.core.getValue aggregates a wallet’s exposure in USDC across all or selected markets.

Request

const summary = await client.data.core.getValue(params);

Parameters

NameTypeRequiredNotes
userstring (address)Wallet or proxy address.
marketstring[]Optional condition IDs to scope the calculation.

Response

type UserValue = {
  user: string;
  value: number;
};
The API returns an array, even when querying a single user/market combination.

Usage example

const [summary] = await client.data.core.getValue({
  user: "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
});

console.log(`Total position value: ${summary.value.toFixed(2)} USDC`);

Failure modes

  • Missing user → validation error.
  • Invalid condition ID → validation error referencing the offending index.