openapi: 3.0.0
info:
  title: List of outstanding Government Bonds under the Infrastructure Bond Programme and Government Sustainable Bond Programme
  description: "For more details, refer the link: https://apidocs.hkma.gov.hk/documentation/market-data-and-statistics/monthly-statistical-bulletin/ibpgsbp/list-outstanding-govbonds-ibpgsbp"
  version: v1
servers:
  - url: https://api.hkma.gov.hk/public/market-data-and-statistics/monthly-statistical-bulletin/ibpgsbp
    variables: {}
paths:
  /list-outstanding-govbonds-ibpgsbp:
    get:
      summary: Retrieve data of List of outstanding Government Bonds under the Infrastructure Bond Programme and Government Sustainable Bond Programme
      parameters:
        - name: segment
          in: query
          description: ""
          required: true
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/Segment"
        - 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:
            oneOf:
              - $ref: "#/components/schemas/Outstanding"
              - $ref: "#/components/schemas/Matured"
          description: ""
    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"
    Segment:
      title: segment
      enum:
        - Outstanding
        - Matured
      type: string
      example: Outstanding
      x-enum-elements:
        - name: Outstanding
          description: ""
        - name: Matured
          description: ""
    Outstanding:
      title: Outstanding
      type: object
      properties:
        expected_maturity_date:
          type: string
          format: date
        original_maturity:
          type: string
        isin_code_regs:
          type: string
        isin_code_144a:
          type: string
        issue_code:
          type: string
        stock_code:
          type: string
        coupon:
          type: number
        Currency:
          type: string
        outstanding_size:
          type: number
        institutional_retail:
          type: string
        Bond_programme:
          type: string
    Matured:
      title: Matured
      type: object
      properties:
        maturity_date:
          type: string
          format: date
        original_maturity:
          type: string
        isin_code_regs:
          type: string
        isin_code_144a:
          type: string
        issue_code:
          type: string
        stock_code:
          type: string
        coupon:
          type: number
        currency:
          type: string
        size:
          type: number
        institutional_retail:
          type: string
        Bond_programme:
          type: string
