> ## 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/getUsableTraffic
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/getUsableTraffic:
    post:
      description: 用户获取剩余流量（汇总所有供应商流量，并返回各供应商明细）
      requestBody:
        description: 获取剩余流量请求
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommonRequestBody'
        required: true
      responses:
        '200':
          description: 获取剩余流量成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Traffic'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CommonRequestBody:
      type: object
      properties:
        appKey:
          type: string
          description: AppKey密钥
      required:
        - appKey
    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

````