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

# Get historical chart/bar data for an asset



## OpenAPI

````yaml /api-reference/openapi.yaml get /assets/chart
openapi: 3.0.0
info:
  title: Bluum Finance Investment API
  version: 1.0.0
  description: >
    The Bluum Finance API provides embeddable investment experiences, allowing
    fintech partners to manage investor accounts, facilitate trading, handle
    document uploads, and manage wallet operations.


    ### Response conventions


    Every resource response carries a small, consistent set of envelope keys

    followed by domain fields:


    ```json

    {
      "id": "<prefix>_<base32>",
      "object": "<resource>",
      "created": <unix_seconds>,
      "livemode": <boolean>,
      "metadata": { ... },
      ... domain fields ...
    }

    ```


    List endpoints return:


    ```json

    {
      "object": "list",
      "url": "/v1/<resource>",
      "has_more": false,
      "data": [ <resource>... ]
    }

    ```


    Errors are wrapped in:


    ```json

    {
      "error": {
        "type": "invalid_request_error",
        "code": "BLUM-400-001",
        "message": "...",
        "param": "tax_id"
      }
    }

    ```


    See `ResourceEnvelope`, `ListEnvelope`, and `ErrorEnvelope` in

    `shared-schemas.yaml` for the full schemas.


    ### Product entitlements


    Core investing (accounts, funding, trading, positions, documents,

    webhooks) is available to every tenant. Three surfaces are add-on products

    that must be enabled for your tenant before use:


    - **Market Data** — `/v1/market-data/*`

    - **Cash Management** — `/v1/cash-management/*`


    Calling a disabled product returns HTTP `403` with the legacy

    `{ "status": "error", "code": "PRODUCT_NOT_ENABLED", "message": "..." }`

    body (not the standard error envelope). Contact your Bluum account manager

    to enable a product.


    ### Field naming


    - snake_case throughout (no camelCase)

    - `email` / `phone` (not `email_address` / `phone_number`)

    - `first_name` / `middle_name` / `last_name` (not `given_name` /
    `family_name`)

    - `address: { street: [string], unit?, city, state?, postal_code?, country
    }`
      (the `street` array form preserves multi-line addresses; ISO 3166-1
      alpha-2 country code on `address.country` and on the top-level
      `country_of_*` fields)
    - `quantity` (not `qty`)

    - Status enums are lowercase Bluum-native vocabulary (e.g. `pending` /
    `filled` / `cancelled` / `failed`)


    Regulatory vocabulary (CAIS / FINRA / IRS / FATF) is preserved verbatim

    (e.g. `tax_id_type`, `country_of_tax_residence`, `is_politically_exposed`,

    `funding_source`).


    ### Terminology


    The investor resource lives at `/v1/investors`. Path parameter is

    `investor_id`.


    ### Asset classification


    Assets carry a canonical `(class, country)` pair:

    - `class`: `equity` | `etf` | `bond` | `bill` | `note` | `mutual_fund` |
      `derivative` | `cryptocurrency` | `commodity` | `real_estate` | `cash`
    - `country`: ISO 3166-1 alpha-2, lower-case (`us`, `ng`, …). Null for
      country-agnostic instruments (most crypto).

    ### Fixed income (bonds)


    Bond orders use the same `POST /v1/investors/{investor_id}/orders`

    endpoint as equities, with bond-specific semantics:

    - `quantity` carries **face value** (e.g. `"10000"` for $10k face),
      and must be a multiple of the bond's `min_increment`.
    - `limit_price` is quoted as **% of par** (e.g. `"99.875"` = 99.875%
      of face value).
    - `settlement_date` is optional; defaults to T+1 for US treasuries
      and T+2 for corporates.
    - Bond quote responses (`/v1/market-data/assets/{symbol}/quote`)
      include a `bond` block with clean/dirty price, accrued interest,
      and yield to maturity.

    Bond trading must be explicitly enabled on the tenant before orders

    will route. Contact Bluum support to flip `fixedIncomeEnabled`.


    ### Authentication


    HTTP Basic Authentication. **API Key** is the username, **API Secret** is

    the password. Base64-encode `API_KEY:API_SECRET` and send in the

    `Authorization` header.
servers:
  - url: https://api.bluumfinance.com/v1
    description: Production Environment
  - url: https://sandbox.api.bluumfinance.com/v1
    description: Sandbox/Testing Environment
  - url: https://service.bluumfinance.com/v1
    description: Production Environment (legacy alias)
  - url: https://test-service.bluumfinance.com/v1
    description: Sandbox/Testing Environment (legacy alias)
security:
  - BluumApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Investors
    description: Create and manage investor accounts, wallets, and transactions.
  - name: API Keys
    description: Mint, list, and revoke investor-scoped API keys for programmatic access.
  - name: Compliance
    description: Investor compliance workflows, KYC checks, and document submissions.
  - name: Transfers
    description: Deposit and withdrawal operations for investor wallets.
  - name: Funding Sources
    description: Connect and manage external funding sources (Plaid, bank accounts).
  - name: Trading
    description: Place, list, and cancel investor orders.
  - name: Positions
    description: View investor portfolio positions.
  - name: Assets
    description: Search and retrieve asset reference data.
  - name: Document Management
    description: Upload, list, and download documents.
  - name: Markets
    description: Market reference data, status, calendar, and halts.
  - name: Market Data
    description: Real-time quotes, snapshots, and historical bars (paywalled product).
  - name: Webhooks
    description: Register and manage webhook endpoints for event delivery.
  - name: Disclosures
    description: >-
      Partner-facing disclosure library (verbatim regulated copy, PDFs) +
      per-investor acceptance trail.
  - name: Cash Sweep
    description: >-
      High Yield Cash (HYC) / FDIC Bank Sweep enrollment, tier management, and
      interest reporting.
  - name: Cash Management
    description: >-
      Multi-currency, zero-day-liquidity yield on cash — programs, eligibility,
      enrollment, sweeps, withdrawals, earnings.
paths:
  /assets/chart:
    get:
      tags:
        - Assets
      summary: Get historical chart/bar data for an asset
      operationId: getChart
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            type: string
          description: Asset ticker symbol (e.g., AAPL, MSFT, BTCUSD)
          example: AAPL
        - name: timeframe
          in: query
          required: true
          schema:
            type: string
            enum:
              - 1Min
              - 5Min
              - 15Min
              - 30Min
              - 1Hour
              - 1Day
              - 1Week
              - 1Month
          description: Bar timeframe
          example: 1Day
        - name: start
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Start date/time (ISO 8601 format). If not provided, returns most
            recent bars up to limit.
          example: '2025-01-01T00:00:00Z'
        - name: end
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: End date/time (ISO 8601 format). If not provided, uses current time.
          example: '2025-01-31T23:59:59Z'
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10000
            default: 100
          description: Maximum number of bars to return. Defaults to 100, maximum is 10000.
        - name: adjustment
          in: query
          required: false
          schema:
            type: string
            enum:
              - raw
              - split
              - dividend
              - all
            default: raw
          description: >-
            Corporate action adjustment. 'raw' = no adjustment, 'split' = split
            adjusted, 'dividend' = dividend adjusted, 'all' = both adjusted.
        - name: feed
          in: query
          required: false
          schema:
            type: string
            enum:
              - iex
              - sip
              - otc
            default: iex
          description: >-
            Data feed source. 'iex' = IEX (free), 'sip' = SIP (premium), 'otc' =
            OTC.
      responses:
        '200':
          description: Chart data with historical bars
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetChartResource'
              examples:
                daily_chart:
                  summary: Daily chart data for AAPL
                  value:
                    object: asset_chart
                    livemode: false
                    symbol: AAPL
                    bars:
                      - timestamp: '2025-01-15T16:00:00Z'
                        open: 175.25
                        high: 177.5
                        low: 174.8
                        close: 176.75
                        volume: 5000000
                        tradeCount: 12500
                        volumeWeightedAveragePrice: 176.2
                      - timestamp: '2025-01-14T16:00:00Z'
                        open: 174
                        high: 175.5
                        low: 173.5
                        close: 175.25
                        volume: 4800000
                        tradeCount: 12000
                        volumeWeightedAveragePrice: 174.75
                      - timestamp: '2025-01-13T16:00:00Z'
                        open: 173.5
                        high: 174.8
                        low: 172.9
                        close: 174
                        volume: 5200000
                        tradeCount: 13000
                        volumeWeightedAveragePrice: 173.9
                    nextPageToken: null
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    AssetChartResource:
      description: 'Envelope-wrapped legacy chart response (object: asset_chart).'
      allOf:
        - $ref: '#/components/schemas/ResourceEnvelope'
        - $ref: '#/components/schemas/ChartResponse'
    ResourceEnvelope:
      type: object
      description: |
        Resource envelope. Domain fields are spread after the
        envelope keys (`id`, `object`, `created`, `livemode`, `metadata`).
        Some Bluum-original resources may emit only `object` + `livemode`
        without `id` / `created` (e.g. one-off action results).
      required:
        - object
        - livemode
      additionalProperties: true
      properties:
        id:
          type: string
          description: Prefixed public id (e.g. `inv_…`, `ord_…`, `dep_…`).
          example: inv_01j9x8m2k7qpzwv3t5r6y8n0ab
        object:
          type: string
          description: The resource type discriminator.
          example: investor
        created:
          type: integer
          nullable: true
          description: Unix-seconds timestamp of resource creation.
          example: 1747776000
        livemode:
          type: boolean
          description: |
            Whether this resource was created against a live API key.
            Test-mode keys always return `false`.
          example: false
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Partner-set key/value map for cross-referencing.
    ChartResponse:
      type: object
      properties:
        symbol:
          type: string
          description: Asset ticker symbol
          example: AAPL
        bars:
          type: array
          items:
            $ref: '#/components/schemas/ChartBar'
          description: Array of historical bars
        nextPageToken:
          type: string
          nullable: true
          description: Token for pagination to get next page of results.
          example: >-
            eyJpZCI6IjIwMjUtMDEtMTVUMTY6MDA6MDBaIiwiY3JlYXRlZEF0IjoiMjAyNS0wMS0xNVQxNjowMDowMFoifQ
      required:
        - symbol
        - bars
    ErrorEnvelope:
      type: object
      description: |
        Error envelope. The Bluum-specific `BLUM-XXX-XXX`
        code is carried in `error.code`; `error.type` is the broad
        category clients branch on.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - not_found_error
                - conflict_error
                - idempotency_error
                - rate_limit_error
                - api_error
              example: invalid_request_error
            code:
              type: string
              description: The Bluum-specific error code.
              example: BLUM-400-001
            message:
              type: string
              description: Developer-facing message.
            param:
              type: string
              description: Field path of the invalid input.
              example: tax_id
            doc_url:
              type: string
              format: uri
              example: https://docs.bluum.finance/errors/BLUM-400-001
            request_log_url:
              type: string
              format: uri
              description: Deep link to the request log in the partner dashboard.
    ChartBar:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Bar timestamp (ISO 8601 format)
          example: '2025-01-15T16:00:00Z'
        open:
          type: number
          description: Opening price
          example: 150.25
        high:
          type: number
          description: Highest price
          example: 152.5
        low:
          type: number
          description: Lowest price
          example: 149.8
        close:
          type: number
          description: Closing price
          example: 151.75
        volume:
          type: integer
          description: Trading volume
          example: 5000000
        tradeCount:
          type: integer
          description: Number of trades (optional)
          example: 12500
        volumeWeightedAveragePrice:
          type: number
          description: Volume weighted average price (optional)
          example: 151.2
      required:
        - timestamp
        - open
        - high
        - low
        - close
        - volume
  responses:
    BadRequestError:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              type: invalid_request_error
              code: BLUM-400-002
              message: Required field 'symbol' is missing.
              param: symbol
    UnauthorizedError:
      description: Authentication information is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              type: authentication_error
              code: BLUM-401-001
              message: Missing or invalid Authorization header.
    InternalServerError:
      description: An internal server error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              type: api_error
              code: BLUM-500-001
              message: An internal server error occurred. Please try again later.
  securitySchemes:
    BluumApiKeyAuth:
      type: http
      scheme: basic
      description: >
        HTTP Basic Authentication using the **API Key** as username and **API
        Secret** as password.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication

````