> ## 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 recent trade data for Bitcoin Runes on a specific DEX with price, volume, and transaction details.

# Rune Trades for DEX



## OpenAPI

````yaml bitcoin/market-price-api/openapi.json get /dexs/trades/{dex}/{symbol}
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:
  /dexs/trades/{dex}/{symbol}:
    get:
      tags:
        - DEX
      summary: Rune Trades for DEX
      description: >-
        Provides a time-series list of individual trades for a specified Rune
        pair on a given DEX, including granular data such as trade price (in
        satoshis), volume, block height, and buy/sell direction. Especially
        useful for high-frequency strategies or price feed services.
      operationId: mkt-dex-trades
      parameters:
        - description: Name of the DEX
          example: magiceden
          in: path
          name: dex
          required: true
          schema:
            default: magiceden
            enum:
              - all
              - magiceden
              - dotswap
            type: string
        - description: Symbol of the Rune asset trading pair (BTC-Rune ID)
          example: BTC-840000:28
          in: path
          name: symbol
          required: true
          schema:
            default: BTC-840000:28
            type: string
        - description: Mempool mode
          example: included
          in: query
          name: mempool
          schema:
            default: excluded
            enum:
              - included
              - excluded
              - only
            type: string
        - description: Start timestamp in Unix
          example: '1735689600'
          in: query
          name: from
          schema:
            default: '1735689600'
            type: string
        - description: End timestamp in Unix
          example: '1742428800'
          in: query
          name: to
          schema:
            default: '1742428800'
            type: string
        - description: 'Limit number of Runes returned (min: 1, max: 50000)'
          example: 10000
          in: query
          name: limit
          schema:
            default: 5000
            maximum: 50000
            minimum: 1
            type: integer
        - description: Sort by descending (desc) or ascending (asc)
          example: desc
          in: query
          name: sort
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TradeList'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bitcoin_api.APIError'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bitcoin_api.APIError'
          description: Server Error
components:
  schemas:
    models.TradeList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/models.Trade'
          type: array
          uniqueItems: false
      type: object
    bitcoin_api.APIError:
      properties:
        error:
          description: Error returned from the API request
          example: Bad Request
          type: string
      type: object
    models.Trade:
      properties:
        amount:
          description: Amount of the asset traded
          example: 3780
          type: number
        block:
          description: Block height where the trade was included
          example: 840000
          type: integer
        dex:
          description: Name of the DEX
          example: magiceden
          type: string
        mempool:
          description: Mempool status of the trade
          example: false
          type: boolean
        price:
          description: Price of the asset in satoshis
          example: 19.75
          type: number
        price_usd:
          description: Price of the asset in usd
          example: 0.0575
          type: number
        side:
          description: 'Trade direction: buy or sell'
          enum:
            - buy
            - sell
          example: buy
          type: string
        symbol:
          description: Symbol of the Rune asset trading pair (BTC-Rune ID)
          example: BTC-840000:28
          type: string
        timestamp:
          description: Time of the block in which trade occurred
          example: '2024-05-03T15:04:05Z'
          type: string
        tx_hash:
          description: Transaction hash of the trade
          example: 2bebfc71ac93f02de19b28a8b438ed40413676f4c4c2609401a9a08ea508fd58
          type: string
        tx_index:
          description: >-
            Index of the trade within the block, 0-based (first trade is 0,
            second trade is 1, not transaction index)
          example: 1
          type: integer
      type: object
  securitySchemes:
    api-key:
      description: Project API Key
      in: header
      name: api-key
      type: apiKey

````