Skip to content
Get started

Get market supply

GET/api/v1/markets/supply

Get market supply

Query ParametersExpand Collapse
with_text: optional boolean

Include text variation fields

ReturnsExpand Collapse
data: object { borrow_collateral, borrow_debt, lend, tvl }
borrow_collateral: BorrowCollateralMarketSupply { non_receipt, receipt, total }

Borrowing market supply - collaterals

non_receipt: MarketSupplyPool { balance, extra, shares }

Supply of all collaterals (excluding receipt tokens)

balance: string

Sum USD value of market balance

extra: object { text }
text: object { balance, shares }

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

balance: string
shares: string
shares: string

Sum USD value of market shares

receipt: MarketSupplyPool { balance, extra, shares }

Supply of receipt token collaterals

balance: string

Sum USD value of market balance

extra: object { text }
text: object { balance, shares }

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

balance: string
shares: string
shares: string

Sum USD value of market shares

total: MarketSupplyPool { balance, extra, shares }

Total supply for collaterals, regardless of type. Equivalent to non_receipt + receipt

balance: string

Sum USD value of market balance

extra: object { text }
text: object { balance, shares }

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

balance: string
shares: string
shares: string

Sum USD value of market shares

borrow_debt: MarketSupplyPool { balance, extra, shares }

Borrowing market supply - debts

balance: string

Sum USD value of market balance

extra: object { text }
text: object { balance, shares }

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

balance: string
shares: string
shares: string

Sum USD value of market shares

lend: LendMarketSupply { extra, principal }

Lending market supply

extra: object { text }
text: object { principal }

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

principal: string
principal: string

Sum USD value of lending principal

tvl: Tvl { extra, net_tvl, tvl }

Market TVL

extra: object { text }
text: object { net_tvl, tvl }

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

net_tvl: string
tvl: string
net_tvl: string

Market net TVL in USD (equivalent to tvl - borrow.debts.supply.balance)

tvl: string

Market TVL in USD (equivalent to borrow.collaterals.supply.non_receipt.balance + lend.supply.principal)

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

Get market supply

curl https://api-v2.nept.finance/api/v1/markets/supply
{
  "data": {
    "borrow_collateral": {
      "non_receipt": {
        "balance": "1911404.359986036157511319",
        "shares": "1461677.619335545343149205",
        "extra": {
          "text": {
            "shares": "$1,461,677.61",
            "balance": "$1,911,404.35"
          }
        }
      },
      "receipt": {
        "balance": "200517.404188230833340572",
        "shares": "200517.404188230833340572",
        "extra": {
          "text": {
            "shares": "$200,517.40",
            "balance": "$200,517.40"
          }
        }
      },
      "total": {
        "balance": "2111921.764174266990851891",
        "shares": "1662195.023523776176489777",
        "extra": {
          "text": {
            "shares": "$1,662,195.02",
            "balance": "$2,111,921.76"
          }
        }
      }
    },
    "borrow_debt": {
      "balance": "1175633.019245139869052634",
      "shares": "1027257.134081383640559021",
      "extra": {
        "text": {
          "shares": "$1,027,257.13",
          "balance": "$1,175,633.01"
        }
      }
    },
    "lend": {
      "principal": "1674639.064979431919912068",
      "extra": {
        "text": {
          "principal": "$1,674,639.06"
        }
      }
    },
    "tvl": {
      "tvl": "3586043.424965468077423387",
      "net_tvl": "2410410.405720328208370753",
      "extra": {
        "text": {
          "net_tvl": "$2,410,410.40",
          "tvl": "$3,586,043.42"
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "Internal Server Error"
}
Returns Examples
{
  "data": {
    "borrow_collateral": {
      "non_receipt": {
        "balance": "1911404.359986036157511319",
        "shares": "1461677.619335545343149205",
        "extra": {
          "text": {
            "shares": "$1,461,677.61",
            "balance": "$1,911,404.35"
          }
        }
      },
      "receipt": {
        "balance": "200517.404188230833340572",
        "shares": "200517.404188230833340572",
        "extra": {
          "text": {
            "shares": "$200,517.40",
            "balance": "$200,517.40"
          }
        }
      },
      "total": {
        "balance": "2111921.764174266990851891",
        "shares": "1662195.023523776176489777",
        "extra": {
          "text": {
            "shares": "$1,662,195.02",
            "balance": "$2,111,921.76"
          }
        }
      }
    },
    "borrow_debt": {
      "balance": "1175633.019245139869052634",
      "shares": "1027257.134081383640559021",
      "extra": {
        "text": {
          "shares": "$1,027,257.13",
          "balance": "$1,175,633.01"
        }
      }
    },
    "lend": {
      "principal": "1674639.064979431919912068",
      "extra": {
        "text": {
          "principal": "$1,674,639.06"
        }
      }
    },
    "tvl": {
      "tvl": "3586043.424965468077423387",
      "net_tvl": "2410410.405720328208370753",
      "extra": {
        "text": {
          "net_tvl": "$2,410,410.40",
          "tvl": "$3,586,043.42"
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "Internal Server Error"
}