openapi: 3.0.0
info:
  title: Monetary Statistics
  description: "For more details, refer the link: https://apidocs.hkma.gov.hk/documentation/market-data-and-statistics/monthly-statistical-bulletin/financial/monetary-statistics"
  version: v1
servers:
  - url: https://api.hkma.gov.hk/public/market-data-and-statistics/monthly-statistical-bulletin/financial
    variables: {}
paths:
  /monetary-statistics:
    get:
      summary: Retrieve data of Monetary Statistics
      parameters:
        - name: pagesize
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: fields
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: column
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: filter
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: choose
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: from
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: to
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: sortby
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: sortorder
          in: query
          description: ""
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/Sortorder"
      responses:
        "200":
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
        "500":
          description: Unexcpeted error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    Header:
      title: Header
      type: object
      properties:
        success:
          type: boolean
        err_code:
          type: string
        err_msg:
          type: string
    Response:
      title: response
      type: object
      properties:
        header:
          $ref: "#/components/schemas/Header"
        result:
          $ref: "#/components/schemas/Result"
    Result:
      title: Result
      type: object
      properties:
        datasize:
          type: integer
          format: int32
        records:
          type: array
          items:
            $ref: "#/components/schemas/Record"
          description: ""
    Record:
      title: Record
      type: object
      properties:
        end_of_month:
          type: string
          format: date
        notes_coins_circulation:
          type: number
        aggr_balance:
          type: number
        ef_bills_notes:
          type: number
        monetary_base_total:
          type: number
        m1_total:
          type: number
        m1_hkd:
          type: number
        m2_total:
          type: number
        m2_hkd:
          type: number
        m3_total:
          type: number
        m3_hkd:
          type: number
        exrate_hkd_usd:
          type: number
        nominal_eff_exrate_index:
          type: number
        hibor_fixing_overnight:
          type: number
        hibor_fixing_3m:
          type: number
        deposit_rate_saving:
          type: number
        deposit_rate_3m:
          type: number
        yield_efpaper_3m:
          type: number
        yield_govbond_10y:
          type: number
        best_lending_rate:
          type: number
        discount_window_base_rate:
          type: number
    Sortorder:
      title: sortorder
      enum:
        - asc
        - desc
      type: string
      example: asc
      x-enum-elements:
        - name: asc
          description: ""
        - name: desc
          description: ""
    ErrorResponse:
      title: errorResponse
      type: object
      properties:
        header:
          $ref: "#/components/schemas/Header"
