Skip to content
Get started

Lookup lending market by asset

GET/api/v1/markets/lend/lookup

Lookup lending market by asset

Query ParametersExpand Collapse
asset_id: string

Asset ID for lookup

with_text: optional boolean

Include text variation fields

with_value: optional boolean

Calculate and include USD values for amounts, where applicable

ReturnsExpand Collapse
data: LendMarket { asset_info, rate, state }

Lending market overview

asset_info: AssetInfo { asset, classification, metadata }

Asset identifiers with associated metadata

asset: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
classification: AssetClassification

The asset's classification metadata. Assets are classfied to provide context on their usage throughout the Neptune API (e.g. regular assets, neptune receipt tokens, LSTs, etc.)

Each asset belongs to only a single classification type. This object contains metadata pertaining to the given classification.

While some fields may be common among the distinct classifcations, each classification is distinct and subject to independent change.

One of the following:
Regular = object { kind, neptune_receipt_asset }
kind: "regular"
neptune_receipt_asset: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
NeptuneReceiptToken = object { kind, origin_asset }
kind: "neptune_receipt_token"
origin_asset: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
LiquidStakingToken = object { kind, origin_asset }
kind: "liquid_staking_token"
origin_asset: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
metadata: AssetMetadata { decimals_denom, decimals_display, name, 2 more }

Additional metadata for assets

decimals_denom: number

Denom exponent, or num. of decimal places that shift between denom/standard amounts (e.g. 18 for INJ)

formatuint32
minimum0
decimals_display: number

Number of decimals used when displaying amounts of this asset (this is subjective and used for generating text representations)

formatuint32
minimum0
name: string

Full name of the asset

symbol: string

Symbol of the asset, e.g.: NEPT INJ

symbol_denom: string

Denom symbol for the asset (e.g. inj for INJ, sat for BTC)

rate: MarketRate { apr, apy, extra }

Lending market rates

apr: string

Market rate in APR standard as a decimal percentage

apy: string

Market rate in APY standard as a decimal percentage

extra: object { text }
text: object { apr, apy }

Human-readable field variants. Will not be null when query param with_text is true.

apr: string
apy: string
state: LendMarketState { extra, principal_sum, receipt_total_supply, redemption_ratio }

Current lending market state

extra: object { text, value }
text: object { principal_sum, receipt_total_supply, redemption_ratio }

Human-readable field variants. Will not be null when query param with_text is true.

principal_sum: string
receipt_total_supply: string
redemption_ratio: string
value: object { extra, price, principal_sum }

USD values for the corresponding amounts above. Will not be null when query param with_value is true.

Note

This variant group contains an additional price field (set to the number used in value calculation).

The embedded text group will contain the text variant if with_text was specified as well.

extra: object { text }
text: object { price, principal_sum }

Human-readable variants of USD values. Will not be null when query params with_text and with_value are true.

price: string

Text representation of price

principal_sum: string
price: string

Price used in value calculations

principal_sum: string
principal_sum: string

The total amount of the asset deposited for lending in the market.

receipt_total_supply: string
redemption_ratio: string
error: unknown

Error data. Guaranteed null for successful response.

status: number

HTTP status. Successful responses are guaranteed to be < 400. Conversely, error responses are guaranteed to be >= 400.

formatuint16
minimum0
maximum65535
status_text: string

HTTP status text

Lookup lending market by asset

curl https://api-v2.nept.finance/api/v1/markets/lend/lookup
{
  "data": {
    "asset_info": {
      "asset": {
        "id": "native;inj",
        "group": "native",
        "group_key": "inj"
      },
      "metadata": {
        "name": "Injective",
        "symbol": "INJ",
        "symbol_denom": "inj",
        "decimals_denom": 18,
        "decimals_display": 4
      },
      "classification": {
        "kind": "regular",
        "neptune_receipt_asset": {
          "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f",
          "group": "token",
          "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f"
        }
      }
    },
    "rate": {
      "apr": "0.21150951",
      "apy": "0.23554172",
      "extra": {
        "text": {
          "apy": "23.55%",
          "apr": "21.15%"
        }
      }
    },
    "state": {
      "principal_sum": "425740748412504991838699",
      "receipt_total_supply": "396952939907783847231686",
      "redemption_ratio": "1.072521968249961422",
      "extra": {
        "text": {
          "redemption_ratio": "1.0725",
          "receipt_total_supply": "396,952.9399 nINJ",
          "principal_sum": "425,740.7484 INJ"
        },
        "value": {
          "price": "2.99835",
          "principal_sum": "1276519.773002634342279563",
          "extra": {
            "text": {
              "price": "$2.99",
              "principal_sum": "$1,276,519.77"
            }
          }
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}
Returns Examples
{
  "data": {
    "asset_info": {
      "asset": {
        "id": "native;inj",
        "group": "native",
        "group_key": "inj"
      },
      "metadata": {
        "name": "Injective",
        "symbol": "INJ",
        "symbol_denom": "inj",
        "decimals_denom": 18,
        "decimals_display": 4
      },
      "classification": {
        "kind": "regular",
        "neptune_receipt_asset": {
          "id": "token;inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f",
          "group": "token",
          "group_key": "inj1rmzufd7h09sqfrre5dtvu5d09ta7c0t4jzkr2f"
        }
      }
    },
    "rate": {
      "apr": "0.21150951",
      "apy": "0.23554172",
      "extra": {
        "text": {
          "apy": "23.55%",
          "apr": "21.15%"
        }
      }
    },
    "state": {
      "principal_sum": "425740748412504991838699",
      "receipt_total_supply": "396952939907783847231686",
      "redemption_ratio": "1.072521968249961422",
      "extra": {
        "text": {
          "redemption_ratio": "1.0725",
          "receipt_total_supply": "396,952.9399 nINJ",
          "principal_sum": "425,740.7484 INJ"
        },
        "value": {
          "price": "2.99835",
          "principal_sum": "1276519.773002634342279563",
          "extra": {
            "text": {
              "price": "$2.99",
              "principal_sum": "$1,276,519.77"
            }
          }
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}