> ## 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 target compliance

> Evaluates the `mm` targets you can see per bucket. `passed` says whether the bucket value met the target's effective threshold; trusted values are used where they exist, reported values otherwise. Intervals below a day need a range of one day or less. `passed` is null for volume targets below a daily interval, and uptime targets only have daily values.



## OpenAPI

````yaml /openapi.yaml get /v2/organizations/targets/compliance/
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/organizations/targets/compliance/:
    get:
      tags:
        - Targets
      summary: Get target compliance
      description: >-
        Evaluates the `mm` targets you can see per bucket. `passed` says whether
        the bucket value met the target's effective threshold; trusted values
        are used where they exist, reported values otherwise. Intervals below a
        day need a range of one day or less. `passed` is null for volume targets
        below a daily interval, and uptime targets only have daily values.
      operationId: v2_organizations_targets_compliance_get
      parameters:
        - in: query
          name: assets
          schema:
            type: array
            items:
              type: string
            maxItems: 100
          description: >-
            Comma separated list of assets `<asset>,<asset>`. Defaults to all
            assets visible to the user.
        - in: query
          name: interval
          schema:
            enum:
              - 1m
              - 5m
              - 1h
              - 1d
            type: string
            minLength: 1
          description: |-
            * `1m` - Aggregated in 1 minute periods. Window must be <= 1 day
            * `5m` - Aggregated in 5 minute periods. Window must be <= 1 day
            * `1h` - Aggregated in 1 hour periods.
            * `1d` - Aggregated in 1 day periods.
          required: true
        - in: query
          name: target_ids
          schema:
            type: array
            items:
              type: integer
              minimum: 1
            maxItems: 100
          description: Comma separated list of target ids to narrow the response.
        - in: query
          name: time_end
          schema:
            type: string
            format: date-time
          required: true
        - in: query
          name: time_start
          schema:
            type: string
            format: date-time
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationTargetComplianceResponse'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    OrganizationTargetComplianceResponse:
      type: object
      properties:
        time_start:
          type: string
          format: date-time
        time_end:
          type: string
          format: date-time
        interval:
          $ref: >-
            #/components/schemas/OrganizationTargetComplianceResponseIntervalEnum
        targets:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationTargetComplianceTarget'
      required:
        - interval
        - targets
        - time_end
        - time_start
    OrganizationTargetComplianceResponseIntervalEnum:
      enum:
        - 1m
        - 5m
        - 1h
        - 1d
      type: string
      description: |-
        * `1m` - Aggregated in 1 minute periods. Window must be <= 1 day
        * `5m` - Aggregated in 5 minute periods. Window must be <= 1 day
        * `1h` - Aggregated in 1 hour periods.
        * `1d` - Aggregated in 1 day periods.
    OrganizationTargetComplianceTarget:
      type: object
      properties:
        id:
          type: integer
        type:
          $ref: '#/components/schemas/TypeEnum'
        organization:
          $ref: '#/components/schemas/OrganizationTargetsOrganizationResponse'
        asset:
          type: string
        exchange:
          type: string
        pair:
          type: string
        metric:
          type: string
        threshold:
          type: number
          format: double
        effective_threshold:
          type: number
          format: double
          nullable: true
        direction:
          type: string
        active:
          type: boolean
        market_hours:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/MarketHoursEnum'
            - $ref: '#/components/schemas/NullEnum'
        scaling:
          $ref: '#/components/schemas/OrganizationTargetComplianceScaling'
        compliance:
          $ref: '#/components/schemas/OrganizationTargetComplianceSummary'
        latest:
          $ref: '#/components/schemas/OrganizationTargetComplianceLatest'
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationTargetComplianceBucket'
      required:
        - active
        - asset
        - buckets
        - compliance
        - direction
        - effective_threshold
        - exchange
        - id
        - latest
        - metric
        - organization
        - pair
        - scaling
        - threshold
        - type
    TypeEnum:
      enum:
        - gb
        - mm
      type: string
      description: |-
        * `gb` - Global
        * `mm` - Market Maker
    OrganizationTargetsOrganizationResponse:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
      required:
        - name
        - slug
    MarketHoursEnum:
      enum:
        - market-hours
        - pre-market
        - after-hours
        - overnight
        - weekend-hours
      type: string
      description: |-
        * `market-hours` - Market Hours
        * `pre-market` - Pre Market
        * `after-hours` - After Hours
        * `overnight` - Overnight
        * `weekend-hours` - Weekend Hours
    NullEnum:
      enum:
        - null
    OrganizationTargetComplianceScaling:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/ModeF67Enum'
        enabled:
          type: boolean
        source:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/SourceFb8Enum'
            - $ref: '#/components/schemas/NullEnum'
        reference_price:
          type: number
          format: double
          nullable: true
        current_price:
          type: number
          format: double
          nullable: true
        factor:
          type: number
          format: double
          nullable: true
      required:
        - enabled
        - mode
    OrganizationTargetComplianceSummary:
      type: object
      properties:
        observed:
          type: integer
          minimum: 0
        passing:
          type: integer
          minimum: 0
        percentage:
          type: number
          format: double
          nullable: true
      required:
        - observed
        - passing
        - percentage
    OrganizationTargetComplianceLatest:
      type: object
      properties:
        value:
          type: number
          format: double
          nullable: true
        timestamp:
          type: string
          format: date-time
          nullable: true
        source:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/Source8d1Enum'
            - $ref: '#/components/schemas/NullEnum'
        passed:
          type: boolean
          nullable: true
      required:
        - passed
        - source
        - timestamp
        - value
    OrganizationTargetComplianceBucket:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        value:
          type: number
          format: double
          nullable: true
        source:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/Source8d1Enum'
            - $ref: '#/components/schemas/NullEnum'
        passed:
          type: boolean
          nullable: true
      required:
        - passed
        - source
        - timestamp
        - value
    ModeF67Enum:
      enum:
        - legacy
        - price
      type: string
      description: |-
        * `legacy` - Legacy
        * `price` - Price
    SourceFb8Enum:
      enum:
        - asset_twap_24h
        - loan_twap
        - manual
      type: string
      description: |-
        * `asset_twap_24h` - Asset Twap 24H
        * `loan_twap` - Loan Twap
        * `manual` - Manual
    Source8d1Enum:
      enum:
        - trusted
        - reported
      type: string
      description: |-
        * `trusted` - trusted
        * `reported` - reported
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Token-based authentication with required prefix "Token ". Example:
        "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
      x-default: Token <token>

````