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

> Get historical Bitcoin price data at a specific timestamp for market analysis and portfolio tracking.

# BTC price by timestamp



## OpenAPI

````yaml bitcoin/market-price-api/openapi.json get /prices/{timestamp}
openapi: 3.1.0
info:
  description: >-
    Maestro’s Market Price API delivers real-time, rollback-protected DEX
    trading activity alongside historical price mapping for both Bitcoin and
    Rune assets in USD. It combines deep network-level indexing with robust
    trade tracking, abstracting away the complexity of UTXO handling.

    #### Key Features:

    - **Mempool Awareness:** Provides insight into the latest trades from the
    mempool for the most dynamic price discovery.

    - **Multi-DEX Support:** Query data from supported decentralized
    exchanges—including Magic Eden and Dotswap—individually or in aggregate.

    - **Rollback Protection:** Ensures price accuracy by tracking chain
    reorganizations and updating data accordingly—no stale or orphaned block
    data.

    - **Dual-Pipeline Indexing:** Separately indexes UTXOs and trades for
    accuracy and real-time responsiveness.

    - **Real-Time DEX Price Feeds:** Continuously updated trade and price data,
    optimized for wallets, traders, and analytics platforms.

    - **Historical Price Mapping:** Access time-series price data (USD) for both
    Bitcoin and Rune assets, enabling historical analysis and charting.


    #### Key Benefits for Developers:

    - Track accurate, chain-verified prices without maintaining your own
    indexers.

    - Build DEX-integrated wallets and apps with reliable, real-time market
    signals.

    - Identify and act on price trends immediately, with confidence the data
    won’t be invalidated by reorgs.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.txt
  title: Bitcoin - Market Price API
  version: 0.1.0
servers:
  - description: Bitcoin Mainnet
    url: https://xbt-mainnet.gomaestro-api.org/v0/markets
  - description: Bitcoin Testnet (coming soon)
    url: https://xbt-testnet.gomaestro-api.org/v0/markets
security:
  - api-key: []
externalDocs:
  description: ''
  url: ''
paths:
  /prices/{timestamp}:
    get:
      tags:
        - Prices
      summary: BTC price by timestamp
      description: Returns BTC-USD price for the provided UTC timestamp.
      operationId: mkt-btc-price-by-timestamp
      parameters:
        - description: Unix timestamp in seconds
          in: path
          name: timestamp
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/bitcoin_api.PriceTimestamp'
                type: array
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/bitcoin_api.APIError'
                  - $ref: '#/components/schemas/bitcoin_api.APIError'
          description: Invalid timestamp
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bitcoin_api.APIError'
          description: Server Error
components:
  schemas:
    bitcoin_api.PriceTimestamp:
      properties:
        price:
          type: number
        timestamp:
          type: integer
      type: object
    bitcoin_api.APIError:
      properties:
        error:
          description: Error returned from the API request
          example: Bad Request
          type: string
      type: object
  securitySchemes:
    api-key:
      description: Project API Key
      in: header
      name: api-key
      type: apiKey

````