Skip to content
Get started

Get market TVL

markets.get_tvl(MarketGetTvlParams**kwargs) -> MarketGetTvlResponse
GET/api/v1/markets/tvl

Get market TVL

ParametersExpand Collapse
with_text: Optional[bool]

Include text variation fields

ReturnsExpand Collapse
class MarketGetTvlResponse:
data: Tvl
collateral_value: str

Market TVL in USD - collateral portion

extra: Extra
text: Optional[ExtraText]

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

collateral_value: str
lend_value: str
total_value: str
lend_value: str

Market TVL in USD - lend portion

total_value: str

Market TVL in USD

error: None

Error data. Guaranteed null for successful response.

status: int

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

formatuint16
minimum0
maximum65535
status_text: str

HTTP status text

Get market TVL

from neptune_api_v2 import NeptuneAPIV2

client = NeptuneAPIV2()
response = client.markets.get_tvl()
print(response.data)
{
  "data": {
    "collateral_value": "1878974.71690777",
    "lend_value": "1713270.07922393",
    "total_value": "3592244.7961317",
    "extra": {
      "text": {
        "collateral_value": "$1,878,974.71",
        "lend_value": "$1,713,270.07",
        "total_value": "$3,592,244.79"
      }
    }
  },
  "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": {
    "collateral_value": "1878974.71690777",
    "lend_value": "1713270.07922393",
    "total_value": "3592244.7961317",
    "extra": {
      "text": {
        "collateral_value": "$1,878,974.71",
        "lend_value": "$1,713,270.07",
        "total_value": "$3,592,244.79"
      }
    }
  },
  "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"
}