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

# 查询授权和用量

此请求没有查询参数。查看 `datasets[].scope.symbols`、`bases` 和 `available` 来决定能请求哪些数据。`usage` 按分钟、日、月统计，`quotas` 为对应窗口的额度。

**错误处理**　401 检查或更换 Key；403 核对授权；422 检查参数；429 遵循 `Retry-After` 并检查用量；503 稍后重试。


## OpenAPI

````yaml spec/customer.json GET /v1/discover
openapi: 3.1.0
info:
  title: Trading Octant Customer REST API
  version: '1.0'
servers:
  - url: https://api.tradingoctant.com
security: []
paths:
  /v1/discover:
    get:
      summary: Discover authorized datasets and usage
      operationId: customerDataDiscover
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDiscovery'
        '401':
          description: Invalid or expired API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProblemResponse'
        '403':
          description: Subscription or scope does not permit access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProblemResponse'
        '422':
          description: Unsupported request scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProblemResponse'
        '429':
          description: Quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProblemResponse'
        '503':
          description: Data temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerProblemResponse'
      security:
        - CustomerBearer: []
components:
  schemas:
    CustomerDiscovery:
      type: object
      properties:
        symbols:
          type: array
          items:
            type: string
            pattern: ^[A-Z]{1,6}$
          maxItems: 128
        capabilities:
          type: array
          items:
            type: string
            pattern: ^[a-z][a-z0-9._]*$
            maxLength: 80
          maxItems: 64
        quotas:
          $ref: '#/components/schemas/CustomerQuotas'
        usage:
          $ref: '#/components/schemas/CustomerUsage'
        quotaUnlimited:
          type: boolean
          description: >-
            Usage is metered without a request limit when true. Numeric quotas
            apply when false or omitted.
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/CustomerDataset'
      required:
        - capabilities
        - symbols
        - quotas
        - usage
        - datasets
    CustomerProblemResponse:
      type: object
      properties:
        detail:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    CustomerQuotas:
      type: object
      properties:
        perMinute:
          type: integer
          minimum: 0
          maximum: 1000000
        perDay:
          type: integer
          minimum: 0
          maximum: 1000000000
        perMonth:
          type: integer
          minimum: 0
          maximum: 10000000000
      required:
        - perMinute
        - perDay
        - perMonth
    CustomerUsage:
      type: object
      properties:
        minute:
          type: integer
          minimum: 0
        day:
          type: integer
          minimum: 0
        month:
          type: integer
          minimum: 0
      required:
        - minute
        - day
        - month
    CustomerDataset:
      type: object
      properties:
        capability:
          type: string
          const: gex.snapshot
        scope:
          type: object
          properties:
            symbols:
              type: array
              items:
                type: string
                pattern: ^[A-Z]{1,6}$
              maxItems: 128
            bases:
              type: array
              items:
                type: string
                const: naive
            replay:
              type: boolean
              const: false
          required:
            - symbols
            - bases
            - replay
          additionalProperties: false
        available:
          type: boolean
      required:
        - capability
        - available
        - scope
  securitySchemes:
    CustomerBearer:
      type: http
      scheme: bearer

````

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