From a258db0798d0887900eec2e89153fde27f024349 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 04:41:28 +0000 Subject: [PATCH 01/19] chore: update SDK settings --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- .stats.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 10 +++++----- pyproject.toml | 6 +++--- src/neptune_api_v2/resources/analytics/analytics.py | 8 ++++---- .../resources/analytics/market/history.py | 8 ++++---- .../resources/analytics/market/market.py | 8 ++++---- src/neptune_api_v2/resources/assets.py | 8 ++++---- src/neptune_api_v2/resources/integrations/bantr.py | 8 ++++---- .../resources/integrations/integrations.py | 8 ++++---- src/neptune_api_v2/resources/markets/borrow/borrow.py | 8 ++++---- .../resources/markets/borrow/collaterals.py | 8 ++++---- src/neptune_api_v2/resources/markets/borrow/debts.py | 8 ++++---- src/neptune_api_v2/resources/markets/lend.py | 8 ++++---- src/neptune_api_v2/resources/markets/markets.py | 8 ++++---- src/neptune_api_v2/resources/nept.py | 8 ++++---- src/neptune_api_v2/resources/status.py | 8 ++++---- .../resources/user/market/borrow/borrow.py | 8 ++++---- .../resources/user/market/borrow/subaccount.py | 8 ++++---- src/neptune_api_v2/resources/user/market/lend.py | 8 ++++---- src/neptune_api_v2/resources/user/market/market.py | 8 ++++---- src/neptune_api_v2/resources/user/nept/nept.py | 8 ++++---- src/neptune_api_v2/resources/user/nept/staking.py | 8 ++++---- src/neptune_api_v2/resources/user/user.py | 8 ++++---- src/neptune_api_v2/resources/user/wallet.py | 8 ++++---- 27 files changed, 97 insertions(+), 97 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index c6ea521..6035a80 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/cryptechdev/stainless-api-v2-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/cryptechdev/neptune-api-v2-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 78f401d..b8e1556 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'cryptechdev/stainless-api-v2-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'cryptechdev/neptune-api-v2-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v6 diff --git a/.stats.yml b/.stats.yml index 6530d99..b452866 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-9048b9a34641ce9f489cc9813115c2cbe53ba4e19fec4d4be8ad50cc4c6dc955.yml openapi_spec_hash: 90a2e162ca6a44232297cba2c5017476 -config_hash: da42ffa688c006ab6ebd3493c9dfb0c6 +config_hash: c0eef50aebf8314784456d5c6f539ce5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 75ff9b5..d0f5d2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```sh -$ pip install git+ssh://git@github.com/cryptechdev/stainless-api-v2-python.git +$ pip install git+ssh://git@github.com/cryptechdev/neptune-api-v2-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -113,7 +113,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/cryptechdev/stainless-api-v2-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/cryptechdev/neptune-api-v2-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index a05340b..89bf3ae 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The full API of this library can be found in [api.md](api.md). ```sh # install from the production repo -pip install git+ssh://git@github.com/cryptechdev/stainless-api-v2-python.git +pip install git+ssh://git@github.com/cryptechdev/neptune-api-v2-python.git ``` > [!NOTE] @@ -65,7 +65,7 @@ You can enable this by installing `aiohttp`: ```sh # install from the production repo -pip install 'neptune_api_v2[aiohttp] @ git+ssh://git@github.com/cryptechdev/stainless-api-v2-python.git' +pip install 'neptune_api_v2[aiohttp] @ git+ssh://git@github.com/cryptechdev/neptune-api-v2-python.git' ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: @@ -226,9 +226,9 @@ status = response.parse() # get the object that `status.check_health()` would h print(status.status) ``` -These methods return an [`APIResponse`](https://github.com/cryptechdev/stainless-api-v2-python/tree/main/src/neptune_api_v2/_response.py) object. +These methods return an [`APIResponse`](https://github.com/cryptechdev/neptune-api-v2-python/tree/main/src/neptune_api_v2/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/cryptechdev/stainless-api-v2-python/tree/main/src/neptune_api_v2/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/cryptechdev/neptune-api-v2-python/tree/main/src/neptune_api_v2/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -332,7 +332,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/cryptechdev/stainless-api-v2-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/cryptechdev/neptune-api-v2-python/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/pyproject.toml b/pyproject.toml index bf78a83..734c39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/cryptechdev/stainless-api-v2-python" -Repository = "https://github.com/cryptechdev/stainless-api-v2-python" +Homepage = "https://github.com/cryptechdev/neptune-api-v2-python" +Repository = "https://github.com/cryptechdev/neptune-api-v2-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] @@ -112,7 +112,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/cryptechdev/stainless-api-v2-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/cryptechdev/neptune-api-v2-python/tree/main/\g<2>)' [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/neptune_api_v2/resources/analytics/analytics.py b/src/neptune_api_v2/resources/analytics/analytics.py index 487b4dc..383349b 100644 --- a/src/neptune_api_v2/resources/analytics/analytics.py +++ b/src/neptune_api_v2/resources/analytics/analytics.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> AnalyticsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AnalyticsResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> AnalyticsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AnalyticsResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncAnalyticsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncAnalyticsResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> AsyncAnalyticsResourceWithStreamingResponse """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncAnalyticsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/analytics/market/history.py b/src/neptune_api_v2/resources/analytics/market/history.py index 304abc5..e2dc723 100644 --- a/src/neptune_api_v2/resources/analytics/market/history.py +++ b/src/neptune_api_v2/resources/analytics/market/history.py @@ -33,7 +33,7 @@ def with_raw_response(self) -> HistoryResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return HistoryResourceWithRawResponse(self) @@ -42,7 +42,7 @@ def with_streaming_response(self) -> HistoryResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return HistoryResourceWithStreamingResponse(self) @@ -227,7 +227,7 @@ def with_raw_response(self) -> AsyncHistoryResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncHistoryResourceWithRawResponse(self) @@ -236,7 +236,7 @@ def with_streaming_response(self) -> AsyncHistoryResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncHistoryResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/analytics/market/market.py b/src/neptune_api_v2/resources/analytics/market/market.py index a4221bc..914fdb0 100644 --- a/src/neptune_api_v2/resources/analytics/market/market.py +++ b/src/neptune_api_v2/resources/analytics/market/market.py @@ -38,7 +38,7 @@ def with_raw_response(self) -> MarketResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return MarketResourceWithRawResponse(self) @@ -47,7 +47,7 @@ def with_streaming_response(self) -> MarketResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return MarketResourceWithStreamingResponse(self) @@ -82,7 +82,7 @@ def with_raw_response(self) -> AsyncMarketResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncMarketResourceWithRawResponse(self) @@ -91,7 +91,7 @@ def with_streaming_response(self) -> AsyncMarketResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncMarketResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/assets.py b/src/neptune_api_v2/resources/assets.py index e6cac28..1036e60 100644 --- a/src/neptune_api_v2/resources/assets.py +++ b/src/neptune_api_v2/resources/assets.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> AssetsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AssetsResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> AssetsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AssetsResourceWithStreamingResponse(self) @@ -197,7 +197,7 @@ def with_raw_response(self) -> AsyncAssetsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncAssetsResourceWithRawResponse(self) @@ -206,7 +206,7 @@ def with_streaming_response(self) -> AsyncAssetsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncAssetsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/integrations/bantr.py b/src/neptune_api_v2/resources/integrations/bantr.py index 61a8c54..0b36876 100644 --- a/src/neptune_api_v2/resources/integrations/bantr.py +++ b/src/neptune_api_v2/resources/integrations/bantr.py @@ -30,7 +30,7 @@ def with_raw_response(self) -> BantrResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return BantrResourceWithRawResponse(self) @@ -39,7 +39,7 @@ def with_streaming_response(self) -> BantrResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return BantrResourceWithStreamingResponse(self) @@ -101,7 +101,7 @@ def with_raw_response(self) -> AsyncBantrResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncBantrResourceWithRawResponse(self) @@ -110,7 +110,7 @@ def with_streaming_response(self) -> AsyncBantrResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncBantrResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/integrations/integrations.py b/src/neptune_api_v2/resources/integrations/integrations.py index 40c404e..7a56c8e 100644 --- a/src/neptune_api_v2/resources/integrations/integrations.py +++ b/src/neptune_api_v2/resources/integrations/integrations.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> IntegrationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return IntegrationsResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> IntegrationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return IntegrationsResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncIntegrationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncIntegrationsResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> AsyncIntegrationsResourceWithStreamingRespo """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncIntegrationsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/markets/borrow/borrow.py b/src/neptune_api_v2/resources/markets/borrow/borrow.py index 8055efa..e612b41 100644 --- a/src/neptune_api_v2/resources/markets/borrow/borrow.py +++ b/src/neptune_api_v2/resources/markets/borrow/borrow.py @@ -55,7 +55,7 @@ def with_raw_response(self) -> BorrowResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return BorrowResourceWithRawResponse(self) @@ -64,7 +64,7 @@ def with_streaming_response(self) -> BorrowResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return BorrowResourceWithStreamingResponse(self) @@ -219,7 +219,7 @@ def with_raw_response(self) -> AsyncBorrowResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncBorrowResourceWithRawResponse(self) @@ -228,7 +228,7 @@ def with_streaming_response(self) -> AsyncBorrowResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncBorrowResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/markets/borrow/collaterals.py b/src/neptune_api_v2/resources/markets/borrow/collaterals.py index 9f89f4b..2ef430b 100644 --- a/src/neptune_api_v2/resources/markets/borrow/collaterals.py +++ b/src/neptune_api_v2/resources/markets/borrow/collaterals.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> CollateralsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return CollateralsResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> CollateralsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return CollateralsResourceWithStreamingResponse(self) @@ -146,7 +146,7 @@ def with_raw_response(self) -> AsyncCollateralsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncCollateralsResourceWithRawResponse(self) @@ -155,7 +155,7 @@ def with_streaming_response(self) -> AsyncCollateralsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncCollateralsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/markets/borrow/debts.py b/src/neptune_api_v2/resources/markets/borrow/debts.py index 262aadd..c9602ae 100644 --- a/src/neptune_api_v2/resources/markets/borrow/debts.py +++ b/src/neptune_api_v2/resources/markets/borrow/debts.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> DebtsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return DebtsResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> DebtsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return DebtsResourceWithStreamingResponse(self) @@ -146,7 +146,7 @@ def with_raw_response(self) -> AsyncDebtsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncDebtsResourceWithRawResponse(self) @@ -155,7 +155,7 @@ def with_streaming_response(self) -> AsyncDebtsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncDebtsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/markets/lend.py b/src/neptune_api_v2/resources/markets/lend.py index b65f30e..3732ff1 100644 --- a/src/neptune_api_v2/resources/markets/lend.py +++ b/src/neptune_api_v2/resources/markets/lend.py @@ -32,7 +32,7 @@ def with_raw_response(self) -> LendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return LendResourceWithRawResponse(self) @@ -41,7 +41,7 @@ def with_streaming_response(self) -> LendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return LendResourceWithStreamingResponse(self) @@ -238,7 +238,7 @@ def with_raw_response(self) -> AsyncLendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncLendResourceWithRawResponse(self) @@ -247,7 +247,7 @@ def with_streaming_response(self) -> AsyncLendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncLendResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/markets/markets.py b/src/neptune_api_v2/resources/markets/markets.py index cb6b5a7..95d3787 100644 --- a/src/neptune_api_v2/resources/markets/markets.py +++ b/src/neptune_api_v2/resources/markets/markets.py @@ -60,7 +60,7 @@ def with_raw_response(self) -> MarketsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return MarketsResourceWithRawResponse(self) @@ -69,7 +69,7 @@ def with_streaming_response(self) -> MarketsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return MarketsResourceWithStreamingResponse(self) @@ -268,7 +268,7 @@ def with_raw_response(self) -> AsyncMarketsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncMarketsResourceWithRawResponse(self) @@ -277,7 +277,7 @@ def with_streaming_response(self) -> AsyncMarketsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncMarketsResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/nept.py b/src/neptune_api_v2/resources/nept.py index 39f3ad6..a3e3897 100644 --- a/src/neptune_api_v2/resources/nept.py +++ b/src/neptune_api_v2/resources/nept.py @@ -30,7 +30,7 @@ def with_raw_response(self) -> NeptResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return NeptResourceWithRawResponse(self) @@ -39,7 +39,7 @@ def with_streaming_response(self) -> NeptResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return NeptResourceWithStreamingResponse(self) @@ -190,7 +190,7 @@ def with_raw_response(self) -> AsyncNeptResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncNeptResourceWithRawResponse(self) @@ -199,7 +199,7 @@ def with_streaming_response(self) -> AsyncNeptResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncNeptResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/status.py b/src/neptune_api_v2/resources/status.py index ca994e5..853f7a4 100644 --- a/src/neptune_api_v2/resources/status.py +++ b/src/neptune_api_v2/resources/status.py @@ -26,7 +26,7 @@ def with_raw_response(self) -> StatusResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return StatusResourceWithRawResponse(self) @@ -35,7 +35,7 @@ def with_streaming_response(self) -> StatusResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return StatusResourceWithStreamingResponse(self) @@ -70,7 +70,7 @@ def with_raw_response(self) -> AsyncStatusResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncStatusResourceWithRawResponse(self) @@ -79,7 +79,7 @@ def with_streaming_response(self) -> AsyncStatusResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncStatusResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/market/borrow/borrow.py b/src/neptune_api_v2/resources/user/market/borrow/borrow.py index a69fe35..2bca14f 100644 --- a/src/neptune_api_v2/resources/user/market/borrow/borrow.py +++ b/src/neptune_api_v2/resources/user/market/borrow/borrow.py @@ -52,7 +52,7 @@ def with_raw_response(self) -> BorrowResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return BorrowResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> BorrowResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return BorrowResourceWithStreamingResponse(self) @@ -340,7 +340,7 @@ def with_raw_response(self) -> AsyncBorrowResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncBorrowResourceWithRawResponse(self) @@ -349,7 +349,7 @@ def with_streaming_response(self) -> AsyncBorrowResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncBorrowResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py index ff4bdfd..f9b625e 100644 --- a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py +++ b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py @@ -40,7 +40,7 @@ def with_raw_response(self) -> SubaccountResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return SubaccountResourceWithRawResponse(self) @@ -49,7 +49,7 @@ def with_streaming_response(self) -> SubaccountResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return SubaccountResourceWithStreamingResponse(self) @@ -277,7 +277,7 @@ def with_raw_response(self) -> AsyncSubaccountResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncSubaccountResourceWithRawResponse(self) @@ -286,7 +286,7 @@ def with_streaming_response(self) -> AsyncSubaccountResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncSubaccountResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/market/lend.py b/src/neptune_api_v2/resources/user/market/lend.py index b347495..046244d 100644 --- a/src/neptune_api_v2/resources/user/market/lend.py +++ b/src/neptune_api_v2/resources/user/market/lend.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> LendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return LendResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> LendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return LendResourceWithStreamingResponse(self) @@ -156,7 +156,7 @@ def with_raw_response(self) -> AsyncLendResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncLendResourceWithRawResponse(self) @@ -165,7 +165,7 @@ def with_streaming_response(self) -> AsyncLendResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncLendResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/market/market.py b/src/neptune_api_v2/resources/user/market/market.py index 90fe01f..c1dcdba 100644 --- a/src/neptune_api_v2/resources/user/market/market.py +++ b/src/neptune_api_v2/resources/user/market/market.py @@ -54,7 +54,7 @@ def with_raw_response(self) -> MarketResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return MarketResourceWithRawResponse(self) @@ -63,7 +63,7 @@ def with_streaming_response(self) -> MarketResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return MarketResourceWithStreamingResponse(self) @@ -241,7 +241,7 @@ def with_raw_response(self) -> AsyncMarketResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncMarketResourceWithRawResponse(self) @@ -250,7 +250,7 @@ def with_streaming_response(self) -> AsyncMarketResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncMarketResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/nept/nept.py b/src/neptune_api_v2/resources/user/nept/nept.py index 09b799b..b325fc4 100644 --- a/src/neptune_api_v2/resources/user/nept/nept.py +++ b/src/neptune_api_v2/resources/user/nept/nept.py @@ -40,7 +40,7 @@ def with_raw_response(self) -> NeptResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return NeptResourceWithRawResponse(self) @@ -49,7 +49,7 @@ def with_streaming_response(self) -> NeptResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return NeptResourceWithStreamingResponse(self) @@ -120,7 +120,7 @@ def with_raw_response(self) -> AsyncNeptResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncNeptResourceWithRawResponse(self) @@ -129,7 +129,7 @@ def with_streaming_response(self) -> AsyncNeptResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncNeptResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/nept/staking.py b/src/neptune_api_v2/resources/user/nept/staking.py index 03a5edd..92d082b 100644 --- a/src/neptune_api_v2/resources/user/nept/staking.py +++ b/src/neptune_api_v2/resources/user/nept/staking.py @@ -36,7 +36,7 @@ def with_raw_response(self) -> StakingResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return StakingResourceWithRawResponse(self) @@ -45,7 +45,7 @@ def with_streaming_response(self) -> StakingResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return StakingResourceWithStreamingResponse(self) @@ -273,7 +273,7 @@ def with_raw_response(self) -> AsyncStakingResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncStakingResourceWithRawResponse(self) @@ -282,7 +282,7 @@ def with_streaming_response(self) -> AsyncStakingResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncStakingResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/user.py b/src/neptune_api_v2/resources/user/user.py index 9afd0d4..7711efc 100644 --- a/src/neptune_api_v2/resources/user/user.py +++ b/src/neptune_api_v2/resources/user/user.py @@ -69,7 +69,7 @@ def with_raw_response(self) -> UserResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return UserResourceWithRawResponse(self) @@ -78,7 +78,7 @@ def with_streaming_response(self) -> UserResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return UserResourceWithStreamingResponse(self) @@ -234,7 +234,7 @@ def with_raw_response(self) -> AsyncUserResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncUserResourceWithRawResponse(self) @@ -243,7 +243,7 @@ def with_streaming_response(self) -> AsyncUserResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncUserResourceWithStreamingResponse(self) diff --git a/src/neptune_api_v2/resources/user/wallet.py b/src/neptune_api_v2/resources/user/wallet.py index 555dd4b..551669b 100644 --- a/src/neptune_api_v2/resources/user/wallet.py +++ b/src/neptune_api_v2/resources/user/wallet.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> WalletResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return WalletResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> WalletResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return WalletResourceWithStreamingResponse(self) @@ -156,7 +156,7 @@ def with_raw_response(self) -> AsyncWalletResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers """ return AsyncWalletResourceWithRawResponse(self) @@ -165,7 +165,7 @@ def with_streaming_response(self) -> AsyncWalletResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/cryptechdev/stainless-api-v2-python#with_streaming_response + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response """ return AsyncWalletResourceWithStreamingResponse(self) From 6f72f25e1ad1f5209d896e95ec091df0175e7381 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 04:42:17 +0000 Subject: [PATCH 02/19] feat(api): manual updates --- .stats.yml | 4 ++-- .../resources/user/market/borrow/subaccount.py | 16 ++-------------- .../types/nept_get_staking_overview_response.py | 2 +- .../subaccount_get_subaccount_health_params.py | 3 --- ..._get_collateral_accounts_by_asset_response.py | 5 +---- .../user/market/borrow/test_subaccount.py | 2 -- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index b452866..6dc737f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-9048b9a34641ce9f489cc9813115c2cbe53ba4e19fec4d4be8ad50cc4c6dc955.yml -openapi_spec_hash: 90a2e162ca6a44232297cba2c5017476 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-449ef5265461321adf3cf141e75d49a3c2c144d0ab33f32363c7d4d32ad77b25.yml +openapi_spec_hash: 8dfec236737b3d0c3074d8b86ec819d1 config_hash: c0eef50aebf8314784456d5c6f539ce5 diff --git a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py index f9b625e..0a7e887 100644 --- a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py +++ b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py @@ -221,7 +221,6 @@ def get_subaccount_health( *, address: str, with_text: bool | Omit = omit, - with_value: 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, @@ -239,8 +238,6 @@ def get_subaccount_health( with_text: Include text variation fields - with_value: Calculate and include USD values for amounts, where applicable - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -259,10 +256,7 @@ def get_subaccount_health( extra_body=extra_body, timeout=timeout, query=maybe_transform( - { - "with_text": with_text, - "with_value": with_value, - }, + {"with_text": with_text}, subaccount_get_subaccount_health_params.SubaccountGetSubaccountHealthParams, ), ), @@ -458,7 +452,6 @@ async def get_subaccount_health( *, address: str, with_text: bool | Omit = omit, - with_value: 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, @@ -476,8 +469,6 @@ async def get_subaccount_health( with_text: Include text variation fields - with_value: Calculate and include USD values for amounts, where applicable - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -496,10 +487,7 @@ async def get_subaccount_health( extra_body=extra_body, timeout=timeout, query=await async_maybe_transform( - { - "with_text": with_text, - "with_value": with_value, - }, + {"with_text": with_text}, subaccount_get_subaccount_health_params.SubaccountGetSubaccountHealthParams, ), ), diff --git a/src/neptune_api_v2/types/nept_get_staking_overview_response.py b/src/neptune_api_v2/types/nept_get_staking_overview_response.py index 2c2a97e..3e6ca4e 100644 --- a/src/neptune_api_v2/types/nept_get_staking_overview_response.py +++ b/src/neptune_api_v2/types/nept_get_staking_overview_response.py @@ -43,7 +43,7 @@ class DataGlobalState(BaseModel): """When staking rewards were last distributed""" stake_acc: str - """**TODO:** rename, proper description + """**TODO:** rename, proper description, text/value? stake_acc = ∫ ( emission_rate / total_reward_weight ) dt """ diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_params.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_params.py index 4208ca4..d423946 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_params.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_params.py @@ -13,6 +13,3 @@ class SubaccountGetSubaccountHealthParams(TypedDict, total=False): with_text: bool """Include text variation fields""" - - with_value: bool - """Calculate and include USD values for amounts, where applicable""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py index 13ce62d..1d9d612 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py @@ -83,10 +83,7 @@ class Data(BaseModel): """Object data""" accounts: List[DataAccount] - """ - All collateral subaccounts for the associated asset type Collateral sub-accounts - for the user - """ + """All collateral subaccounts for the associated asset type""" asset_info: AssetInfo """Asset identifiers with associated metadata""" diff --git a/tests/api_resources/user/market/borrow/test_subaccount.py b/tests/api_resources/user/market/borrow/test_subaccount.py index b2aa6d6..07d224d 100644 --- a/tests/api_resources/user/market/borrow/test_subaccount.py +++ b/tests/api_resources/user/market/borrow/test_subaccount.py @@ -209,7 +209,6 @@ def test_method_get_subaccount_health_with_all_params(self, client: NeptuneAPIV2 index=0, address="address", with_text=True, - with_value=True, ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) @@ -443,7 +442,6 @@ async def test_method_get_subaccount_health_with_all_params(self, async_client: index=0, address="address", with_text=True, - with_value=True, ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) From c653eb6ddb24d4868b70257fc558f7d6cac3564f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 21:34:11 +0000 Subject: [PATCH 03/19] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6dc737f..d216d19 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-449ef5265461321adf3cf141e75d49a3c2c144d0ab33f32363c7d4d32ad77b25.yml -openapi_spec_hash: 8dfec236737b3d0c3074d8b86ec819d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml +openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5 config_hash: c0eef50aebf8314784456d5c6f539ce5 From 4e6c64bf38019b5e56ba876a2ca2597af53b3e1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:14:17 +0000 Subject: [PATCH 04/19] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d216d19..0d2ff3d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5 -config_hash: c0eef50aebf8314784456d5c6f539ce5 +config_hash: c31f660ae992403120ee4f523f626fd3 From 46f828ac3c0610a7e01eaa8577f8e822c629f3ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:25:07 +0000 Subject: [PATCH 05/19] chore: configure new SDK language --- .stats.yml | 2 +- README.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0d2ff3d..81947eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5 -config_hash: c31f660ae992403120ee4f523f626fd3 +config_hash: 2e68e0b619739f7ffeb7e94897f6a2db diff --git a/README.md b/README.md index 89bf3ae..2048106 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https:// It is generated with [Stainless](https://www.stainless.com/). +## MCP Server + +Use the Neptune API V2 MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. + +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40neptunefinance%2Fapi-v2-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuZXB0dW5lZmluYW5jZS9hcGktdjItbWNwIl19) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40neptunefinance%2Fapi-v2-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40neptunefinance%2Fapi-v2-mcp%22%5D%7D) + +> Note: You may need to set environment variables in your MCP client. + ## Documentation The full API of this library can be found in [api.md](api.md). From f9cfab2a146e924b7d3f07f253be4de3ba9e4a2a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:45:27 +0000 Subject: [PATCH 06/19] feat(api): manual updates Drop MCP --- .stats.yml | 2 +- README.md | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 81947eb..0d2ff3d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5 -config_hash: 2e68e0b619739f7ffeb7e94897f6a2db +config_hash: c31f660ae992403120ee4f523f626fd3 diff --git a/README.md b/README.md index 2048106..89bf3ae 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,6 @@ and offers both synchronous and asynchronous clients powered by [httpx](https:// It is generated with [Stainless](https://www.stainless.com/). -## MCP Server - -Use the Neptune API V2 MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. - -[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40neptunefinance%2Fapi-v2-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuZXB0dW5lZmluYW5jZS9hcGktdjItbWNwIl19) -[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40neptunefinance%2Fapi-v2-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40neptunefinance%2Fapi-v2-mcp%22%5D%7D) - -> Note: You may need to set environment variables in your MCP client. - ## Documentation The full API of this library can be found in [api.md](api.md). From 18daf632e1cce3dcd2a6ff59252f39523a731e86 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 22:28:58 +0000 Subject: [PATCH 07/19] chore(ci): skip uploading artifacts on stainless-internal branches --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0189133..b011bcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,14 +55,18 @@ jobs: run: uv build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/neptune-api-v2-python' + if: |- + github.repository == 'stainless-sdks/neptune-api-v2-python' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/neptune-api-v2-python' + if: |- + github.repository == 'stainless-sdks/neptune-api-v2-python' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From fc8fe1ae1177429d60d06dc7f0ba836b90964ff1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:32:11 +0000 Subject: [PATCH 08/19] fix(pydantic): do not pass `by_alias` unless set --- src/neptune_api_v2/_compat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/neptune_api_v2/_compat.py b/src/neptune_api_v2/_compat.py index 786ff42..e6690a4 100644 --- a/src/neptune_api_v2/_compat.py +++ b/src/neptune_api_v2/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", From c53e89a6e5ba4e1b20012c7a141bc1858de26148 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:36:03 +0000 Subject: [PATCH 09/19] fix(deps): bump minimum typing-extensions version --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 734c39e..1d8932d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", diff --git a/uv.lock b/uv.lock index 1b59a20..befbd83 100644 --- a/uv.lock +++ b/uv.lock @@ -821,7 +821,7 @@ requires-dist = [ { name = "httpx-aiohttp", marker = "extra == 'aiohttp'", specifier = ">=0.1.9" }, { name = "pydantic", specifier = ">=1.9.0,<3" }, { name = "sniffio" }, - { name = "typing-extensions", specifier = ">=4.10,<5" }, + { name = "typing-extensions", specifier = ">=4.14,<5" }, ] provides-extras = ["aiohttp"] From 73115dce28adf13fd26721e8d012ca37a5a15c5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:38:36 +0000 Subject: [PATCH 10/19] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b011bcc..fb4fa64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From 44c0c8b8e3f5eeed5b54674c5a7ae43b8a176976 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:52:30 +0000 Subject: [PATCH 11/19] fix: sanitize endpoint path params --- src/neptune_api_v2/_utils/__init__.py | 1 + src/neptune_api_v2/_utils/_path.py | 127 ++++++++++++++++++ .../resources/user/market/borrow/borrow.py | 22 +-- .../user/market/borrow/subaccount.py | 30 +++-- .../resources/user/market/lend.py | 10 +- .../resources/user/market/market.py | 14 +- .../resources/user/nept/nept.py | 6 +- .../resources/user/nept/staking.py | 18 +-- src/neptune_api_v2/resources/user/user.py | 10 +- src/neptune_api_v2/resources/user/wallet.py | 10 +- tests/test_utils/test_path.py | 89 ++++++++++++ 11 files changed, 283 insertions(+), 54 deletions(-) create mode 100644 src/neptune_api_v2/_utils/_path.py create mode 100644 tests/test_utils/test_path.py diff --git a/src/neptune_api_v2/_utils/__init__.py b/src/neptune_api_v2/_utils/__init__.py index dc64e29..10cb66d 100644 --- a/src/neptune_api_v2/_utils/__init__.py +++ b/src/neptune_api_v2/_utils/__init__.py @@ -1,3 +1,4 @@ +from ._path import path_template as path_template from ._sync import asyncify as asyncify from ._proxy import LazyProxy as LazyProxy from ._utils import ( diff --git a/src/neptune_api_v2/_utils/_path.py b/src/neptune_api_v2/_utils/_path.py new file mode 100644 index 0000000..4d6e1e4 --- /dev/null +++ b/src/neptune_api_v2/_utils/_path.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +import re +from typing import ( + Any, + Mapping, + Callable, +) +from urllib.parse import quote + +# Matches '.' or '..' where each dot is either literal or percent-encoded (%2e / %2E). +_DOT_SEGMENT_RE = re.compile(r"^(?:\.|%2[eE]){1,2}$") + +_PLACEHOLDER_RE = re.compile(r"\{(\w+)\}") + + +def _quote_path_segment_part(value: str) -> str: + """Percent-encode `value` for use in a URI path segment. + + Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 + """ + # quote() already treats unreserved characters (letters, digits, and -._~) + # as safe, so we only need to add sub-delims, ':', and '@'. + # Notably, unlike the default `safe` for quote(), / is unsafe and must be quoted. + return quote(value, safe="!$&'()*+,;=:@") + + +def _quote_query_part(value: str) -> str: + """Percent-encode `value` for use in a URI query string. + + Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 + """ + return quote(value, safe="!$'()*+,;:@/?") + + +def _quote_fragment_part(value: str) -> str: + """Percent-encode `value` for use in a URI fragment. + + Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.5 + """ + return quote(value, safe="!$&'()*+,;=:@/?") + + +def _interpolate( + template: str, + values: Mapping[str, Any], + quoter: Callable[[str], str], +) -> str: + """Replace {name} placeholders in `template`, quoting each value with `quoter`. + + Placeholder names are looked up in `values`. + + Raises: + KeyError: If a placeholder is not found in `values`. + """ + # re.split with a capturing group returns alternating + # [text, name, text, name, ..., text] elements. + parts = _PLACEHOLDER_RE.split(template) + + for i in range(1, len(parts), 2): + name = parts[i] + if name not in values: + raise KeyError(f"a value for placeholder {{{name}}} was not provided") + val = values[name] + if val is None: + parts[i] = "null" + elif isinstance(val, bool): + parts[i] = "true" if val else "false" + else: + parts[i] = quoter(str(values[name])) + + return "".join(parts) + + +def path_template(template: str, /, **kwargs: Any) -> str: + """Interpolate {name} placeholders in `template` from keyword arguments. + + Args: + template: The template string containing {name} placeholders. + **kwargs: Keyword arguments to interpolate into the template. + + Returns: + The template with placeholders interpolated and percent-encoded. + + Safe characters for percent-encoding are dependent on the URI component. + Placeholders in path and fragment portions are percent-encoded where the `segment` + and `fragment` sets from RFC 3986 respectively are considered safe. + Placeholders in the query portion are percent-encoded where the `query` set from + RFC 3986 §3.3 is considered safe except for = and & characters. + + Raises: + KeyError: If a placeholder is not found in `kwargs`. + ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments). + """ + # Split the template into path, query, and fragment portions. + fragment_template: str | None = None + query_template: str | None = None + + rest = template + if "#" in rest: + rest, fragment_template = rest.split("#", 1) + if "?" in rest: + rest, query_template = rest.split("?", 1) + path_template = rest + + # Interpolate each portion with the appropriate quoting rules. + path_result = _interpolate(path_template, kwargs, _quote_path_segment_part) + + # Reject dot-segments (. and ..) in the final assembled path. The check + # runs after interpolation so that adjacent placeholders or a mix of static + # text and placeholders that together form a dot-segment are caught. + # Also reject percent-encoded dot-segments to protect against incorrectly + # implemented normalization in servers/proxies. + for segment in path_result.split("/"): + if _DOT_SEGMENT_RE.match(segment): + raise ValueError(f"Constructed path {path_result!r} contains dot-segment {segment!r} which is not allowed") + + result = path_result + if query_template is not None: + result += "?" + _interpolate(query_template, kwargs, _quote_query_part) + if fragment_template is not None: + result += "#" + _interpolate(fragment_template, kwargs, _quote_fragment_part) + + return result diff --git a/src/neptune_api_v2/resources/user/market/borrow/borrow.py b/src/neptune_api_v2/resources/user/market/borrow/borrow.py index 2bca14f..c7253b1 100644 --- a/src/neptune_api_v2/resources/user/market/borrow/borrow.py +++ b/src/neptune_api_v2/resources/user/market/borrow/borrow.py @@ -5,7 +5,7 @@ import httpx from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ....._utils import maybe_transform, async_maybe_transform +from ....._utils import path_template, maybe_transform, async_maybe_transform from .subaccount import ( SubaccountResource, AsyncSubaccountResource, @@ -102,7 +102,7 @@ def get_collateral_accounts_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/lookup/collateral", + path_template("/api/v1/users/{address}/markets/borrow/lookup/collateral", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -154,7 +154,7 @@ def get_collateral_totals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/sum/collaterals", + path_template("/api/v1/users/{address}/markets/borrow/sum/collaterals", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +208,7 @@ def get_debt_accounts_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/lookup/debt", + path_template("/api/v1/users/{address}/markets/borrow/lookup/debt", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -260,7 +260,7 @@ def get_debts_totals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/sum/debts", + path_template("/api/v1/users/{address}/markets/borrow/sum/debts", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -311,7 +311,7 @@ def get_portfolio( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow", + path_template("/api/v1/users/{address}/markets/borrow", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -390,7 +390,7 @@ async def get_collateral_accounts_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/lookup/collateral", + path_template("/api/v1/users/{address}/markets/borrow/lookup/collateral", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -442,7 +442,7 @@ async def get_collateral_totals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/sum/collaterals", + path_template("/api/v1/users/{address}/markets/borrow/sum/collaterals", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -496,7 +496,7 @@ async def get_debt_accounts_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/lookup/debt", + path_template("/api/v1/users/{address}/markets/borrow/lookup/debt", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -548,7 +548,7 @@ async def get_debts_totals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/sum/debts", + path_template("/api/v1/users/{address}/markets/borrow/sum/debts", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -599,7 +599,7 @@ async def get_portfolio( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow", + path_template("/api/v1/users/{address}/markets/borrow", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py index 0a7e887..d406b82 100644 --- a/src/neptune_api_v2/resources/user/market/borrow/subaccount.py +++ b/src/neptune_api_v2/resources/user/market/borrow/subaccount.py @@ -5,7 +5,7 @@ import httpx from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ....._utils import maybe_transform, async_maybe_transform +from ....._utils import path_template, maybe_transform, async_maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource from ....._response import ( @@ -90,7 +90,7 @@ def get_subaccount( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}", + path_template("/api/v1/users/{address}/markets/borrow/accounts/{index}", address=address, index=index), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -144,7 +144,9 @@ def get_subaccount_collaterals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -198,7 +200,9 @@ def get_subaccount_debts( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/debts", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/debts", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -249,7 +253,9 @@ def get_subaccount_health( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/health", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/health", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -321,7 +327,7 @@ async def get_subaccount( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}", + path_template("/api/v1/users/{address}/markets/borrow/accounts/{index}", address=address, index=index), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -375,7 +381,9 @@ async def get_subaccount_collaterals( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/collaterals", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -429,7 +437,9 @@ async def get_subaccount_debts( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/debts", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/debts", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -480,7 +490,9 @@ async def get_subaccount_health( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/borrow/accounts/{index}/health", + path_template( + "/api/v1/users/{address}/markets/borrow/accounts/{index}/health", address=address, index=index + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/market/lend.py b/src/neptune_api_v2/resources/user/market/lend.py index 046244d..e09bf29 100644 --- a/src/neptune_api_v2/resources/user/market/lend.py +++ b/src/neptune_api_v2/resources/user/market/lend.py @@ -5,7 +5,7 @@ import httpx from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ...._utils import maybe_transform, async_maybe_transform +from ...._utils import path_template, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -76,7 +76,7 @@ def list( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/lend", + path_template("/api/v1/users/{address}/markets/lend", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +130,7 @@ def get_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/lend/lookup", + path_template("/api/v1/users/{address}/markets/lend/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -203,7 +203,7 @@ async def list( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/lend", + path_template("/api/v1/users/{address}/markets/lend", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -257,7 +257,7 @@ async def get_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/lend/lookup", + path_template("/api/v1/users/{address}/markets/lend/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/market/market.py b/src/neptune_api_v2/resources/user/market/market.py index c1dcdba..cbf8406 100644 --- a/src/neptune_api_v2/resources/user/market/market.py +++ b/src/neptune_api_v2/resources/user/market/market.py @@ -13,7 +13,7 @@ AsyncLendResourceWithStreamingResponse, ) from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ...._utils import maybe_transform, async_maybe_transform +from ...._utils import path_template, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -102,7 +102,7 @@ def get_merged( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/merged", + path_template("/api/v1/users/{address}/markets/merged", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -156,7 +156,7 @@ def get_merged_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets/merged/lookup", + path_template("/api/v1/users/{address}/markets/merged/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +208,7 @@ def get_portfolio( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/markets", + path_template("/api/v1/users/{address}/markets", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -289,7 +289,7 @@ async def get_merged( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/merged", + path_template("/api/v1/users/{address}/markets/merged", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -343,7 +343,7 @@ async def get_merged_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets/merged/lookup", + path_template("/api/v1/users/{address}/markets/merged/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -395,7 +395,7 @@ async def get_portfolio( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/markets", + path_template("/api/v1/users/{address}/markets", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/nept/nept.py b/src/neptune_api_v2/resources/user/nept/nept.py index b325fc4..473d5f1 100644 --- a/src/neptune_api_v2/resources/user/nept/nept.py +++ b/src/neptune_api_v2/resources/user/nept/nept.py @@ -13,7 +13,7 @@ AsyncStakingResourceWithStreamingResponse, ) from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ...._utils import maybe_transform, async_maybe_transform +from ...._utils import path_template, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -90,7 +90,7 @@ def get_unlocks( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/nept/unlocks", + path_template("/api/v1/users/{address}/nept/unlocks", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -170,7 +170,7 @@ async def get_unlocks( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/nept/unlocks", + path_template("/api/v1/users/{address}/nept/unlocks", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/nept/staking.py b/src/neptune_api_v2/resources/user/nept/staking.py index 92d082b..2622988 100644 --- a/src/neptune_api_v2/resources/user/nept/staking.py +++ b/src/neptune_api_v2/resources/user/nept/staking.py @@ -5,7 +5,7 @@ import httpx from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ...._utils import maybe_transform, async_maybe_transform +from ...._utils import path_template, maybe_transform, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -83,7 +83,7 @@ def get_overview( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/nept/staking", + path_template("/api/v1/users/{address}/nept/staking", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -144,7 +144,7 @@ def get_staking_pool( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/nept/staking/pools/lookup", + path_template("/api/v1/users/{address}/nept/staking/pools/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -197,7 +197,7 @@ def get_staking_pools( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/nept/staking/pools", + path_template("/api/v1/users/{address}/nept/staking/pools", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -248,7 +248,7 @@ def get_unstaking( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/nept/staking/unstaking", + path_template("/api/v1/users/{address}/nept/staking/unstaking", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -320,7 +320,7 @@ async def get_overview( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/nept/staking", + path_template("/api/v1/users/{address}/nept/staking", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -381,7 +381,7 @@ async def get_staking_pool( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/nept/staking/pools/lookup", + path_template("/api/v1/users/{address}/nept/staking/pools/lookup", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -434,7 +434,7 @@ async def get_staking_pools( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/nept/staking/pools", + path_template("/api/v1/users/{address}/nept/staking/pools", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -485,7 +485,7 @@ async def get_unstaking( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/nept/staking/unstaking", + path_template("/api/v1/users/{address}/nept/staking/unstaking", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/user.py b/src/neptune_api_v2/resources/user/user.py index 7711efc..bd92efc 100644 --- a/src/neptune_api_v2/resources/user/user.py +++ b/src/neptune_api_v2/resources/user/user.py @@ -17,7 +17,7 @@ ) from ...types import EventAction, user_get_user_params, user_get_tx_history_params from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from .nept.nept import ( NeptResource, @@ -138,7 +138,7 @@ def get_tx_history( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/tx-history", + path_template("/api/v1/users/{address}/tx-history", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -196,7 +196,7 @@ def get_user( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/user", + path_template("/api/v1/users/{address}/user", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -303,7 +303,7 @@ async def get_tx_history( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/tx-history", + path_template("/api/v1/users/{address}/tx-history", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -361,7 +361,7 @@ async def get_user( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/user", + path_template("/api/v1/users/{address}/user", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/neptune_api_v2/resources/user/wallet.py b/src/neptune_api_v2/resources/user/wallet.py index 551669b..de73d10 100644 --- a/src/neptune_api_v2/resources/user/wallet.py +++ b/src/neptune_api_v2/resources/user/wallet.py @@ -5,7 +5,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -79,7 +79,7 @@ def get_balance_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/wallet/balance", + path_template("/api/v1/users/{address}/wallet/balance", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -131,7 +131,7 @@ def get_balances( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return self._get( - f"/api/v1/users/{address}/wallet/balances", + path_template("/api/v1/users/{address}/wallet/balances", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -206,7 +206,7 @@ async def get_balance_by_asset( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/wallet/balance", + path_template("/api/v1/users/{address}/wallet/balance", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -258,7 +258,7 @@ async def get_balances( if not address: raise ValueError(f"Expected a non-empty value for `address` but received {address!r}") return await self._get( - f"/api/v1/users/{address}/wallet/balances", + path_template("/api/v1/users/{address}/wallet/balances", address=address), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/tests/test_utils/test_path.py b/tests/test_utils/test_path.py new file mode 100644 index 0000000..5da6cc2 --- /dev/null +++ b/tests/test_utils/test_path.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from typing import Any + +import pytest + +from neptune_api_v2._utils._path import path_template + + +@pytest.mark.parametrize( + "template, kwargs, expected", + [ + ("/v1/{id}", dict(id="abc"), "/v1/abc"), + ("/v1/{a}/{b}", dict(a="x", b="y"), "/v1/x/y"), + ("/v1/{a}{b}/path/{c}?val={d}#{e}", dict(a="x", b="y", c="z", d="u", e="v"), "/v1/xy/path/z?val=u#v"), + ("/{w}/{w}", dict(w="echo"), "/echo/echo"), + ("/v1/static", {}, "/v1/static"), + ("", {}, ""), + ("/v1/?q={n}&count=10", dict(n=42), "/v1/?q=42&count=10"), + ("/v1/{v}", dict(v=None), "/v1/null"), + ("/v1/{v}", dict(v=True), "/v1/true"), + ("/v1/{v}", dict(v=False), "/v1/false"), + ("/v1/{v}", dict(v=".hidden"), "/v1/.hidden"), # dot prefix ok + ("/v1/{v}", dict(v="file.txt"), "/v1/file.txt"), # dot in middle ok + ("/v1/{v}", dict(v="..."), "/v1/..."), # triple dot ok + ("/v1/{a}{b}", dict(a=".", b="txt"), "/v1/.txt"), # dot var combining with adjacent to be ok + ("/items?q={v}#{f}", dict(v=".", f=".."), "/items?q=.#.."), # dots in query/fragment are fine + ( + "/v1/{a}?query={b}", + dict(a="../../other/endpoint", b="a&bad=true"), + "/v1/..%2F..%2Fother%2Fendpoint?query=a%26bad%3Dtrue", + ), + ("/v1/{val}", dict(val="a/b/c"), "/v1/a%2Fb%2Fc"), + ("/v1/{val}", dict(val="a/b/c?query=value"), "/v1/a%2Fb%2Fc%3Fquery=value"), + ("/v1/{val}", dict(val="a/b/c?query=value&bad=true"), "/v1/a%2Fb%2Fc%3Fquery=value&bad=true"), + ("/v1/{val}", dict(val="%20"), "/v1/%2520"), # escapes escape sequences in input + # Query: slash and ? are safe, # is not + ("/items?q={v}", dict(v="a/b"), "/items?q=a/b"), + ("/items?q={v}", dict(v="a?b"), "/items?q=a?b"), + ("/items?q={v}", dict(v="a#b"), "/items?q=a%23b"), + ("/items?q={v}", dict(v="a b"), "/items?q=a%20b"), + # Fragment: slash and ? are safe + ("/docs#{v}", dict(v="a/b"), "/docs#a/b"), + ("/docs#{v}", dict(v="a?b"), "/docs#a?b"), + # Path: slash, ? and # are all encoded + ("/v1/{v}", dict(v="a/b"), "/v1/a%2Fb"), + ("/v1/{v}", dict(v="a?b"), "/v1/a%3Fb"), + ("/v1/{v}", dict(v="a#b"), "/v1/a%23b"), + # same var encoded differently by component + ( + "/v1/{v}?q={v}#{v}", + dict(v="a/b?c#d"), + "/v1/a%2Fb%3Fc%23d?q=a/b?c%23d#a/b?c%23d", + ), + ("/v1/{val}", dict(val="x?admin=true"), "/v1/x%3Fadmin=true"), # query injection + ("/v1/{val}", dict(val="x#admin"), "/v1/x%23admin"), # fragment injection + ], +) +def test_interpolation(template: str, kwargs: dict[str, Any], expected: str) -> None: + assert path_template(template, **kwargs) == expected + + +def test_missing_kwarg_raises_key_error() -> None: + with pytest.raises(KeyError, match="org_id"): + path_template("/v1/{org_id}") + + +@pytest.mark.parametrize( + "template, kwargs", + [ + ("{a}/path", dict(a=".")), + ("{a}/path", dict(a="..")), + ("/v1/{a}", dict(a=".")), + ("/v1/{a}", dict(a="..")), + ("/v1/{a}/path", dict(a=".")), + ("/v1/{a}/path", dict(a="..")), + ("/v1/{a}{b}", dict(a=".", b=".")), # adjacent vars → ".." + ("/v1/{a}.", dict(a=".")), # var + static → ".." + ("/v1/{a}{b}", dict(a="", b=".")), # empty + dot → "." + ("/v1/%2e/{x}", dict(x="ok")), # encoded dot in static text + ("/v1/%2e./{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/.%2E/{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/{v}?q=1", dict(v="..")), + ("/v1/{v}#frag", dict(v="..")), + ], +) +def test_dot_segment_rejected(template: str, kwargs: dict[str, Any]) -> None: + with pytest.raises(ValueError, match="dot-segment"): + path_template(template, **kwargs) From 234d18a2f8796f655ae9b581a183d8692679cf32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 03:23:12 +0000 Subject: [PATCH 12/19] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 95ceb18..3824f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log _dev __pycache__ From 05a360fc519e9a75b6befeba4929e75f50bbd40b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:59:29 +0000 Subject: [PATCH 13/19] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb4fa64..16d12a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/neptune-api-v2-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -35,7 +35,7 @@ jobs: run: ./scripts/lint build: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') timeout-minutes: 10 name: build permissions: From 03d9eb0b52e51bef70134c34432e4899b2094632 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 04:21:25 +0000 Subject: [PATCH 14/19] feat(internal): implement indices array format for query and form serialization --- src/neptune_api_v2/_qs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/neptune_api_v2/_qs.py b/src/neptune_api_v2/_qs.py index ada6fd3..de8c99b 100644 --- a/src/neptune_api_v2/_qs.py +++ b/src/neptune_api_v2/_qs.py @@ -101,7 +101,10 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + items = [] + for i, item in enumerate(value): + items.extend(self._stringify_item(f"{key}[{i}]", item, opts)) + return items elif array_format == "brackets": items = [] key = key + "[]" From b6c29dbc5c8474713d3b45ad71d9e6ad36f269d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 02:56:52 +0000 Subject: [PATCH 15/19] feat(api): api update --- .stats.yml | 6 +- api.md | 2 +- .../resources/analytics/market/history.py | 6 +- src/neptune_api_v2/resources/assets.py | 6 +- .../resources/markets/borrow/borrow.py | 6 +- src/neptune_api_v2/resources/markets/lend.py | 6 +- src/neptune_api_v2/types/__init__.py | 1 - ...ry_get_loans_originated_by_asset_params.py | 3 +- ..._get_loans_originated_by_asset_response.py | 21 +++-- .../history_get_loans_originated_response.py | 21 +++-- .../market_get_current_state_response.py | 23 +++--- .../types/asset_get_price_history_params.py | 3 +- .../types/asset_get_price_history_response.py | 21 +++-- .../types/asset_list_prices_response.py | 23 +++--- .../types/asset_list_response.py | 25 +++--- src/neptune_api_v2/types/error_data.py | 39 --------- .../market_get_merged_by_asset_response.py | 21 ++--- .../types/market_get_merged_response.py | 25 +++--- .../types/market_get_overview_response.py | 23 +++--- .../types/market_get_params_response.py | 21 ++--- .../collateral_get_by_asset_response.py | 21 ++--- .../borrow/collateral_list_response.py | 25 +++--- .../borrow/debt_get_by_asset_response.py | 21 ++--- .../markets/borrow/debt_list_response.py | 25 +++--- .../markets/borrow_get_overview_response.py | 21 ++--- .../markets/borrow_get_rate_history_params.py | 3 +- .../borrow_get_rate_history_response.py | 21 ++--- .../markets/lend_get_by_asset_response.py | 21 ++--- .../markets/lend_get_rate_history_params.py | 3 +- .../markets/lend_get_rate_history_response.py | 21 ++--- .../types/markets/lend_list_response.py | 25 +++--- .../types/nept_get_params_response.py | 23 +++--- .../nept_get_staking_overview_response.py | 23 +++--- .../types/nept_get_state_response.py | 23 +++--- src/neptune_api_v2/types/staking_pool_full.py | 4 +- ...unt_get_subaccount_collaterals_response.py | 25 +++--- ...ubaccount_get_subaccount_debts_response.py | 25 +++--- ...baccount_get_subaccount_health_response.py | 21 ++--- .../subaccount_get_subaccount_response.py | 21 ++--- ...t_collateral_accounts_by_asset_response.py | 21 +++-- .../borrow_get_collateral_totals_response.py | 25 +++--- ...row_get_debt_accounts_by_asset_response.py | 21 +++-- .../borrow_get_debts_totals_response.py | 25 +++--- .../market/borrow_get_portfolio_response.py | 21 ++--- .../user/market/lend_get_by_asset_response.py | 21 ++--- .../types/user/market/lend_list_response.py | 25 +++--- .../market_get_merged_by_asset_response.py | 21 ++--- .../types/user/market_get_merged_response.py | 25 +++--- .../user/market_get_portfolio_response.py | 21 ++--- .../nept/staking_get_overview_response.py | 21 ++--- .../nept/staking_get_staking_pool_response.py | 21 ++--- .../staking_get_staking_pools_response.py | 25 +++--- .../nept/staking_get_unstaking_response.py | 23 +++--- .../types/user/nept_get_unlocks_response.py | 21 ++--- .../types/user/user_nept_unlock_amounts.py | 6 +- .../types/user/user_nept_unlock_overview.py | 4 +- .../wallet_get_balance_by_asset_response.py | 21 ++--- .../user/wallet_get_balances_response.py | 21 +++-- .../types/user_get_tx_history_response.py | 23 +++--- .../types/user_get_user_response.py | 27 ++++--- tests/api_resources/test_user.py | 32 ++++---- .../user/market/borrow/test_subaccount.py | 64 +++++++-------- .../api_resources/user/market/test_borrow.py | 80 +++++++++---------- tests/api_resources/user/market/test_lend.py | 32 ++++---- tests/api_resources/user/nept/test_staking.py | 64 +++++++-------- tests/api_resources/user/test_market.py | 48 +++++------ tests/api_resources/user/test_nept.py | 16 ++-- tests/api_resources/user/test_wallet.py | 32 ++++---- 68 files changed, 820 insertions(+), 661 deletions(-) delete mode 100644 src/neptune_api_v2/types/error_data.py diff --git a/.stats.yml b/.stats.yml index 0d2ff3d..5db887d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml -openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5 -config_hash: c31f660ae992403120ee4f523f626fd3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-65d147ca43891623187340ff0aa56887343ee8e60d19ad156b65e241ebea8a99.yml +openapi_spec_hash: c063aafd7db98b2572545d87247fc8a1 +config_hash: 8a15725f9f0e7bdf072a3c089d80c452 diff --git a/api.md b/api.md index 646fa64..5413b58 100644 --- a/api.md +++ b/api.md @@ -3,7 +3,7 @@ Types: ```python -from neptune_api_v2.types import ErrorData, Interval, IntervalUnit +from neptune_api_v2.types import Interval, IntervalUnit ``` # Status diff --git a/src/neptune_api_v2/resources/analytics/market/history.py b/src/neptune_api_v2/resources/analytics/market/history.py index e2dc723..e054aa0 100644 --- a/src/neptune_api_v2/resources/analytics/market/history.py +++ b/src/neptune_api_v2/resources/analytics/market/history.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Optional + import httpx from ....types import IntervalUnit @@ -136,7 +138,7 @@ def get_loans_originated_by_asset( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, @@ -330,7 +332,7 @@ async def get_loans_originated_by_asset( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, diff --git a/src/neptune_api_v2/resources/assets.py b/src/neptune_api_v2/resources/assets.py index 1036e60..ba20705 100644 --- a/src/neptune_api_v2/resources/assets.py +++ b/src/neptune_api_v2/resources/assets.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Optional + import httpx from ..types import IntervalUnit, asset_list_prices_params, asset_get_price_history_params @@ -69,7 +71,7 @@ def get_price_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, @@ -235,7 +237,7 @@ async def get_price_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, diff --git a/src/neptune_api_v2/resources/markets/borrow/borrow.py b/src/neptune_api_v2/resources/markets/borrow/borrow.py index e612b41..de746b2 100644 --- a/src/neptune_api_v2/resources/markets/borrow/borrow.py +++ b/src/neptune_api_v2/resources/markets/borrow/borrow.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Optional + import httpx from .debts import ( @@ -120,7 +122,7 @@ def get_rate_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, @@ -284,7 +286,7 @@ async def get_rate_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, diff --git a/src/neptune_api_v2/resources/markets/lend.py b/src/neptune_api_v2/resources/markets/lend.py index 3732ff1..67de206 100644 --- a/src/neptune_api_v2/resources/markets/lend.py +++ b/src/neptune_api_v2/resources/markets/lend.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Optional + import httpx from ...types import IntervalUnit @@ -147,7 +149,7 @@ def get_rate_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, @@ -353,7 +355,7 @@ async def get_rate_history( end: int, period: IntervalUnit, start: int, - asset_ids: str | Omit = omit, + asset_ids: Optional[str] | Omit = omit, interval: int | Omit = omit, limit: int | Omit = omit, offset: int | Omit = omit, diff --git a/src/neptune_api_v2/types/__init__.py b/src/neptune_api_v2/types/__init__.py index df2e4cb..2a8da0b 100644 --- a/src/neptune_api_v2/types/__init__.py +++ b/src/neptune_api_v2/types/__init__.py @@ -5,7 +5,6 @@ from .interval import Interval as Interval from .asset_info import AssetInfo as AssetInfo from .asset_spec import AssetSpec as AssetSpec -from .error_data import ErrorData as ErrorData from .event_action import EventAction as EventAction from .interval_unit import IntervalUnit as IntervalUnit from .merged_market import MergedMarket as MergedMarket diff --git a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_params.py b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_params.py index 8274cf3..c587804 100644 --- a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_params.py +++ b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Required, TypedDict from ...interval_unit import IntervalUnit @@ -36,7 +37,7 @@ class HistoryGetLoansOriginatedByAssetParams(TypedDict, total=False): Must be provided as unix timestamp (in seconds) """ - asset_ids: str + asset_ids: Optional[str] """Optional comma-separated list of asset IDs to filter for. If excluded, values will be returned for all assets. diff --git a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py index 525b2e9..44acb20 100644 --- a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py +++ b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py @@ -6,7 +6,6 @@ from ...._models import BaseModel from ...interval import Interval from ...asset_spec import AssetSpec -from ...error_data import ErrorData __all__ = [ "HistoryGetLoansOriginatedByAssetResponse", @@ -66,7 +65,7 @@ class DataSeries(BaseModel): class Data(BaseModel): - """Historical cumulative lend value for assets""" + """Primary response content (object)""" pagination: DataPagination """Values used for paginating the time series data""" @@ -82,14 +81,20 @@ class Data(BaseModel): class HistoryGetLoansOriginatedByAssetResponse(BaseModel): - data: Optional[Data] = None - """Historical cumulative lend value for assets""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py index 5a4e6ec..262b9b4 100644 --- a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py +++ b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py @@ -5,7 +5,6 @@ from ...._models import BaseModel from ...interval import Interval -from ...error_data import ErrorData __all__ = ["HistoryGetLoansOriginatedResponse", "Data", "DataPagination", "DataPoint", "DataRange"] @@ -46,7 +45,7 @@ class DataRange(BaseModel): class Data(BaseModel): - """Historical cumulative lend value for assets""" + """Primary response content (object)""" pagination: DataPagination """Pagination parameters for the interval response""" @@ -58,14 +57,20 @@ class Data(BaseModel): class HistoryGetLoansOriginatedResponse(BaseModel): - data: Optional[Data] = None - """Historical cumulative lend value for assets""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/analytics/market_get_current_state_response.py b/src/neptune_api_v2/types/analytics/market_get_current_state_response.py index d45e835..8ca6dba 100644 --- a/src/neptune_api_v2/types/analytics/market_get_current_state_response.py +++ b/src/neptune_api_v2/types/analytics/market_get_current_state_response.py @@ -1,10 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import List, Union from ..._models import BaseModel from ..asset_spec import AssetSpec -from ..error_data import ErrorData __all__ = ["MarketGetCurrentStateResponse", "Data", "DataAsset", "DataLoansOriginated", "DataLoansOriginatedBreakdown"] @@ -43,7 +42,7 @@ class DataLoansOriginated(BaseModel): class Data(BaseModel): - """Object data""" + """Primary response content (object)""" assets: List[DataAsset] @@ -60,14 +59,20 @@ class Data(BaseModel): class MarketGetCurrentStateResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/asset_get_price_history_params.py b/src/neptune_api_v2/types/asset_get_price_history_params.py index 7a3d918..8a7f4cf 100644 --- a/src/neptune_api_v2/types/asset_get_price_history_params.py +++ b/src/neptune_api_v2/types/asset_get_price_history_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Required, TypedDict from .interval_unit import IntervalUnit @@ -36,7 +37,7 @@ class AssetGetPriceHistoryParams(TypedDict, total=False): Must be provided as unix timestamp (in seconds) """ - asset_ids: str + asset_ids: Optional[str] """Optional comma-separated list of asset IDs to filter for. If excluded, values will be returned for all assets. diff --git a/src/neptune_api_v2/types/asset_get_price_history_response.py b/src/neptune_api_v2/types/asset_get_price_history_response.py index 54f2b5a..2a6d9a2 100644 --- a/src/neptune_api_v2/types/asset_get_price_history_response.py +++ b/src/neptune_api_v2/types/asset_get_price_history_response.py @@ -6,7 +6,6 @@ from .._models import BaseModel from .interval import Interval from .asset_spec import AssetSpec -from .error_data import ErrorData __all__ = ["AssetGetPriceHistoryResponse", "Data", "DataPagination", "DataRange", "DataSeries", "DataSeriesPoint"] @@ -59,7 +58,7 @@ class DataSeries(BaseModel): class Data(BaseModel): - """Historical prices for assets""" + """Primary response content (object)""" pagination: DataPagination """Values used for paginating the time series data""" @@ -75,14 +74,20 @@ class Data(BaseModel): class AssetGetPriceHistoryResponse(BaseModel): - data: Optional[Data] = None - """Historical prices for assets""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/asset_list_prices_response.py b/src/neptune_api_v2/types/asset_list_prices_response.py index cae5d25..f74ebd9 100644 --- a/src/neptune_api_v2/types/asset_list_prices_response.py +++ b/src/neptune_api_v2/types/asset_list_prices_response.py @@ -5,7 +5,6 @@ from .._models import BaseModel from .asset_spec import AssetSpec -from .error_data import ErrorData from .asset_metadata import AssetMetadata from .asset_classification import AssetClassification @@ -73,17 +72,23 @@ class Data(BaseModel): class AssetListPricesResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[Data]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[Data] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/asset_list_response.py b/src/neptune_api_v2/types/asset_list_response.py index f04686f..626bc88 100644 --- a/src/neptune_api_v2/types/asset_list_response.py +++ b/src/neptune_api_v2/types/asset_list_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from .._models import BaseModel from .asset_info import AssetInfo -from .error_data import ErrorData __all__ = ["AssetListResponse"] class AssetListResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[AssetInfo]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[AssetInfo] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/error_data.py b/src/neptune_api_v2/types/error_data.py deleted file mode 100644 index 2a6dfec..0000000 --- a/src/neptune_api_v2/types/error_data.py +++ /dev/null @@ -1,39 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ErrorData", "Field"] - - -class Field(BaseModel): - field: str - - message: str - - -class ErrorData(BaseModel): - fields: Optional[List[Field]] = None - """List of names and error messages for invalid fields. - - Never NULL when `error.kind == 'validation'`. Always NULL for all other cases. - """ - - kind: Literal["invalid_request", "validation", "entity_not_found", "contract", "internal"] - """Error kind/category - - Useful to match against for clients that require custom logic depending on the - type of error encountered - """ - - message: str - """Error message""" - - scope: Literal["user", "client", "server"] - """The scope/region of the error. - - Clients may use this to determine how to handle an error message (e.g. log it to - console or display it to the user). - """ diff --git a/src/neptune_api_v2/types/market_get_merged_by_asset_response.py b/src/neptune_api_v2/types/market_get_merged_by_asset_response.py index 49739c3..88c0a3f 100644 --- a/src/neptune_api_v2/types/market_get_merged_by_asset_response.py +++ b/src/neptune_api_v2/types/market_get_merged_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from .._models import BaseModel -from .error_data import ErrorData from .merged_market import MergedMarket __all__ = ["MarketGetMergedByAssetResponse"] class MarketGetMergedByAssetResponse(BaseModel): - data: Optional[MergedMarket] = None - """Data for all of an assets markets""" + """Object data success response""" + + data: MergedMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/market_get_merged_response.py b/src/neptune_api_v2/types/market_get_merged_response.py index 01f13d2..95398ab 100644 --- a/src/neptune_api_v2/types/market_get_merged_response.py +++ b/src/neptune_api_v2/types/market_get_merged_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from .._models import BaseModel -from .error_data import ErrorData from .merged_market import MergedMarket __all__ = ["MarketGetMergedResponse"] class MarketGetMergedResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[MergedMarket]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[MergedMarket] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/market_get_overview_response.py b/src/neptune_api_v2/types/market_get_overview_response.py index 33d6848..0f657b8 100644 --- a/src/neptune_api_v2/types/market_get_overview_response.py +++ b/src/neptune_api_v2/types/market_get_overview_response.py @@ -1,9 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from .._models import BaseModel -from .error_data import ErrorData from .markets.lend_market import LendMarket from .global_market_config import GlobalMarketConfig from .markets.borrow_market_overview import BorrowMarketOverview @@ -12,7 +11,7 @@ class Data(BaseModel): - """Object data""" + """Primary response content (object)""" borrow: BorrowMarketOverview """Borrow market overview""" @@ -25,14 +24,20 @@ class Data(BaseModel): class MarketGetOverviewResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/market_get_params_response.py b/src/neptune_api_v2/types/market_get_params_response.py index 99970dd..4514093 100644 --- a/src/neptune_api_v2/types/market_get_params_response.py +++ b/src/neptune_api_v2/types/market_get_params_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from .._models import BaseModel -from .error_data import ErrorData from .global_market_config import GlobalMarketConfig __all__ = ["MarketGetParamsResponse"] class MarketGetParamsResponse(BaseModel): - data: Optional[GlobalMarketConfig] = None - """Object data""" + """Object data success response""" + + data: GlobalMarketConfig + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py b/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py index 43ff109..f785e6c 100644 --- a/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel -from ...error_data import ErrorData from .borrow_collateral_market import BorrowCollateralMarket __all__ = ["CollateralGetByAssetResponse"] class CollateralGetByAssetResponse(BaseModel): - data: Optional[BorrowCollateralMarket] = None - """Object data""" + """Object data success response""" + + data: BorrowCollateralMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py b/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py index 735f761..4a35b7c 100644 --- a/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py +++ b/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .borrow_collateral_market import BorrowCollateralMarket __all__ = ["CollateralListResponse"] class CollateralListResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[BorrowCollateralMarket]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[BorrowCollateralMarket] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py b/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py index 8ed45dc..ad941b0 100644 --- a/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel -from ...error_data import ErrorData from .borrow_debt_market import BorrowDebtMarket __all__ = ["DebtGetByAssetResponse"] class DebtGetByAssetResponse(BaseModel): - data: Optional[BorrowDebtMarket] = None - """Object data""" + """Object data success response""" + + data: BorrowDebtMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow/debt_list_response.py b/src/neptune_api_v2/types/markets/borrow/debt_list_response.py index 03dec36..d23e8bb 100644 --- a/src/neptune_api_v2/types/markets/borrow/debt_list_response.py +++ b/src/neptune_api_v2/types/markets/borrow/debt_list_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .borrow_debt_market import BorrowDebtMarket __all__ = ["DebtListResponse"] class DebtListResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[BorrowDebtMarket]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[BorrowDebtMarket] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow_get_overview_response.py b/src/neptune_api_v2/types/markets/borrow_get_overview_response.py index 9f03107..47ddd1f 100644 --- a/src/neptune_api_v2/types/markets/borrow_get_overview_response.py +++ b/src/neptune_api_v2/types/markets/borrow_get_overview_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .borrow_market_overview import BorrowMarketOverview __all__ = ["BorrowGetOverviewResponse"] class BorrowGetOverviewResponse(BaseModel): - data: Optional[BorrowMarketOverview] = None - """Object data""" + """Object data success response""" + + data: BorrowMarketOverview + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/borrow_get_rate_history_params.py b/src/neptune_api_v2/types/markets/borrow_get_rate_history_params.py index 23d457b..df6ca37 100644 --- a/src/neptune_api_v2/types/markets/borrow_get_rate_history_params.py +++ b/src/neptune_api_v2/types/markets/borrow_get_rate_history_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Required, TypedDict from ..interval_unit import IntervalUnit @@ -36,7 +37,7 @@ class BorrowGetRateHistoryParams(TypedDict, total=False): Must be provided as unix timestamp (in seconds) """ - asset_ids: str + asset_ids: Optional[str] """Optional comma-separated list of asset IDs to filter for. If excluded, values will be returned for all assets. diff --git a/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py b/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py index dd21c45..4070379 100644 --- a/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py +++ b/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from ..asset_rate_history import AssetRateHistory __all__ = ["BorrowGetRateHistoryResponse"] class BorrowGetRateHistoryResponse(BaseModel): - data: Optional[AssetRateHistory] = None - """Historical rates for assets""" + """Object data success response""" + + data: AssetRateHistory + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py b/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py index 5fb685d..b181190 100644 --- a/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .lend_market import LendMarket __all__ = ["LendGetByAssetResponse"] class LendGetByAssetResponse(BaseModel): - data: Optional[LendMarket] = None - """Object data""" + """Object data success response""" + + data: LendMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/lend_get_rate_history_params.py b/src/neptune_api_v2/types/markets/lend_get_rate_history_params.py index a3bcd6c..29825d6 100644 --- a/src/neptune_api_v2/types/markets/lend_get_rate_history_params.py +++ b/src/neptune_api_v2/types/markets/lend_get_rate_history_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Required, TypedDict from ..interval_unit import IntervalUnit @@ -36,7 +37,7 @@ class LendGetRateHistoryParams(TypedDict, total=False): Must be provided as unix timestamp (in seconds) """ - asset_ids: str + asset_ids: Optional[str] """Optional comma-separated list of asset IDs to filter for. If excluded, values will be returned for all assets. diff --git a/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py b/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py index ba67c7e..72c5179 100644 --- a/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py +++ b/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from ..asset_rate_history import AssetRateHistory __all__ = ["LendGetRateHistoryResponse"] class LendGetRateHistoryResponse(BaseModel): - data: Optional[AssetRateHistory] = None - """Historical rates for assets""" + """Object data success response""" + + data: AssetRateHistory + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/markets/lend_list_response.py b/src/neptune_api_v2/types/markets/lend_list_response.py index 613e43b..022f73e 100644 --- a/src/neptune_api_v2/types/markets/lend_list_response.py +++ b/src/neptune_api_v2/types/markets/lend_list_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ..._models import BaseModel -from ..error_data import ErrorData from .lend_market import LendMarket __all__ = ["LendListResponse"] class LendListResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[LendMarket]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[LendMarket] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/nept_get_params_response.py b/src/neptune_api_v2/types/nept_get_params_response.py index e5b9373..278adac 100644 --- a/src/neptune_api_v2/types/nept_get_params_response.py +++ b/src/neptune_api_v2/types/nept_get_params_response.py @@ -3,7 +3,6 @@ from typing import List, Optional from .._models import BaseModel -from .error_data import ErrorData from .staking_pool_params import StakingPoolParams __all__ = [ @@ -102,11 +101,11 @@ class DataStakingPool(BaseModel): """The ordered index (position) of this pool""" params: StakingPoolParams - """-- Staking pool contract parameters""" + """Staking pool contract parameters""" class Data(BaseModel): - """Object data""" + """Primary response content (object)""" emission_rate: str """The emission rate of NEPT in tokens per year""" @@ -124,14 +123,20 @@ class Data(BaseModel): class NeptGetParamsResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/nept_get_staking_overview_response.py b/src/neptune_api_v2/types/nept_get_staking_overview_response.py index 3e6ca4e..9f2e4a5 100644 --- a/src/neptune_api_v2/types/nept_get_staking_overview_response.py +++ b/src/neptune_api_v2/types/nept_get_staking_overview_response.py @@ -5,7 +5,6 @@ from .._models import BaseModel from .asset_info import AssetInfo -from .error_data import ErrorData from .staking_pool_full import StakingPoolFull __all__ = [ @@ -43,14 +42,14 @@ class DataGlobalState(BaseModel): """When staking rewards were last distributed""" stake_acc: str - """**TODO:** rename, proper description, text/value? + """**! TODO:** rename, proper description, text/value? stake_acc = ∫ ( emission_rate / total_reward_weight ) dt """ class Data(BaseModel): - """Object data""" + """Primary response content (object)""" asset_info: AssetInfo """Asset identifiers with associated metadata""" @@ -66,14 +65,20 @@ class Data(BaseModel): class NeptGetStakingOverviewResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/nept_get_state_response.py b/src/neptune_api_v2/types/nept_get_state_response.py index 5332039..2b20ed4 100644 --- a/src/neptune_api_v2/types/nept_get_state_response.py +++ b/src/neptune_api_v2/types/nept_get_state_response.py @@ -3,7 +3,6 @@ from typing import List, Optional from .._models import BaseModel -from .error_data import ErrorData from .staking_pool_state import StakingPoolState __all__ = [ @@ -120,11 +119,11 @@ class DataStaking(BaseModel): """The ordered index (position) of this pool""" state: StakingPoolState - """-- Current contract state of staking pool""" + """Current contract state of staking pool""" class Data(BaseModel): - """Object data""" + """Primary response content (object)""" extra: DataExtra @@ -157,14 +156,20 @@ class Data(BaseModel): class NeptGetStateResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/staking_pool_full.py b/src/neptune_api_v2/types/staking_pool_full.py index 2424e9c..bd003a1 100644 --- a/src/neptune_api_v2/types/staking_pool_full.py +++ b/src/neptune_api_v2/types/staking_pool_full.py @@ -40,7 +40,7 @@ class StakingPoolFull(BaseModel): """The ordered index (position) of this pool""" params: StakingPoolParams - """-- Staking pool contract parameters""" + """Staking pool contract parameters""" state: StakingPoolState - """-- Current contract state of staking pool""" + """Current contract state of staking pool""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py index 9b8666d..6f2ab93 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ....._models import BaseModel -from ....error_data import ErrorData from .user_collateral_asset_pool import UserCollateralAssetPool __all__ = ["SubaccountGetSubaccountCollateralsResponse"] class SubaccountGetSubaccountCollateralsResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserCollateralAssetPool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserCollateralAssetPool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py index 3e5e085..3dc245a 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ....._models import BaseModel -from ....error_data import ErrorData from ..user_debt_asset_pool import UserDebtAssetPool __all__ = ["SubaccountGetSubaccountDebtsResponse"] class SubaccountGetSubaccountDebtsResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserDebtAssetPool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserDebtAssetPool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py index e9c75d4..2fdb081 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ....._models import BaseModel -from ....error_data import ErrorData from .user_account_health import UserAccountHealth __all__ = ["SubaccountGetSubaccountHealthResponse"] class SubaccountGetSubaccountHealthResponse(BaseModel): - data: Optional[UserAccountHealth] = None - """Object data""" + """Object data success response""" + + data: UserAccountHealth + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py index 21ef2ec..2a464a0 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ....._models import BaseModel -from ....error_data import ErrorData from .user_borrow_market_account import UserBorrowMarketAccount __all__ = ["SubaccountGetSubaccountResponse"] class SubaccountGetSubaccountResponse(BaseModel): - data: Optional[UserBorrowMarketAccount] = None - """Object data""" + """Object data success response""" + + data: UserBorrowMarketAccount + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py index 1d9d612..cf61777 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py @@ -4,7 +4,6 @@ from ...._models import BaseModel from ...asset_info import AssetInfo -from ...error_data import ErrorData __all__ = [ "BorrowGetCollateralAccountsByAssetResponse", @@ -80,7 +79,7 @@ class DataAccount(BaseModel): class Data(BaseModel): - """Object data""" + """Primary response content (object)""" accounts: List[DataAccount] """All collateral subaccounts for the associated asset type""" @@ -90,14 +89,20 @@ class Data(BaseModel): class BorrowGetCollateralAccountsByAssetResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py b/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py index 3c3a455..61eb4e0 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .borrow.user_collateral_asset_pool import UserCollateralAssetPool __all__ = ["BorrowGetCollateralTotalsResponse"] class BorrowGetCollateralTotalsResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserCollateralAssetPool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserCollateralAssetPool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py b/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py index 8382e6b..d056903 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py @@ -4,7 +4,6 @@ from ...._models import BaseModel from ...asset_info import AssetInfo -from ...error_data import ErrorData __all__ = [ "BorrowGetDebtAccountsByAssetResponse", @@ -98,7 +97,7 @@ class DataAccount(BaseModel): class Data(BaseModel): - """Object data""" + """Primary response content (object)""" accounts: List[DataAccount] """All debt subaccounts for the associated asset type""" @@ -108,14 +107,20 @@ class Data(BaseModel): class BorrowGetDebtAccountsByAssetResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py b/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py index c3cff8d..6a81620 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .user_debt_asset_pool import UserDebtAssetPool __all__ = ["BorrowGetDebtsTotalsResponse"] class BorrowGetDebtsTotalsResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserDebtAssetPool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserDebtAssetPool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py b/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py index 499a872..e46b738 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel -from ...error_data import ErrorData from .user_borrow_market import UserBorrowMarket __all__ = ["BorrowGetPortfolioResponse"] class BorrowGetPortfolioResponse(BaseModel): - data: Optional[UserBorrowMarket] = None - """Object data""" + """Object data success response""" + + data: UserBorrowMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py b/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py index f7de6df..5412fab 100644 --- a/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel -from ...error_data import ErrorData from .user_debt_asset_pool import UserDebtAssetPool __all__ = ["LendGetByAssetResponse"] class LendGetByAssetResponse(BaseModel): - data: Optional[UserDebtAssetPool] = None - """Object data""" + """Object data success response""" + + data: UserDebtAssetPool + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market/lend_list_response.py b/src/neptune_api_v2/types/user/market/lend_list_response.py index 6286aef..03633cd 100644 --- a/src/neptune_api_v2/types/user/market/lend_list_response.py +++ b/src/neptune_api_v2/types/user/market/lend_list_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .user_debt_asset_pool import UserDebtAssetPool __all__ = ["LendListResponse"] class LendListResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserDebtAssetPool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserDebtAssetPool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py b/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py index 0114d35..2ad28bf 100644 --- a/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .user_merged_market import UserMergedMarket __all__ = ["MarketGetMergedByAssetResponse"] class MarketGetMergedByAssetResponse(BaseModel): - data: Optional[UserMergedMarket] = None - """Object data""" + """Object data success response""" + + data: UserMergedMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market_get_merged_response.py b/src/neptune_api_v2/types/user/market_get_merged_response.py index 6c9788d..08113ab 100644 --- a/src/neptune_api_v2/types/user/market_get_merged_response.py +++ b/src/neptune_api_v2/types/user/market_get_merged_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ..._models import BaseModel -from ..error_data import ErrorData from .user_merged_market import UserMergedMarket __all__ = ["MarketGetMergedResponse"] class MarketGetMergedResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserMergedMarket]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserMergedMarket] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/market_get_portfolio_response.py b/src/neptune_api_v2/types/user/market_get_portfolio_response.py index b29dd79..838b717 100644 --- a/src/neptune_api_v2/types/user/market_get_portfolio_response.py +++ b/src/neptune_api_v2/types/user/market_get_portfolio_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .user_market import UserMarket __all__ = ["MarketGetPortfolioResponse"] class MarketGetPortfolioResponse(BaseModel): - data: Optional[UserMarket] = None - """Object data""" + """Object data success response""" + + data: UserMarket + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py b/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py index 2d6a183..a37a90a 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel from .user_stake import UserStake -from ...error_data import ErrorData __all__ = ["StakingGetOverviewResponse"] class StakingGetOverviewResponse(BaseModel): - data: Optional[UserStake] = None - """Object data""" + """Object data success response""" + + data: UserStake + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py b/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py index ec6c81f..a9b2c3a 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ...._models import BaseModel -from ...error_data import ErrorData from .user_stake_pool import UserStakePool __all__ = ["StakingGetStakingPoolResponse"] class StakingGetStakingPoolResponse(BaseModel): - data: Optional[UserStakePool] = None - """Object data""" + """Object data success response""" + + data: UserStakePool + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py b/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py index 1dd9d61..87406cb 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py @@ -1,26 +1,31 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .user_stake_pool import UserStakePool __all__ = ["StakingGetStakingPoolsResponse"] class StakingGetStakingPoolsResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[UserStakePool]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[UserStakePool] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py b/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py index 813a303..34d6b13 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py @@ -1,16 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel -from ...error_data import ErrorData from .user_stake_unbonding_entry import UserStakeUnbondingEntry __all__ = ["StakingGetUnstakingResponse", "Data"] class Data(BaseModel): - """Object data""" + """Primary response content (object)""" amount_sum: str """Total amount of all unbond entries @@ -28,14 +27,20 @@ class Data(BaseModel): class StakingGetUnstakingResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/nept_get_unlocks_response.py b/src/neptune_api_v2/types/user/nept_get_unlocks_response.py index c946438..b9cf199 100644 --- a/src/neptune_api_v2/types/user/nept_get_unlocks_response.py +++ b/src/neptune_api_v2/types/user/nept_get_unlocks_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .user_nept_unlock_overview import UserNeptUnlockOverview __all__ = ["NeptGetUnlocksResponse"] class NeptGetUnlocksResponse(BaseModel): - data: Optional[UserNeptUnlockOverview] = None - """Object data""" + """Object data success response""" + + data: UserNeptUnlockOverview + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py b/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py index b2accba..c4a2b16 100644 --- a/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py +++ b/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py @@ -150,14 +150,14 @@ class Extra(BaseModel): class UserNeptUnlockAmounts(BaseModel): amount: str - """The full unlock amount. + """The full unlock amount This value is immutable and does not change with regards to expiry/reclamation/lock states. """ claimable: str - """The amount currently claimable. + """The amount currently claimable This takes into account: reclamation, lock state, expiry, and previously claimed. In other words, this is an accurate representation of what the user can @@ -170,7 +170,7 @@ class UserNeptUnlockAmounts(BaseModel): expired: str """ The amount that was claimable but has now expired due to the presence and - subsequent passing of `expires_at`. + subsequent passing of `expires_at` """ extra: Extra diff --git a/src/neptune_api_v2/types/user/user_nept_unlock_overview.py b/src/neptune_api_v2/types/user/user_nept_unlock_overview.py index 7633f19..40c5df7 100644 --- a/src/neptune_api_v2/types/user/user_nept_unlock_overview.py +++ b/src/neptune_api_v2/types/user/user_nept_unlock_overview.py @@ -141,7 +141,7 @@ class Extra(BaseModel): class UserNeptUnlockOverview(BaseModel): arrangements: List[Arrangement] - """-- A list of the user's active unlock arrangements""" + """A list of the user's active unlock arrangements""" extra: Extra @@ -149,4 +149,4 @@ class UserNeptUnlockOverview(BaseModel): """The time at which the most recent unlock claim occurred, if any""" totals: UserNeptUnlockAmounts - """-- Contains pre-calculated total amounts for all unlock agreements""" + """Contains pre-calculated total amounts for all unlock agreements""" diff --git a/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py b/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py index bd296b1..8642345 100644 --- a/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py +++ b/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py @@ -1,23 +1,26 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from ..._models import BaseModel -from ..error_data import ErrorData from .wallet_balance import WalletBalance __all__ = ["WalletGetBalanceByAssetResponse"] class WalletGetBalanceByAssetResponse(BaseModel): - data: Optional[WalletBalance] = None - """Object data""" + """Object data success response""" + + data: WalletBalance + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user/wallet_get_balances_response.py b/src/neptune_api_v2/types/user/wallet_get_balances_response.py index c1c615f..e1d3a06 100644 --- a/src/neptune_api_v2/types/user/wallet_get_balances_response.py +++ b/src/neptune_api_v2/types/user/wallet_get_balances_response.py @@ -3,14 +3,13 @@ from typing import List, Optional from ..._models import BaseModel -from ..error_data import ErrorData from .wallet_balance import WalletBalance __all__ = ["WalletGetBalancesResponse", "Data"] class Data(BaseModel): - """Object data""" + """Primary response content (object)""" balances: List[WalletBalance] """Array of each wallet balance""" @@ -26,14 +25,20 @@ class Data(BaseModel): class WalletGetBalancesResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + data: Data + """Primary response content (object)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user_get_tx_history_response.py b/src/neptune_api_v2/types/user_get_tx_history_response.py index 40cc72f..0b7e8d0 100644 --- a/src/neptune_api_v2/types/user_get_tx_history_response.py +++ b/src/neptune_api_v2/types/user_get_tx_history_response.py @@ -5,7 +5,6 @@ from .._models import BaseModel from .asset_info import AssetInfo -from .error_data import ErrorData from .event_action import EventAction __all__ = [ @@ -154,17 +153,23 @@ class Data(BaseModel): class UserGetTxHistoryResponse(BaseModel): - count: Optional[int] = None - """Total number of objects in all pages""" + """List data success response""" - data: Optional[List[Data]] = None - """List contents""" + count: int + """Total number of objects irrespective of any pagination parameters.""" - error: Optional[ErrorData] = None - """Error message, if any""" + data: List[Data] + """Primary response content (list)""" + + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/src/neptune_api_v2/types/user_get_user_response.py b/src/neptune_api_v2/types/user_get_user_response.py index 60d0a44..27a1b58 100644 --- a/src/neptune_api_v2/types/user_get_user_response.py +++ b/src/neptune_api_v2/types/user_get_user_response.py @@ -1,9 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional - from .._models import BaseModel -from .error_data import ErrorData from .user.user_market import UserMarket from .user.nept.user_stake import UserStake from .user.user_wallet_portfolio import UserWalletPortfolio @@ -16,14 +13,14 @@ class DataNept(BaseModel): """User's NEPT associations (e.g. stake, unlocks)""" staking: UserStake - """-- Overview of the user's staking contributions/activity""" + """Overview of the user's staking contributions/activity""" unlocks: UserNeptUnlockOverview - """-- Overview of the user's unlock arrangements and claim statistics""" + """Overview of the user's unlock arrangements and claim statistics""" class Data(BaseModel): - """Object data""" + """Primary response content (object)""" markets: UserMarket """User's market contribution overview""" @@ -36,14 +33,20 @@ class Data(BaseModel): class UserGetUserResponse(BaseModel): - data: Optional[Data] = None - """Object data""" + """Object data success response""" + + data: Data + """Primary response content (object)""" - error: Optional[ErrorData] = None - """Error content, only set if an error occurs""" + error: None = None + """Error data. Guaranteed `null` for successful response.""" status: int - """Request status""" + """HTTP status. + + Successful responses are guaranteed to be < `400`. Conversely, error responses + are guaranteed to be >= `400`. + """ status_text: str - """Request status text""" + """HTTP status text""" diff --git a/tests/api_resources/test_user.py b/tests/api_resources/test_user.py index 0db2cb8..8fca026 100644 --- a/tests/api_resources/test_user.py +++ b/tests/api_resources/test_user.py @@ -24,7 +24,7 @@ class TestUser: @parametrize def test_method_get_tx_history(self, client: NeptuneAPIV2) -> None: user = client.user.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(UserGetTxHistoryResponse, user, path=["response"]) @@ -32,7 +32,7 @@ def test_method_get_tx_history(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_tx_history_with_all_params(self, client: NeptuneAPIV2) -> None: user = client.user.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", action="borrow_flash_loan", limit=1, prev_event_uuid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -46,7 +46,7 @@ def test_method_get_tx_history_with_all_params(self, client: NeptuneAPIV2) -> No @parametrize def test_raw_response_get_tx_history(self, client: NeptuneAPIV2) -> None: response = client.user.with_raw_response.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -58,7 +58,7 @@ def test_raw_response_get_tx_history(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_tx_history(self, client: NeptuneAPIV2) -> None: with client.user.with_streaming_response.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -80,7 +80,7 @@ def test_path_params_get_tx_history(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_user(self, client: NeptuneAPIV2) -> None: user = client.user.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(UserGetUserResponse, user, path=["response"]) @@ -88,7 +88,7 @@ def test_method_get_user(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_user_with_all_params(self, client: NeptuneAPIV2) -> None: user = client.user.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_percent=True, with_text=True, with_value=True, @@ -99,7 +99,7 @@ def test_method_get_user_with_all_params(self, client: NeptuneAPIV2) -> None: @parametrize def test_raw_response_get_user(self, client: NeptuneAPIV2) -> None: response = client.user.with_raw_response.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -111,7 +111,7 @@ def test_raw_response_get_user(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_user(self, client: NeptuneAPIV2) -> None: with client.user.with_streaming_response.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ class TestAsyncUser: @parametrize async def test_method_get_tx_history(self, async_client: AsyncNeptuneAPIV2) -> None: user = await async_client.user.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(UserGetTxHistoryResponse, user, path=["response"]) @@ -147,7 +147,7 @@ async def test_method_get_tx_history(self, async_client: AsyncNeptuneAPIV2) -> N @parametrize async def test_method_get_tx_history_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: user = await async_client.user.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", action="borrow_flash_loan", limit=1, prev_event_uuid="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -161,7 +161,7 @@ async def test_method_get_tx_history_with_all_params(self, async_client: AsyncNe @parametrize async def test_raw_response_get_tx_history(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.with_raw_response.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -173,7 +173,7 @@ async def test_raw_response_get_tx_history(self, async_client: AsyncNeptuneAPIV2 @parametrize async def test_streaming_response_get_tx_history(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.with_streaming_response.get_tx_history( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -195,7 +195,7 @@ async def test_path_params_get_tx_history(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_method_get_user(self, async_client: AsyncNeptuneAPIV2) -> None: user = await async_client.user.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(UserGetUserResponse, user, path=["response"]) @@ -203,7 +203,7 @@ async def test_method_get_user(self, async_client: AsyncNeptuneAPIV2) -> None: @parametrize async def test_method_get_user_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: user = await async_client.user.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_percent=True, with_text=True, with_value=True, @@ -214,7 +214,7 @@ async def test_method_get_user_with_all_params(self, async_client: AsyncNeptuneA @parametrize async def test_raw_response_get_user(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.with_raw_response.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -226,7 +226,7 @@ async def test_raw_response_get_user(self, async_client: AsyncNeptuneAPIV2) -> N @parametrize async def test_streaming_response_get_user(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.with_streaming_response.get_user( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/market/borrow/test_subaccount.py b/tests/api_resources/user/market/borrow/test_subaccount.py index 07d224d..7c4b1a7 100644 --- a/tests/api_resources/user/market/borrow/test_subaccount.py +++ b/tests/api_resources/user/market/borrow/test_subaccount.py @@ -27,7 +27,7 @@ class TestSubaccount: def test_method_get_subaccount(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountResponse, subaccount, path=["response"]) @@ -36,7 +36,7 @@ def test_method_get_subaccount(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_with_all_params(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -47,7 +47,7 @@ def test_method_get_subaccount_with_all_params(self, client: NeptuneAPIV2) -> No def test_raw_response_get_subaccount(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.subaccount.with_raw_response.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -60,7 +60,7 @@ def test_raw_response_get_subaccount(self, client: NeptuneAPIV2) -> None: def test_streaming_response_get_subaccount(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.subaccount.with_streaming_response.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -84,7 +84,7 @@ def test_path_params_get_subaccount(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountCollateralsResponse, subaccount, path=["response"]) @@ -93,7 +93,7 @@ def test_method_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_collaterals_with_all_params(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -104,7 +104,7 @@ def test_method_get_subaccount_collaterals_with_all_params(self, client: Neptune def test_raw_response_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.subaccount.with_raw_response.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> def test_streaming_response_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,7 +141,7 @@ def test_path_params_get_subaccount_collaterals(self, client: NeptuneAPIV2) -> N def test_method_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountDebtsResponse, subaccount, path=["response"]) @@ -150,7 +150,7 @@ def test_method_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_debts_with_all_params(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -161,7 +161,7 @@ def test_method_get_subaccount_debts_with_all_params(self, client: NeptuneAPIV2) def test_raw_response_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.subaccount.with_raw_response.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -174,7 +174,7 @@ def test_raw_response_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: def test_streaming_response_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -198,7 +198,7 @@ def test_path_params_get_subaccount_debts(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_health(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) @@ -207,7 +207,7 @@ def test_method_get_subaccount_health(self, client: NeptuneAPIV2) -> None: def test_method_get_subaccount_health_with_all_params(self, client: NeptuneAPIV2) -> None: subaccount = client.user.market.borrow.subaccount.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) @@ -217,7 +217,7 @@ def test_method_get_subaccount_health_with_all_params(self, client: NeptuneAPIV2 def test_raw_response_get_subaccount_health(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.subaccount.with_raw_response.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -230,7 +230,7 @@ def test_raw_response_get_subaccount_health(self, client: NeptuneAPIV2) -> None: def test_streaming_response_get_subaccount_health(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -260,7 +260,7 @@ class TestAsyncSubaccount: async def test_method_get_subaccount(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountResponse, subaccount, path=["response"]) @@ -269,7 +269,7 @@ async def test_method_get_subaccount(self, async_client: AsyncNeptuneAPIV2) -> N async def test_method_get_subaccount_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -280,7 +280,7 @@ async def test_method_get_subaccount_with_all_params(self, async_client: AsyncNe async def test_raw_response_get_subaccount(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.subaccount.with_raw_response.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -293,7 +293,7 @@ async def test_raw_response_get_subaccount(self, async_client: AsyncNeptuneAPIV2 async def test_streaming_response_get_subaccount(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.subaccount.with_streaming_response.get_subaccount( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,7 +317,7 @@ async def test_path_params_get_subaccount(self, async_client: AsyncNeptuneAPIV2) async def test_method_get_subaccount_collaterals(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountCollateralsResponse, subaccount, path=["response"]) @@ -326,7 +326,7 @@ async def test_method_get_subaccount_collaterals(self, async_client: AsyncNeptun async def test_method_get_subaccount_collaterals_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -337,7 +337,7 @@ async def test_method_get_subaccount_collaterals_with_all_params(self, async_cli async def test_raw_response_get_subaccount_collaterals(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.subaccount.with_raw_response.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -350,7 +350,7 @@ async def test_raw_response_get_subaccount_collaterals(self, async_client: Async async def test_streaming_response_get_subaccount_collaterals(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_collaterals( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,7 +374,7 @@ async def test_path_params_get_subaccount_collaterals(self, async_client: AsyncN async def test_method_get_subaccount_debts(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountDebtsResponse, subaccount, path=["response"]) @@ -383,7 +383,7 @@ async def test_method_get_subaccount_debts(self, async_client: AsyncNeptuneAPIV2 async def test_method_get_subaccount_debts_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -394,7 +394,7 @@ async def test_method_get_subaccount_debts_with_all_params(self, async_client: A async def test_raw_response_get_subaccount_debts(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.subaccount.with_raw_response.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -407,7 +407,7 @@ async def test_raw_response_get_subaccount_debts(self, async_client: AsyncNeptun async def test_streaming_response_get_subaccount_debts(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_debts( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -431,7 +431,7 @@ async def test_path_params_get_subaccount_debts(self, async_client: AsyncNeptune async def test_method_get_subaccount_health(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) @@ -440,7 +440,7 @@ async def test_method_get_subaccount_health(self, async_client: AsyncNeptuneAPIV async def test_method_get_subaccount_health_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: subaccount = await async_client.user.market.borrow.subaccount.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, ) assert_matches_type(SubaccountGetSubaccountHealthResponse, subaccount, path=["response"]) @@ -450,7 +450,7 @@ async def test_method_get_subaccount_health_with_all_params(self, async_client: async def test_raw_response_get_subaccount_health(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.subaccount.with_raw_response.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -463,7 +463,7 @@ async def test_raw_response_get_subaccount_health(self, async_client: AsyncNeptu async def test_streaming_response_get_subaccount_health(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.subaccount.with_streaming_response.get_subaccount_health( index=0, - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/market/test_borrow.py b/tests/api_resources/user/market/test_borrow.py index 5af9899..a10de55 100644 --- a/tests/api_resources/user/market/test_borrow.py +++ b/tests/api_resources/user/market/test_borrow.py @@ -27,7 +27,7 @@ class TestBorrow: @parametrize def test_method_get_collateral_accounts_by_asset(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(BorrowGetCollateralAccountsByAssetResponse, borrow, path=["response"]) @@ -36,7 +36,7 @@ def test_method_get_collateral_accounts_by_asset(self, client: NeptuneAPIV2) -> @parametrize def test_method_get_collateral_accounts_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -47,7 +47,7 @@ def test_method_get_collateral_accounts_by_asset_with_all_params(self, client: N @parametrize def test_raw_response_get_collateral_accounts_by_asset(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.with_raw_response.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -60,7 +60,7 @@ def test_raw_response_get_collateral_accounts_by_asset(self, client: NeptuneAPIV @parametrize def test_streaming_response_get_collateral_accounts_by_asset(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.with_streaming_response.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -84,7 +84,7 @@ def test_path_params_get_collateral_accounts_by_asset(self, client: NeptuneAPIV2 @parametrize def test_method_get_collateral_totals(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetCollateralTotalsResponse, borrow, path=["response"]) @@ -92,7 +92,7 @@ def test_method_get_collateral_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_collateral_totals_with_all_params(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -102,7 +102,7 @@ def test_method_get_collateral_totals_with_all_params(self, client: NeptuneAPIV2 @parametrize def test_raw_response_get_collateral_totals(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.with_raw_response.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -114,7 +114,7 @@ def test_raw_response_get_collateral_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_collateral_totals(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.with_streaming_response.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -136,7 +136,7 @@ def test_path_params_get_collateral_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(BorrowGetDebtAccountsByAssetResponse, borrow, path=["response"]) @@ -145,7 +145,7 @@ def test_method_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_debt_accounts_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -156,7 +156,7 @@ def test_method_get_debt_accounts_by_asset_with_all_params(self, client: Neptune @parametrize def test_raw_response_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.with_raw_response.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -169,7 +169,7 @@ def test_raw_response_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> @parametrize def test_streaming_response_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.with_streaming_response.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -193,7 +193,7 @@ def test_path_params_get_debt_accounts_by_asset(self, client: NeptuneAPIV2) -> N @parametrize def test_method_get_debts_totals(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetDebtsTotalsResponse, borrow, path=["response"]) @@ -201,7 +201,7 @@ def test_method_get_debts_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_debts_totals_with_all_params(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -211,7 +211,7 @@ def test_method_get_debts_totals_with_all_params(self, client: NeptuneAPIV2) -> @parametrize def test_raw_response_get_debts_totals(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.with_raw_response.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -223,7 +223,7 @@ def test_raw_response_get_debts_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_debts_totals(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.with_streaming_response.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -245,7 +245,7 @@ def test_path_params_get_debts_totals(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_portfolio(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetPortfolioResponse, borrow, path=["response"]) @@ -253,7 +253,7 @@ def test_method_get_portfolio(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_portfolio_with_all_params(self, client: NeptuneAPIV2) -> None: borrow = client.user.market.borrow.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -263,7 +263,7 @@ def test_method_get_portfolio_with_all_params(self, client: NeptuneAPIV2) -> Non @parametrize def test_raw_response_get_portfolio(self, client: NeptuneAPIV2) -> None: response = client.user.market.borrow.with_raw_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -275,7 +275,7 @@ def test_raw_response_get_portfolio(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_portfolio(self, client: NeptuneAPIV2) -> None: with client.user.market.borrow.with_streaming_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -303,7 +303,7 @@ class TestAsyncBorrow: @parametrize async def test_method_get_collateral_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(BorrowGetCollateralAccountsByAssetResponse, borrow, path=["response"]) @@ -314,7 +314,7 @@ async def test_method_get_collateral_accounts_by_asset_with_all_params( self, async_client: AsyncNeptuneAPIV2 ) -> None: borrow = await async_client.user.market.borrow.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -325,7 +325,7 @@ async def test_method_get_collateral_accounts_by_asset_with_all_params( @parametrize async def test_raw_response_get_collateral_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.with_raw_response.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -338,7 +338,7 @@ async def test_raw_response_get_collateral_accounts_by_asset(self, async_client: @parametrize async def test_streaming_response_get_collateral_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.with_streaming_response.get_collateral_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -362,7 +362,7 @@ async def test_path_params_get_collateral_accounts_by_asset(self, async_client: @parametrize async def test_method_get_collateral_totals(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetCollateralTotalsResponse, borrow, path=["response"]) @@ -370,7 +370,7 @@ async def test_method_get_collateral_totals(self, async_client: AsyncNeptuneAPIV @parametrize async def test_method_get_collateral_totals_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -380,7 +380,7 @@ async def test_method_get_collateral_totals_with_all_params(self, async_client: @parametrize async def test_raw_response_get_collateral_totals(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.with_raw_response.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -392,7 +392,7 @@ async def test_raw_response_get_collateral_totals(self, async_client: AsyncNeptu @parametrize async def test_streaming_response_get_collateral_totals(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.with_streaming_response.get_collateral_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -414,7 +414,7 @@ async def test_path_params_get_collateral_totals(self, async_client: AsyncNeptun @parametrize async def test_method_get_debt_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(BorrowGetDebtAccountsByAssetResponse, borrow, path=["response"]) @@ -423,7 +423,7 @@ async def test_method_get_debt_accounts_by_asset(self, async_client: AsyncNeptun @parametrize async def test_method_get_debt_accounts_by_asset_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -434,7 +434,7 @@ async def test_method_get_debt_accounts_by_asset_with_all_params(self, async_cli @parametrize async def test_raw_response_get_debt_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.with_raw_response.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -447,7 +447,7 @@ async def test_raw_response_get_debt_accounts_by_asset(self, async_client: Async @parametrize async def test_streaming_response_get_debt_accounts_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.with_streaming_response.get_debt_accounts_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -471,7 +471,7 @@ async def test_path_params_get_debt_accounts_by_asset(self, async_client: AsyncN @parametrize async def test_method_get_debts_totals(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetDebtsTotalsResponse, borrow, path=["response"]) @@ -479,7 +479,7 @@ async def test_method_get_debts_totals(self, async_client: AsyncNeptuneAPIV2) -> @parametrize async def test_method_get_debts_totals_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -489,7 +489,7 @@ async def test_method_get_debts_totals_with_all_params(self, async_client: Async @parametrize async def test_raw_response_get_debts_totals(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.with_raw_response.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -501,7 +501,7 @@ async def test_raw_response_get_debts_totals(self, async_client: AsyncNeptuneAPI @parametrize async def test_streaming_response_get_debts_totals(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.with_streaming_response.get_debts_totals( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -523,7 +523,7 @@ async def test_path_params_get_debts_totals(self, async_client: AsyncNeptuneAPIV @parametrize async def test_method_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(BorrowGetPortfolioResponse, borrow, path=["response"]) @@ -531,7 +531,7 @@ async def test_method_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> No @parametrize async def test_method_get_portfolio_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: borrow = await async_client.user.market.borrow.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -541,7 +541,7 @@ async def test_method_get_portfolio_with_all_params(self, async_client: AsyncNep @parametrize async def test_raw_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.borrow.with_raw_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -553,7 +553,7 @@ async def test_raw_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.borrow.with_streaming_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/market/test_lend.py b/tests/api_resources/user/market/test_lend.py index 81febfc..4a9ea74 100644 --- a/tests/api_resources/user/market/test_lend.py +++ b/tests/api_resources/user/market/test_lend.py @@ -24,7 +24,7 @@ class TestLend: @parametrize def test_method_list(self, client: NeptuneAPIV2) -> None: lend = client.user.market.lend.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(LendListResponse, lend, path=["response"]) @@ -32,7 +32,7 @@ def test_method_list(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_list_with_all_params(self, client: NeptuneAPIV2) -> None: lend = client.user.market.lend.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -42,7 +42,7 @@ def test_method_list_with_all_params(self, client: NeptuneAPIV2) -> None: @parametrize def test_raw_response_list(self, client: NeptuneAPIV2) -> None: response = client.user.market.lend.with_raw_response.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -54,7 +54,7 @@ def test_raw_response_list(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_list(self, client: NeptuneAPIV2) -> None: with client.user.market.lend.with_streaming_response.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -76,7 +76,7 @@ def test_path_params_list(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_by_asset(self, client: NeptuneAPIV2) -> None: lend = client.user.market.lend.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(LendGetByAssetResponse, lend, path=["response"]) @@ -85,7 +85,7 @@ def test_method_get_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None: lend = client.user.market.lend.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -96,7 +96,7 @@ def test_method_get_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None @parametrize def test_raw_response_get_by_asset(self, client: NeptuneAPIV2) -> None: response = client.user.market.lend.with_raw_response.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -109,7 +109,7 @@ def test_raw_response_get_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_by_asset(self, client: NeptuneAPIV2) -> None: with client.user.market.lend.with_streaming_response.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -139,7 +139,7 @@ class TestAsyncLend: @parametrize async def test_method_list(self, async_client: AsyncNeptuneAPIV2) -> None: lend = await async_client.user.market.lend.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(LendListResponse, lend, path=["response"]) @@ -147,7 +147,7 @@ async def test_method_list(self, async_client: AsyncNeptuneAPIV2) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: lend = await async_client.user.market.lend.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -157,7 +157,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncNeptuneAPIV2 @parametrize async def test_raw_response_list(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.lend.with_raw_response.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncNeptuneAPIV2) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.lend.with_streaming_response.list( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,7 +191,7 @@ async def test_path_params_list(self, async_client: AsyncNeptuneAPIV2) -> None: @parametrize async def test_method_get_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: lend = await async_client.user.market.lend.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(LendGetByAssetResponse, lend, path=["response"]) @@ -200,7 +200,7 @@ async def test_method_get_by_asset(self, async_client: AsyncNeptuneAPIV2) -> Non @parametrize async def test_method_get_by_asset_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: lend = await async_client.user.market.lend.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -211,7 +211,7 @@ async def test_method_get_by_asset_with_all_params(self, async_client: AsyncNept @parametrize async def test_raw_response_get_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.lend.with_raw_response.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -224,7 +224,7 @@ async def test_raw_response_get_by_asset(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.lend.with_streaming_response.get_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed diff --git a/tests/api_resources/user/nept/test_staking.py b/tests/api_resources/user/nept/test_staking.py index 7c0fc6b..7d486de 100644 --- a/tests/api_resources/user/nept/test_staking.py +++ b/tests/api_resources/user/nept/test_staking.py @@ -26,7 +26,7 @@ class TestStaking: @parametrize def test_method_get_overview(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetOverviewResponse, staking, path=["response"]) @@ -34,7 +34,7 @@ def test_method_get_overview(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_overview_with_all_params(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -44,7 +44,7 @@ def test_method_get_overview_with_all_params(self, client: NeptuneAPIV2) -> None @parametrize def test_raw_response_get_overview(self, client: NeptuneAPIV2) -> None: response = client.user.nept.staking.with_raw_response.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_get_overview(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_overview(self, client: NeptuneAPIV2) -> None: with client.user.nept.staking.with_streaming_response.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_path_params_get_overview(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_staking_pool(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetStakingPoolResponse, staking, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get_staking_pool(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_staking_pool_with_all_params(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", duration=0, index=0, with_text=True, @@ -98,7 +98,7 @@ def test_method_get_staking_pool_with_all_params(self, client: NeptuneAPIV2) -> @parametrize def test_raw_response_get_staking_pool(self, client: NeptuneAPIV2) -> None: response = client.user.nept.staking.with_raw_response.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -110,7 +110,7 @@ def test_raw_response_get_staking_pool(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_staking_pool(self, client: NeptuneAPIV2) -> None: with client.user.nept.staking.with_streaming_response.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -132,7 +132,7 @@ def test_path_params_get_staking_pool(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_staking_pools(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetStakingPoolsResponse, staking, path=["response"]) @@ -140,7 +140,7 @@ def test_method_get_staking_pools(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_staking_pools_with_all_params(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -150,7 +150,7 @@ def test_method_get_staking_pools_with_all_params(self, client: NeptuneAPIV2) -> @parametrize def test_raw_response_get_staking_pools(self, client: NeptuneAPIV2) -> None: response = client.user.nept.staking.with_raw_response.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -162,7 +162,7 @@ def test_raw_response_get_staking_pools(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_staking_pools(self, client: NeptuneAPIV2) -> None: with client.user.nept.staking.with_streaming_response.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,7 +184,7 @@ def test_path_params_get_staking_pools(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_unstaking(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetUnstakingResponse, staking, path=["response"]) @@ -192,7 +192,7 @@ def test_method_get_unstaking(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_unstaking_with_all_params(self, client: NeptuneAPIV2) -> None: staking = client.user.nept.staking.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -202,7 +202,7 @@ def test_method_get_unstaking_with_all_params(self, client: NeptuneAPIV2) -> Non @parametrize def test_raw_response_get_unstaking(self, client: NeptuneAPIV2) -> None: response = client.user.nept.staking.with_raw_response.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -214,7 +214,7 @@ def test_raw_response_get_unstaking(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_unstaking(self, client: NeptuneAPIV2) -> None: with client.user.nept.staking.with_streaming_response.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -242,7 +242,7 @@ class TestAsyncStaking: @parametrize async def test_method_get_overview(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetOverviewResponse, staking, path=["response"]) @@ -250,7 +250,7 @@ async def test_method_get_overview(self, async_client: AsyncNeptuneAPIV2) -> Non @parametrize async def test_method_get_overview_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -260,7 +260,7 @@ async def test_method_get_overview_with_all_params(self, async_client: AsyncNept @parametrize async def test_raw_response_get_overview(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.nept.staking.with_raw_response.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -272,7 +272,7 @@ async def test_raw_response_get_overview(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_overview(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.nept.staking.with_streaming_response.get_overview( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -294,7 +294,7 @@ async def test_path_params_get_overview(self, async_client: AsyncNeptuneAPIV2) - @parametrize async def test_method_get_staking_pool(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetStakingPoolResponse, staking, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_get_staking_pool(self, async_client: AsyncNeptuneAPIV2) -> @parametrize async def test_method_get_staking_pool_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", duration=0, index=0, with_text=True, @@ -314,7 +314,7 @@ async def test_method_get_staking_pool_with_all_params(self, async_client: Async @parametrize async def test_raw_response_get_staking_pool(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.nept.staking.with_raw_response.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_get_staking_pool(self, async_client: AsyncNeptuneAPI @parametrize async def test_streaming_response_get_staking_pool(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.nept.staking.with_streaming_response.get_staking_pool( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -348,7 +348,7 @@ async def test_path_params_get_staking_pool(self, async_client: AsyncNeptuneAPIV @parametrize async def test_method_get_staking_pools(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetStakingPoolsResponse, staking, path=["response"]) @@ -356,7 +356,7 @@ async def test_method_get_staking_pools(self, async_client: AsyncNeptuneAPIV2) - @parametrize async def test_method_get_staking_pools_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -366,7 +366,7 @@ async def test_method_get_staking_pools_with_all_params(self, async_client: Asyn @parametrize async def test_raw_response_get_staking_pools(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.nept.staking.with_raw_response.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -378,7 +378,7 @@ async def test_raw_response_get_staking_pools(self, async_client: AsyncNeptuneAP @parametrize async def test_streaming_response_get_staking_pools(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.nept.staking.with_streaming_response.get_staking_pools( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -400,7 +400,7 @@ async def test_path_params_get_staking_pools(self, async_client: AsyncNeptuneAPI @parametrize async def test_method_get_unstaking(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(StakingGetUnstakingResponse, staking, path=["response"]) @@ -408,7 +408,7 @@ async def test_method_get_unstaking(self, async_client: AsyncNeptuneAPIV2) -> No @parametrize async def test_method_get_unstaking_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: staking = await async_client.user.nept.staking.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -418,7 +418,7 @@ async def test_method_get_unstaking_with_all_params(self, async_client: AsyncNep @parametrize async def test_raw_response_get_unstaking(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.nept.staking.with_raw_response.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -430,7 +430,7 @@ async def test_raw_response_get_unstaking(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_unstaking(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.nept.staking.with_streaming_response.get_unstaking( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/test_market.py b/tests/api_resources/user/test_market.py index 853b082..bf26fff 100644 --- a/tests/api_resources/user/test_market.py +++ b/tests/api_resources/user/test_market.py @@ -25,7 +25,7 @@ class TestMarket: @parametrize def test_method_get_merged(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(MarketGetMergedResponse, market, path=["response"]) @@ -33,7 +33,7 @@ def test_method_get_merged(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_merged_with_all_params(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -43,7 +43,7 @@ def test_method_get_merged_with_all_params(self, client: NeptuneAPIV2) -> None: @parametrize def test_raw_response_get_merged(self, client: NeptuneAPIV2) -> None: response = client.user.market.with_raw_response.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -55,7 +55,7 @@ def test_raw_response_get_merged(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_merged(self, client: NeptuneAPIV2) -> None: with client.user.market.with_streaming_response.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -77,7 +77,7 @@ def test_path_params_get_merged(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(MarketGetMergedByAssetResponse, market, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_merged_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -97,7 +97,7 @@ def test_method_get_merged_by_asset_with_all_params(self, client: NeptuneAPIV2) @parametrize def test_raw_response_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: response = client.user.market.with_raw_response.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -110,7 +110,7 @@ def test_raw_response_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: with client.user.market.with_streaming_response.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -134,7 +134,7 @@ def test_path_params_get_merged_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_portfolio(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(MarketGetPortfolioResponse, market, path=["response"]) @@ -142,7 +142,7 @@ def test_method_get_portfolio(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_portfolio_with_all_params(self, client: NeptuneAPIV2) -> None: market = client.user.market.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -152,7 +152,7 @@ def test_method_get_portfolio_with_all_params(self, client: NeptuneAPIV2) -> Non @parametrize def test_raw_response_get_portfolio(self, client: NeptuneAPIV2) -> None: response = client.user.market.with_raw_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -164,7 +164,7 @@ def test_raw_response_get_portfolio(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_portfolio(self, client: NeptuneAPIV2) -> None: with client.user.market.with_streaming_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,7 +192,7 @@ class TestAsyncMarket: @parametrize async def test_method_get_merged(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(MarketGetMergedResponse, market, path=["response"]) @@ -200,7 +200,7 @@ async def test_method_get_merged(self, async_client: AsyncNeptuneAPIV2) -> None: @parametrize async def test_method_get_merged_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -210,7 +210,7 @@ async def test_method_get_merged_with_all_params(self, async_client: AsyncNeptun @parametrize async def test_raw_response_get_merged(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.with_raw_response.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -222,7 +222,7 @@ async def test_raw_response_get_merged(self, async_client: AsyncNeptuneAPIV2) -> @parametrize async def test_streaming_response_get_merged(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.with_streaming_response.get_merged( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -244,7 +244,7 @@ async def test_path_params_get_merged(self, async_client: AsyncNeptuneAPIV2) -> @parametrize async def test_method_get_merged_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(MarketGetMergedByAssetResponse, market, path=["response"]) @@ -253,7 +253,7 @@ async def test_method_get_merged_by_asset(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_method_get_merged_by_asset_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -264,7 +264,7 @@ async def test_method_get_merged_by_asset_with_all_params(self, async_client: As @parametrize async def test_raw_response_get_merged_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.with_raw_response.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -277,7 +277,7 @@ async def test_raw_response_get_merged_by_asset(self, async_client: AsyncNeptune @parametrize async def test_streaming_response_get_merged_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.with_streaming_response.get_merged_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -301,7 +301,7 @@ async def test_path_params_get_merged_by_asset(self, async_client: AsyncNeptuneA @parametrize async def test_method_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(MarketGetPortfolioResponse, market, path=["response"]) @@ -309,7 +309,7 @@ async def test_method_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> No @parametrize async def test_method_get_portfolio_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: market = await async_client.user.market.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -319,7 +319,7 @@ async def test_method_get_portfolio_with_all_params(self, async_client: AsyncNep @parametrize async def test_raw_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.market.with_raw_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -331,7 +331,7 @@ async def test_raw_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_portfolio(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.market.with_streaming_response.get_portfolio( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/test_nept.py b/tests/api_resources/user/test_nept.py index ba03d3f..b1456cc 100644 --- a/tests/api_resources/user/test_nept.py +++ b/tests/api_resources/user/test_nept.py @@ -21,7 +21,7 @@ class TestNept: @parametrize def test_method_get_unlocks(self, client: NeptuneAPIV2) -> None: nept = client.user.nept.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(NeptGetUnlocksResponse, nept, path=["response"]) @@ -29,7 +29,7 @@ def test_method_get_unlocks(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_unlocks_with_all_params(self, client: NeptuneAPIV2) -> None: nept = client.user.nept.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_percent=True, with_text=True, with_value=True, @@ -40,7 +40,7 @@ def test_method_get_unlocks_with_all_params(self, client: NeptuneAPIV2) -> None: @parametrize def test_raw_response_get_unlocks(self, client: NeptuneAPIV2) -> None: response = client.user.nept.with_raw_response.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -52,7 +52,7 @@ def test_raw_response_get_unlocks(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_unlocks(self, client: NeptuneAPIV2) -> None: with client.user.nept.with_streaming_response.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -80,7 +80,7 @@ class TestAsyncNept: @parametrize async def test_method_get_unlocks(self, async_client: AsyncNeptuneAPIV2) -> None: nept = await async_client.user.nept.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(NeptGetUnlocksResponse, nept, path=["response"]) @@ -88,7 +88,7 @@ async def test_method_get_unlocks(self, async_client: AsyncNeptuneAPIV2) -> None @parametrize async def test_method_get_unlocks_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: nept = await async_client.user.nept.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_percent=True, with_text=True, with_value=True, @@ -99,7 +99,7 @@ async def test_method_get_unlocks_with_all_params(self, async_client: AsyncNeptu @parametrize async def test_raw_response_get_unlocks(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.nept.with_raw_response.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -111,7 +111,7 @@ async def test_raw_response_get_unlocks(self, async_client: AsyncNeptuneAPIV2) - @parametrize async def test_streaming_response_get_unlocks(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.nept.with_streaming_response.get_unlocks( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/user/test_wallet.py b/tests/api_resources/user/test_wallet.py index 68945d7..7a702dd 100644 --- a/tests/api_resources/user/test_wallet.py +++ b/tests/api_resources/user/test_wallet.py @@ -24,7 +24,7 @@ class TestWallet: @parametrize def test_method_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: wallet = client.user.wallet.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(WalletGetBalanceByAssetResponse, wallet, path=["response"]) @@ -33,7 +33,7 @@ def test_method_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_balance_by_asset_with_all_params(self, client: NeptuneAPIV2) -> None: wallet = client.user.wallet.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -44,7 +44,7 @@ def test_method_get_balance_by_asset_with_all_params(self, client: NeptuneAPIV2) @parametrize def test_raw_response_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: response = client.user.wallet.with_raw_response.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -57,7 +57,7 @@ def test_raw_response_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: with client.user.wallet.with_streaming_response.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -81,7 +81,7 @@ def test_path_params_get_balance_by_asset(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_balances(self, client: NeptuneAPIV2) -> None: wallet = client.user.wallet.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(WalletGetBalancesResponse, wallet, path=["response"]) @@ -89,7 +89,7 @@ def test_method_get_balances(self, client: NeptuneAPIV2) -> None: @parametrize def test_method_get_balances_with_all_params(self, client: NeptuneAPIV2) -> None: wallet = client.user.wallet.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -99,7 +99,7 @@ def test_method_get_balances_with_all_params(self, client: NeptuneAPIV2) -> None @parametrize def test_raw_response_get_balances(self, client: NeptuneAPIV2) -> None: response = client.user.wallet.with_raw_response.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -111,7 +111,7 @@ def test_raw_response_get_balances(self, client: NeptuneAPIV2) -> None: @parametrize def test_streaming_response_get_balances(self, client: NeptuneAPIV2) -> None: with client.user.wallet.with_streaming_response.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ class TestAsyncWallet: @parametrize async def test_method_get_balance_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: wallet = await async_client.user.wallet.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) assert_matches_type(WalletGetBalanceByAssetResponse, wallet, path=["response"]) @@ -148,7 +148,7 @@ async def test_method_get_balance_by_asset(self, async_client: AsyncNeptuneAPIV2 @parametrize async def test_method_get_balance_by_asset_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: wallet = await async_client.user.wallet.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", with_text=True, with_value=True, @@ -159,7 +159,7 @@ async def test_method_get_balance_by_asset_with_all_params(self, async_client: A @parametrize async def test_raw_response_get_balance_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.wallet.with_raw_response.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) @@ -172,7 +172,7 @@ async def test_raw_response_get_balance_by_asset(self, async_client: AsyncNeptun @parametrize async def test_streaming_response_get_balance_by_asset(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.wallet.with_streaming_response.get_balance_by_asset( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", asset_id="token;-K-//-//3-", ) as response: assert not response.is_closed @@ -196,7 +196,7 @@ async def test_path_params_get_balance_by_asset(self, async_client: AsyncNeptune @parametrize async def test_method_get_balances(self, async_client: AsyncNeptuneAPIV2) -> None: wallet = await async_client.user.wallet.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert_matches_type(WalletGetBalancesResponse, wallet, path=["response"]) @@ -204,7 +204,7 @@ async def test_method_get_balances(self, async_client: AsyncNeptuneAPIV2) -> Non @parametrize async def test_method_get_balances_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: wallet = await async_client.user.wallet.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", with_text=True, with_value=True, ) @@ -214,7 +214,7 @@ async def test_method_get_balances_with_all_params(self, async_client: AsyncNept @parametrize async def test_raw_response_get_balances(self, async_client: AsyncNeptuneAPIV2) -> None: response = await async_client.user.wallet.with_raw_response.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) assert response.is_closed is True @@ -226,7 +226,7 @@ async def test_raw_response_get_balances(self, async_client: AsyncNeptuneAPIV2) @parametrize async def test_streaming_response_get_balances(self, async_client: AsyncNeptuneAPIV2) -> None: async with async_client.user.wallet.with_streaming_response.get_balances( - address="address", + address="injvalcons1a03k0ztfyjnd70apawva003pkh0adqmau0a9q0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 75d052fd3c0aa157ad1d05d310e9f0c65de679e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:48:52 +0000 Subject: [PATCH 16/19] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5db887d..8c44a14 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 47 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-65d147ca43891623187340ff0aa56887343ee8e60d19ad156b65e241ebea8a99.yml openapi_spec_hash: c063aafd7db98b2572545d87247fc8a1 -config_hash: 8a15725f9f0e7bdf072a3c089d80c452 +config_hash: 86d436d2720b30be618058b316c2100e From fabb464d4759502d7f49abdad35c2d06e227f414 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 18:51:37 +0000 Subject: [PATCH 17/19] feat(api): fix missing unlocks endpoint --- .stats.yml | 4 +- api.md | 12 + .../resources/analytics/__init__.py | 14 + .../resources/analytics/analytics.py | 32 ++ .../resources/analytics/nept.py | 199 ++++++++++++ .../types/analytics/__init__.py | 2 + .../nept_unlocks_distribution_params.py | 18 ++ .../nept_unlocks_distribution_response.py | 286 ++++++++++++++++++ tests/api_resources/analytics/test_nept.py | 100 ++++++ 9 files changed, 665 insertions(+), 2 deletions(-) create mode 100644 src/neptune_api_v2/resources/analytics/nept.py create mode 100644 src/neptune_api_v2/types/analytics/nept_unlocks_distribution_params.py create mode 100644 src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py create mode 100644 tests/api_resources/analytics/test_nept.py diff --git a/.stats.yml b/.stats.yml index 8c44a14..dad5a70 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 47 +configured_endpoints: 48 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-65d147ca43891623187340ff0aa56887343ee8e60d19ad156b65e241ebea8a99.yml openapi_spec_hash: c063aafd7db98b2572545d87247fc8a1 -config_hash: 86d436d2720b30be618058b316c2100e +config_hash: 25ce124efff11211f32262e6c378136d diff --git a/api.md b/api.md index 5413b58..7f03832 100644 --- a/api.md +++ b/api.md @@ -344,6 +344,18 @@ Methods: - client.analytics.market.history.get_loans_originated(\*\*params) -> HistoryGetLoansOriginatedResponse - client.analytics.market.history.get_loans_originated_by_asset(\*\*params) -> HistoryGetLoansOriginatedByAssetResponse +## Nept + +Types: + +```python +from neptune_api_v2.types.analytics import NeptUnlocksDistributionResponse +``` + +Methods: + +- client.analytics.nept.unlocks_distribution(\*\*params) -> NeptUnlocksDistributionResponse + # Integrations ## Bantr diff --git a/src/neptune_api_v2/resources/analytics/__init__.py b/src/neptune_api_v2/resources/analytics/__init__.py index 9f6da41..6cc4d7d 100644 --- a/src/neptune_api_v2/resources/analytics/__init__.py +++ b/src/neptune_api_v2/resources/analytics/__init__.py @@ -1,5 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .nept import ( + NeptResource, + AsyncNeptResource, + NeptResourceWithRawResponse, + AsyncNeptResourceWithRawResponse, + NeptResourceWithStreamingResponse, + AsyncNeptResourceWithStreamingResponse, +) from .market import ( MarketResource, AsyncMarketResource, @@ -24,6 +32,12 @@ "AsyncMarketResourceWithRawResponse", "MarketResourceWithStreamingResponse", "AsyncMarketResourceWithStreamingResponse", + "NeptResource", + "AsyncNeptResource", + "NeptResourceWithRawResponse", + "AsyncNeptResourceWithRawResponse", + "NeptResourceWithStreamingResponse", + "AsyncNeptResourceWithStreamingResponse", "AnalyticsResource", "AsyncAnalyticsResource", "AnalyticsResourceWithRawResponse", diff --git a/src/neptune_api_v2/resources/analytics/analytics.py b/src/neptune_api_v2/resources/analytics/analytics.py index 383349b..45df7b1 100644 --- a/src/neptune_api_v2/resources/analytics/analytics.py +++ b/src/neptune_api_v2/resources/analytics/analytics.py @@ -2,6 +2,14 @@ from __future__ import annotations +from .nept import ( + NeptResource, + AsyncNeptResource, + NeptResourceWithRawResponse, + AsyncNeptResourceWithRawResponse, + NeptResourceWithStreamingResponse, + AsyncNeptResourceWithStreamingResponse, +) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from .market.market import ( @@ -21,6 +29,10 @@ class AnalyticsResource(SyncAPIResource): def market(self) -> MarketResource: return MarketResource(self._client) + @cached_property + def nept(self) -> NeptResource: + return NeptResource(self._client) + @cached_property def with_raw_response(self) -> AnalyticsResourceWithRawResponse: """ @@ -46,6 +58,10 @@ class AsyncAnalyticsResource(AsyncAPIResource): def market(self) -> AsyncMarketResource: return AsyncMarketResource(self._client) + @cached_property + def nept(self) -> AsyncNeptResource: + return AsyncNeptResource(self._client) + @cached_property def with_raw_response(self) -> AsyncAnalyticsResourceWithRawResponse: """ @@ -74,6 +90,10 @@ def __init__(self, analytics: AnalyticsResource) -> None: def market(self) -> MarketResourceWithRawResponse: return MarketResourceWithRawResponse(self._analytics.market) + @cached_property + def nept(self) -> NeptResourceWithRawResponse: + return NeptResourceWithRawResponse(self._analytics.nept) + class AsyncAnalyticsResourceWithRawResponse: def __init__(self, analytics: AsyncAnalyticsResource) -> None: @@ -83,6 +103,10 @@ def __init__(self, analytics: AsyncAnalyticsResource) -> None: def market(self) -> AsyncMarketResourceWithRawResponse: return AsyncMarketResourceWithRawResponse(self._analytics.market) + @cached_property + def nept(self) -> AsyncNeptResourceWithRawResponse: + return AsyncNeptResourceWithRawResponse(self._analytics.nept) + class AnalyticsResourceWithStreamingResponse: def __init__(self, analytics: AnalyticsResource) -> None: @@ -92,6 +116,10 @@ def __init__(self, analytics: AnalyticsResource) -> None: def market(self) -> MarketResourceWithStreamingResponse: return MarketResourceWithStreamingResponse(self._analytics.market) + @cached_property + def nept(self) -> NeptResourceWithStreamingResponse: + return NeptResourceWithStreamingResponse(self._analytics.nept) + class AsyncAnalyticsResourceWithStreamingResponse: def __init__(self, analytics: AsyncAnalyticsResource) -> None: @@ -100,3 +128,7 @@ def __init__(self, analytics: AsyncAnalyticsResource) -> None: @cached_property def market(self) -> AsyncMarketResourceWithStreamingResponse: return AsyncMarketResourceWithStreamingResponse(self._analytics.market) + + @cached_property + def nept(self) -> AsyncNeptResourceWithStreamingResponse: + return AsyncNeptResourceWithStreamingResponse(self._analytics.nept) diff --git a/src/neptune_api_v2/resources/analytics/nept.py b/src/neptune_api_v2/resources/analytics/nept.py new file mode 100644 index 0000000..1367be3 --- /dev/null +++ b/src/neptune_api_v2/resources/analytics/nept.py @@ -0,0 +1,199 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.analytics import nept_unlocks_distribution_params +from ...types.analytics.nept_unlocks_distribution_response import NeptUnlocksDistributionResponse + +__all__ = ["NeptResource", "AsyncNeptResource"] + + +class NeptResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> NeptResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers + """ + return NeptResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> NeptResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response + """ + return NeptResourceWithStreamingResponse(self) + + def unlocks_distribution( + self, + *, + with_percent: bool | Omit = omit, + with_text: bool | Omit = omit, + with_value: 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, + ) -> NeptUnlocksDistributionResponse: + """ + Get distribution analytics for NEPT unlocks + + Args: + with_percent: Calculate and include proportional percentages, where applicable + + with_text: Include text variation fields + + with_value: Calculate and include USD values for amounts, where applicable + + 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/analytics/nept/unlocks-distribution", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "with_percent": with_percent, + "with_text": with_text, + "with_value": with_value, + }, + nept_unlocks_distribution_params.NeptUnlocksDistributionParams, + ), + ), + cast_to=NeptUnlocksDistributionResponse, + ) + + +class AsyncNeptResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncNeptResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers + """ + return AsyncNeptResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncNeptResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response + """ + return AsyncNeptResourceWithStreamingResponse(self) + + async def unlocks_distribution( + self, + *, + with_percent: bool | Omit = omit, + with_text: bool | Omit = omit, + with_value: 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, + ) -> NeptUnlocksDistributionResponse: + """ + Get distribution analytics for NEPT unlocks + + Args: + with_percent: Calculate and include proportional percentages, where applicable + + with_text: Include text variation fields + + with_value: Calculate and include USD values for amounts, where applicable + + 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/analytics/nept/unlocks-distribution", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "with_percent": with_percent, + "with_text": with_text, + "with_value": with_value, + }, + nept_unlocks_distribution_params.NeptUnlocksDistributionParams, + ), + ), + cast_to=NeptUnlocksDistributionResponse, + ) + + +class NeptResourceWithRawResponse: + def __init__(self, nept: NeptResource) -> None: + self._nept = nept + + self.unlocks_distribution = to_raw_response_wrapper( + nept.unlocks_distribution, + ) + + +class AsyncNeptResourceWithRawResponse: + def __init__(self, nept: AsyncNeptResource) -> None: + self._nept = nept + + self.unlocks_distribution = async_to_raw_response_wrapper( + nept.unlocks_distribution, + ) + + +class NeptResourceWithStreamingResponse: + def __init__(self, nept: NeptResource) -> None: + self._nept = nept + + self.unlocks_distribution = to_streamed_response_wrapper( + nept.unlocks_distribution, + ) + + +class AsyncNeptResourceWithStreamingResponse: + def __init__(self, nept: AsyncNeptResource) -> None: + self._nept = nept + + self.unlocks_distribution = async_to_streamed_response_wrapper( + nept.unlocks_distribution, + ) diff --git a/src/neptune_api_v2/types/analytics/__init__.py b/src/neptune_api_v2/types/analytics/__init__.py index 3ab4d39..601cef0 100644 --- a/src/neptune_api_v2/types/analytics/__init__.py +++ b/src/neptune_api_v2/types/analytics/__init__.py @@ -2,4 +2,6 @@ from __future__ import annotations +from .nept_unlocks_distribution_params import NeptUnlocksDistributionParams as NeptUnlocksDistributionParams from .market_get_current_state_response import MarketGetCurrentStateResponse as MarketGetCurrentStateResponse +from .nept_unlocks_distribution_response import NeptUnlocksDistributionResponse as NeptUnlocksDistributionResponse diff --git a/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_params.py b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_params.py new file mode 100644 index 0000000..f34b588 --- /dev/null +++ b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["NeptUnlocksDistributionParams"] + + +class NeptUnlocksDistributionParams(TypedDict, total=False): + with_percent: bool + """Calculate and include proportional percentages, where applicable""" + + with_text: bool + """Include text variation fields""" + + with_value: bool + """Calculate and include USD values for amounts, where applicable""" diff --git a/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py new file mode 100644 index 0000000..6a985dd --- /dev/null +++ b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py @@ -0,0 +1,286 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = [ + "NeptUnlocksDistributionResponse", + "Data", + "DataGroup", + "DataGroupExtra", + "DataGroupExtraPercent", + "DataGroupExtraPercentExtra", + "DataGroupExtraPercentExtraText", + "DataGroupExtraText", + "DataGroupExtraValue", + "DataGroupExtraValueExtra", + "DataGroupExtraValueExtraText", +] + + +class DataGroupExtraPercentExtraText(BaseModel): + """Human-readable variants of percentages for unlock amounts. + + Will not be null when query params `with_text` and `with_percent` are `true`. + """ + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_locked: str + + amount_reclaimed: str + + amount_unlocked: str + + +class DataGroupExtraPercentExtra(BaseModel): + text: Optional[DataGroupExtraPercentExtraText] = None + """Human-readable variants of percentages for unlock amounts. + + Will not be null when query params `with_text` and `with_percent` are `true`. + """ + + +class DataGroupExtraPercent(BaseModel): + """Percentages for unlock amounts. + + These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. + """ + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_locked: str + + amount_reclaimed: str + + amount_unlocked: str + + extra: DataGroupExtraPercentExtra + + +class DataGroupExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + member_class: str + + +class DataGroupExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + +class DataGroupExtraValueExtra(BaseModel): + text: Optional[DataGroupExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class DataGroupExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + extra: DataGroupExtraValueExtra + + +class DataGroupExtra(BaseModel): + percent: Optional[DataGroupExtraPercent] = None + """Percentages for unlock amounts. + + These do not factor in the `amount_staked` or `amount_held` values. Will not be + null when query param `with_percent` is `true`. + """ + + text: Optional[DataGroupExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[DataGroupExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class DataGroup(BaseModel): + amount: str + """The sum of all token distribution unlock amounts for this group. + + This value is immutable and does not change with regards to + expiry/reclamation/lock states. + """ + + amount_claimable: str + """The amount currently claimable + + This takes into account: reclamation, lock state, expiry, and previously + claimed. In other words, this is an accurate representation of what the user can + currently claim. + """ + + amount_claimed: str + """The amount that has already been successfully claimed by the user""" + + amount_expired: str + """The amount that has expired. + + This will be the remaining unclaimed amount (if any) once the time specified by + the `expires_at` is past (if one is set). + + **NOTE:** Reclaimed amouts take priority. + + - If the remaining amount is reclaimed prior to a configured `expires_at`, this + will remain at 0 and will not change even after the `expires_at` time is + reached. + """ + + amount_held: str + """The total amount of NEPT currently held by the addresses in this group.""" + + amount_locked: str + """The total amount of NEPT currently time-locked. + + **NOTE:** This does not factor in reclaimed or expired states. + + - For linear unlock schedules: + + - This represents how much NEPT is time-locked by the `begins_at` and the + `ends_at` properties. + + - For lump sum unlocks: + - This will be the full amount prior to the `begins_at` unlock property. + - Once the time indicated by the `begins_at` property has been reached, this + value will be 0. + """ + + amount_reclaimed: str + """The amount that has been reclaimed from the unlock arrangement admin + + This will be the amount of the remaining unclaimed and locked at the time the + reclaim is issued. + """ + + amount_staked: str + """The total amount of NEPT current staked by the addresses in this group.""" + + amount_unlocked: str + """The total amount of NEPT currently unlocked + + **NOTE:** This does not factor in reclaimed or expired states. + + - For linear unlock schedules: + + - This represents the "progress" of unlocked NEPT from the time range between + the `begins_at` and the `ends_at` properties. + + - For lump sum unlocks: + - This will be 0 at any given time prior to the timestamp provided by the + `begins_at` unlock property. + - Once the time indicated by the `begins_at` property has been reached, this + value will be the full amount of the unlock. + """ + + extra: DataGroupExtra + + member_class: Literal["team", "advisor", "investor"] + """The group category""" + + +class Data(BaseModel): + """Primary response content (object)""" + + groups: List[DataGroup] + + +class NeptUnlocksDistributionResponse(BaseModel): + """Object data success response""" + + data: Data + """Primary response content (object)""" + + 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""" diff --git a/tests/api_resources/analytics/test_nept.py b/tests/api_resources/analytics/test_nept.py new file mode 100644 index 0000000..53ecf99 --- /dev/null +++ b/tests/api_resources/analytics/test_nept.py @@ -0,0 +1,100 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from tests.utils import assert_matches_type +from neptune_api_v2 import NeptuneAPIV2, AsyncNeptuneAPIV2 +from neptune_api_v2.types.analytics import NeptUnlocksDistributionResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestNept: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_unlocks_distribution(self, client: NeptuneAPIV2) -> None: + nept = client.analytics.nept.unlocks_distribution() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_unlocks_distribution_with_all_params(self, client: NeptuneAPIV2) -> None: + nept = client.analytics.nept.unlocks_distribution( + with_percent=True, + with_text=True, + with_value=True, + ) + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_unlocks_distribution(self, client: NeptuneAPIV2) -> None: + response = client.analytics.nept.with_raw_response.unlocks_distribution() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + nept = response.parse() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_unlocks_distribution(self, client: NeptuneAPIV2) -> None: + with client.analytics.nept.with_streaming_response.unlocks_distribution() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + nept = response.parse() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncNept: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_unlocks_distribution(self, async_client: AsyncNeptuneAPIV2) -> None: + nept = await async_client.analytics.nept.unlocks_distribution() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_unlocks_distribution_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: + nept = await async_client.analytics.nept.unlocks_distribution( + with_percent=True, + with_text=True, + with_value=True, + ) + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_unlocks_distribution(self, async_client: AsyncNeptuneAPIV2) -> None: + response = await async_client.analytics.nept.with_raw_response.unlocks_distribution() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + nept = await response.parse() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_unlocks_distribution(self, async_client: AsyncNeptuneAPIV2) -> None: + async with async_client.analytics.nept.with_streaming_response.unlocks_distribution() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + nept = await response.parse() + assert_matches_type(NeptUnlocksDistributionResponse, nept, path=["response"]) + + assert cast(Any, response.is_closed) is True From b7c41b2c316bc714f82b75233307cb53040366c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 02:38:29 +0000 Subject: [PATCH 18/19] feat(api): manual updates --- .stats.yml | 6 +- api.md | 52 +++- src/neptune_api_v2/types/__init__.py | 11 + ..._get_loans_originated_by_asset_response.py | 4 +- .../history_get_loans_originated_response.py | 4 +- .../market_get_current_state_response.py | 3 - .../nept_unlocks_distribution_response.py | 263 +----------------- .../types/asset_get_price_history_response.py | 75 +---- .../types/asset_list_prices_response.py | 40 +-- .../types/asset_list_response.py | 1 - src/neptune_api_v2/types/asset_price.py | 39 +++ .../types/asset_price_history.py | 73 +++++ src/neptune_api_v2/types/error_kind.py | 22 ++ src/neptune_api_v2/types/error_scope.py | 7 + .../market_get_merged_by_asset_response.py | 2 +- .../types/market_get_merged_response.py | 1 - .../types/market_get_overview_response.py | 3 - .../types/market_get_params_response.py | 1 - .../types/{markets => }/market_rate.py | 2 +- src/neptune_api_v2/types/markets/__init__.py | 2 +- .../types/markets/borrow/__init__.py | 2 + .../borrow/borrow_collateral_market_data.py | 15 + .../markets/borrow/borrow_debt_market.py | 2 +- .../markets/borrow/borrow_debt_market_data.py | 21 ++ .../collateral_get_by_asset_response.py | 1 - .../borrow/collateral_list_response.py | 1 - .../borrow/debt_get_by_asset_response.py | 1 - .../markets/borrow/debt_list_response.py | 1 - .../markets/borrow_get_overview_response.py | 1 - .../borrow_get_rate_history_response.py | 2 +- .../markets/lend_get_by_asset_response.py | 1 - .../markets/lend_get_rate_history_response.py | 2 +- .../types/markets/lend_list_response.py | 1 - .../types/markets/lend_market.py | 2 +- .../types/markets/lend_market_data.py | 17 ++ src/neptune_api_v2/types/merged_market.py | 50 +--- .../types/nept_get_params_response.py | 123 +------- .../nept_get_staking_overview_response.py | 3 - .../types/nept_get_state_response.py | 156 +---------- src/neptune_api_v2/types/nept_params.py | 119 ++++++++ src/neptune_api_v2/types/nept_state.py | 152 ++++++++++ .../types/nept_unlock_distribution_group.py | 258 +++++++++++++++++ src/neptune_api_v2/types/user/__init__.py | 10 +- .../types/user/market/__init__.py | 3 +- .../types/user/market/borrow/__init__.py | 3 + ...unt_get_subaccount_collaterals_response.py | 1 - ...ubaccount_get_subaccount_debts_response.py | 3 +- ...baccount_get_subaccount_health_response.py | 1 - .../subaccount_get_subaccount_response.py | 1 - .../borrow/user_borrow_market_account.py | 2 +- .../borrow/user_collateral_account_pool.py | 68 +++++ .../market/borrow/user_debt_account_pool.py | 86 ++++++ .../{ => borrow}/user_debt_asset_pool.py | 4 +- ...t_collateral_accounts_by_asset_response.py | 80 +----- .../borrow_get_collateral_totals_response.py | 1 - ...row_get_debt_accounts_by_asset_response.py | 98 +------ .../borrow_get_debts_totals_response.py | 3 +- .../market/borrow_get_portfolio_response.py | 1 - .../user/market/lend_get_by_asset_response.py | 3 +- .../types/user/market/lend_list_response.py | 3 +- .../types/user/market/user_borrow_market.py | 17 +- .../user/market/user_borrow_market_pools.py | 17 ++ .../types/user/market/user_lend_market.py | 13 + .../market_get_merged_by_asset_response.py | 1 - .../types/user/market_get_merged_response.py | 1 - .../user/market_get_portfolio_response.py | 1 - .../types/user/nept/__init__.py | 2 + .../nept/staking_get_overview_response.py | 1 - .../nept/staking_get_staking_pool_response.py | 1 - .../staking_get_staking_pools_response.py | 1 - .../nept/staking_get_unstaking_response.py | 3 - .../types/user/nept/user_stake.py | 92 +----- .../user/nept/user_stake_bonding_entry.py | 77 +++++ .../types/user/nept/user_stake_pool.py | 88 +----- .../types/user/nept/user_stake_unbonding.py | 77 +++++ .../types/user/nept_get_unlocks_response.py | 5 +- src/neptune_api_v2/types/user/user.py | 30 ++ src/neptune_api_v2/types/user/user_market.py | 15 +- ...lock_amounts.py => user_unlock_amounts.py} | 4 +- ...ck_overview.py => user_unlock_overview.py} | 67 +---- .../types/user/user_unlock_schedule.py | 11 + .../types/user/user_unlock_schedule_linear.py | 46 +++ .../user/user_unlock_schedule_lump_sum.py | 11 + src/neptune_api_v2/types/user/wallet_asset.py | 11 + .../types/user/wallet_asset_unknown.py | 14 + .../types/user/wallet_balance.py | 19 +- .../wallet_get_balance_by_asset_response.py | 1 - .../user/wallet_get_balances_response.py | 3 - .../types/user_get_tx_history_response.py | 153 +--------- .../types/user_get_user_response.py | 33 +-- src/neptune_api_v2/types/user_tx.py | 144 ++++++++++ .../types/validation_field_source.py | 7 + 92 files changed, 1497 insertions(+), 1382 deletions(-) create mode 100644 src/neptune_api_v2/types/asset_price.py create mode 100644 src/neptune_api_v2/types/asset_price_history.py create mode 100644 src/neptune_api_v2/types/error_kind.py create mode 100644 src/neptune_api_v2/types/error_scope.py rename src/neptune_api_v2/types/{markets => }/market_rate.py (95%) create mode 100644 src/neptune_api_v2/types/markets/borrow/borrow_collateral_market_data.py create mode 100644 src/neptune_api_v2/types/markets/borrow/borrow_debt_market_data.py create mode 100644 src/neptune_api_v2/types/markets/lend_market_data.py create mode 100644 src/neptune_api_v2/types/nept_params.py create mode 100644 src/neptune_api_v2/types/nept_state.py create mode 100644 src/neptune_api_v2/types/nept_unlock_distribution_group.py create mode 100644 src/neptune_api_v2/types/user/market/borrow/user_collateral_account_pool.py create mode 100644 src/neptune_api_v2/types/user/market/borrow/user_debt_account_pool.py rename src/neptune_api_v2/types/user/market/{ => borrow}/user_debt_asset_pool.py (96%) create mode 100644 src/neptune_api_v2/types/user/market/user_borrow_market_pools.py create mode 100644 src/neptune_api_v2/types/user/market/user_lend_market.py create mode 100644 src/neptune_api_v2/types/user/nept/user_stake_bonding_entry.py create mode 100644 src/neptune_api_v2/types/user/nept/user_stake_unbonding.py create mode 100644 src/neptune_api_v2/types/user/user.py rename src/neptune_api_v2/types/user/{user_nept_unlock_amounts.py => user_unlock_amounts.py} (98%) rename src/neptune_api_v2/types/user/{user_nept_unlock_overview.py => user_unlock_overview.py} (55%) create mode 100644 src/neptune_api_v2/types/user/user_unlock_schedule.py create mode 100644 src/neptune_api_v2/types/user/user_unlock_schedule_linear.py create mode 100644 src/neptune_api_v2/types/user/user_unlock_schedule_lump_sum.py create mode 100644 src/neptune_api_v2/types/user/wallet_asset.py create mode 100644 src/neptune_api_v2/types/user/wallet_asset_unknown.py create mode 100644 src/neptune_api_v2/types/user_tx.py create mode 100644 src/neptune_api_v2/types/validation_field_source.py diff --git a/.stats.yml b/.stats.yml index dad5a70..6e0347a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-65d147ca43891623187340ff0aa56887343ee8e60d19ad156b65e241ebea8a99.yml -openapi_spec_hash: c063aafd7db98b2572545d87247fc8a1 -config_hash: 25ce124efff11211f32262e6c378136d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-5768d4f43166406f5b74235f2dd9e91082bd67a7b182ca05d5df55604ebedd7e.yml +openapi_spec_hash: 2c5da98fd945fbfc68611634b7aa7042 +config_hash: fa0efc29593602eac57523d55bc83fa6 diff --git a/api.md b/api.md index 7f03832..7fbed9f 100644 --- a/api.md +++ b/api.md @@ -3,7 +3,20 @@ Types: ```python -from neptune_api_v2.types import Interval, IntervalUnit +from neptune_api_v2.types import ( + ErrorData, + ErrorDataVariants, + ErrorKind, + ErrorResponseVariants, + ErrorScope, + FieldValidationError, + Interval, + IntervalUnit, + ListErrorResponse, + ObjErrorResponse, + ValidationErrorData, + ValidationFieldSource, +) ``` # Status @@ -27,6 +40,9 @@ from neptune_api_v2.types import ( AssetClassification, AssetInfo, AssetMetadata, + AssetPrice, + AssetPriceHistory, + AssetRateHistory, AssetSpec, AssetListResponse, AssetGetPriceHistoryResponse, @@ -46,8 +62,8 @@ Types: ```python from neptune_api_v2.types import ( - AssetRateHistory, GlobalMarketConfig, + MarketRate, MergedMarket, MarketGetMergedResponse, MarketGetMergedByAssetResponse, @@ -70,8 +86,8 @@ Types: ```python from neptune_api_v2.types.markets import ( LendMarket, + LendMarketData, LendMarketState, - MarketRate, LendListResponse, LendGetByAssetResponse, LendGetRateHistoryResponse, @@ -109,6 +125,7 @@ Types: from neptune_api_v2.types.markets.borrow import ( BorrowCollateralConfig, BorrowCollateralMarket, + BorrowCollateralMarketData, BorrowCollateralState, CollateralListResponse, CollateralGetByAssetResponse, @@ -128,6 +145,7 @@ Types: from neptune_api_v2.types.markets.borrow import ( BorrowDebtConfig, BorrowDebtMarket, + BorrowDebtMarketData, BorrowDebtState, DebtListResponse, DebtGetByAssetResponse, @@ -145,6 +163,9 @@ Types: ```python from neptune_api_v2.types import ( + NeptParams, + NeptState, + NeptUnlockDistributionGroup, StakingPoolFull, StakingPoolParams, StakingPoolState, @@ -165,7 +186,13 @@ Methods: Types: ```python -from neptune_api_v2.types import EventAction, UserGetTxHistoryResponse, UserGetUserResponse +from neptune_api_v2.types import ( + EventAction, + User, + UserTx, + UserGetTxHistoryResponse, + UserGetUserResponse, +) ``` Methods: @@ -199,7 +226,7 @@ Types: ```python from neptune_api_v2.types.user.market import ( - UserDebtAssetPool, + UserLendMarket, LendListResponse, LendGetByAssetResponse, ) @@ -217,6 +244,7 @@ Types: ```python from neptune_api_v2.types.user.market import ( UserBorrowMarket, + UserBorrowMarketPools, BorrowGetCollateralAccountsByAssetResponse, BorrowGetCollateralTotalsResponse, BorrowGetDebtAccountsByAssetResponse, @@ -241,7 +269,10 @@ Types: from neptune_api_v2.types.user.market.borrow import ( UserAccountHealth, UserBorrowMarketAccount, + UserCollateralAccountPool, UserCollateralAssetPool, + UserDebtAccountPool, + UserDebtAssetPool, SubaccountGetSubaccountResponse, SubaccountGetSubaccountCollateralsResponse, SubaccountGetSubaccountDebtsResponse, @@ -262,8 +293,11 @@ Types: ```python from neptune_api_v2.types.user import ( - UserNeptUnlockAmounts, - UserNeptUnlockOverview, + UserUnlockAmounts, + UserUnlockOverview, + UserUnlockSchedule, + UserUnlockScheduleLinear, + UserUnlockScheduleLumpSum, NeptGetUnlocksResponse, ) ``` @@ -279,7 +313,9 @@ Types: ```python from neptune_api_v2.types.user.nept import ( UserStake, + UserStakeBondingEntry, UserStakePool, + UserStakeUnbonding, UserStakeUnbondingEntry, StakingGetOverviewResponse, StakingGetStakingPoolResponse, @@ -302,7 +338,9 @@ Types: ```python from neptune_api_v2.types.user import ( UserWalletPortfolio, + WalletAsset, WalletAssetKnown, + WalletAssetUnknown, WalletBalance, WalletGetBalanceByAssetResponse, WalletGetBalancesResponse, diff --git a/src/neptune_api_v2/types/__init__.py b/src/neptune_api_v2/types/__init__.py index 2a8da0b..78878e1 100644 --- a/src/neptune_api_v2/types/__init__.py +++ b/src/neptune_api_v2/types/__init__.py @@ -2,9 +2,17 @@ from __future__ import annotations +from .user import User as User +from .user_tx import UserTx as UserTx from .interval import Interval as Interval from .asset_info import AssetInfo as AssetInfo from .asset_spec import AssetSpec as AssetSpec +from .error_kind import ErrorKind as ErrorKind +from .nept_state import NeptState as NeptState +from .asset_price import AssetPrice as AssetPrice +from .error_scope import ErrorScope as ErrorScope +from .market_rate import MarketRate as MarketRate +from .nept_params import NeptParams as NeptParams from .event_action import EventAction as EventAction from .interval_unit import IntervalUnit as IntervalUnit from .merged_market import MergedMarket as MergedMarket @@ -13,6 +21,7 @@ from .asset_rate_history import AssetRateHistory as AssetRateHistory from .staking_pool_state import StakingPoolState as StakingPoolState from .asset_list_response import AssetListResponse as AssetListResponse +from .asset_price_history import AssetPriceHistory as AssetPriceHistory from .staking_pool_params import StakingPoolParams as StakingPoolParams from .asset_classification import AssetClassification as AssetClassification from .global_market_config import GlobalMarketConfig as GlobalMarketConfig @@ -21,6 +30,7 @@ from .nept_get_params_params import NeptGetParamsParams as NeptGetParamsParams from .user_get_user_response import UserGetUserResponse as UserGetUserResponse 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 from .market_get_merged_params import MarketGetMergedParams as MarketGetMergedParams from .market_get_params_params import MarketGetParamsParams as MarketGetParamsParams @@ -34,6 +44,7 @@ from .status_check_health_response import StatusCheckHealthResponse as StatusCheckHealthResponse from .user_get_tx_history_response import UserGetTxHistoryResponse as UserGetTxHistoryResponse from .asset_get_price_history_params import AssetGetPriceHistoryParams as AssetGetPriceHistoryParams +from .nept_unlock_distribution_group import NeptUnlockDistributionGroup as NeptUnlockDistributionGroup from .asset_get_price_history_response import AssetGetPriceHistoryResponse as AssetGetPriceHistoryResponse from .nept_get_staking_overview_params import NeptGetStakingOverviewParams as NeptGetStakingOverviewParams from .market_get_merged_by_asset_params import MarketGetMergedByAssetParams as MarketGetMergedByAssetParams diff --git a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py index 44acb20..d54dbe9 100644 --- a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py +++ b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py @@ -65,7 +65,7 @@ class DataSeries(BaseModel): class Data(BaseModel): - """Primary response content (object)""" + """Historical cumulative lend value for assets""" pagination: DataPagination """Values used for paginating the time series data""" @@ -84,7 +84,7 @@ class HistoryGetLoansOriginatedByAssetResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" + """Historical cumulative lend value for assets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py index 262b9b4..1cd56be 100644 --- a/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py +++ b/src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py @@ -45,7 +45,7 @@ class DataRange(BaseModel): class Data(BaseModel): - """Primary response content (object)""" + """Historical cumulative lend value for assets""" pagination: DataPagination """Pagination parameters for the interval response""" @@ -60,7 +60,7 @@ class HistoryGetLoansOriginatedResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" + """Historical cumulative lend value for assets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/analytics/market_get_current_state_response.py b/src/neptune_api_v2/types/analytics/market_get_current_state_response.py index 8ca6dba..1690a67 100644 --- a/src/neptune_api_v2/types/analytics/market_get_current_state_response.py +++ b/src/neptune_api_v2/types/analytics/market_get_current_state_response.py @@ -42,8 +42,6 @@ class DataLoansOriginated(BaseModel): class Data(BaseModel): - """Primary response content (object)""" - assets: List[DataAsset] borrower_account_active: int @@ -62,7 +60,6 @@ class MarketGetCurrentStateResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py index 6a985dd..ab881cc 100644 --- a/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py +++ b/src/neptune_api_v2/types/analytics/nept_unlocks_distribution_response.py @@ -1,276 +1,21 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional -from typing_extensions import Literal +from typing import List from ..._models import BaseModel +from ..nept_unlock_distribution_group import NeptUnlockDistributionGroup -__all__ = [ - "NeptUnlocksDistributionResponse", - "Data", - "DataGroup", - "DataGroupExtra", - "DataGroupExtraPercent", - "DataGroupExtraPercentExtra", - "DataGroupExtraPercentExtraText", - "DataGroupExtraText", - "DataGroupExtraValue", - "DataGroupExtraValueExtra", - "DataGroupExtraValueExtraText", -] - - -class DataGroupExtraPercentExtraText(BaseModel): - """Human-readable variants of percentages for unlock amounts. - - Will not be null when query params `with_text` and `with_percent` are `true`. - """ - - amount_claimable: str - - amount_claimed: str - - amount_expired: str - - amount_locked: str - - amount_reclaimed: str - - amount_unlocked: str - - -class DataGroupExtraPercentExtra(BaseModel): - text: Optional[DataGroupExtraPercentExtraText] = None - """Human-readable variants of percentages for unlock amounts. - - Will not be null when query params `with_text` and `with_percent` are `true`. - """ - - -class DataGroupExtraPercent(BaseModel): - """Percentages for unlock amounts. - - These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. - """ - - amount_claimable: str - - amount_claimed: str - - amount_expired: str - - amount_locked: str - - amount_reclaimed: str - - amount_unlocked: str - - extra: DataGroupExtraPercentExtra - - -class DataGroupExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - amount: str - - amount_claimable: str - - amount_claimed: str - - amount_expired: str - - amount_held: str - - amount_locked: str - - amount_reclaimed: str - - amount_staked: str - - amount_unlocked: str - - member_class: str - - -class DataGroupExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - amount: str - - amount_claimable: str - - amount_claimed: str - - amount_expired: str - - amount_held: str - - amount_locked: str - - amount_reclaimed: str - - amount_staked: str - - amount_unlocked: str - - -class DataGroupExtraValueExtra(BaseModel): - text: Optional[DataGroupExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataGroupExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - amount: str - - amount_claimable: str - - amount_claimed: str - - amount_expired: str - - amount_held: str - - amount_locked: str - - amount_reclaimed: str - - amount_staked: str - - amount_unlocked: str - - extra: DataGroupExtraValueExtra - - -class DataGroupExtra(BaseModel): - percent: Optional[DataGroupExtraPercent] = None - """Percentages for unlock amounts. - - These do not factor in the `amount_staked` or `amount_held` values. Will not be - null when query param `with_percent` is `true`. - """ - - text: Optional[DataGroupExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[DataGroupExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class DataGroup(BaseModel): - amount: str - """The sum of all token distribution unlock amounts for this group. - - This value is immutable and does not change with regards to - expiry/reclamation/lock states. - """ - - amount_claimable: str - """The amount currently claimable - - This takes into account: reclamation, lock state, expiry, and previously - claimed. In other words, this is an accurate representation of what the user can - currently claim. - """ - - amount_claimed: str - """The amount that has already been successfully claimed by the user""" - - amount_expired: str - """The amount that has expired. - - This will be the remaining unclaimed amount (if any) once the time specified by - the `expires_at` is past (if one is set). - - **NOTE:** Reclaimed amouts take priority. - - - If the remaining amount is reclaimed prior to a configured `expires_at`, this - will remain at 0 and will not change even after the `expires_at` time is - reached. - """ - - amount_held: str - """The total amount of NEPT currently held by the addresses in this group.""" - - amount_locked: str - """The total amount of NEPT currently time-locked. - - **NOTE:** This does not factor in reclaimed or expired states. - - - For linear unlock schedules: - - - This represents how much NEPT is time-locked by the `begins_at` and the - `ends_at` properties. - - - For lump sum unlocks: - - This will be the full amount prior to the `begins_at` unlock property. - - Once the time indicated by the `begins_at` property has been reached, this - value will be 0. - """ - - amount_reclaimed: str - """The amount that has been reclaimed from the unlock arrangement admin - - This will be the amount of the remaining unclaimed and locked at the time the - reclaim is issued. - """ - - amount_staked: str - """The total amount of NEPT current staked by the addresses in this group.""" - - amount_unlocked: str - """The total amount of NEPT currently unlocked - - **NOTE:** This does not factor in reclaimed or expired states. - - - For linear unlock schedules: - - - This represents the "progress" of unlocked NEPT from the time range between - the `begins_at` and the `ends_at` properties. - - - For lump sum unlocks: - - This will be 0 at any given time prior to the timestamp provided by the - `begins_at` unlock property. - - Once the time indicated by the `begins_at` property has been reached, this - value will be the full amount of the unlock. - """ - - extra: DataGroupExtra - - member_class: Literal["team", "advisor", "investor"] - """The group category""" +__all__ = ["NeptUnlocksDistributionResponse", "Data"] class Data(BaseModel): - """Primary response content (object)""" - - groups: List[DataGroup] + groups: List[NeptUnlockDistributionGroup] class NeptUnlocksDistributionResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/asset_get_price_history_response.py b/src/neptune_api_v2/types/asset_get_price_history_response.py index 2a6d9a2..ed9ddeb 100644 --- a/src/neptune_api_v2/types/asset_get_price_history_response.py +++ b/src/neptune_api_v2/types/asset_get_price_history_response.py @@ -1,83 +1,16 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional -from datetime import datetime - from .._models import BaseModel -from .interval import Interval -from .asset_spec import AssetSpec - -__all__ = ["AssetGetPriceHistoryResponse", "Data", "DataPagination", "DataRange", "DataSeries", "DataSeriesPoint"] - - -class DataPagination(BaseModel): - """Values used for paginating the time series data""" - - interval_count: int - """ - The total number of intervals/buckets for the provided interval parameters - (size, period, start, end) - """ - - next_offset: Optional[int] = None - """ - The offset a client should use to fetch the next page of intervals (so long as - limit remains unchanged) - """ - - -class DataRange(BaseModel): - """ - Provides values for the requested range in it's entire width, regardless of page/limit. - """ - - end: datetime - - interval: Interval - """Interval period & size""" - - start: datetime - - -class DataSeriesPoint(BaseModel): - """Time + value pair representing a point in time for use with time series""" - - t: datetime - - v: Optional[str] = None - - -class DataSeries(BaseModel): - asset: AssetSpec - """Provides a unique identifier for an asset for use throughout the Neptune API. - - IDs are unique across asset domains (contract tokens, native denoms, etc) - """ - - points: List[DataSeriesPoint] - - -class Data(BaseModel): - """Primary response content (object)""" - - pagination: DataPagination - """Values used for paginating the time series data""" - - range: DataRange - """ - Provides values for the requested range in it's entire width, regardless of - page/limit. - """ +from .asset_price_history import AssetPriceHistory - series: List[DataSeries] - """Pairs of items and their associated points""" +__all__ = ["AssetGetPriceHistoryResponse"] class AssetGetPriceHistoryResponse(BaseModel): """Object data success response""" - data: Data - """Primary response content (object)""" + data: AssetPriceHistory + """Historical prices for assets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/asset_list_prices_response.py b/src/neptune_api_v2/types/asset_list_prices_response.py index f74ebd9..993366a 100644 --- a/src/neptune_api_v2/types/asset_list_prices_response.py +++ b/src/neptune_api_v2/types/asset_list_prices_response.py @@ -1,45 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional -from datetime import datetime +from typing import List from .._models import BaseModel from .asset_spec import AssetSpec +from .asset_price import AssetPrice from .asset_metadata import AssetMetadata from .asset_classification import AssetClassification -__all__ = ["AssetListPricesResponse", "Data", "DataPrice", "DataPriceExtra", "DataPriceExtraText"] - - -class DataPriceExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with-text` is `true`. - """ - - last_updated_at: str - - price: str - - -class DataPriceExtra(BaseModel): - text: Optional[DataPriceExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with-text` is `true`. - """ - - -class DataPrice(BaseModel): - """> **Note**: Prices are sourced from Neptune's Price Oracle""" - - extra: DataPriceExtra - - last_updated_at: datetime - """Asset price value, as per Neptune Price Oracle""" - - price: str - """Asset price""" +__all__ = ["AssetListPricesResponse", "Data"] class Data(BaseModel): @@ -67,7 +36,7 @@ class Data(BaseModel): metadata: AssetMetadata """Additional metadata for assets""" - price: DataPrice + price: AssetPrice """> **Note**: Prices are sourced from Neptune's Price Oracle""" @@ -78,7 +47,6 @@ class AssetListPricesResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[Data] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/asset_list_response.py b/src/neptune_api_v2/types/asset_list_response.py index 626bc88..b3d758d 100644 --- a/src/neptune_api_v2/types/asset_list_response.py +++ b/src/neptune_api_v2/types/asset_list_response.py @@ -15,7 +15,6 @@ class AssetListResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[AssetInfo] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/asset_price.py b/src/neptune_api_v2/types/asset_price.py new file mode 100644 index 0000000..c635ba1 --- /dev/null +++ b/src/neptune_api_v2/types/asset_price.py @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from .._models import BaseModel + +__all__ = ["AssetPrice", "Extra", "ExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with-text` is `true`. + """ + + last_updated_at: str + + price: str + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with-text` is `true`. + """ + + +class AssetPrice(BaseModel): + """> **Note**: Prices are sourced from Neptune's Price Oracle""" + + extra: Extra + + last_updated_at: datetime + """Asset price value, as per Neptune Price Oracle""" + + price: str + """Asset price""" diff --git a/src/neptune_api_v2/types/asset_price_history.py b/src/neptune_api_v2/types/asset_price_history.py new file mode 100644 index 0000000..cc8a290 --- /dev/null +++ b/src/neptune_api_v2/types/asset_price_history.py @@ -0,0 +1,73 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from .._models import BaseModel +from .interval import Interval +from .asset_spec import AssetSpec + +__all__ = ["AssetPriceHistory", "Pagination", "Range", "Series", "SeriesPoint"] + + +class Pagination(BaseModel): + """Values used for paginating the time series data""" + + interval_count: int + """ + The total number of intervals/buckets for the provided interval parameters + (size, period, start, end) + """ + + next_offset: Optional[int] = None + """ + The offset a client should use to fetch the next page of intervals (so long as + limit remains unchanged) + """ + + +class Range(BaseModel): + """ + Provides values for the requested range in it's entire width, regardless of page/limit. + """ + + end: datetime + + interval: Interval + """Interval period & size""" + + start: datetime + + +class SeriesPoint(BaseModel): + """Time + value pair representing a point in time for use with time series""" + + t: datetime + + v: Optional[str] = None + + +class Series(BaseModel): + asset: AssetSpec + """Provides a unique identifier for an asset for use throughout the Neptune API. + + IDs are unique across asset domains (contract tokens, native denoms, etc) + """ + + points: List[SeriesPoint] + + +class AssetPriceHistory(BaseModel): + """Historical prices for assets""" + + pagination: Pagination + """Values used for paginating the time series data""" + + range: Range + """ + Provides values for the requested range in it's entire width, regardless of + page/limit. + """ + + series: List[Series] + """Pairs of items and their associated points""" diff --git a/src/neptune_api_v2/types/error_kind.py b/src/neptune_api_v2/types/error_kind.py new file mode 100644 index 0000000..22bfb93 --- /dev/null +++ b/src/neptune_api_v2/types/error_kind.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["ErrorKind"] + +ErrorKind: TypeAlias = Literal[ + "entity_not_found", + "path_invalid", + "path_unknown", + "path_parameter_invalid", + "query_invalid", + "query_parameter_invalid", + "query_parameter_unknown", + "query_parameter_missing", + "json_invalid", + "json_decode", + "json_body_deserialize_failure", + "content_type_unsupported", + "validation", + "internal", +] diff --git a/src/neptune_api_v2/types/error_scope.py b/src/neptune_api_v2/types/error_scope.py new file mode 100644 index 0000000..f37ed81 --- /dev/null +++ b/src/neptune_api_v2/types/error_scope.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["ErrorScope"] + +ErrorScope: TypeAlias = Literal["user", "client", "server"] diff --git a/src/neptune_api_v2/types/market_get_merged_by_asset_response.py b/src/neptune_api_v2/types/market_get_merged_by_asset_response.py index 88c0a3f..f4f7b41 100644 --- a/src/neptune_api_v2/types/market_get_merged_by_asset_response.py +++ b/src/neptune_api_v2/types/market_get_merged_by_asset_response.py @@ -10,7 +10,7 @@ class MarketGetMergedByAssetResponse(BaseModel): """Object data success response""" data: MergedMarket - """Primary response content (object)""" + """Data for all of an assets markets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/market_get_merged_response.py b/src/neptune_api_v2/types/market_get_merged_response.py index 95398ab..48030cf 100644 --- a/src/neptune_api_v2/types/market_get_merged_response.py +++ b/src/neptune_api_v2/types/market_get_merged_response.py @@ -15,7 +15,6 @@ class MarketGetMergedResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[MergedMarket] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/market_get_overview_response.py b/src/neptune_api_v2/types/market_get_overview_response.py index 0f657b8..27c0c45 100644 --- a/src/neptune_api_v2/types/market_get_overview_response.py +++ b/src/neptune_api_v2/types/market_get_overview_response.py @@ -11,8 +11,6 @@ class Data(BaseModel): - """Primary response content (object)""" - borrow: BorrowMarketOverview """Borrow market overview""" @@ -27,7 +25,6 @@ class MarketGetOverviewResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/market_get_params_response.py b/src/neptune_api_v2/types/market_get_params_response.py index 4514093..6f08b8a 100644 --- a/src/neptune_api_v2/types/market_get_params_response.py +++ b/src/neptune_api_v2/types/market_get_params_response.py @@ -10,7 +10,6 @@ class MarketGetParamsResponse(BaseModel): """Object data success response""" data: GlobalMarketConfig - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/market_rate.py b/src/neptune_api_v2/types/market_rate.py similarity index 95% rename from src/neptune_api_v2/types/markets/market_rate.py rename to src/neptune_api_v2/types/market_rate.py index 5dc59d4..ca04c3c 100644 --- a/src/neptune_api_v2/types/markets/market_rate.py +++ b/src/neptune_api_v2/types/market_rate.py @@ -2,7 +2,7 @@ from typing import Optional -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["MarketRate", "Extra", "ExtraText"] diff --git a/src/neptune_api_v2/types/markets/__init__.py b/src/neptune_api_v2/types/markets/__init__.py index f2dc764..d64c771 100644 --- a/src/neptune_api_v2/types/markets/__init__.py +++ b/src/neptune_api_v2/types/markets/__init__.py @@ -3,8 +3,8 @@ from __future__ import annotations from .lend_market import LendMarket as LendMarket -from .market_rate import MarketRate as MarketRate from .lend_list_params import LendListParams as LendListParams +from .lend_market_data import LendMarketData as LendMarketData from .lend_market_state import LendMarketState as LendMarketState from .lend_list_response import LendListResponse as LendListResponse from .borrow_market_overview import BorrowMarketOverview as BorrowMarketOverview diff --git a/src/neptune_api_v2/types/markets/borrow/__init__.py b/src/neptune_api_v2/types/markets/borrow/__init__.py index 389d3a4..221b631 100644 --- a/src/neptune_api_v2/types/markets/borrow/__init__.py +++ b/src/neptune_api_v2/types/markets/borrow/__init__.py @@ -9,10 +9,12 @@ from .debt_list_response import DebtListResponse as DebtListResponse from .collateral_list_params import CollateralListParams as CollateralListParams from .borrow_collateral_state import BorrowCollateralState as BorrowCollateralState +from .borrow_debt_market_data import BorrowDebtMarketData as BorrowDebtMarketData from .borrow_collateral_config import BorrowCollateralConfig as BorrowCollateralConfig from .borrow_collateral_market import BorrowCollateralMarket as BorrowCollateralMarket from .collateral_list_response import CollateralListResponse as CollateralListResponse from .debt_get_by_asset_params import DebtGetByAssetParams as DebtGetByAssetParams from .debt_get_by_asset_response import DebtGetByAssetResponse as DebtGetByAssetResponse +from .borrow_collateral_market_data import BorrowCollateralMarketData as BorrowCollateralMarketData from .collateral_get_by_asset_params import CollateralGetByAssetParams as CollateralGetByAssetParams from .collateral_get_by_asset_response import CollateralGetByAssetResponse as CollateralGetByAssetResponse diff --git a/src/neptune_api_v2/types/markets/borrow/borrow_collateral_market_data.py b/src/neptune_api_v2/types/markets/borrow/borrow_collateral_market_data.py new file mode 100644 index 0000000..33f3361 --- /dev/null +++ b/src/neptune_api_v2/types/markets/borrow/borrow_collateral_market_data.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ...._models import BaseModel +from .borrow_collateral_state import BorrowCollateralState +from .borrow_collateral_config import BorrowCollateralConfig + +__all__ = ["BorrowCollateralMarketData"] + + +class BorrowCollateralMarketData(BaseModel): + config: BorrowCollateralConfig + """Collateral configuration parameters""" + + state: BorrowCollateralState + """Current collateral state""" diff --git a/src/neptune_api_v2/types/markets/borrow/borrow_debt_market.py b/src/neptune_api_v2/types/markets/borrow/borrow_debt_market.py index 51fffed..4adf326 100644 --- a/src/neptune_api_v2/types/markets/borrow/borrow_debt_market.py +++ b/src/neptune_api_v2/types/markets/borrow/borrow_debt_market.py @@ -4,7 +4,7 @@ from ...._models import BaseModel from ...asset_info import AssetInfo -from ..market_rate import MarketRate +from ...market_rate import MarketRate from .borrow_debt_state import BorrowDebtState from .borrow_debt_config import BorrowDebtConfig diff --git a/src/neptune_api_v2/types/markets/borrow/borrow_debt_market_data.py b/src/neptune_api_v2/types/markets/borrow/borrow_debt_market_data.py new file mode 100644 index 0000000..385251b --- /dev/null +++ b/src/neptune_api_v2/types/markets/borrow/borrow_debt_market_data.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ...._models import BaseModel +from ...market_rate import MarketRate +from .borrow_debt_state import BorrowDebtState +from .borrow_debt_config import BorrowDebtConfig + +__all__ = ["BorrowDebtMarketData"] + + +class BorrowDebtMarketData(BaseModel): + config: BorrowDebtConfig + """Debt market configuration parameters""" + + rate: Optional[MarketRate] = None + """Market rates""" + + state: BorrowDebtState + """Current debt market state""" diff --git a/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py b/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py index f785e6c..1ef8032 100644 --- a/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/borrow/collateral_get_by_asset_response.py @@ -10,7 +10,6 @@ class CollateralGetByAssetResponse(BaseModel): """Object data success response""" data: BorrowCollateralMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py b/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py index 4a35b7c..f1e49c6 100644 --- a/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py +++ b/src/neptune_api_v2/types/markets/borrow/collateral_list_response.py @@ -15,7 +15,6 @@ class CollateralListResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[BorrowCollateralMarket] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py b/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py index ad941b0..8ef143a 100644 --- a/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/borrow/debt_get_by_asset_response.py @@ -10,7 +10,6 @@ class DebtGetByAssetResponse(BaseModel): """Object data success response""" data: BorrowDebtMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/borrow/debt_list_response.py b/src/neptune_api_v2/types/markets/borrow/debt_list_response.py index d23e8bb..4c79060 100644 --- a/src/neptune_api_v2/types/markets/borrow/debt_list_response.py +++ b/src/neptune_api_v2/types/markets/borrow/debt_list_response.py @@ -15,7 +15,6 @@ class DebtListResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[BorrowDebtMarket] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/borrow_get_overview_response.py b/src/neptune_api_v2/types/markets/borrow_get_overview_response.py index 47ddd1f..027ed45 100644 --- a/src/neptune_api_v2/types/markets/borrow_get_overview_response.py +++ b/src/neptune_api_v2/types/markets/borrow_get_overview_response.py @@ -10,7 +10,6 @@ class BorrowGetOverviewResponse(BaseModel): """Object data success response""" data: BorrowMarketOverview - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py b/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py index 4070379..cb43c85 100644 --- a/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py +++ b/src/neptune_api_v2/types/markets/borrow_get_rate_history_response.py @@ -10,7 +10,7 @@ class BorrowGetRateHistoryResponse(BaseModel): """Object data success response""" data: AssetRateHistory - """Primary response content (object)""" + """Historical rates for assets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py b/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py index b181190..9b7c1f2 100644 --- a/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py +++ b/src/neptune_api_v2/types/markets/lend_get_by_asset_response.py @@ -10,7 +10,6 @@ class LendGetByAssetResponse(BaseModel): """Object data success response""" data: LendMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py b/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py index 72c5179..59deeae 100644 --- a/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py +++ b/src/neptune_api_v2/types/markets/lend_get_rate_history_response.py @@ -10,7 +10,7 @@ class LendGetRateHistoryResponse(BaseModel): """Object data success response""" data: AssetRateHistory - """Primary response content (object)""" + """Historical rates for assets""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/lend_list_response.py b/src/neptune_api_v2/types/markets/lend_list_response.py index 022f73e..40d25fd 100644 --- a/src/neptune_api_v2/types/markets/lend_list_response.py +++ b/src/neptune_api_v2/types/markets/lend_list_response.py @@ -15,7 +15,6 @@ class LendListResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[LendMarket] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/markets/lend_market.py b/src/neptune_api_v2/types/markets/lend_market.py index 05e6918..77c468f 100644 --- a/src/neptune_api_v2/types/markets/lend_market.py +++ b/src/neptune_api_v2/types/markets/lend_market.py @@ -4,7 +4,7 @@ from ..._models import BaseModel from ..asset_info import AssetInfo -from .market_rate import MarketRate +from ..market_rate import MarketRate from .lend_market_state import LendMarketState __all__ = ["LendMarket"] diff --git a/src/neptune_api_v2/types/markets/lend_market_data.py b/src/neptune_api_v2/types/markets/lend_market_data.py new file mode 100644 index 0000000..de79a04 --- /dev/null +++ b/src/neptune_api_v2/types/markets/lend_market_data.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from ..market_rate import MarketRate +from .lend_market_state import LendMarketState + +__all__ = ["LendMarketData"] + + +class LendMarketData(BaseModel): + rate: Optional[MarketRate] = None + """Lending market rates""" + + state: LendMarketState + """Current lending market state""" diff --git a/src/neptune_api_v2/types/merged_market.py b/src/neptune_api_v2/types/merged_market.py index 97f494c..98b1e68 100644 --- a/src/neptune_api_v2/types/merged_market.py +++ b/src/neptune_api_v2/types/merged_market.py @@ -4,47 +4,11 @@ from .._models import BaseModel from .asset_info import AssetInfo -from .markets.market_rate import MarketRate -from .markets.lend_market_state import LendMarketState -from .markets.borrow.borrow_debt_state import BorrowDebtState -from .markets.borrow.borrow_debt_config import BorrowDebtConfig -from .markets.borrow.borrow_collateral_state import BorrowCollateralState -from .markets.borrow.borrow_collateral_config import BorrowCollateralConfig +from .markets.lend_market_data import LendMarketData +from .markets.borrow.borrow_debt_market_data import BorrowDebtMarketData +from .markets.borrow.borrow_collateral_market_data import BorrowCollateralMarketData -__all__ = ["MergedMarket", "BorrowCollateral", "BorrowDebt", "Lend"] - - -class BorrowCollateral(BaseModel): - """Info for asset as collateral for borrow market, if one exists""" - - config: BorrowCollateralConfig - """Collateral configuration parameters""" - - state: BorrowCollateralState - """Current collateral state""" - - -class BorrowDebt(BaseModel): - """Info for asset as debt for borrow market, if one exists""" - - config: BorrowDebtConfig - """Debt market configuration parameters""" - - rate: Optional[MarketRate] = None - """Market rates""" - - state: BorrowDebtState - """Current debt market state""" - - -class Lend(BaseModel): - """Info for asset's lending market, if one exists""" - - rate: Optional[MarketRate] = None - """Lending market rates""" - - state: LendMarketState - """Current lending market state""" +__all__ = ["MergedMarket"] class MergedMarket(BaseModel): @@ -53,11 +17,11 @@ class MergedMarket(BaseModel): asset_info: AssetInfo """Asset identifiers with associated metadata""" - borrow_collateral: Optional[BorrowCollateral] = None + borrow_collateral: Optional[BorrowCollateralMarketData] = None """Info for asset as collateral for borrow market, if one exists""" - borrow_debt: Optional[BorrowDebt] = None + borrow_debt: Optional[BorrowDebtMarketData] = None """Info for asset as debt for borrow market, if one exists""" - lend: Optional[Lend] = None + lend: Optional[LendMarketData] = None """Info for asset's lending market, if one exists""" diff --git a/src/neptune_api_v2/types/nept_get_params_response.py b/src/neptune_api_v2/types/nept_get_params_response.py index 278adac..e246773 100644 --- a/src/neptune_api_v2/types/nept_get_params_response.py +++ b/src/neptune_api_v2/types/nept_get_params_response.py @@ -1,132 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional - from .._models import BaseModel -from .staking_pool_params import StakingPoolParams - -__all__ = [ - "NeptGetParamsResponse", - "Data", - "DataExtra", - "DataExtraText", - "DataExtraValue", - "DataExtraValueExtra", - "DataExtraValueExtraText", - "DataStakingPool", - "DataStakingPoolExtra", - "DataStakingPoolExtraText", -] - - -class DataExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - emission_rate: str - - -class DataExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - emission_rate: str - - -class DataExtraValueExtra(BaseModel): - text: Optional[DataExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - emission_rate: str - - extra: DataExtraValueExtra - - -class DataExtra(BaseModel): - text: Optional[DataExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ +from .nept_params import NeptParams - value: Optional[DataExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class DataStakingPoolExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - duration: str - - index: str - - -class DataStakingPoolExtra(BaseModel): - text: Optional[DataStakingPoolExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - -class DataStakingPool(BaseModel): - """Merges `StakingPool` with `StakingPoolParams`""" - - duration: int - """The lockup duration for this pool in seconds""" - - extra: DataStakingPoolExtra - - index: int - """The ordered index (position) of this pool""" - - params: StakingPoolParams - """Staking pool contract parameters""" - - -class Data(BaseModel): - """Primary response content (object)""" - - emission_rate: str - """The emission rate of NEPT in tokens per year""" - - extra: DataExtra - - staking_pools: List[DataStakingPool] - """Staking pools (pool params are included)""" - - tokens_per_weight: int - """Weight:token scaling factor - - This is defined in the contract spec to mitigate library type restrictions - """ +__all__ = ["NeptGetParamsResponse"] class NeptGetParamsResponse(BaseModel): """Object data success response""" - data: Data - """Primary response content (object)""" + data: NeptParams error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/nept_get_staking_overview_response.py b/src/neptune_api_v2/types/nept_get_staking_overview_response.py index 9f2e4a5..8badf4a 100644 --- a/src/neptune_api_v2/types/nept_get_staking_overview_response.py +++ b/src/neptune_api_v2/types/nept_get_staking_overview_response.py @@ -49,8 +49,6 @@ class DataGlobalState(BaseModel): class Data(BaseModel): - """Primary response content (object)""" - asset_info: AssetInfo """Asset identifiers with associated metadata""" @@ -68,7 +66,6 @@ class NeptGetStakingOverviewResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/nept_get_state_response.py b/src/neptune_api_v2/types/nept_get_state_response.py index 2b20ed4..8594aa7 100644 --- a/src/neptune_api_v2/types/nept_get_state_response.py +++ b/src/neptune_api_v2/types/nept_get_state_response.py @@ -1,165 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional - from .._models import BaseModel -from .staking_pool_state import StakingPoolState - -__all__ = [ - "NeptGetStateResponse", - "Data", - "DataExtra", - "DataExtraText", - "DataExtraValue", - "DataExtraValueExtra", - "DataExtraValueExtraText", - "DataStaking", - "DataStakingExtra", - "DataStakingExtraText", -] - - -class DataExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - total_claimed: str - - total_issued: str - - total_locked: str - - total_supply: str - - -class DataExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - total_claimed: str - - total_issued: str - - total_locked: str - - total_supply: str - - -class DataExtraValueExtra(BaseModel): - text: Optional[DataExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - extra: DataExtraValueExtra - - total_claimed: str - - total_issued: str - - total_locked: str - - total_supply: str - - -class DataExtra(BaseModel): - text: Optional[DataExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ +from .nept_state import NeptState - value: Optional[DataExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class DataStakingExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - duration: str - - index: str - - -class DataStakingExtra(BaseModel): - text: Optional[DataStakingExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - -class DataStaking(BaseModel): - """Merges `StakingPool` with `StakingPoolState`""" - - duration: int - """The lockup duration for this pool in seconds""" - - extra: DataStakingExtra - - index: int - """The ordered index (position) of this pool""" - - state: StakingPoolState - """Current contract state of staking pool""" - - -class Data(BaseModel): - """Primary response content (object)""" - - extra: DataExtra - - staking: List[DataStaking] - """Staking pools (current pool state is included)""" - - total_claimed: str - """Total amount of NEPT claimed, either locked or unlocked - - Includes initial balances and claimed rewards but not unclaimed rewards - """ - - total_issued: str - """Total amount of NEPT issued, either locked or unlocked - - Includes initial balances and all claimed or claimable rewards - """ - - total_locked: str - """Total amount of NEPT locked - - Inlcudes unlocks which have not yet been claimed - """ - - total_supply: str - """Total supply of NEPT - - Includes locked and unissued tokens - """ +__all__ = ["NeptGetStateResponse"] class NeptGetStateResponse(BaseModel): """Object data success response""" - data: Data - """Primary response content (object)""" + data: NeptState error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/nept_params.py b/src/neptune_api_v2/types/nept_params.py new file mode 100644 index 0000000..714a0a2 --- /dev/null +++ b/src/neptune_api_v2/types/nept_params.py @@ -0,0 +1,119 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .staking_pool_params import StakingPoolParams + +__all__ = [ + "NeptParams", + "Extra", + "ExtraText", + "ExtraValue", + "ExtraValueExtra", + "ExtraValueExtraText", + "StakingPool", + "StakingPoolExtra", + "StakingPoolExtraText", +] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + emission_rate: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + emission_rate: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + emission_rate: str + + extra: ExtraValueExtra + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class StakingPoolExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + duration: str + + index: str + + +class StakingPoolExtra(BaseModel): + text: Optional[StakingPoolExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + +class StakingPool(BaseModel): + """Merges `StakingPool` with `StakingPoolParams`""" + + duration: int + """The lockup duration for this pool in seconds""" + + extra: StakingPoolExtra + + index: int + """The ordered index (position) of this pool""" + + params: StakingPoolParams + """Staking pool contract parameters""" + + +class NeptParams(BaseModel): + emission_rate: str + """The emission rate of NEPT in tokens per year""" + + extra: Extra + + staking_pools: List[StakingPool] + """Staking pools (pool params are included)""" + + tokens_per_weight: int + """Weight:token scaling factor + + This is defined in the contract spec to mitigate library type restrictions + """ diff --git a/src/neptune_api_v2/types/nept_state.py b/src/neptune_api_v2/types/nept_state.py new file mode 100644 index 0000000..59c6a2a --- /dev/null +++ b/src/neptune_api_v2/types/nept_state.py @@ -0,0 +1,152 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .staking_pool_state import StakingPoolState + +__all__ = [ + "NeptState", + "Extra", + "ExtraText", + "ExtraValue", + "ExtraValueExtra", + "ExtraValueExtraText", + "Staking", + "StakingExtra", + "StakingExtraText", +] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + total_claimed: str + + total_issued: str + + total_locked: str + + total_supply: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + total_claimed: str + + total_issued: str + + total_locked: str + + total_supply: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + extra: ExtraValueExtra + + total_claimed: str + + total_issued: str + + total_locked: str + + total_supply: str + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class StakingExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + duration: str + + index: str + + +class StakingExtra(BaseModel): + text: Optional[StakingExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + +class Staking(BaseModel): + """Merges `StakingPool` with `StakingPoolState`""" + + duration: int + """The lockup duration for this pool in seconds""" + + extra: StakingExtra + + index: int + """The ordered index (position) of this pool""" + + state: StakingPoolState + """Current contract state of staking pool""" + + +class NeptState(BaseModel): + extra: Extra + + staking: List[Staking] + """Staking pools (current pool state is included)""" + + total_claimed: str + """Total amount of NEPT claimed, either locked or unlocked + + Includes initial balances and claimed rewards but not unclaimed rewards + """ + + total_issued: str + """Total amount of NEPT issued, either locked or unlocked + + Includes initial balances and all claimed or claimable rewards + """ + + total_locked: str + """Total amount of NEPT locked + + Inlcudes unlocks which have not yet been claimed + """ + + total_supply: str + """Total supply of NEPT + + Includes locked and unissued tokens + """ diff --git a/src/neptune_api_v2/types/nept_unlock_distribution_group.py b/src/neptune_api_v2/types/nept_unlock_distribution_group.py new file mode 100644 index 0000000..9316443 --- /dev/null +++ b/src/neptune_api_v2/types/nept_unlock_distribution_group.py @@ -0,0 +1,258 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "NeptUnlockDistributionGroup", + "Extra", + "ExtraPercent", + "ExtraPercentExtra", + "ExtraPercentExtraText", + "ExtraText", + "ExtraValue", + "ExtraValueExtra", + "ExtraValueExtraText", +] + + +class ExtraPercentExtraText(BaseModel): + """Human-readable variants of percentages for unlock amounts. + + Will not be null when query params `with_text` and `with_percent` are `true`. + """ + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_locked: str + + amount_reclaimed: str + + amount_unlocked: str + + +class ExtraPercentExtra(BaseModel): + text: Optional[ExtraPercentExtraText] = None + """Human-readable variants of percentages for unlock amounts. + + Will not be null when query params `with_text` and `with_percent` are `true`. + """ + + +class ExtraPercent(BaseModel): + """Percentages for unlock amounts. + + These do not factor in the `amount_staked` or `amount_held` values. Will not be null when query param `with_percent` is `true`. + """ + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_locked: str + + amount_reclaimed: str + + amount_unlocked: str + + extra: ExtraPercentExtra + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + member_class: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount: str + + amount_claimable: str + + amount_claimed: str + + amount_expired: str + + amount_held: str + + amount_locked: str + + amount_reclaimed: str + + amount_staked: str + + amount_unlocked: str + + extra: ExtraValueExtra + + +class Extra(BaseModel): + percent: Optional[ExtraPercent] = None + """Percentages for unlock amounts. + + These do not factor in the `amount_staked` or `amount_held` values. Will not be + null when query param `with_percent` is `true`. + """ + + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class NeptUnlockDistributionGroup(BaseModel): + amount: str + """The sum of all token distribution unlock amounts for this group. + + This value is immutable and does not change with regards to + expiry/reclamation/lock states. + """ + + amount_claimable: str + """The amount currently claimable + + This takes into account: reclamation, lock state, expiry, and previously + claimed. In other words, this is an accurate representation of what the user can + currently claim. + """ + + amount_claimed: str + """The amount that has already been successfully claimed by the user""" + + amount_expired: str + """The amount that has expired. + + This will be the remaining unclaimed amount (if any) once the time specified by + the `expires_at` is past (if one is set). + + **NOTE:** Reclaimed amouts take priority. + + - If the remaining amount is reclaimed prior to a configured `expires_at`, this + will remain at 0 and will not change even after the `expires_at` time is + reached. + """ + + amount_held: str + """The total amount of NEPT currently held by the addresses in this group.""" + + amount_locked: str + """The total amount of NEPT currently time-locked. + + **NOTE:** This does not factor in reclaimed or expired states. + + - For linear unlock schedules: + + - This represents how much NEPT is time-locked by the `begins_at` and the + `ends_at` properties. + + - For lump sum unlocks: + - This will be the full amount prior to the `begins_at` unlock property. + - Once the time indicated by the `begins_at` property has been reached, this + value will be 0. + """ + + amount_reclaimed: str + """The amount that has been reclaimed from the unlock arrangement admin + + This will be the amount of the remaining unclaimed and locked at the time the + reclaim is issued. + """ + + amount_staked: str + """The total amount of NEPT current staked by the addresses in this group.""" + + amount_unlocked: str + """The total amount of NEPT currently unlocked + + **NOTE:** This does not factor in reclaimed or expired states. + + - For linear unlock schedules: + + - This represents the "progress" of unlocked NEPT from the time range between + the `begins_at` and the `ends_at` properties. + + - For lump sum unlocks: + - This will be 0 at any given time prior to the timestamp provided by the + `begins_at` unlock property. + - Once the time indicated by the `begins_at` property has been reached, this + value will be the full amount of the unlock. + """ + + extra: Extra + + member_class: Literal["team", "advisor", "investor"] + """The group category""" diff --git a/src/neptune_api_v2/types/user/__init__.py b/src/neptune_api_v2/types/user/__init__.py index 18aa241..0b53244 100644 --- a/src/neptune_api_v2/types/user/__init__.py +++ b/src/neptune_api_v2/types/user/__init__.py @@ -2,21 +2,27 @@ from __future__ import annotations +from .user import User as User from .user_market import UserMarket as UserMarket +from .wallet_asset import WalletAsset as WalletAsset from .wallet_balance import WalletBalance as WalletBalance from .user_merged_market import UserMergedMarket as UserMergedMarket from .wallet_asset_known import WalletAssetKnown as WalletAssetKnown +from .user_unlock_amounts import UserUnlockAmounts as UserUnlockAmounts +from .user_unlock_overview import UserUnlockOverview as UserUnlockOverview +from .user_unlock_schedule import UserUnlockSchedule as UserUnlockSchedule +from .wallet_asset_unknown import WalletAssetUnknown as WalletAssetUnknown from .user_wallet_portfolio import UserWalletPortfolio as UserWalletPortfolio from .nept_get_unlocks_params import NeptGetUnlocksParams as NeptGetUnlocksParams from .market_get_merged_params import MarketGetMergedParams as MarketGetMergedParams -from .user_nept_unlock_amounts import UserNeptUnlockAmounts as UserNeptUnlockAmounts from .nept_get_unlocks_response import NeptGetUnlocksResponse as NeptGetUnlocksResponse -from .user_nept_unlock_overview import UserNeptUnlockOverview as UserNeptUnlockOverview from .market_get_merged_response import MarketGetMergedResponse as MarketGetMergedResponse from .wallet_get_balances_params import WalletGetBalancesParams as WalletGetBalancesParams from .market_get_portfolio_params import MarketGetPortfolioParams as MarketGetPortfolioParams +from .user_unlock_schedule_linear import UserUnlockScheduleLinear as UserUnlockScheduleLinear from .wallet_get_balances_response import WalletGetBalancesResponse as WalletGetBalancesResponse from .market_get_portfolio_response import MarketGetPortfolioResponse as MarketGetPortfolioResponse +from .user_unlock_schedule_lump_sum import UserUnlockScheduleLumpSum as UserUnlockScheduleLumpSum from .market_get_merged_by_asset_params import MarketGetMergedByAssetParams as MarketGetMergedByAssetParams from .wallet_get_balance_by_asset_params import WalletGetBalanceByAssetParams as WalletGetBalanceByAssetParams from .market_get_merged_by_asset_response import MarketGetMergedByAssetResponse as MarketGetMergedByAssetResponse diff --git a/src/neptune_api_v2/types/user/market/__init__.py b/src/neptune_api_v2/types/user/market/__init__.py index f1012a9..0f686ae 100644 --- a/src/neptune_api_v2/types/user/market/__init__.py +++ b/src/neptune_api_v2/types/user/market/__init__.py @@ -3,10 +3,11 @@ from __future__ import annotations from .lend_list_params import LendListParams as LendListParams +from .user_lend_market import UserLendMarket as UserLendMarket from .lend_list_response import LendListResponse as LendListResponse from .user_borrow_market import UserBorrowMarket as UserBorrowMarket -from .user_debt_asset_pool import UserDebtAssetPool as UserDebtAssetPool from .lend_get_by_asset_params import LendGetByAssetParams as LendGetByAssetParams +from .user_borrow_market_pools import UserBorrowMarketPools as UserBorrowMarketPools from .lend_get_by_asset_response import LendGetByAssetResponse as LendGetByAssetResponse from .borrow_get_portfolio_params import BorrowGetPortfolioParams as BorrowGetPortfolioParams from .borrow_get_portfolio_response import BorrowGetPortfolioResponse as BorrowGetPortfolioResponse diff --git a/src/neptune_api_v2/types/user/market/borrow/__init__.py b/src/neptune_api_v2/types/user/market/borrow/__init__.py index c12083c..6418b4a 100644 --- a/src/neptune_api_v2/types/user/market/borrow/__init__.py +++ b/src/neptune_api_v2/types/user/market/borrow/__init__.py @@ -3,8 +3,11 @@ from __future__ import annotations from .user_account_health import UserAccountHealth as UserAccountHealth +from .user_debt_asset_pool import UserDebtAssetPool as UserDebtAssetPool +from .user_debt_account_pool import UserDebtAccountPool as UserDebtAccountPool from .user_borrow_market_account import UserBorrowMarketAccount as UserBorrowMarketAccount from .user_collateral_asset_pool import UserCollateralAssetPool as UserCollateralAssetPool +from .user_collateral_account_pool import UserCollateralAccountPool as UserCollateralAccountPool from .subaccount_get_subaccount_params import SubaccountGetSubaccountParams as SubaccountGetSubaccountParams from .subaccount_get_subaccount_response import SubaccountGetSubaccountResponse as SubaccountGetSubaccountResponse from .subaccount_get_subaccount_debts_params import ( diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py index 6f2ab93..6cb10c5 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_collaterals_response.py @@ -15,7 +15,6 @@ class SubaccountGetSubaccountCollateralsResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserCollateralAssetPool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py index 3dc245a..d6709bf 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_debts_response.py @@ -3,7 +3,7 @@ from typing import List from ....._models import BaseModel -from ..user_debt_asset_pool import UserDebtAssetPool +from .user_debt_asset_pool import UserDebtAssetPool __all__ = ["SubaccountGetSubaccountDebtsResponse"] @@ -15,7 +15,6 @@ class SubaccountGetSubaccountDebtsResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserDebtAssetPool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py index 2fdb081..fd48d28 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_health_response.py @@ -10,7 +10,6 @@ class SubaccountGetSubaccountHealthResponse(BaseModel): """Object data success response""" data: UserAccountHealth - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py index 2a464a0..993fcb7 100644 --- a/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py +++ b/src/neptune_api_v2/types/user/market/borrow/subaccount_get_subaccount_response.py @@ -10,7 +10,6 @@ class SubaccountGetSubaccountResponse(BaseModel): """Object data success response""" data: UserBorrowMarketAccount - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow/user_borrow_market_account.py b/src/neptune_api_v2/types/user/market/borrow/user_borrow_market_account.py index be5491c..19ebffd 100644 --- a/src/neptune_api_v2/types/user/market/borrow/user_borrow_market_account.py +++ b/src/neptune_api_v2/types/user/market/borrow/user_borrow_market_account.py @@ -4,7 +4,7 @@ from ....._models import BaseModel from .user_account_health import UserAccountHealth -from ..user_debt_asset_pool import UserDebtAssetPool +from .user_debt_asset_pool import UserDebtAssetPool from .user_collateral_asset_pool import UserCollateralAssetPool __all__ = ["UserBorrowMarketAccount"] diff --git a/src/neptune_api_v2/types/user/market/borrow/user_collateral_account_pool.py b/src/neptune_api_v2/types/user/market/borrow/user_collateral_account_pool.py new file mode 100644 index 0000000..67f11af --- /dev/null +++ b/src/neptune_api_v2/types/user/market/borrow/user_collateral_account_pool.py @@ -0,0 +1,68 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["UserCollateralAccountPool", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + amount: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount: str + + extra: ExtraValueExtra + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class UserCollateralAccountPool(BaseModel): + amount: str + """Amount of this asset which is actively collateralized""" + + extra: Extra + + index: int + """Account index""" diff --git a/src/neptune_api_v2/types/user/market/borrow/user_debt_account_pool.py b/src/neptune_api_v2/types/user/market/borrow/user_debt_account_pool.py new file mode 100644 index 0000000..74931f5 --- /dev/null +++ b/src/neptune_api_v2/types/user/market/borrow/user_debt_account_pool.py @@ -0,0 +1,86 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ....._models import BaseModel + +__all__ = ["UserDebtAccountPool", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + debt: str + + interest: str + + principal: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + debt: str + + interest: str + + principal: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + debt: str + + extra: ExtraValueExtra + + interest: str + + principal: str + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class UserDebtAccountPool(BaseModel): + debt: str + """Sum open debt amount (this is simply the principal + interest)""" + + extra: Extra + + index: int + """Account index""" + + interest: str + """Sum of accrued interest for open debt position""" + + principal: str + """Initial amount borrowed (of debts which have not yet been repaid)""" diff --git a/src/neptune_api_v2/types/user/market/user_debt_asset_pool.py b/src/neptune_api_v2/types/user/market/borrow/user_debt_asset_pool.py similarity index 96% rename from src/neptune_api_v2/types/user/market/user_debt_asset_pool.py rename to src/neptune_api_v2/types/user/market/borrow/user_debt_asset_pool.py index 7d95afb..b66bde3 100644 --- a/src/neptune_api_v2/types/user/market/user_debt_asset_pool.py +++ b/src/neptune_api_v2/types/user/market/borrow/user_debt_asset_pool.py @@ -2,8 +2,8 @@ from typing import Optional -from ...._models import BaseModel -from ...asset_info import AssetInfo +from ....._models import BaseModel +from ....asset_info import AssetInfo __all__ = ["UserDebtAssetPool", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] diff --git a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py index cf61777..61c4f7d 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_collateral_accounts_by_asset_response.py @@ -1,87 +1,16 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel from ...asset_info import AssetInfo +from .borrow.user_collateral_account_pool import UserCollateralAccountPool -__all__ = [ - "BorrowGetCollateralAccountsByAssetResponse", - "Data", - "DataAccount", - "DataAccountExtra", - "DataAccountExtraText", - "DataAccountExtraValue", - "DataAccountExtraValueExtra", - "DataAccountExtraValueExtraText", -] - - -class DataAccountExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - amount: str - - -class DataAccountExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - amount: str - - -class DataAccountExtraValueExtra(BaseModel): - text: Optional[DataAccountExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataAccountExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - amount: str - - extra: DataAccountExtraValueExtra - - -class DataAccountExtra(BaseModel): - text: Optional[DataAccountExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[DataAccountExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class DataAccount(BaseModel): - amount: str - """Amount of this asset which is actively collateralized""" - - extra: DataAccountExtra - - index: int - """Account index""" +__all__ = ["BorrowGetCollateralAccountsByAssetResponse", "Data"] class Data(BaseModel): - """Primary response content (object)""" - - accounts: List[DataAccount] + accounts: List[UserCollateralAccountPool] """All collateral subaccounts for the associated asset type""" asset_info: AssetInfo @@ -92,7 +21,6 @@ class BorrowGetCollateralAccountsByAssetResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py b/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py index 61eb4e0..392c30f 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_collateral_totals_response.py @@ -15,7 +15,6 @@ class BorrowGetCollateralTotalsResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserCollateralAssetPool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py b/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py index d056903..c13cb66 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_debt_accounts_by_asset_response.py @@ -1,105 +1,16 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List from ...._models import BaseModel from ...asset_info import AssetInfo +from .borrow.user_debt_account_pool import UserDebtAccountPool -__all__ = [ - "BorrowGetDebtAccountsByAssetResponse", - "Data", - "DataAccount", - "DataAccountExtra", - "DataAccountExtraText", - "DataAccountExtraValue", - "DataAccountExtraValueExtra", - "DataAccountExtraValueExtraText", -] - - -class DataAccountExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - debt: str - - interest: str - - principal: str - - -class DataAccountExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - debt: str - - interest: str - - principal: str - - -class DataAccountExtraValueExtra(BaseModel): - text: Optional[DataAccountExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataAccountExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - debt: str - - extra: DataAccountExtraValueExtra - - interest: str - - principal: str - - -class DataAccountExtra(BaseModel): - text: Optional[DataAccountExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[DataAccountExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class DataAccount(BaseModel): - debt: str - """Sum open debt amount (this is simply the principal + interest)""" - - extra: DataAccountExtra - - index: int - """Account index""" - - interest: str - """Sum of accrued interest for open debt position""" - - principal: str - """Initial amount borrowed (of debts which have not yet been repaid)""" +__all__ = ["BorrowGetDebtAccountsByAssetResponse", "Data"] class Data(BaseModel): - """Primary response content (object)""" - - accounts: List[DataAccount] + accounts: List[UserDebtAccountPool] """All debt subaccounts for the associated asset type""" asset_info: AssetInfo @@ -110,7 +21,6 @@ class BorrowGetDebtAccountsByAssetResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py b/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py index 6a81620..0280984 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_debts_totals_response.py @@ -3,7 +3,7 @@ from typing import List from ...._models import BaseModel -from .user_debt_asset_pool import UserDebtAssetPool +from .borrow.user_debt_asset_pool import UserDebtAssetPool __all__ = ["BorrowGetDebtsTotalsResponse"] @@ -15,7 +15,6 @@ class BorrowGetDebtsTotalsResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserDebtAssetPool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py b/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py index e46b738..b85f86d 100644 --- a/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py +++ b/src/neptune_api_v2/types/user/market/borrow_get_portfolio_response.py @@ -10,7 +10,6 @@ class BorrowGetPortfolioResponse(BaseModel): """Object data success response""" data: UserBorrowMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py b/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py index 5412fab..c19d8e3 100644 --- a/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market/lend_get_by_asset_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from ...._models import BaseModel -from .user_debt_asset_pool import UserDebtAssetPool +from .borrow.user_debt_asset_pool import UserDebtAssetPool __all__ = ["LendGetByAssetResponse"] @@ -10,7 +10,6 @@ class LendGetByAssetResponse(BaseModel): """Object data success response""" data: UserDebtAssetPool - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/lend_list_response.py b/src/neptune_api_v2/types/user/market/lend_list_response.py index 03633cd..f90512d 100644 --- a/src/neptune_api_v2/types/user/market/lend_list_response.py +++ b/src/neptune_api_v2/types/user/market/lend_list_response.py @@ -3,7 +3,7 @@ from typing import List from ...._models import BaseModel -from .user_debt_asset_pool import UserDebtAssetPool +from .borrow.user_debt_asset_pool import UserDebtAssetPool __all__ = ["LendListResponse"] @@ -15,7 +15,6 @@ class LendListResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserDebtAssetPool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market/user_borrow_market.py b/src/neptune_api_v2/types/user/market/user_borrow_market.py index 9aa21f7..ab07213 100644 --- a/src/neptune_api_v2/types/user/market/user_borrow_market.py +++ b/src/neptune_api_v2/types/user/market/user_borrow_market.py @@ -3,26 +3,15 @@ from typing import List from ...._models import BaseModel -from .user_debt_asset_pool import UserDebtAssetPool +from .user_borrow_market_pools import UserBorrowMarketPools from .borrow.user_borrow_market_account import UserBorrowMarketAccount -from .borrow.user_collateral_asset_pool import UserCollateralAssetPool -__all__ = ["UserBorrowMarket", "Totals"] - - -class Totals(BaseModel): - """Collateral/debt totals of all sub-accounts by asset""" - - collaterals: List[UserCollateralAssetPool] - """Account collateral allocations""" - - debts: List[UserDebtAssetPool] - """Account debt allocations""" +__all__ = ["UserBorrowMarket"] class UserBorrowMarket(BaseModel): accounts: List[UserBorrowMarketAccount] """Market sub-accounts for the user""" - totals: Totals + totals: UserBorrowMarketPools """Collateral/debt totals of all sub-accounts by asset""" diff --git a/src/neptune_api_v2/types/user/market/user_borrow_market_pools.py b/src/neptune_api_v2/types/user/market/user_borrow_market_pools.py new file mode 100644 index 0000000..e5b253c --- /dev/null +++ b/src/neptune_api_v2/types/user/market/user_borrow_market_pools.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from ...._models import BaseModel +from .borrow.user_debt_asset_pool import UserDebtAssetPool +from .borrow.user_collateral_asset_pool import UserCollateralAssetPool + +__all__ = ["UserBorrowMarketPools"] + + +class UserBorrowMarketPools(BaseModel): + collaterals: List[UserCollateralAssetPool] + """Account collateral allocations""" + + debts: List[UserDebtAssetPool] + """Account debt allocations""" diff --git a/src/neptune_api_v2/types/user/market/user_lend_market.py b/src/neptune_api_v2/types/user/market/user_lend_market.py new file mode 100644 index 0000000..0263e20 --- /dev/null +++ b/src/neptune_api_v2/types/user/market/user_lend_market.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from ...._models import BaseModel +from .borrow.user_debt_asset_pool import UserDebtAssetPool + +__all__ = ["UserLendMarket"] + + +class UserLendMarket(BaseModel): + asset_pools: List[UserDebtAssetPool] + """User lending allocations""" diff --git a/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py b/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py index 2ad28bf..061fd50 100644 --- a/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py +++ b/src/neptune_api_v2/types/user/market_get_merged_by_asset_response.py @@ -10,7 +10,6 @@ class MarketGetMergedByAssetResponse(BaseModel): """Object data success response""" data: UserMergedMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market_get_merged_response.py b/src/neptune_api_v2/types/user/market_get_merged_response.py index 08113ab..faeb17f 100644 --- a/src/neptune_api_v2/types/user/market_get_merged_response.py +++ b/src/neptune_api_v2/types/user/market_get_merged_response.py @@ -15,7 +15,6 @@ class MarketGetMergedResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserMergedMarket] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/market_get_portfolio_response.py b/src/neptune_api_v2/types/user/market_get_portfolio_response.py index 838b717..11eb072 100644 --- a/src/neptune_api_v2/types/user/market_get_portfolio_response.py +++ b/src/neptune_api_v2/types/user/market_get_portfolio_response.py @@ -10,7 +10,6 @@ class MarketGetPortfolioResponse(BaseModel): """Object data success response""" data: UserMarket - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/nept/__init__.py b/src/neptune_api_v2/types/user/nept/__init__.py index 73939ad..30e6143 100644 --- a/src/neptune_api_v2/types/user/nept/__init__.py +++ b/src/neptune_api_v2/types/user/nept/__init__.py @@ -4,6 +4,8 @@ from .user_stake import UserStake as UserStake from .user_stake_pool import UserStakePool as UserStakePool +from .user_stake_unbonding import UserStakeUnbonding as UserStakeUnbonding +from .user_stake_bonding_entry import UserStakeBondingEntry as UserStakeBondingEntry from .user_stake_unbonding_entry import UserStakeUnbondingEntry as UserStakeUnbondingEntry from .staking_get_overview_params import StakingGetOverviewParams as StakingGetOverviewParams from .staking_get_unstaking_params import StakingGetUnstakingParams as StakingGetUnstakingParams diff --git a/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py b/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py index a37a90a..6c3e290 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_overview_response.py @@ -10,7 +10,6 @@ class StakingGetOverviewResponse(BaseModel): """Object data success response""" data: UserStake - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py b/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py index a9b2c3a..609b590 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_staking_pool_response.py @@ -10,7 +10,6 @@ class StakingGetStakingPoolResponse(BaseModel): """Object data success response""" data: UserStakePool - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py b/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py index 87406cb..1689c3d 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_staking_pools_response.py @@ -15,7 +15,6 @@ class StakingGetStakingPoolsResponse(BaseModel): """Total number of objects irrespective of any pagination parameters.""" data: List[UserStakePool] - """Primary response content (list)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py b/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py index 34d6b13..7f9f8b9 100644 --- a/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py +++ b/src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py @@ -9,8 +9,6 @@ class Data(BaseModel): - """Primary response content (object)""" - amount_sum: str """Total amount of all unbond entries @@ -30,7 +28,6 @@ class StakingGetUnstakingResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/nept/user_stake.py b/src/neptune_api_v2/types/user/nept/user_stake.py index a1cbab2..42fedb9 100644 --- a/src/neptune_api_v2/types/user/nept/user_stake.py +++ b/src/neptune_api_v2/types/user/nept/user_stake.py @@ -5,22 +5,9 @@ from ...._models import BaseModel from ...asset_info import AssetInfo from .user_stake_pool import UserStakePool -from .user_stake_unbonding_entry import UserStakeUnbondingEntry - -__all__ = [ - "UserStake", - "Extra", - "ExtraText", - "ExtraValue", - "ExtraValueExtra", - "ExtraValueExtraText", - "Unbonding", - "UnbondingExtra", - "UnbondingExtraText", - "UnbondingExtraValue", - "UnbondingExtraValueExtra", - "UnbondingExtraValueExtraText", -] +from .user_stake_unbonding import UserStakeUnbonding + +__all__ = ["UserStake", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] class ExtraText(BaseModel): @@ -92,77 +79,6 @@ class Extra(BaseModel): """ -class UnbondingExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - amount_sum: str - - -class UnbondingExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - amount_sum: str - - -class UnbondingExtraValueExtra(BaseModel): - text: Optional[UnbondingExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class UnbondingExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - amount_sum: str - - extra: UnbondingExtraValueExtra - - -class UnbondingExtra(BaseModel): - text: Optional[UnbondingExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[UnbondingExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class Unbonding(BaseModel): - """User unstake/unbonding data""" - - amount_sum: str - """Total amount of all unbond entries - - **NOTE:** this value is affected by active filters, if any (e.g. filtering over - account index) - """ - - contents: List[UserStakeUnbondingEntry] - """Unbonding/unstake entries - - **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list - of the lower adjacent pool from which the unbond occurred. - """ - - extra: UnbondingExtra - - class UserStake(BaseModel): asset_info: AssetInfo """Asset identifiers with associated metadata""" @@ -188,7 +104,7 @@ class UserStake(BaseModel): pools: List[UserStakePool] """User allocations for each staking pool""" - unbonding: Unbonding + unbonding: UserStakeUnbonding """User unstake/unbonding data""" unclaimed: str diff --git a/src/neptune_api_v2/types/user/nept/user_stake_bonding_entry.py b/src/neptune_api_v2/types/user/nept/user_stake_bonding_entry.py new file mode 100644 index 0000000..053900f --- /dev/null +++ b/src/neptune_api_v2/types/user/nept/user_stake_bonding_entry.py @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ...._models import BaseModel + +__all__ = ["UserStakeBondingEntry", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + amount: str + + transition_at: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount: str + + extra: ExtraValueExtra + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class UserStakeBondingEntry(BaseModel): + account_index: int + """User account index""" + + amount: str + """Bonding amount""" + + cascade: bool + + extra: Extra + + last_stake_acc: str + + transition_at: Optional[datetime] = None diff --git a/src/neptune_api_v2/types/user/nept/user_stake_pool.py b/src/neptune_api_v2/types/user/nept/user_stake_pool.py index 96eff95..73728fc 100644 --- a/src/neptune_api_v2/types/user/nept/user_stake_pool.py +++ b/src/neptune_api_v2/types/user/nept/user_stake_pool.py @@ -1,94 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from datetime import datetime from ...._models import BaseModel from ...staking_pool_full import StakingPoolFull +from .user_stake_bonding_entry import UserStakeBondingEntry -__all__ = [ - "UserStakePool", - "Content", - "ContentExtra", - "ContentExtraText", - "ContentExtraValue", - "ContentExtraValueExtra", - "ContentExtraValueExtraText", - "Extra", - "ExtraText", - "ExtraValue", - "ExtraValueExtra", - "ExtraValueExtraText", -] - - -class ContentExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - amount: str - - transition_at: str - - -class ContentExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - amount: str - - -class ContentExtraValueExtra(BaseModel): - text: Optional[ContentExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class ContentExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - amount: str - - extra: ContentExtraValueExtra - - -class ContentExtra(BaseModel): - text: Optional[ContentExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[ContentExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class Content(BaseModel): - account_index: int - """User account index""" - - amount: str - """Bonding amount""" - - cascade: bool - - extra: ContentExtra - - last_stake_acc: str - - transition_at: Optional[datetime] = None +__all__ = ["UserStakePool", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] class ExtraText(BaseModel): @@ -153,7 +71,7 @@ class UserStakePool(BaseModel): common: StakingPoolFull """Merges `StakingPool` with both `StakingPoolWithParams` and `StakingPoolState`""" - contents: List[Content] + contents: List[UserStakeBondingEntry] """Bonding/stake entries **NOTE:** entries that differ only in amount are merged upon creation diff --git a/src/neptune_api_v2/types/user/nept/user_stake_unbonding.py b/src/neptune_api_v2/types/user/nept/user_stake_unbonding.py new file mode 100644 index 0000000..75a21ca --- /dev/null +++ b/src/neptune_api_v2/types/user/nept/user_stake_unbonding.py @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from ...._models import BaseModel +from .user_stake_unbonding_entry import UserStakeUnbondingEntry + +__all__ = ["UserStakeUnbonding", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + amount_sum: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount_sum: str + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount_sum: str + + extra: ExtraValueExtra + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class UserStakeUnbonding(BaseModel): + amount_sum: str + """Total amount of all unbond entries + + **NOTE:** this value is affected by active filters, if any (e.g. filtering over + account index) + """ + + contents: List[UserStakeUnbondingEntry] + """Unbonding/unstake entries + + **NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list + of the lower adjacent pool from which the unbond occurred. + """ + + extra: Extra diff --git a/src/neptune_api_v2/types/user/nept_get_unlocks_response.py b/src/neptune_api_v2/types/user/nept_get_unlocks_response.py index b9cf199..3988e5d 100644 --- a/src/neptune_api_v2/types/user/nept_get_unlocks_response.py +++ b/src/neptune_api_v2/types/user/nept_get_unlocks_response.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from ..._models import BaseModel -from .user_nept_unlock_overview import UserNeptUnlockOverview +from .user_unlock_overview import UserUnlockOverview __all__ = ["NeptGetUnlocksResponse"] @@ -9,8 +9,7 @@ class NeptGetUnlocksResponse(BaseModel): """Object data success response""" - data: UserNeptUnlockOverview - """Primary response content (object)""" + data: UserUnlockOverview error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/user.py b/src/neptune_api_v2/types/user/user.py new file mode 100644 index 0000000..8239996 --- /dev/null +++ b/src/neptune_api_v2/types/user/user.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ..._models import BaseModel +from .user_market import UserMarket +from .nept.user_stake import UserStake +from .user_unlock_overview import UserUnlockOverview +from .user_wallet_portfolio import UserWalletPortfolio + +__all__ = ["User", "Nept"] + + +class Nept(BaseModel): + """User's NEPT associations (e.g. stake, unlocks)""" + + staking: UserStake + """Overview of the user's staking contributions/activity""" + + unlocks: UserUnlockOverview + """Overview of the user's unlock arrangements and claim statistics""" + + +class User(BaseModel): + markets: UserMarket + """User's market contribution overview""" + + nept: Nept + """User's NEPT associations (e.g. stake, unlocks)""" + + wallets: UserWalletPortfolio + """User's wallets and balances""" diff --git a/src/neptune_api_v2/types/user/user_market.py b/src/neptune_api_v2/types/user/user_market.py index fe0dda6..5a1e2a9 100644 --- a/src/neptune_api_v2/types/user/user_market.py +++ b/src/neptune_api_v2/types/user/user_market.py @@ -1,24 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List - from ..._models import BaseModel +from .market.user_lend_market import UserLendMarket from .market.user_borrow_market import UserBorrowMarket -from .market.user_debt_asset_pool import UserDebtAssetPool - -__all__ = ["UserMarket", "Lend"] - - -class Lend(BaseModel): - """Overview of user lending portfolio""" - asset_pools: List[UserDebtAssetPool] - """User lending allocations""" +__all__ = ["UserMarket"] class UserMarket(BaseModel): borrow: UserBorrowMarket """Overview of user borrowing portfolio""" - lend: Lend + lend: UserLendMarket """Overview of user lending portfolio""" diff --git a/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py b/src/neptune_api_v2/types/user/user_unlock_amounts.py similarity index 98% rename from src/neptune_api_v2/types/user/user_nept_unlock_amounts.py rename to src/neptune_api_v2/types/user/user_unlock_amounts.py index c4a2b16..1b99d5d 100644 --- a/src/neptune_api_v2/types/user/user_nept_unlock_amounts.py +++ b/src/neptune_api_v2/types/user/user_unlock_amounts.py @@ -5,7 +5,7 @@ from ..._models import BaseModel __all__ = [ - "UserNeptUnlockAmounts", + "UserUnlockAmounts", "Extra", "ExtraPercent", "ExtraPercentExtra", @@ -148,7 +148,7 @@ class Extra(BaseModel): """ -class UserNeptUnlockAmounts(BaseModel): +class UserUnlockAmounts(BaseModel): amount: str """The full unlock amount diff --git a/src/neptune_api_v2/types/user/user_nept_unlock_overview.py b/src/neptune_api_v2/types/user/user_unlock_overview.py similarity index 55% rename from src/neptune_api_v2/types/user/user_nept_unlock_overview.py rename to src/neptune_api_v2/types/user/user_unlock_overview.py index 40c5df7..0919017 100644 --- a/src/neptune_api_v2/types/user/user_nept_unlock_overview.py +++ b/src/neptune_api_v2/types/user/user_unlock_overview.py @@ -1,23 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import List, Optional from datetime import datetime -from typing_extensions import Literal, TypeAlias from ..._models import BaseModel -from .user_nept_unlock_amounts import UserNeptUnlockAmounts +from .user_unlock_amounts import UserUnlockAmounts +from .user_unlock_schedule import UserUnlockSchedule __all__ = [ - "UserNeptUnlockOverview", + "UserUnlockOverview", "Arrangement", "ArrangementAdmin", "ArrangementExtra", "ArrangementExtraText", - "ArrangementSchedule", - "ArrangementScheduleUnlockScheduleLinear", - "ArrangementScheduleUnlockScheduleLinearExtra", - "ArrangementScheduleUnlockScheduleLinearExtraText", - "ArrangementScheduleUnlockScheduleLumpSum", "Extra", "ExtraText", ] @@ -54,57 +49,11 @@ class ArrangementExtra(BaseModel): """ -class ArrangementScheduleUnlockScheduleLinearExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - duration: str - - ends_at: str - - -class ArrangementScheduleUnlockScheduleLinearExtra(BaseModel): - text: Optional[ArrangementScheduleUnlockScheduleLinearExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - -class ArrangementScheduleUnlockScheduleLinear(BaseModel): - duration: int - """The duration of the unlock in seconds""" - - ends_at: datetime - """ - The time at which the unlock has/was/would've completed. This is identical to - `begins_at + duration`. - - This timestamp will remain valid even if the unlock has been reclaimed. - Therefore, it should not be used as a validity check. - """ - - extra: ArrangementScheduleUnlockScheduleLinearExtra - - kind: Literal["linear"] - - -class ArrangementScheduleUnlockScheduleLumpSum(BaseModel): - kind: Literal["lump_sum"] - - -ArrangementSchedule: TypeAlias = Union[ - ArrangementScheduleUnlockScheduleLinear, ArrangementScheduleUnlockScheduleLumpSum -] - - class Arrangement(BaseModel): admin: Optional[ArrangementAdmin] = None """The admin of the unlock, if any""" - amounts: UserNeptUnlockAmounts + amounts: UserUnlockAmounts """Primary unlock amount and other pre-calculated/derived amounts""" begins_at: datetime @@ -118,7 +67,7 @@ class Arrangement(BaseModel): last_claimed_at: Optional[datetime] = None """The time at which the unlock was last claimed, if any""" - schedule: ArrangementSchedule + schedule: UserUnlockSchedule """The schedule of the unlock""" @@ -139,7 +88,7 @@ class Extra(BaseModel): """ -class UserNeptUnlockOverview(BaseModel): +class UserUnlockOverview(BaseModel): arrangements: List[Arrangement] """A list of the user's active unlock arrangements""" @@ -148,5 +97,5 @@ class UserNeptUnlockOverview(BaseModel): last_claimed_at: Optional[datetime] = None """The time at which the most recent unlock claim occurred, if any""" - totals: UserNeptUnlockAmounts + totals: UserUnlockAmounts """Contains pre-calculated total amounts for all unlock agreements""" diff --git a/src/neptune_api_v2/types/user/user_unlock_schedule.py b/src/neptune_api_v2/types/user/user_unlock_schedule.py new file mode 100644 index 0000000..28d74e5 --- /dev/null +++ b/src/neptune_api_v2/types/user/user_unlock_schedule.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union +from typing_extensions import TypeAlias + +from .user_unlock_schedule_linear import UserUnlockScheduleLinear +from .user_unlock_schedule_lump_sum import UserUnlockScheduleLumpSum + +__all__ = ["UserUnlockSchedule"] + +UserUnlockSchedule: TypeAlias = Union[UserUnlockScheduleLinear, UserUnlockScheduleLumpSum] diff --git a/src/neptune_api_v2/types/user/user_unlock_schedule_linear.py b/src/neptune_api_v2/types/user/user_unlock_schedule_linear.py new file mode 100644 index 0000000..ae15995 --- /dev/null +++ b/src/neptune_api_v2/types/user/user_unlock_schedule_linear.py @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["UserUnlockScheduleLinear", "Extra", "ExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + duration: str + + ends_at: str + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + +class UserUnlockScheduleLinear(BaseModel): + duration: int + """The duration of the unlock in seconds""" + + ends_at: datetime + """ + The time at which the unlock has/was/would've completed. This is identical to + `begins_at + duration`. + + This timestamp will remain valid even if the unlock has been reclaimed. + Therefore, it should not be used as a validity check. + """ + + extra: Extra + + kind: Literal["linear"] diff --git a/src/neptune_api_v2/types/user/user_unlock_schedule_lump_sum.py b/src/neptune_api_v2/types/user/user_unlock_schedule_lump_sum.py new file mode 100644 index 0000000..9e9ca66 --- /dev/null +++ b/src/neptune_api_v2/types/user/user_unlock_schedule_lump_sum.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["UserUnlockScheduleLumpSum"] + + +class UserUnlockScheduleLumpSum(BaseModel): + kind: Literal["lump_sum"] diff --git a/src/neptune_api_v2/types/user/wallet_asset.py b/src/neptune_api_v2/types/user/wallet_asset.py new file mode 100644 index 0000000..02b1507 --- /dev/null +++ b/src/neptune_api_v2/types/user/wallet_asset.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union +from typing_extensions import TypeAlias + +from .wallet_asset_known import WalletAssetKnown +from .wallet_asset_unknown import WalletAssetUnknown + +__all__ = ["WalletAsset"] + +WalletAsset: TypeAlias = Union[WalletAssetKnown, WalletAssetUnknown] diff --git a/src/neptune_api_v2/types/user/wallet_asset_unknown.py b/src/neptune_api_v2/types/user/wallet_asset_unknown.py new file mode 100644 index 0000000..a18896d --- /dev/null +++ b/src/neptune_api_v2/types/user/wallet_asset_unknown.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["WalletAssetUnknown"] + + +class WalletAssetUnknown(BaseModel): + amount: str + """Wallet balance in native denom.""" + + kind: Literal["unknown"] diff --git a/src/neptune_api_v2/types/user/wallet_balance.py b/src/neptune_api_v2/types/user/wallet_balance.py index a7625a2..558a560 100644 --- a/src/neptune_api_v2/types/user/wallet_balance.py +++ b/src/neptune_api_v2/types/user/wallet_balance.py @@ -1,23 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union -from typing_extensions import Literal, TypeAlias - from ..._models import BaseModel from ..asset_spec import AssetSpec -from .wallet_asset_known import WalletAssetKnown - -__all__ = ["WalletBalance", "Values", "ValuesWalletAssetUnknown"] - - -class ValuesWalletAssetUnknown(BaseModel): - amount: str - """Wallet balance in native denom.""" - - kind: Literal["unknown"] - +from .wallet_asset import WalletAsset -Values: TypeAlias = Union[WalletAssetKnown, ValuesWalletAssetUnknown] +__all__ = ["WalletBalance"] class WalletBalance(BaseModel): @@ -27,5 +14,5 @@ class WalletBalance(BaseModel): IDs are unique across asset domains (contract tokens, native denoms, etc) """ - values: Values + values: WalletAsset """Derived values and amounts.""" diff --git a/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py b/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py index 8642345..325172a 100644 --- a/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py +++ b/src/neptune_api_v2/types/user/wallet_get_balance_by_asset_response.py @@ -10,7 +10,6 @@ class WalletGetBalanceByAssetResponse(BaseModel): """Object data success response""" data: WalletBalance - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user/wallet_get_balances_response.py b/src/neptune_api_v2/types/user/wallet_get_balances_response.py index e1d3a06..3e6bf1f 100644 --- a/src/neptune_api_v2/types/user/wallet_get_balances_response.py +++ b/src/neptune_api_v2/types/user/wallet_get_balances_response.py @@ -9,8 +9,6 @@ class Data(BaseModel): - """Primary response content (object)""" - balances: List[WalletBalance] """Array of each wallet balance""" @@ -28,7 +26,6 @@ class WalletGetBalancesResponse(BaseModel): """Object data success response""" data: Data - """Primary response content (object)""" error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user_get_tx_history_response.py b/src/neptune_api_v2/types/user_get_tx_history_response.py index 0b7e8d0..74154dc 100644 --- a/src/neptune_api_v2/types/user_get_tx_history_response.py +++ b/src/neptune_api_v2/types/user_get_tx_history_response.py @@ -1,155 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional -from datetime import datetime +from typing import List +from .user_tx import UserTx from .._models import BaseModel -from .asset_info import AssetInfo -from .event_action import EventAction -__all__ = [ - "UserGetTxHistoryResponse", - "Data", - "DataExtra", - "DataExtraText", - "DataExtraValue", - "DataExtraValueExtra", - "DataExtraValueExtraText", -] - - -class DataExtraText(BaseModel): - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - action: str - - amount: str - - event_time: str - - price: str - - value: str - - -class DataExtraValueExtraText(BaseModel): - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - amount: Optional[str] = None - - -class DataExtraValueExtra(BaseModel): - text: Optional[DataExtraValueExtraText] = None - """Human-readable variants of USD values. - - Will not be null when query params `with_text` and `with_value` are `true`. - """ - - -class DataExtraValue(BaseModel): - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - amount: Optional[str] = None - - extra: DataExtraValueExtra - - -class DataExtra(BaseModel): - text: Optional[DataExtraText] = None - """Human-readable field variants. - - Will not be null when query param `with_text` is `true`. - """ - - value: Optional[DataExtraValue] = None - """USD values for the corresponding amounts above. - - Will not be null when query param `with_value` is `true`. - """ - - -class Data(BaseModel): - account_address: str - """Account address corresponding to the transaction""" - - account_index: Optional[int] = None - """Neptune market sub-account index. - - Will be set for the following event types: `borrow`, `return`, - `deposit_collateral`, `withdraw_collateral`, `liquidate`, `bond`, `unbond`. - - Otherwise the value is guaranteed to be null. - """ - - action: EventAction - """Neptune event type for the given market/token contract execute call""" - - amount: Optional[str] = None - """The relevant amount for the given tx/event. - - This value will be set for all currently implemented action types. It is set as - nullable for forwards compatibility for future action types which may not have - an associated amount. - """ - - asset: AssetInfo - """Asset identifiers with associated metadata""" - - contract_address: str - """Address for the event's corresponding contract""" - - destination_address: Optional[str] = None - """Destination account address. Non-null for `send`/`transfer` transactions. - - This field will be null for all other action types. - """ - - event_time: datetime - """Event/transaction block time""" - - event_uuid: str - """Internal UUID created when the transaction was first indexed by Neptune. - - Primary usage for API clients is tx history pagination offsets. - - NOTE: event UUIDs should not be used as a guaranteed method of uniquely - identifying a transaction event over extended periods of time. - - Future updates to our indexer may infrequently require a full re-index of - transactions, resulting in newly generated UUIDs. - """ - - extra: DataExtra - - price: Union[str, float, None] = None - """The price of the associated asset at the time of the transaction. - - This value will be set for all currently implemented action types. It is set as - nullable for forwards compatibility for future action types which may not have - an associated amount. - """ - - tx_hash: str - """Transaction hash""" - - value: Union[str, float, None] = None - """The USD value at the time of the transaction. - - Derived using the amount and historical price of the associated asset. - - This value will be set for all currently implemented action types. It is set as - nullable for forwards compatibility for future action types which may not have - an associated amount. - """ +__all__ = ["UserGetTxHistoryResponse"] class UserGetTxHistoryResponse(BaseModel): @@ -158,8 +14,7 @@ class UserGetTxHistoryResponse(BaseModel): count: int """Total number of objects irrespective of any pagination parameters.""" - data: List[Data] - """Primary response content (list)""" + data: List[UserTx] error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user_get_user_response.py b/src/neptune_api_v2/types/user_get_user_response.py index 27a1b58..8449c66 100644 --- a/src/neptune_api_v2/types/user_get_user_response.py +++ b/src/neptune_api_v2/types/user_get_user_response.py @@ -1,42 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .._models import BaseModel -from .user.user_market import UserMarket -from .user.nept.user_stake import UserStake -from .user.user_wallet_portfolio import UserWalletPortfolio -from .user.user_nept_unlock_overview import UserNeptUnlockOverview +from .user.user import User -__all__ = ["UserGetUserResponse", "Data", "DataNept"] - - -class DataNept(BaseModel): - """User's NEPT associations (e.g. stake, unlocks)""" - - staking: UserStake - """Overview of the user's staking contributions/activity""" - - unlocks: UserNeptUnlockOverview - """Overview of the user's unlock arrangements and claim statistics""" - - -class Data(BaseModel): - """Primary response content (object)""" - - markets: UserMarket - """User's market contribution overview""" - - nept: DataNept - """User's NEPT associations (e.g. stake, unlocks)""" - - wallets: UserWalletPortfolio - """User's wallets and balances""" +__all__ = ["UserGetUserResponse"] class UserGetUserResponse(BaseModel): """Object data success response""" - data: Data - """Primary response content (object)""" + data: User error: None = None """Error data. Guaranteed `null` for successful response.""" diff --git a/src/neptune_api_v2/types/user_tx.py b/src/neptune_api_v2/types/user_tx.py new file mode 100644 index 0000000..61da072 --- /dev/null +++ b/src/neptune_api_v2/types/user_tx.py @@ -0,0 +1,144 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union, Optional +from datetime import datetime + +from .._models import BaseModel +from .asset_info import AssetInfo +from .event_action import EventAction + +__all__ = ["UserTx", "Extra", "ExtraText", "ExtraValue", "ExtraValueExtra", "ExtraValueExtraText"] + + +class ExtraText(BaseModel): + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + action: str + + amount: str + + event_time: str + + price: str + + value: str + + +class ExtraValueExtraText(BaseModel): + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + amount: Optional[str] = None + + +class ExtraValueExtra(BaseModel): + text: Optional[ExtraValueExtraText] = None + """Human-readable variants of USD values. + + Will not be null when query params `with_text` and `with_value` are `true`. + """ + + +class ExtraValue(BaseModel): + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + amount: Optional[str] = None + + extra: ExtraValueExtra + + +class Extra(BaseModel): + text: Optional[ExtraText] = None + """Human-readable field variants. + + Will not be null when query param `with_text` is `true`. + """ + + value: Optional[ExtraValue] = None + """USD values for the corresponding amounts above. + + Will not be null when query param `with_value` is `true`. + """ + + +class UserTx(BaseModel): + account_address: str + """Account address corresponding to the transaction""" + + account_index: Optional[int] = None + """Neptune market sub-account index. + + Will be set for the following event types: `borrow`, `return`, + `deposit_collateral`, `withdraw_collateral`, `liquidate`, `bond`, `unbond`. + + Otherwise the value is guaranteed to be null. + """ + + action: EventAction + """Neptune event type for the given market/token contract execute call""" + + amount: Optional[str] = None + """The relevant amount for the given tx/event. + + This value will be set for all currently implemented action types. It is set as + nullable for forwards compatibility for future action types which may not have + an associated amount. + """ + + asset: AssetInfo + """Asset identifiers with associated metadata""" + + contract_address: str + """Address for the event's corresponding contract""" + + destination_address: Optional[str] = None + """Destination account address. Non-null for `send`/`transfer` transactions. + + This field will be null for all other action types. + """ + + event_time: datetime + """Event/transaction block time""" + + event_uuid: str + """Internal UUID created when the transaction was first indexed by Neptune. + + Primary usage for API clients is tx history pagination offsets. + + NOTE: event UUIDs should not be used as a guaranteed method of uniquely + identifying a transaction event over extended periods of time. + + Future updates to our indexer may infrequently require a full re-index of + transactions, resulting in newly generated UUIDs. + """ + + extra: Extra + + price: Union[str, float, None] = None + """The price of the associated asset at the time of the transaction. + + This value will be set for all currently implemented action types. It is set as + nullable for forwards compatibility for future action types which may not have + an associated amount. + """ + + tx_hash: str + """Transaction hash""" + + value: Union[str, float, None] = None + """The USD value at the time of the transaction. + + Derived using the amount and historical price of the associated asset. + + This value will be set for all currently implemented action types. It is set as + nullable for forwards compatibility for future action types which may not have + an associated amount. + """ diff --git a/src/neptune_api_v2/types/validation_field_source.py b/src/neptune_api_v2/types/validation_field_source.py new file mode 100644 index 0000000..c258c2c --- /dev/null +++ b/src/neptune_api_v2/types/validation_field_source.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["ValidationFieldSource"] + +ValidationFieldSource: TypeAlias = Literal["header", "query", "path", "body"] From 8c4148daa0c4c2acb035c12e8afc960d8bda3a49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 02:38:51 +0000 Subject: [PATCH 19/19] release: 0.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/neptune_api_v2/_version.py | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1332969..3d2ac0b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.1" + ".": "0.1.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6fb1613 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +## 0.1.0 (2026-03-30) + +Full Changelog: [v0.0.1...v0.1.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.0.1...v0.1.0) + +### Features + +* **api:** api update ([b6c29db](https://github.com/cryptechdev/neptune-api-v2-python/commit/b6c29dbc5c8474713d3b45ad71d9e6ad36f269d5)) +* **api:** fix missing unlocks endpoint ([fabb464](https://github.com/cryptechdev/neptune-api-v2-python/commit/fabb464d4759502d7f49abdad35c2d06e227f414)) +* **api:** fix npm package name yaml ([9ce497f](https://github.com/cryptechdev/neptune-api-v2-python/commit/9ce497f5da04a604c0fa6f1ff0ee229372a27bfb)) +* **api:** manual updates ([b7c41b2](https://github.com/cryptechdev/neptune-api-v2-python/commit/b7c41b2c316bc714f82b75233307cb53040366c9)) +* **api:** manual updates ([f9cfab2](https://github.com/cryptechdev/neptune-api-v2-python/commit/f9cfab2a146e924b7d3f07f253be4de3ba9e4a2a)) +* **api:** manual updates ([6f72f25](https://github.com/cryptechdev/neptune-api-v2-python/commit/6f72f25e1ad1f5209d896e95ec091df0175e7381)) +* **api:** manual updates ([ad3aa1d](https://github.com/cryptechdev/neptune-api-v2-python/commit/ad3aa1d9eb34446c929eef61fc8c1c7f02c47d27)) +* **api:** manual updates ([1637771](https://github.com/cryptechdev/neptune-api-v2-python/commit/163777148c4c49df2a6a1bc43f674527c87543b8)) +* **api:** manual updates ([88800d5](https://github.com/cryptechdev/neptune-api-v2-python/commit/88800d595d34fca5b632ee8905c691e8ece062d5)) +* **api:** manual updates ([734507c](https://github.com/cryptechdev/neptune-api-v2-python/commit/734507cb06dfce17a1577895c23ee9498a6b2cc2)) +* **api:** manual updates ([078f551](https://github.com/cryptechdev/neptune-api-v2-python/commit/078f551028b777b9f32caa954d16f98b0a188385)) +* **api:** manual updates ([c020beb](https://github.com/cryptechdev/neptune-api-v2-python/commit/c020bebc90b10afcb8e3fb4c4bb92db31d79a3a6)) +* **api:** manual updates ([e86feeb](https://github.com/cryptechdev/neptune-api-v2-python/commit/e86feeb3249f10c94bff4c20870d66b5d87c797f)) +* **api:** manual updates ([3208888](https://github.com/cryptechdev/neptune-api-v2-python/commit/32088880c9c616e927016134b5ffaa8fc25bbcc4)) +* **api:** manual updates ([e19ffc5](https://github.com/cryptechdev/neptune-api-v2-python/commit/e19ffc53385463539ba1ef1a2550c269053f301d)) +* **api:** manual updates ([665f696](https://github.com/cryptechdev/neptune-api-v2-python/commit/665f696256c564619c93dffcb53afd7359c95e30)) +* **api:** update openapi spec ([67890ec](https://github.com/cryptechdev/neptune-api-v2-python/commit/67890ec54db761e15180cb2553a757e57d4f9007)) +* **internal:** implement indices array format for query and form serialization ([03d9eb0](https://github.com/cryptechdev/neptune-api-v2-python/commit/03d9eb0b52e51bef70134c34432e4899b2094632)) + + +### Bug Fixes + +* **deps:** bump minimum typing-extensions version ([c53e89a](https://github.com/cryptechdev/neptune-api-v2-python/commit/c53e89a6e5ba4e1b20012c7a141bc1858de26148)) +* **pydantic:** do not pass `by_alias` unless set ([fc8fe1a](https://github.com/cryptechdev/neptune-api-v2-python/commit/fc8fe1ae1177429d60d06dc7f0ba836b90964ff1)) +* sanitize endpoint path params ([44c0c8b](https://github.com/cryptechdev/neptune-api-v2-python/commit/44c0c8b8e3f5eeed5b54674c5a7ae43b8a176976)) + + +### Chores + +* **ci:** bump uv version ([2eb8bd0](https://github.com/cryptechdev/neptune-api-v2-python/commit/2eb8bd02d7bb0cfbd130a4c1fcadf80422954c64)) +* **ci:** skip lint on metadata-only changes ([05a360f](https://github.com/cryptechdev/neptune-api-v2-python/commit/05a360fc519e9a75b6befeba4929e75f50bbd40b)) +* **ci:** skip uploading artifacts on stainless-internal branches ([18daf63](https://github.com/cryptechdev/neptune-api-v2-python/commit/18daf632e1cce3dcd2a6ff59252f39523a731e86)) +* configure new SDK language ([46f828a](https://github.com/cryptechdev/neptune-api-v2-python/commit/46f828ac3c0610a7e01eaa8577f8e822c629f3ec)) +* configure new SDK language ([e5f08fa](https://github.com/cryptechdev/neptune-api-v2-python/commit/e5f08fa74eec724defb1621f896a5182522a540b)) +* **internal:** add request options to SSE classes ([580d4ce](https://github.com/cryptechdev/neptune-api-v2-python/commit/580d4ce4f69a5cd75421af1465b5ebd209c34699)) +* **internal:** make `test_proxy_environment_variables` more resilient ([29b6d23](https://github.com/cryptechdev/neptune-api-v2-python/commit/29b6d2306832ef6eec67c77cbe1147b785d0ce17)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([75f44ea](https://github.com/cryptechdev/neptune-api-v2-python/commit/75f44eac55564fa4af69a3bf7bb00e4ede77ff29)) +* **internal:** refactor authentication internals ([3261db6](https://github.com/cryptechdev/neptune-api-v2-python/commit/3261db685ebc85d286eef92d04fb416f2bed5b6c)) +* **internal:** tweak CI branches ([73115dc](https://github.com/cryptechdev/neptune-api-v2-python/commit/73115dce28adf13fd26721e8d012ca37a5a15c5e)) +* **internal:** update gitignore ([234d18a](https://github.com/cryptechdev/neptune-api-v2-python/commit/234d18a2f8796f655ae9b581a183d8692679cf32)) +* update SDK settings ([a258db0](https://github.com/cryptechdev/neptune-api-v2-python/commit/a258db0798d0887900eec2e89153fde27f024349)) +* update SDK settings ([658ca27](https://github.com/cryptechdev/neptune-api-v2-python/commit/658ca278b9e97285664bee1bea5664a36dd3afea)) diff --git a/pyproject.toml b/pyproject.toml index 1d8932d..64d3057 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neptune_api_v2" -version = "0.0.1" +version = "0.1.0" description = "The official Python library for the neptune-api-v2 API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/neptune_api_v2/_version.py b/src/neptune_api_v2/_version.py index 0de3c05..ec05cbf 100644 --- a/src/neptune_api_v2/_version.py +++ b/src/neptune_api_v2/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "neptune_api_v2" -__version__ = "0.0.1" # x-release-please-version +__version__ = "0.1.0" # x-release-please-version