THORChain Pool API
The Pool API from THORChain — 2 operation(s) for pool.
The Pool API from THORChain — 2 operation(s) for pool.
openapi: 3.0.0
info:
title: Thornode Auth Pool API
version: 3.19.1
contact:
email: devs@thorchain.org
description: Thornode REST API.
tags:
- name: Pool
paths:
/v2/pool/{asset}:
get:
description: 'Returns details of the pool: depths, price, 24h volume, APY. '
operationId: GetPool
parameters:
- description: pool name
example: BNB.TOMOB-1E1
in: path
name: asset
required: true
schema:
type: string
- description: 'Specifies the base interval from which APY is extrapolated.
Default is 14d.
'
example: 100d
in: query
name: period
schema:
enum:
- 1h
- 24h
- 7d
- 14d
- 30d
- 90d
- 100d
- 180d
- 365d
- all
type: string
responses:
'200':
$ref: '#/components/responses/PoolResponse'
summary: Details of a Pool
tags:
- Pool
/v2/pool/{asset}/stats:
get:
description: 'Statistics about the pool. The description of the fields have pointers about the
corresponding v2/history location. Visit the history endpoint for drilldowns.
'
operationId: GetPoolStats
parameters:
- description: pool name
example: BNB.TOMOB-1E1
in: path
name: asset
required: true
schema:
type: string
- description: 'Restricts aggregation type fields to the last period only.
Default is 14d.
'
example: 24h
in: query
name: period
schema:
enum:
- 1h
- 24h
- 7d
- 14d
- 30d
- 90d
- 100d
- 180d
- 365d
- all
type: string
responses:
'200':
$ref: '#/components/responses/PoolStatsResponse'
summary: Pool Statistics
tags:
- Pool
components:
schemas:
PoolDetail:
properties:
annualPercentageRate:
description: 'Float, Annual Percentage Yield of earning to depth (earning/depth) estimated from a period
(configurable by the period parameter, default is 14) E.g. 0.1 means 10% yearly return.
'
type: string
asset:
type: string
assetDepth:
description: Int64(e8), the amount of Asset in the pool.
type: string
assetPrice:
description: Float, price of asset in rune. I.e. rune amount / asset amount.
type: string
assetPriceUSD:
description: Float, the price of asset in USD (based on the deepest USD pool).
type: string
depthMinus2Percent:
description: 'Int64(e8), liquidity depth at -2% price movement calculated using Uniswap V2 constant product
formula with fee from L1SLIPMINBPS mimir value. Represents the maximum RUNE value that can be traded before the pool
price decreases by 2%.
'
type: string
depthPlus2Percent:
description: 'Int64(e8), liquidity depth at +2% price movement calculated using Uniswap V2 constant product
formula with fee from L1SLIPMINBPS mimir value. Represents the maximum RUNE value that can be traded before the pool
price increases by 2%.
'
type: string
earnings:
description: "Int64(e8), The earning that has been recorded from the pool asset's Liquidity Fees\nand Rewards in RUNE. The earnings shown are from the period parameter default being 14 days \n(configurable by the period parameter).\n"
type: string
earningsAnnualAsPercentOfDepth:
description: "Float, The estimation of earnings during the time interval expanded through a year \ncompared to the current pool depth.\nE.g. 0.1 means the pool based on this interval earnings can earn 10% of its pool during a year.\n"
type: string
liquidityInUSD:
description: Float, the price of the liquidity pool in USD
type: string
liquidityUnits:
description: Int64, Liquidity Units in the pool.
type: string
lpLuvi:
description: 'Float, Annual yield estimated (compounding) from a period (default being 14d)
configurable by the period parameter. Calculated from Liquidity Unit Value Index (LUVI).
Due to Impermanent Loss and Synths Leverage this might be negative.
'
type: string
nativeDecimal:
description: Int64, The native decimal number of the pool asset. (If the value is "-1", it means midgard doesn't know the pool native decimal)
type: string
poolAPY:
description: 'Float, Annual Percentage Yield of earning to depth (earning/depth) estimated from a period
(configurable by the period parameter, default is 14) E.g. 0.1 means 10% yearly return.
'
type: string
runeDepth:
description: Int64(e8), the amount of Rune in the pool.
type: string
saversAPR:
description: 'Float, Annual Return estimated linearly (not compounded) for savers from
a period of typically the last 30 or 100 days (configurable by the period parameter,
default is 14). E.g. 0.1 means 10% yearly return.
If the savers period has not yet been reached, It will show zero instead.
'
type: string
saversDepth:
description: Int64, Total synth locked in saver vault.
type: string
saversUnits:
description: Int64, Units tracking savers vault ownership.
type: string
saversYieldShare:
description: "Float, the proportion of overall yield that is given to savers based on its size \n(relative to dual side LPs) and the SynthYieldBasisPoints. E.g. 0.1 means 10% of the yield\ngoes to the savers.\n"
type: string
status:
description: The state of the pool, e.g. Available, Staged.
type: string
synthSupply:
description: Int64, Synth supply in the pool.
type: string
synthUnits:
description: Int64, Synth Units in the pool.
type: string
totalCollateral:
description: Int64, Total collateral of the pool created by the borrowers.
type: string
totalDebtTor:
description: Int64, Total debt of the pool by the borrowers.
type: string
units:
description: Int64, Total Units (synthUnits + liquidityUnits) in the pool.
type: string
volume24h:
description: 'Int64(e8), the total volume of swaps in the last 24h to and from Rune denoted in Rune.
It includes synth mint or burn.
'
type: string
required:
- asset
- volume24h
- assetDepth
- runeDepth
- assetPrice
- assetPriceUSD
- liquidityInUSD
- annualPercentageRate
- poolAPY
- earnings
- earningsAnnualAsPercentOfDepth
- status
- liquidityUnits
- synthUnits
- synthSupply
- units
- nativeDecimal
- saversUnits
- saversDepth
- saversAPR
- totalCollateral
- totalDebtTor
- lpLuvi
type: object
PoolStatsDetail:
properties:
addAssetLiquidityVolume:
description: Int64(e8), same as history/liquidity_changes:addAssetLiquidityVolume
type: string
addLiquidityCount:
description: Int64, same as history/liquidity_changes:addLiquidityCount
type: string
addLiquidityVolume:
description: Int64(e8), same as history/liquidity_changes:addLiquidityVolume
type: string
addRuneLiquidityVolume:
description: Int64(e8), same as history/liquidity_changes:addRuneLiquidityVolume
type: string
annualPercentageRate:
description: deprecated now it's only showing zero util being deleted.
type: string
asset:
type: string
assetDepth:
description: Int64(e8), the amount of Asset in the pool
type: string
assetPrice:
description: Float, price of asset in rune. I.e. rune amount / asset amount
type: string
assetPriceUSD:
description: Float, the price of asset in USD (based on the deepest USD pool).
type: string
averageSlip:
description: 'Float64 (Basis points, 0-10000, where 10000=100%), same as history/swaps:averageSlip
'
type: string
earnings:
description: "Int64(e8), The earning that has been recorded from the pool asset's Liquidity Fees\nand Rewards in RUNE. The earnings shown are from the period parameter default being 14 days \n(configurable by the period parameter).\n"
type: string
earningsAnnualAsPercentOfDepth:
description: "Float, The estimation of earnings during the time interval expanded through a year \ncompared to the current pool depth.\nE.g. 0.1 means the pool based on this interval earnings can earn 10% of its pool during a year.\n"
type: string
liquidityUnits:
description: Int64, Liquidity Units in the pool
type: string
poolAPY:
description: deprecated now it's only showing zero util being deleted.
type: string
runeDepth:
description: Int64(e8), the amount of Rune in the pool
type: string
saversAPR:
description: 'Float, Annual Return estimated linearly (not compounded) for savers from
a period of typically the last 30 or 100 days (configurable by the period parameter,
default is 14). E.g. 0.1 means 10% yearly return.
If the savers period has not yet been reached, It will show zero instead.
'
type: string
status:
description: The state of the pool, e.g. Available, Staged
type: string
swapCount:
description: Int64, same as history/swaps:totalCount
type: string
swapVolume:
description: Int64(e8), same as history/swaps:totalVolume
type: string
synthSupply:
description: Int64, Synth supply in the pool
type: string
synthUnits:
description: Int64, Synth Units in the pool
type: string
toAssetAverageSlip:
description: 'Float64 (Basis points, 0-10000, where 10000=100%), same as
history/swaps:toAssetAverageSlip
'
type: string
toAssetCount:
description: Int64, same as history/swaps:toAssetCount
type: string
toAssetFees:
description: Int64(e8), same as history/swaps:toAssetFees
type: string
toAssetVolume:
description: Int64(e8), same as history/swaps:toAssetVolume
type: string
toRuneAverageSlip:
description: 'Float64 (Basis points, 0-10000, where 10000=100%), same as
history/swaps:toRuneAverageSlip
'
type: string
toRuneCount:
description: Int64, same as history/swaps:toRuneCount
type: string
toRuneFees:
description: Int64(e8), same as history/swaps:toRuneFees
type: string
toRuneVolume:
description: Int64(e8), same as history/swaps:toRuneVolume
type: string
totalFees:
description: Int64(e8), same as history/swaps:totalFees
type: string
uniqueMemberCount:
description: Int64, same as len(history/members?pool=POOL)
type: string
uniqueSwapperCount:
description: Deprecated, it's always 0.
type: string
units:
description: Int64, Total Units (synthUnits + liquidityUnits) in the pool
type: string
withdrawAssetVolume:
description: Int64(e8), same as history/liquidity_changes:withdrawAssetVolume
type: string
withdrawCount:
description: Int64, same as history/liquidity_changes:withdrawCount
type: string
withdrawRuneVolume:
description: Int64(e8), same as history/liquidity_changes:withdrawRuneVolume
type: string
withdrawVolume:
description: Int64(e8), same as history/liquidity_changes:withdrawVolume
type: string
required:
- asset
- status
- assetPrice
- assetPriceUSD
- assetDepth
- runeDepth
- liquidityUnits
- synthUnits
- synthSupply
- units
- toAssetVolume
- toRuneVolume
- swapVolume
- toAssetCount
- toRuneCount
- swapCount
- uniqueSwapperCount
- toAssetAverageSlip
- toRuneAverageSlip
- averageSlip
- toAssetFees
- toRuneFees
- totalFees
- poolAPY
- annualPercentageRate
- earnings
- earningsAnnualAsPercentOfDepth
- saversAPR
- addAssetLiquidityVolume
- addRuneLiquidityVolume
- addLiquidityVolume
- addLiquidityCount
- withdrawAssetVolume
- withdrawRuneVolume
- withdrawVolume
- withdrawCount
- uniqueMemberCount
type: object
responses:
PoolStatsResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/PoolStatsDetail'
description: Stats for one pool.
PoolResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/PoolDetail'
description: Object containing details for one pool