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

# Historical Price

> Get historical BTC price data points suitable for rendering line charts. Supports time intervals from 5 minutes to monthly.

export const EndpointMeta = ({premium, cus, cusUnit, mainnetOnly}) => {
  const items = [];
  const planName = typeof premium === "string" ? premium : "Pro";
  if (premium) {
    items.push({
      icon: "\u26a0\ufe0f",
      label: "Premium endpoint",
      text: <>
          Requires the <strong>{planName} plan</strong> or above.{" "}
          <a href="/data-api/introduction/resources/premium-endpoints">
            View all
          </a>
          .
        </>
    });
  }
  if (cus) {
    const isDynamic = !!cusUnit;
    items.push({
      icon: "\u26a1",
      label: isDynamic ? "Dynamic cost" : "Endpoint cost",
      text: isDynamic ? <>
          {cus} CUs per {cusUnit}.{" "}
          <a href="/get-started/pricing#dynamic-endpoints">Learn more</a>.
        </> : <>
          {cus} CUs.{" "}
          <a href="/get-started/pricing">Learn more</a>.
        </>
    });
  }
  if (mainnetOnly) {
    items.push({
      icon: "\ud83d\udd17",
      label: "Mainnet only",
      text: <>Testnet chains are not supported.</>
    });
  }
  if (items.length === 0) return null;
  return <div className="endpoint-meta" style={{
    border: "1px solid var(--border-color, #e2e8f0)",
    borderRadius: "8px",
    overflow: "hidden",
    marginBottom: "16px",
    fontSize: "14px",
    lineHeight: "1.6",
    maxWidth: "100%"
  }}>
      <style dangerouslySetInnerHTML={{
    __html: `
            .endpoint-meta {
              --border-color: #e2e8f0;
              --row-bg: #f8fafc;
              --label-color: #0f172a;
              --text-color: #1f2937;
            }
            .endpoint-meta a {
              color: #0f7fff !important;
              text-decoration: underline;
            }
            @media (prefers-color-scheme: dark) {
              .endpoint-meta {
                --border-color: #374151 !important;
                --row-bg: #1e293b !important;
                --label-color: #f9fafb !important;
                --text-color: #e5e7eb !important;
              }
              .endpoint-meta a {
                color: #60a5fa !important;
              }
            }
            html.dark .endpoint-meta,
            [data-theme="dark"] .endpoint-meta {
              --border-color: #374151 !important;
              --row-bg: #1e293b !important;
              --label-color: #f9fafb !important;
              --text-color: #e5e7eb !important;
            }
            html.dark .endpoint-meta a,
            [data-theme="dark"] .endpoint-meta a {
              color: #60a5fa !important;
            }
          `
  }} />
      {items.map((item, i) => <div key={i} style={{
    display: "flex",
    alignItems: "baseline",
    gap: "8px",
    padding: "10px 14px",
    borderBottom: i < items.length - 1 ? "1px solid var(--border-color, #e2e8f0)" : "none",
    backgroundColor: "var(--row-bg, #f8fafc)"
  }}>
          <span style={{
    flexShrink: 0
  }}>{item.icon}</span>
          <span style={{
    wordBreak: "break-word",
    color: "var(--text-color, #1f2937)"
  }}>
            <strong style={{
    color: "var(--label-color, #0f172a)"
  }}>
              {item.label}:
            </strong>{" "}
            {item.text}
          </span>
        </div>)}
    </div>;
};

<EndpointMeta cus={50} />

<Note>
  For BTC, pass `bitcoin` as `chainAlias` and `native` as `tokenAliasOrTokenAddress`.
</Note>


## OpenAPI

````yaml /openapi-files/data-api/bitcoin-api-v1.json GET /v1/chains/{chainAlias}/tokens/{tokenAliasOrTokenAddress}/price/timeseries
openapi: 3.0.0
info:
  title: Moralis Bitcoin Data API
  description: >-
    Bitcoin-scoped view of the Moralis Universal API. Every endpoint below is a
    Universal endpoint with chain inputs restricted to Bitcoin for clarity.
  version: '1.0'
servers:
  - url: https://api.moralis.com
security: []
externalDocs:
  description: Moralis API Docs
  url: https://docs.moralis.com
paths:
  /v1/chains/{chainAlias}/tokens/{tokenAliasOrTokenAddress}/price/timeseries:
    get:
      tags:
        - Tokens
      summary: Get historical BTC price time-series
      description: >-
        Get historical BTC price data points suitable for rendering line charts.
        Supports time intervals from 5 minutes to monthly.
      operationId: getTokenPriceTimeSeries
      parameters:
        - name: chainAlias
          required: true
          in: path
          description: Bitcoin chain alias. Pass `bitcoin` or `bitcoin-mainnet`.
          schema:
            type: string
            enum:
              - bitcoin
              - bitcoin-mainnet
        - name: tokenAliasOrTokenAddress
          required: true
          in: path
          description: For BTC price, pass `native`.
          examples:
            btcNative:
              value: native
          schema:
            type: string
            enum:
              - native
        - name: limit
          required: false
          in: query
          description: The limit per page
          schema:
            minimum: 1
            maximum: 100
            default: 100
            type: number
        - name: cursor
          required: false
          in: query
          description: The cursor to the next page
          schema:
            type: string
        - name: interval
          required: false
          in: query
          description: >-
            The time interval for price data points. Defaults to 5m if not
            provided.
          schema:
            default: 5m
            example: hourly
            enum:
              - 5m
              - hourly
              - daily
              - weekly
              - monthly
            type: string
        - name: fromDate
          required: false
          in: query
          description: >-
            The starting date (format in seconds or datestring accepted by
            momentjs). Defaults to 24 hours before toDate if not provided.
          schema:
            example: '2025-01-01T00:00:00Z'
            type: string
        - name: toDate
          required: false
          in: query
          description: >-
            The ending date (format in seconds or datestring accepted by
            momentjs). Defaults to now if not provided.
          schema:
            example: '2025-01-07T00:00:00Z'
            type: string
        - name: forwardFill
          required: false
          in: query
          description: When true, fills gaps in the time series with interpolated values
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTokenPriceTimeSeriesResponseDto'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetTokenPriceTimeSeriesResponseDto:
      type: object
      properties:
        cursor:
          type: string
          description: The cursor to be used for getting the next page of results
          nullable: true
          example: eyJhbGciOi...VCaaw
        chain:
          type: string
          description: The blockchain network chain ID
          example: bitcoin
        fromDate:
          type: string
          description: The starting date of the time series in ISO 8601 format
          example: '2025-01-01T00:00:00.000Z'
        toDate:
          type: string
          description: The ending date of the time series in ISO 8601 format
          example: '2025-01-07T00:00:00.000Z'
        interval:
          type: string
          description: The time interval used for the price data points
          enum:
            - 5m
            - hourly
            - daily
            - weekly
            - monthly
          example: 5m
        page:
          type: number
          description: The current page number
          example: 1
        result:
          description: The list of price data points
          type: array
          items:
            $ref: '#/components/schemas/PriceTimeSeriesItemDto'
        meta:
          $ref: '#/components/schemas/SingleChainResponseMetaDto'
      required:
        - cursor
        - chain
        - fromDate
        - toDate
        - interval
        - page
        - result
        - meta
    PriceTimeSeriesItemDto:
      type: object
      properties:
        timestamp:
          type: string
          description: The timestamp of the price point in ISO-8601 format
          example: '2025-01-02T09:00:00.000Z'
        price:
          type: string
          description: The price in USD at this timestamp
          example: '0.00123'
      required:
        - timestamp
        - price
    SingleChainResponseMetaDto:
      type: object
      properties:
        syncedAt:
          type: object
          description: Last ingested block number per chain ID
          additionalProperties:
            type: number
          example:
            bitcoin: latest
      required:
        - syncedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````