> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octav.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Nav

> Retrieve Net Asset Value of any address

Get the Net Asset Value of an address across multiple chains.

<Note>
  **Interactive Playground:** Test this endpoint in the [API Playground](/api-reference/nav). Get your API key at [data.octav.fi](https://data.octav.fi/)
</Note>

<Info>
  **Cost:** 1 credit per call
</Info>

***

## Endpoint

<CodeGroup>
  ```bash Request theme={null}
  GET https://api.octav.fi/v1/nav
  ```

  ```bash Example theme={null}
  curl -X GET "https://api.octav.fi/v1/nav?addresses=0x6426af179aabebe47666f345d69fd9079673f6cd" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

***

## Parameters

<ParamField query="addresses" type="string" required>
  EVM or SOL wallet address to retrieve net asset value data for

  ```
  addresses=0x6426af179aabebe47666f345d69fd9079673f6cd
  ```
</ParamField>

<ParamField query="waitForSync" type="boolean" default="false">
  Wait for fresh data if cache is stale

  * `false`: Return cached data immediately (recommended)
  * `true`: Wait for sync if data is older than 1 minute
</ParamField>

<ParamField query="currency" type="string" default="USD">
  Currency in which to return the Net Asset Value

  **Fiat currencies:** `USD`, `EUR`, `CAD`, `AED`, `CHF`, `SGD`

  **Crypto currencies:** `ETH`, `SOL`, `cbBTC`, `EURC`, `BNB`

  When a crypto currency is specified, the NAV is converted using on-chain conversion rates from each portfolio's holdings, with a weighted average price across wallets.

  ```
  currency=EUR
  ```
</ParamField>

***

## Response

<ResponseField name="nav" type="number">
  The Net Asset Value in the requested currency
</ResponseField>

<ResponseField name="currency" type="string">
  The currency code of the returned value (e.g., USD, EUR, ETH)
</ResponseField>

<ResponseField name="conversionPrice" type="number">
  The conversion price used to calculate the NAV. For fiat currencies, this is the exchange rate from USD. For crypto currencies, this is the weighted average price in USD across all queried wallets.
</ResponseField>

***

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.octav.fi/v1/nav?addresses=0x6426af179aabebe47666f345d69fd9079673f6cd" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const address = '0x6426af179aabebe47666f345d69fd9079673f6cd';

  const response = await fetch(
    `https://api.octav.fi/v1/nav?addresses=${address}`,
    {
      headers: {
        'Authorization': `Bearer ${apiKey}`
      }
    }
  );

  const data = await response.json();
  console.log(`Net Asset Value: ${data.currency} ${data.nav}`);
  ```

  ```python Python theme={null}
  import requests

  address = '0x6426af179aabebe47666f345d69fd9079673f6cd'

  response = requests.get(
      'https://api.octav.fi/v1/nav',
      params={
          'addresses': address
      },
      headers={'Authorization': f'Bearer {api_key}'}
  )

  data = response.json()
  print(f"Net Worth: {data['currency']} {data['nav']}")
  ```

  ```typescript TypeScript theme={null}
  interface NavResponse {
    nav: number;
    currency: string;
    conversionPrice: number;
  }

  const address = '0x6426af179aabebe47666f345d69fd9079673f6cd';

  const response = await fetch(
    `https://api.octav.fi/v1/nav?addresses=${address}`,
    {
      headers: {
        'Authorization': `Bearer ${apiKey}`
      }
    }
  );

  const data: NavResponse = await response.json();
  console.log(`Net Asset Value: ${data.currency} ${data.nav}`);
  ```
</CodeGroup>

***

## Example Response

<Accordion title="View Full Response" icon="code">
  ```json USD (default) theme={null}
  {
    "nav": 1235564.43434,
    "currency": "USD",
    "conversionPrice": 1
  }
  ```

  ```json ETH theme={null}
  {
    "nav": 617.78,
    "currency": "ETH",
    "conversionPrice": 2000.12
  }
  ```
</Accordion>

***

## Data Freshness

The Nav endpoint uses intelligent caching to balance data freshness with performance:

<AccordionGroup>
  <Accordion title="How Caching Works" icon="clock">
    **Cache Duration:** 1 minute

    **When data is less than 1 minute old:**

    * Cached data returned immediately
    * Response time: under 100ms

    **When data is more than 1 minute old:**

    * Cached data returned immediately
    * Background sync initiated for next request
    * Next request gets fresh data

    **With waitForSync=true:**

    * Waits for sync if data is stale
    * Returns data less than 1 minute old
    * Response time: Variable (1-10 seconds)
  </Accordion>

  <Accordion title="Best Practices" icon="lightbulb">
    **For most use cases:**

    * Use default `waitForSync=false`
    * Data fresher than 1 minute is sufficient
    * Fast response times

    **For real-time tracking:**

    * Set `waitForSync=true` when you need the absolute latest data
    * Accept longer response times
    * Consider rate limits

    **For background updates:**

    * Call endpoint periodically to keep cache warm
    * Background sync ensures next request is fresh
  </Accordion>
</AccordionGroup>

## Error Responses

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    Invalid parameters provided.

    ```json theme={null}
    {
      "error": "Bad Request",
      "message": "addresses parameter is required"
    }
    ```

    **Common causes:**

    * Missing `addresses` parameter
    * Invalid address format
    * Too many addresses in single request
  </Accordion>

  <Accordion title="401 Unauthorized" icon="lock">
    Authentication failed.

    ```json theme={null}
    {
      "error": "Unauthorized",
      "message": "Invalid API key"
    }
    ```

    **Solution:** Check your API key in the Authorization header
  </Accordion>

  <Accordion title="429 Too Many Requests" icon="gauge-high">
    Rate limit exceeded.

    ```json theme={null}
    {
      "error": "Rate limit exceeded",
      "message": "You have exceeded your rate limit",
      "retry_after": 60
    }
    ```

    **Solution:** Wait for the specified time or implement retry logic
  </Accordion>

  <Accordion title="402 Payment Required" icon="credit-card">
    Insufficient credits.

    ```json theme={null}
    {
      "error": "Insufficient credits",
      "message": "Please purchase more credits to continue"
    }
    ```

    **Solution:** Purchase more credits at [data.octav.fi](https://data.octav.fi/)
  </Accordion>
</AccordionGroup>

***

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Transactions" icon="receipt" href="/api/endpoints/transactions">
    View transaction history for these addresses
  </Card>

  <Card title="Token Overview" icon="coins" href="/api/endpoints/token-overview">
    Get detailed token breakdown by protocol
  </Card>

  <Card title="Historical Portfolio" icon="clock" href="/api/endpoints/historical-portfolio">
    View portfolio value at specific dates
  </Card>

  <Card title="Status" icon="signal" href="/api/endpoints/status">
    Check when portfolio was last synced
  </Card>
</CardGroup>
