THORChain Borrower API

The Borrower API from THORChain — 1 operation(s) for borrower.

OpenAPI Specification

thorchain-borrower-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Thornode Auth Borrower API
  version: 3.19.1
  contact:
    email: devs@thorchain.org
  description: Thornode REST API.
tags:
- name: Borrower
paths:
  /v2/borrower/{address}:
    get:
      description: 'Returns an array of statistics for all the open loans associated with a given

        borrower address.

        '
      operationId: GetBorrowerDetail
      parameters:
      - description: 'Address to match borrower, an asset address is given.

          Query can also be multiple addresses should be separated by comma ('','')

          '
        example: bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m,bc1qcxssye4j6730h7ehgega3gyykkuwgdgmmpu62n
        in: path
        name: address
        required: true
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/BorrowerDetailsResponse'
      summary: Borrower Details
      tags:
      - Borrower
components:
  schemas:
    BorrowerPool:
      properties:
        collateral_asset:
          description: The asset that the borrower used as collateral
          type: string
        collateral_deposited:
          description: Int64(e8), The total amount of collateral that user deposited
          type: string
        collateral_withdrawn:
          description: Int64(e8), The total amount of collateral the system paid back to the user
          type: string
        debt_issued_tor:
          description: Int64(e8), The total amount of debt issued as debt for user. denominated in TOR.
          type: string
        debt_repaid_tor:
          description: Int64(e8), The total amount of debt that the user paid back. denominated in TOR.
          type: string
        last_open_loan_timestamp:
          description: Int64, Unix timestamp for the last time borrower opened a loan
          type: string
        last_repay_loan_timestamp:
          description: Int64, Unix timestamp for the last time borrower repayment occurred
          type: string
        target_assets:
          items:
            description: All target assets that the user used as debt target
            example: ETH.ETH
            type: string
          type: array
      required:
      - collateral_asset
      - target_assets
      - debt_issued_tor
      - debt_repaid_tor
      - collateral_deposited
      - collateral_withdrawn
      - last_open_loan_timestamp
      - last_repay_loan_timestamp
      type: object
    BorrowerDetails:
      properties:
        pools:
          description: List details of all the loans identified with the given address
          items:
            $ref: '#/components/schemas/BorrowerPool'
          type: array
      required:
      - pools
      type: object
  responses:
    BorrowerDetailsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BorrowerDetails'
      description: object containing loan data for a specific borrower