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

# 查询用户流量

> 代理商查询用户流量



## OpenAPI

````yaml POST /account/queryTraffic
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://apiv1.cakeip.com/openapi
security: []
paths:
  /account/queryTraffic:
    post:
      description: 代理商查询用户流量
      requestBody:
        description: Plant to add to the store
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryTraffic'
        required: true
      responses:
        '200':
          description: plant response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Traffic'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    QueryTraffic:
      type: object
      properties:
        appKey:
          type: string
          description: AppKey密钥
        params:
          type: object
          properties:
            username:
              type: string
              description: 用户名
          required:
            - username
          description: 动态参数集合
      required:
        - appKey
        - params
    Traffic:
      type: object
      description: 获取剩余流量响应（汇总所有供应商流量）
      properties:
        code:
          default: 0
          description: 状态码，0为操作成功
          type: integer
          format: int32
          example: 0
          enum:
            - 0
            - -1
        msg:
          description: 响应消息
          type: string
        data:
          description: 用户流量数据
          type: object
          properties:
            fullTraffic:
              type: integer
              format: int32
              description: 用户总购买量
              example: 1000
            traffic:
              type: integer
              format: int32
              description: 用户当前剩余流量
              example: 800
      required:
        - code
        - msg
        - data
    Error:
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
      required:
        - error
        - message

````