Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/release-doctor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-99a21fdf9159c28a75eb60c0b7ad4710d01b0a98dd0474267a07e9914039fa83.yml
openapi_spec_hash: f58f326c00c34bc45b28b09b9530566c
config_hash: 27aff5f3f84397a9b3c2cb8a3c1d1e71
configured_endpoints: 50
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-40d8045cda417d4c8a7a4a0d014345cdeb273fb5fdfa48eea08493bc5a5079ce.yml
openapi_spec_hash: 71ca66dcf6e775aae3f49b42cd6ce2cc
config_hash: f5ca3bc259f95069f0db4114d34e29ef
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.5.0 (2026-04-17)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.4.0...v0.5.0)

### Features

* **api:** add TVL, missing balance variants ([10486d5](https://github.com/cryptechdev/neptune-api-v2-python/commit/10486d58a60c4e1744125c00f7cee3b8eb34382e))


### Bug Fixes

* ensure file data are only sent as 1 parameter ([1581f6d](https://github.com/cryptechdev/neptune-api-v2-python/commit/1581f6dae176d8896f9d7dcfc79cda9413aa7275))


### Chores

* **ci:** remove release-doctor workflow ([39b2df7](https://github.com/cryptechdev/neptune-api-v2-python/commit/39b2df7b359adc03bcad1e4f6521ace263c88393))

## 0.4.0 (2026-04-09)

Full Changelog: [v0.3.0...v0.4.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.3.0...v0.4.0)
Expand Down
3 changes: 3 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ from neptune_api_v2.types import (
GlobalMarketConfig,
MarketRate,
MergedMarket,
Tvl,
MarketGetMergedResponse,
MarketGetMergedByAssetResponse,
MarketGetOverviewResponse,
MarketGetParamsResponse,
MarketGetTvlResponse,
)
```

Expand All @@ -76,6 +78,7 @@ Methods:
- <code title="get /api/v1/markets/merged/lookup">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_merged_by_asset</a>(\*\*<a href="src/neptune_api_v2/types/market_get_merged_by_asset_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_merged_by_asset_response.py">MarketGetMergedByAssetResponse</a></code>
- <code title="get /api/v1/markets">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_overview</a>(\*\*<a href="src/neptune_api_v2/types/market_get_overview_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_overview_response.py">MarketGetOverviewResponse</a></code>
- <code title="get /api/v1/markets/config">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_params</a>(\*\*<a href="src/neptune_api_v2/types/market_get_params_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_params_response.py">MarketGetParamsResponse</a></code>
- <code title="get /api/v1/markets/tvl">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_tvl</a>(\*\*<a href="src/neptune_api_v2/types/market_get_tvl_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_tvl_response.py">MarketGetTvlResponse</a></code>

## Lend

Expand Down
17 changes: 0 additions & 17 deletions bin/check-release-environment

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "neptune_api_v2"
version = "0.4.0"
version = "0.5.0"
description = "The official Python library for the neptune-api-v2 API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/neptune_api_v2/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/neptune_api_v2/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "neptune_api_v2"
__version__ = "0.4.0" # x-release-please-version
__version__ = "0.5.0" # x-release-please-version
88 changes: 88 additions & 0 deletions src/neptune_api_v2/resources/markets/markets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
AsyncLendResourceWithStreamingResponse,
)
from ...types import (
market_get_tvl_params,
market_get_merged_params,
market_get_params_params,
market_get_overview_params,
Expand All @@ -37,6 +38,7 @@
AsyncBorrowResourceWithStreamingResponse,
)
from ..._base_client import make_request_options
from ...types.market_get_tvl_response import MarketGetTvlResponse
from ...types.market_get_merged_response import MarketGetMergedResponse
from ...types.market_get_params_response import MarketGetParamsResponse
from ...types.market_get_overview_response import MarketGetOverviewResponse
Expand Down Expand Up @@ -252,6 +254,43 @@ def get_params(
cast_to=MarketGetParamsResponse,
)

def get_tvl(
self,
*,
with_text: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MarketGetTvlResponse:
"""
Get market TVL

Args:
with_text: Include text variation fields

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
"/api/v1/markets/tvl",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"with_text": with_text}, market_get_tvl_params.MarketGetTvlParams),
),
cast_to=MarketGetTvlResponse,
)


class AsyncMarketsResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -462,6 +501,43 @@ async def get_params(
cast_to=MarketGetParamsResponse,
)

async def get_tvl(
self,
*,
with_text: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> MarketGetTvlResponse:
"""
Get market TVL

Args:
with_text: Include text variation fields

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
"/api/v1/markets/tvl",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform({"with_text": with_text}, market_get_tvl_params.MarketGetTvlParams),
),
cast_to=MarketGetTvlResponse,
)


class MarketsResourceWithRawResponse:
def __init__(self, markets: MarketsResource) -> None:
Expand All @@ -479,6 +555,9 @@ def __init__(self, markets: MarketsResource) -> None:
self.get_params = to_raw_response_wrapper(
markets.get_params,
)
self.get_tvl = to_raw_response_wrapper(
markets.get_tvl,
)

@cached_property
def lend(self) -> LendResourceWithRawResponse:
Expand All @@ -505,6 +584,9 @@ def __init__(self, markets: AsyncMarketsResource) -> None:
self.get_params = async_to_raw_response_wrapper(
markets.get_params,
)
self.get_tvl = async_to_raw_response_wrapper(
markets.get_tvl,
)

@cached_property
def lend(self) -> AsyncLendResourceWithRawResponse:
Expand All @@ -531,6 +613,9 @@ def __init__(self, markets: MarketsResource) -> None:
self.get_params = to_streamed_response_wrapper(
markets.get_params,
)
self.get_tvl = to_streamed_response_wrapper(
markets.get_tvl,
)

@cached_property
def lend(self) -> LendResourceWithStreamingResponse:
Expand All @@ -557,6 +642,9 @@ def __init__(self, markets: AsyncMarketsResource) -> None:
self.get_params = async_to_streamed_response_wrapper(
markets.get_params,
)
self.get_tvl = async_to_streamed_response_wrapper(
markets.get_tvl,
)

@cached_property
def lend(self) -> AsyncLendResourceWithStreamingResponse:
Expand Down
3 changes: 3 additions & 0 deletions src/neptune_api_v2/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from .tvl import Tvl as Tvl
from .user import User as User
from .user_tx import UserTx as UserTx
from .interval import Interval as Interval
Expand All @@ -26,9 +27,11 @@
from .asset_classification import AssetClassification as AssetClassification
from .global_market_config import GlobalMarketConfig as GlobalMarketConfig
from .user_get_user_params import UserGetUserParams as UserGetUserParams
from .market_get_tvl_params import MarketGetTvlParams as MarketGetTvlParams
from .nept_get_state_params import NeptGetStateParams as NeptGetStateParams
from .nept_get_params_params import NeptGetParamsParams as NeptGetParamsParams
from .user_get_user_response import UserGetUserResponse as UserGetUserResponse
from .market_get_tvl_response import MarketGetTvlResponse as MarketGetTvlResponse
from .nept_get_state_response import NeptGetStateResponse as NeptGetStateResponse
from .validation_field_source import ValidationFieldSource as ValidationFieldSource
from .asset_list_prices_params import AssetListPricesParams as AssetListPricesParams
Expand Down
4 changes: 4 additions & 0 deletions src/neptune_api_v2/types/market_get_overview_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from typing import List

from .tvl import Tvl
from .._models import BaseModel
from .markets.lend_market import LendMarket
from .global_market_config import GlobalMarketConfig
Expand All @@ -20,6 +21,9 @@ class Data(BaseModel):
lend: List[LendMarket]
"""Current lending markets"""

tvl: Tvl
"""Market TVL"""


class MarketGetOverviewResponse(BaseModel):
data: Data
Expand Down
12 changes: 12 additions & 0 deletions src/neptune_api_v2/types/market_get_tvl_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import TypedDict

__all__ = ["MarketGetTvlParams"]


class MarketGetTvlParams(TypedDict, total=False):
with_text: bool
"""Include text variation fields"""
23 changes: 23 additions & 0 deletions src/neptune_api_v2/types/market_get_tvl_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .tvl import Tvl
from .._models import BaseModel

__all__ = ["MarketGetTvlResponse"]


class MarketGetTvlResponse(BaseModel):
data: Tvl

error: None = 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`.
"""

status_text: str
"""HTTP status text"""
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class ExtraText(BaseModel):
Will not be null when query param `with_text` is `true`.
"""

balance: str

collateral_sum: str


Expand All @@ -22,6 +24,8 @@ class ExtraValueExtraText(BaseModel):
Will not be null when query params `with_text` and `with_value` are `true`.
"""

balance: str

collateral_sum: str

price: str
Expand All @@ -48,6 +52,8 @@ class ExtraValue(BaseModel):
The embedded text group will contain the text variant if `with_text` was specified as well.
"""

balance: str

collateral_sum: str

extra: ExtraValueExtra
Expand Down
Loading
Loading