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

# Get header price, volume and exchange coverage

> Compact price, 24-hour volume and exchange coverage for an asset. The one-hour price change compares the latest minute's median TWAP with the first minute's average TWAP. The 24-hour change compares that latest price with the first hour's average TWAP. Optional end times default to the current minute and hour, respectively.



## OpenAPI

````yaml /openapi.yaml get /v2/metrics/header-summary/
openapi: 3.0.3
info:
  title: Glass Market API
  version: 1.0.0
  x-logo:
    url: https://api.glassmarkets.io/static/black.png
    backgroundColor: '#FFFFFF'
    altText: Glass Market API
  description: >

    Guides, a quickstart and code samples are at

    [docs.glassmarkets.io](https://docs.glassmarkets.io). The API serves the
    data

    behind the GlassMarkets app: market data collected from crypto exchanges,
    and

    market-making data for the assets your organizations work on. The

    [Authentication guide](https://docs.glassmarkets.io/guides/authentication)

    covers login: `POST /v1/login/` returns a token that goes on every request
    as

    `Authorization: Token <token>`.
servers:
  - url: https://api.glassmarkets.io
security: []
tags:
  - name: Authentication
    description: Log in, log out and read the current session.
  - name: Organizations
    description: Your organizations, and the assets, exchanges and pairs each one covers.
  - name: Reported metrics
    description: Volume, depth and spread that market makers report for their assets.
  - name: Trusted metrics
    description: >-
      Volume, depth and spread that Shield measures directly from market makers'
      exchange accounts.
  - name: Market maker metrics
    description: >-
      Market-maker volume, depth, spread, uptime and coverage, combining trusted
      and reported data.
  - name: Targets
    description: >-
      Market-making targets per asset, exchange and pair, and whether they are
      met.
  - name: Market data
    description: >-
      Exchange market data for your assets: volume, spread, order book depth,
      slippage, uptime, futures and more.
  - name: Leaderboard
    description: Trading pairs across exchanges, ranked by market data.
  - name: Loans
    description: Token loans to market makers for your assets.
  - name: RFQ
    description: >-
      Requests for quotes: a project invites market makers to propose
      market-making terms for its token.
  - name: Account
    description: Manage your password, passkeys and two-factor authentication.
externalDocs:
  url: https://docs.glassmarkets.io
  description: Guides, quickstart and code samples
paths:
  /v2/metrics/header-summary/:
    get:
      tags:
        - Market data
      summary: Get header price, volume and exchange coverage
      description: >-
        Compact price, 24-hour volume and exchange coverage for an asset. The
        one-hour price change compares the latest minute's median TWAP with the
        first minute's average TWAP. The 24-hour change compares that latest
        price with the first hour's average TWAP. Optional end times default to
        the current minute and hour, respectively.
      operationId: v2_metrics_header_summary_get
      parameters:
        - in: query
          name: asset
          schema:
            type: string
            maxLength: 100
            minLength: 1
            example: BTC
          required: true
        - in: query
          name: hourly_end
          schema:
            type: string
            format: date-time
        - in: query
          name: minutely_end
          schema:
            type: string
            format: date-time
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsHeaderSummaryResponse'
              examples:
                BTCHeaderSummary:
                  value:
                    price_now: 83410
                    price_change_1h: 0.42
                    price_change_24h: 2.17
                    volume_24h: 1791000000
                    exchanges:
                      - slug: binance
                        name: Binance
                        icon_url: >-
                          https://s2.coinmarketcap.com/static/img/exchanges/64x64/630.png
                      - slug: coinbasepro
                        name: Coinbase Pro
                        icon_url: >-
                          https://s2.coinmarketcap.com/static/img/exchanges/64x64/89.png
                  summary: BTC header summary
          description: ''
        '400':
          description: A field is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrors'
              examples:
                InvalidInput:
                  value:
                    asset:
                      - This field is required.
        '401':
          $ref: '#/components/responses/ApiKeyUnauthorized'
        '403':
          $ref: '#/components/responses/ApiKeyForbidden'
      security:
        - metricsApiKeyAuth: []
        - tokenAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.glassmarkets.io/v2/metrics/header-summary/?asset=BTC' \
              --header 'Authorization: ApiKey <key>'
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.glassmarkets.io/v2/metrics/header-summary/?asset=BTC"


            headers = {"Authorization": "ApiKey <key>"}


            response = requests.get(url, headers=headers)


            print(response.text)
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {Authorization: 'ApiKey
            <key>'}};


            fetch('https://api.glassmarkets.io/v2/metrics/header-summary/?asset=BTC',
            options)
              .then(res => res.json())
              .then(res => console.log(res))
              .catch(err => console.error(err));
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.glassmarkets.io/v2/metrics/header-summary/?asset=BTC\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"ApiKey <key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
        - lang: java
          label: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://api.glassmarkets.io/v2/metrics/header-summary/?asset=BTC")
              .header("Authorization", "ApiKey <key>")
              .asString();
components:
  schemas:
    MetricsHeaderSummaryResponse:
      type: object
      properties:
        price_now:
          type: number
          format: double
          nullable: true
        price_change_1h:
          type: number
          format: double
          nullable: true
        price_change_24h:
          type: number
          format: double
          nullable: true
        volume_24h:
          type: number
          format: double
        exchanges:
          type: array
          items:
            $ref: '#/components/schemas/ExchangeResponse'
      required:
        - exchanges
        - price_change_1h
        - price_change_24h
        - price_now
        - volume_24h
    ValidationErrors:
      type: object
      description: >-
        One entry per invalid field; `non_field_errors` covers the request as a
        whole. A field carries a list of messages or a single message; a nested
        field carries an object, or a list of objects, of the same shape.
      additionalProperties:
        anyOf:
          - type: array
            items:
              type: string
          - type: string
          - type: object
          - type: array
            items:
              type: object
    ExchangeResponse:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
        icon_url:
          type: string
          format: uri
      required:
        - icon_url
        - name
        - slug
    ErrorDetail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  responses:
    ApiKeyUnauthorized:
      description: The token or API key is missing, invalid, expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          examples:
            InvalidToken:
              value:
                detail: Invalid token.
            MissingToken:
              value:
                detail: Authentication credentials were not provided.
            InvalidApiKey:
              value:
                detail: Invalid or expired API key.
    ApiKeyForbidden:
      description: The API key does not have the scope this endpoint needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorDetail'
          examples:
            MissingScope:
              value:
                detail: API key does not have access to this endpoint.
  securitySchemes:
    metricsApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Scoped API key with required prefix "ApiKey ". Available scopes:
        metrics:read and reported_metrics:write.
      x-default: ApiKey <key>
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token-based authentication with required prefix "Token ". Example:
        "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
      x-default: Token <token>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.