> ## 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.

# Download a chart as CSV

> Returns the series of one chart as a CSV file. `specific_metric` picks the metric and `group_by` how series are grouped. Every other query parameter goes to the endpoint behind the metric, including the ones it requires such as `interval`, and is validated the same way. Endpoint per metric:

- `volume`, `twap`, `vwap`, `volumeContribution`, `perpSpotArbitrage`: `GET /v2/metrics/volume/`
- `rollingVolume`, `rollingTwap`, `rollingVwap`: `GET /v2/metrics/rolling_volume/`
- `spreadAbs`, `spreadBps`, `midPrice`, `midPriceMovement`: `GET /v2/metrics/spread/`
- `topOfBookBidPrice`, `topOfBookBidAmount`, `topOfBookBidAmountUsd`, `topOfBookAskPrice`, `topOfBookAskAmount`, `topOfBookAskAmountUsd`: `GET /v2/metrics/top_of_book/`
- `depthBid`, `depthAsk`, `countBid`, `countAsk`: `GET /v2/metrics/depth/`
- `slippageBuy`, `slippageSell`: `GET /v2/metrics/slippage/`
- `spreadUptime`: `GET /v2/metrics/uptime/spread/`
- `depthUptime`: `GET /v2/metrics/uptime/depth/`
- `fundingRate8h`, `fundingRateAnnualized`, `oiWeightedFundingRate8h`, `oiWeightedFundingRateAnnualized`, `openInterestUsd`, `openInterestBase`: `GET /v2/metrics/futures/`
- `marketMakerVolume`: `GET /v2/organizations/market-maker-metrics/volume/`
- `marketMakerDepthBid`, `marketMakerDepthAsk`: `GET /v2/organizations/market-maker-metrics/depth/`
- `marketMakerSpreadBps`: `GET /v2/organizations/market-maker-metrics/spread/`
- `marketMakerVolumeCoverage`: `GET /v2/organizations/market-maker-metrics/coverage/volume/`
- `marketMakerDepthCoverageBid`, `marketMakerDepthCoverageAsk`: `GET /v2/organizations/market-maker-metrics/coverage/depth/`
- `reportedVolume`: `GET /v2/organizations/reported-metrics/volume/`
- `reportedVolumeCoverage`: `GET /v2/organizations/reported-metrics/coverage/volume/`
- `reportedSpreadBps`: `GET /v2/organizations/reported-metrics/spread/`
- `reportedSpreadUptime`: `GET /v2/organizations/reported-metrics/uptime/spread/`
- `reportedDepthBid`, `reportedDepthAsk`: `GET /v2/organizations/reported-metrics/depth/`
- `reportedDepthUptimeBid`, `reportedDepthUptimeAsk`: `GET /v2/organizations/reported-metrics/uptime/depth/`
- `reportedDepthCoverageBid`, `reportedDepthCoverageAsk`: `GET /v2/organizations/reported-metrics/coverage/depth/`



## OpenAPI

````yaml /openapi.yaml get /v2/metrics/chart-csv/
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: >

    The GlassMarkets 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. Market makers also use it to submit the metrics they

    report.


    The base URL is `https://api.glassmarkets.io`. Requests and responses are
    JSON,

    and times are ISO 8601 in UTC. `bps` means basis points: 1 bps is 0.01%.


    ## Authentication


    1. Log in with `POST /v1/login/`, sending your email and password. The
    response
       contains a `token` and its `expiry`.
    2. Send the token on every request in the `Authorization` header:
       `Authorization: Token <token>`.

    A token expires one day after its last use, and at most 30 days after login.

    With `"remember_me": true` at login, it stays valid for at least 7 days. A

    request with a missing, expired or revoked token returns `401`: log in
    again.

    `POST /v1/logout/` revokes the token.


    If your account has two-factor authentication, login returns `202` with a

    `challenge_id`. Send it with your authentication code to `POST
    /v1/totp/login/`

    to get the token.


    ## Quickstart


    1. Log in:

       ```
       curl -X POST https://api.glassmarkets.io/v1/login/ \
         -H "Content-Type: application/json" \
         -d '{"email": "you@example.com", "password": "..."}'
       ```

    2. List your organizations with `GET /v1/organizations/`. Each organization
       lists its assets. Each asset lists the exchanges it trades on (`slug`) and
       the pairs on each exchange. Use these exact values in other requests.

       ```
       curl https://api.glassmarkets.io/v1/organizations/ \
         -H "Authorization: Token <token>"
       ```

    3. Call an endpoint with those values, for example the daily trading volume
    of
       one of your assets:

       ```
       curl -G https://api.glassmarkets.io/v2/metrics/volume/ \
         -H "Authorization: Token <token>" \
         -d assets=BTC -d interval=1d \
         -d time_start=2026-09-01T00:00:00Z -d time_end=2026-09-08T00:00:00Z
       ```

    ## Errors


    Invalid input returns `400` with the problem per field, for example

    `{"interval": ["This field is required."]}`. Other errors return a status

    code with a `detail` message: `401` when you are not logged in, `403` when
    your

    account may not use the endpoint, and `404` when the resource does not
    exist.
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.
paths:
  /v2/metrics/chart-csv/:
    get:
      tags:
        - Market data
      summary: Download a chart as CSV
      description: >-
        Returns the series of one chart as a CSV file. `specific_metric` picks
        the metric and `group_by` how series are grouped. Every other query
        parameter goes to the endpoint behind the metric, including the ones it
        requires such as `interval`, and is validated the same way. Endpoint per
        metric:


        - `volume`, `twap`, `vwap`, `volumeContribution`, `perpSpotArbitrage`:
        `GET /v2/metrics/volume/`

        - `rollingVolume`, `rollingTwap`, `rollingVwap`: `GET
        /v2/metrics/rolling_volume/`

        - `spreadAbs`, `spreadBps`, `midPrice`, `midPriceMovement`: `GET
        /v2/metrics/spread/`

        - `topOfBookBidPrice`, `topOfBookBidAmount`, `topOfBookBidAmountUsd`,
        `topOfBookAskPrice`, `topOfBookAskAmount`, `topOfBookAskAmountUsd`: `GET
        /v2/metrics/top_of_book/`

        - `depthBid`, `depthAsk`, `countBid`, `countAsk`: `GET
        /v2/metrics/depth/`

        - `slippageBuy`, `slippageSell`: `GET /v2/metrics/slippage/`

        - `spreadUptime`: `GET /v2/metrics/uptime/spread/`

        - `depthUptime`: `GET /v2/metrics/uptime/depth/`

        - `fundingRate8h`, `fundingRateAnnualized`, `oiWeightedFundingRate8h`,
        `oiWeightedFundingRateAnnualized`, `openInterestUsd`,
        `openInterestBase`: `GET /v2/metrics/futures/`

        - `marketMakerVolume`: `GET
        /v2/organizations/market-maker-metrics/volume/`

        - `marketMakerDepthBid`, `marketMakerDepthAsk`: `GET
        /v2/organizations/market-maker-metrics/depth/`

        - `marketMakerSpreadBps`: `GET
        /v2/organizations/market-maker-metrics/spread/`

        - `marketMakerVolumeCoverage`: `GET
        /v2/organizations/market-maker-metrics/coverage/volume/`

        - `marketMakerDepthCoverageBid`, `marketMakerDepthCoverageAsk`: `GET
        /v2/organizations/market-maker-metrics/coverage/depth/`

        - `reportedVolume`: `GET /v2/organizations/reported-metrics/volume/`

        - `reportedVolumeCoverage`: `GET
        /v2/organizations/reported-metrics/coverage/volume/`

        - `reportedSpreadBps`: `GET /v2/organizations/reported-metrics/spread/`

        - `reportedSpreadUptime`: `GET
        /v2/organizations/reported-metrics/uptime/spread/`

        - `reportedDepthBid`, `reportedDepthAsk`: `GET
        /v2/organizations/reported-metrics/depth/`

        - `reportedDepthUptimeBid`, `reportedDepthUptimeAsk`: `GET
        /v2/organizations/reported-metrics/uptime/depth/`

        - `reportedDepthCoverageBid`, `reportedDepthCoverageAsk`: `GET
        /v2/organizations/reported-metrics/coverage/depth/`
      operationId: v2_metrics_chart_csv_get
      parameters:
        - in: query
          name: filename
          schema:
            type: string
            default: chart.csv
            minLength: 1
          description: File name of the download.
        - in: query
          name: filter_exchange
          schema:
            type: array
            items:
              type: string
          description: Keep only these exchange slugs. Repeatable.
        - in: query
          name: filter_organization
          schema:
            type: array
            items:
              type: string
          description: Keep only these organization slugs. Repeatable.
        - in: query
          name: filter_quote
          schema:
            type: array
            items:
              type: string
          description: Keep only pairs with these quote currencies. Repeatable.
        - in: query
          name: group_by
          schema:
            enum:
              - pair
              - all
              - exchange
              - asset
              - organization
            type: string
            minLength: 1
          description: >-
            One series per pair, exchange, asset or organization, or one for
            `all`.


            * `pair` - pair

            * `all` - all

            * `exchange` - exchange

            * `asset` - asset

            * `organization` - organization
          required: true
        - in: query
          name: selected_label
          schema:
            type: array
            items:
              type: string
          description: Keep only the series with these labels. Repeatable.
        - in: query
          name: specific_metric
          schema:
            enum:
              - volume
              - twap
              - vwap
              - rollingVolume
              - rollingTwap
              - rollingVwap
              - spreadAbs
              - spreadBps
              - midPrice
              - midPriceMovement
              - topOfBookBidPrice
              - topOfBookBidAmount
              - topOfBookBidAmountUsd
              - topOfBookAskPrice
              - topOfBookAskAmount
              - topOfBookAskAmountUsd
              - depthBid
              - depthAsk
              - countBid
              - countAsk
              - slippageBuy
              - slippageSell
              - spreadUptime
              - depthUptime
              - volumeContribution
              - fundingRate8h
              - fundingRateAnnualized
              - oiWeightedFundingRate8h
              - oiWeightedFundingRateAnnualized
              - openInterestUsd
              - openInterestBase
              - perpSpotArbitrage
              - marketMakerVolume
              - marketMakerDepthBid
              - marketMakerDepthAsk
              - marketMakerSpreadBps
              - marketMakerVolumeCoverage
              - marketMakerDepthCoverageBid
              - marketMakerDepthCoverageAsk
              - reportedVolume
              - reportedVolumeCoverage
              - reportedSpreadBps
              - reportedSpreadUptime
              - reportedDepthBid
              - reportedDepthAsk
              - reportedDepthUptimeBid
              - reportedDepthUptimeAsk
              - reportedDepthCoverageBid
              - reportedDepthCoverageAsk
            type: string
            minLength: 1
          description: >-
            * `volume` - volume

            * `twap` - twap

            * `vwap` - vwap

            * `rollingVolume` - rollingVolume

            * `rollingTwap` - rollingTwap

            * `rollingVwap` - rollingVwap

            * `spreadAbs` - spreadAbs

            * `spreadBps` - spreadBps

            * `midPrice` - midPrice

            * `midPriceMovement` - midPriceMovement

            * `topOfBookBidPrice` - topOfBookBidPrice

            * `topOfBookBidAmount` - topOfBookBidAmount

            * `topOfBookBidAmountUsd` - topOfBookBidAmountUsd

            * `topOfBookAskPrice` - topOfBookAskPrice

            * `topOfBookAskAmount` - topOfBookAskAmount

            * `topOfBookAskAmountUsd` - topOfBookAskAmountUsd

            * `depthBid` - depthBid

            * `depthAsk` - depthAsk

            * `countBid` - countBid

            * `countAsk` - countAsk

            * `slippageBuy` - slippageBuy

            * `slippageSell` - slippageSell

            * `spreadUptime` - spreadUptime

            * `depthUptime` - depthUptime

            * `volumeContribution` - volumeContribution

            * `fundingRate8h` - fundingRate8h

            * `fundingRateAnnualized` - fundingRateAnnualized

            * `oiWeightedFundingRate8h` - oiWeightedFundingRate8h

            * `oiWeightedFundingRateAnnualized` -
            oiWeightedFundingRateAnnualized

            * `openInterestUsd` - openInterestUsd

            * `openInterestBase` - openInterestBase

            * `perpSpotArbitrage` - perpSpotArbitrage

            * `marketMakerVolume` - marketMakerVolume

            * `marketMakerDepthBid` - marketMakerDepthBid

            * `marketMakerDepthAsk` - marketMakerDepthAsk

            * `marketMakerSpreadBps` - marketMakerSpreadBps

            * `marketMakerVolumeCoverage` - marketMakerVolumeCoverage

            * `marketMakerDepthCoverageBid` - marketMakerDepthCoverageBid

            * `marketMakerDepthCoverageAsk` - marketMakerDepthCoverageAsk

            * `reportedVolume` - reportedVolume

            * `reportedVolumeCoverage` - reportedVolumeCoverage

            * `reportedSpreadBps` - reportedSpreadBps

            * `reportedSpreadUptime` - reportedSpreadUptime

            * `reportedDepthBid` - reportedDepthBid

            * `reportedDepthAsk` - reportedDepthAsk

            * `reportedDepthUptimeBid` - reportedDepthUptimeBid

            * `reportedDepthUptimeAsk` - reportedDepthUptimeAsk

            * `reportedDepthCoverageBid` - reportedDepthCoverageBid

            * `reportedDepthCoverageAsk` - reportedDepthCoverageAsk
          required: true
      responses:
        '200':
          content:
            text/csv:
              schema:
                type: string
          description: CSV file download.
      security:
        - tokenAuth: []
components:
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token-based authentication with required prefix "Token ". Example:
        "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
      x-default: Token <token>

````