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

# Get asset historical balance

> Retrieves the historical balance of a specific asset in the portfolio, including the total and available balance over time.

export const RestEndpointSubjects = ({subjects = []}) => {
  const subjectToIconMap = {
    'client': 'browser',
    'user:individual': 'user',
    'user:business': 'briefcase'
  };
  if (subjects.length === 0) {
    return null;
  }
  return <>
      {subjects.map(subject => <a key={subject} href="/rest-apis/authentication#subjects" className="border-0 opacity-85 hover:opacity-100 transition-opacity">
          <Badge stroke size="lg" icon={subjectToIconMap[subject]} color="gray" className="mr-1">
            {subject}
          </Badge>
        </a>)}
    </>;
};

<RestEndpointSubjects subjects={["user:individual", "user:business"]} />

## Denomination

The `denomination` query parameter allows you to denominate rates against another asset. If no value is set for this parameter, it defaults to `USD`.

There is a specific set of assets allowed, including but not limited to: `USD`, `EUR`, `GBP`, `AUD`, `CAD`, `NZD`, `MXN`, and `BTC`. If you need a particular asset added to this list, please reach out to your Account Manager.

For a more detailed explanation of the denomination concept, check the [Core Concepts](../concepts#denomination) page.

## Interval

The `interval` query parameter determines the overall timespan of historical data and the frequency of the data points (rollup frequency).
Each interval value defines how far back in time the data spans, and how granular each returned data point is within that range:

| Interval    | Description                   | Rollup Frequency |
| :---------- | :---------------------------- | :--------------- |
| `one-hour`  | Past hour of historical data  | 30 seconds       |
| `one-day`   | Past day of historical data   | 10 minutes       |
| `one-week`  | Past week of historical data  | 1 hour           |
| `one-month` | Past month of historical data | 6 hours          |
| `one-year`  | Past year of historical data  | 2 days           |


## OpenAPI

````yaml _media/specs/core-openapi.mintlify.json get /core/portfolio/assets/{asset}/historical-balance
openapi: 3.1.0
info:
  version: 0.1.0
  title: Core API
  description: >-
    The Core API provides essential building blocks that empower businesses to
    embed financial services into their applications.
  contact:
    name: Uphold API Team
    email: developers@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: Authentication
    description: Authentication.
  - name: Countries
    description: Countries.
  - name: Users
    description: Users.
  - name: KYC
    description: Individual User's KYC.
  - name: KYB
    description: Business User's KYB.
  - name: Capabilities
    description: User capabilities.
  - name: Terms of service
    description: User terms of service.
  - name: Files
    description: Files.
  - name: Assets
    description: Assets, networks and rails.
  - name: Accounts
    description: Accounts.
  - name: External accounts
    description: External accounts.
  - name: Transactions
    description: Transactions.
  - name: Portfolio
    description: Portfolio.
  - name: Statements
    description: Statements.
  - name: Metadata
    description: Metadata.
  - name: Webhooks
    description: Webhooks.
paths:
  /core/portfolio/assets/{asset}/historical-balance:
    get:
      tags:
        - Portfolio
      summary: Get asset historical balance
      description: >-
        Retrieves the historical balance of a specific asset in the portfolio,
        including the total and available balance over time.
      operationId: core.get-portfolio-asset-historical-balance
      parameters:
        - $ref: '#/components/parameters/asset-code'
        - $ref: '#/components/parameters/denomination'
        - $ref: '#/components/parameters/portfolio-historical-balance-interval'
        - $ref: '#/components/parameters/portfolio-include-base'
      responses:
        '200':
          $ref: >-
            #/components/responses/get-portfolio-asset-historical-balance-response
        '404':
          $ref: >-
            #/components/responses/get-portfolio-asset-historical-balance-not-found-response
        '409':
          $ref: >-
            #/components/responses/get-portfolio-asset-historical-balance-conflict-response
      security:
        - OAuth2:
            - core.portfolio:read
components:
  parameters:
    asset-code:
      name: asset
      description: The asset code.
      in: path
      required: true
      schema:
        type: string
        minLength: 1
      examples:
        BTC Asset:
          value: BTC
    denomination:
      name: denomination
      description: >-
        Specifies the asset code to use as the denomination for value
        conversion. If not provided, USD is used by default.
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        default: USD
      examples:
        BTC Asset:
          value: BTC
    portfolio-historical-balance-interval:
      name: interval
      description: The interval for the portfolio historical data.
      in: query
      required: false
      schema:
        type: string
        enum:
          - one-hour
          - one-day
          - one-week
          - one-month
          - one-year
        default: one-day
    portfolio-include-base:
      name: includeBase
      description: >-
        Whether to include total and available amounts denominated in the base
        asset, in addition to the selected denomination.
      in: query
      required: false
      schema:
        type: boolean
        default: false
  responses:
    get-portfolio-asset-historical-balance-response:
      description: Portfolio asset historical balance retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              historicalBalance:
                type: array
                items:
                  $ref: '#/components/schemas/portfolio-historical-balance'
                minItems: 1
            required:
              - historicalBalance
          examples:
            Portfolio Account Historical Balance Retrieved:
              value:
                historicalBalance:
                  - timestamp: '2020-01-01T00:00:00.000Z'
                    balance:
                      total: '1000.00'
                      available: '950.00'
                  - timestamp: '2020-01-02T00:00:00.000Z'
                    balance:
                      total: '1200.00'
                      available: '1150.00'
            Portfolio Account Historical Balance With Base Asset Amounts Retrieved:
              value:
                historicalBalance:
                  - timestamp: '2020-01-01T00:00:00.000Z'
                    balance:
                      total: '1600.83'
                      available: '1500.83'
                      baseTotal: '0.01493'
                      baseAvailable: '0.01399'
                  - timestamp: '2020-01-02T00:00:00.000Z'
                    balance:
                      total: '1800.50'
                      available: '1750.00'
                      baseTotal: '0.01679'
                      baseAvailable: '0.01632'
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-asset-historical-balance-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Asset Not Found:
              value:
                code: entity_not_found
                message: The asset cannot be found
                details:
                  entity: asset
            Denomination Asset Not Found:
              value:
                code: entity_not_found
                message: The denomination asset cannot be found
                details:
                  context: query
                  property: denomination
                  entity: asset
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-asset-historical-balance-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Supported:
              value:
                code: asset_not_supported
                message: The denomination asset is not supported
                details:
                  context: query
                  property: denomination
                  entity: asset
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
  schemas:
    portfolio-historical-balance:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: The timestamp for the balance entry.
        balance:
          type: object
          properties:
            total:
              type: string
              description: The total balance at the given timestamp.
            available:
              type: string
              description: The available balance at the given timestamp.
            baseTotal:
              type: string
              description: Base asset total amount.
            baseAvailable:
              type: string
              description: Base asset available amount.
          required:
            - total
            - available
      required:
        - timestamp
    error:
      description: The error information.
      type: object
      properties:
        code:
          description: >-
            A short string with a brief explanation about the error code
            reported.
          type: string
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional information about the error reported.
          type: object
          additionalProperties: true
      required:
        - code
        - message
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            core.users:act-on-behalf-of: Grants access to act on behalf of a user
            core.users:create: Grants access to create users
            core.users:read: Grants access to view users
            core.users:delete: Grants access to delete users
            core.users.metadata:read: Grants access to view user metadata
            core.users.metadata:write: Grants access to modify user metadata
            core.kyc:read: Grants access to view KYC processes
            core.kyc.profile:update: Grants access to update profile KYC process
            core.kyc.address:update: Grants access to update address KYC process
            core.kyc.email:update: Grants access to update email KYC process
            core.kyc.phone:update: Grants access to update phone KYC process
            core.kyc.identity:update: Grants access to update identity KYC process
            core.kyc.proof-of-address:update: Grants access to update proof-of-address KYC process
            core.kyc.customer-due-diligence:update: Grants access to update customer due diligence KYC process
            core.kyc.enhanced-due-diligence:update: Grants access to update enhanced due diligence KYC process
            core.kyc.crypto-risk-assessment:update: Grants access to update crypto risk assessment KYC process
            core.kyc.self-categorization-statement:update: Grants access to update self-categorization statement KYC process
            core.kyc.tax-details:update: Grants access to update tax details KYC process
            core.capabilities:read: Grants access to view user capabilities
            core.terms-of-service:read: Grants access to view terms of service
            core.terms-of-service:accept: Grants access to accept terms of service
            core.files:create: Grants access to create files
            core.files:read: Grants access to view files
            core.files.metadata:read: Grants access to view files metadata
            core.files.metadata:write: Grants access to modify files metadata
            core.accounts:create: Grants access to create accounts
            core.accounts:read: Grants access to view accounts
            core.accounts:update: Grants access to update accounts
            core.accounts:archive: Grants access to archive accounts
            core.accounts:deposit-method: >-
              Grants access to deposit method needed for depositing into
              accounts
            core.accounts:use-test-helpers: Grants access to test helpers of accounts
            core.accounts.metadata:read: Grants access to view accounts metadata
            core.accounts.metadata:write: Grants access to modify accounts metadata
            core.assets:use-test-helpers: Grants access to test helpers of assets
            core.external-accounts:create: Grants access to create external accounts
            core.external-accounts:read: Grants access to view external accounts
            core.external-accounts:update: Grants access to update external accounts
            core.external-accounts:delete: Grants access to delete external accounts
            core.external-accounts.metadata:read: Grants access to view external accounts metadata
            core.external-accounts.metadata:write: Grants access to modify external accounts metadata
            core.transactions:create: Grants access to commit quotes
            core.transactions:read: Grants access to view transactions
            core.transactions.metadata:read: Grants access to view transactions metadata
            core.transactions.metadata:write: Grants access to modify transactions metadata
            core.transactions.requests-for-information:read: Grants access to view transactions requests for information
            core.transactions.requests-for-information:update: Grants access to update transactions requests for information
            core.portfolio:read: >-
              Grants access to view portfolio overview, performance, and
              historical balance
            core.statements:read: Grants access to read statements
            core.webhooks:management-link: Grants access to create webhook management links

````