Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
contact:
email: devs@thorchain.org
description: The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.
title: Midgard Public Borrower API
version: 2.34.2
servers:
- url: https://gateway.liquify.com/chain/thorchain_midgard
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