Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Exactly Liquidations API
version: 1.0.0
contact:
name: Exactly Protocol
url: https://docs.exact.ly
license:
name: MIT
url: https://github.com/exactly/protocol/blob/main/LICENSE-MIT
description: 'Operations tagged Liquidations across 2 of this provider''s published API definitions: auditor-api.yml, market-api.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://app.exact.ly
description: Exactly Protocol App
tags:
- name: Liquidations
description: Liquidation eligibility and seizure calculations
paths:
/auditor/calculateSeize:
post:
summary: Calculate assets to seize during liquidation
description: Calculates the amount of collateral to seize from a borrower during liquidation, accounting for the liquidation incentive and lender fees.
operationId: calculateSeize
tags:
- Liquidations
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- repayMarket
- seizeMarket
- borrower
- actualRepayAssets
properties:
repayMarket:
type: string
description: Market where the debt is being repaid
pattern: ^0x[a-fA-F0-9]{40}$
seizeMarket:
type: string
description: Market from which collateral is seized
pattern: ^0x[a-fA-F0-9]{40}$
borrower:
type: string
description: Address of the borrower being liquidated
pattern: ^0x[a-fA-F0-9]{40}$
actualRepayAssets:
type: string
description: Actual assets being repaid (in wei)
responses:
'200':
description: Seizure amounts
content:
application/json:
schema:
type: object
properties:
lendersAssets:
type: string
description: Assets allocated to lenders as incentive (in wei)
seizeAssets:
type: string
description: Total collateral assets to seize from borrower (in wei)
servers:
- url: https://app.exact.ly
description: Exactly Protocol App
/auditor/checkLiquidation:
post:
summary: Check liquidation eligibility and maximum repay
description: Verifies that a liquidation is valid and computes the maximum assets the liquidator is allowed to repay given the dynamic close factor.
operationId: checkLiquidation
tags:
- Liquidations
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- repayMarket
- seizeMarket
- borrower
- maxLiquidatorAssets
properties:
repayMarket:
type: string
description: Market where the debt is being repaid
pattern: ^0x[a-fA-F0-9]{40}$
seizeMarket:
type: string
description: Market from which collateral is seized
pattern: ^0x[a-fA-F0-9]{40}$
borrower:
type: string
description: Address of the borrower being liquidated
pattern: ^0x[a-fA-F0-9]{40}$
maxLiquidatorAssets:
type: string
description: Maximum assets the liquidator wants to repay (in wei)
responses:
'200':
description: Maximum repayable assets
content:
application/json:
schema:
type: object
properties:
maxRepayAssets:
type: string
description: Maximum allowed repay amount after dynamic close factor (in wei)
servers:
- url: https://app.exact.ly
description: Exactly Protocol App
/market/liquidate:
post:
summary: Liquidate an undercollateralized borrower
description: Liquidates a borrower's variable rate debt when their health factor falls below the threshold. The liquidator repays up to maxAssets of debt and receives collateral from the seizeMarket.
operationId: liquidate
tags:
- Liquidations
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- borrower
- maxAssets
- seizeMarket
properties:
borrower:
type: string
description: Address of the undercollateralized borrower
pattern: ^0x[a-fA-F0-9]{40}$
maxAssets:
type: string
description: Maximum assets to repay (in wei)
seizeMarket:
type: string
description: Market from which to seize collateral
pattern: ^0x[a-fA-F0-9]{40}$
responses:
'200':
description: Assets repaid
content:
application/json:
schema:
type: object
properties:
repaidAssets:
type: string
description: Total assets repaid (in wei)
servers:
- url: https://app.exact.ly
description: Exactly Protocol App
/market/clearBadDebt:
post:
summary: Clear bad debt for a borrower
description: Clears bad debt from a borrower's account by using the earnings accumulator. Only callable when the borrower's collateral has been fully seized.
operationId: clearBadDebt
tags:
- Liquidations
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- borrower
properties:
borrower:
type: string
description: Address of the borrower with bad debt
pattern: ^0x[a-fA-F0-9]{40}$
responses:
'200':
description: Bad debt cleared successfully
servers:
- url: https://app.exact.ly
description: Exactly Protocol App
x-refined-from:
- auditor-api.yml
- market-api.yml