Skip to content

Commit 7812ed7

Browse files
authored
Merge pull request #4 from cryptechdev/release-please--branches--main--changes--next
release: 0.4.0 - Fix response types for: - `/api/v1/users/{address}/wallet/balances` - `/api/v1/users/{address}/nept/staking/unstaking` While these are 'breaking changes', the existing sdk calls do no work and will throw exceptions during deserialization. Please update.
2 parents 7b21e9c + cae91e6 commit 7812ed7

11 files changed

Lines changed: 79 additions & 53 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.0"
2+
".": "0.4.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 49
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-cd6572e5c8f35a293af2a1dae3e41c63da19dad8d2ab456a7322a09614de3ae9.yml
3-
openapi_spec_hash: 68dd5648c3ee92f07f52c5d4ebf2f8fc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-99a21fdf9159c28a75eb60c0b7ad4710d01b0a98dd0474267a07e9914039fa83.yml
3+
openapi_spec_hash: f58f326c00c34bc45b28b09b9530566c
44
config_hash: 27aff5f3f84397a9b3c2cb8a3c1d1e71

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.4.0 (2026-04-09)
4+
5+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.3.0...v0.4.0)
6+
7+
### Features
8+
9+
* **api:** API backend sync ([404a198](https://github.com/cryptechdev/neptune-api-v2-python/commit/404a198d748b43053c14018ec69bac544a93bba9))
10+
11+
12+
### Bug Fixes
13+
14+
* **client:** preserve hardcoded query params when merging with user params ([f3dc171](https://github.com/cryptechdev/neptune-api-v2-python/commit/f3dc171474cb886cbf6b48d39d813ffe378583f0))
15+
316
## 0.3.0 (2026-04-04)
417

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "neptune_api_v2"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
description = "The official Python library for the neptune-api-v2 API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/neptune_api_v2/_base_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,10 @@ def _build_request(
558558
files = cast(HttpxRequestFiles, ForceMultipartDict())
559559

560560
prepared_url = self._prepare_url(options.url)
561+
# preserve hard-coded query params from the url
562+
if params and prepared_url.query:
563+
params = {**dict(prepared_url.params.items()), **params}
564+
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
561565
if "_" in prepared_url.host:
562566
# work around https://github.com/encode/httpx/discussions/2880
563567
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}

src/neptune_api_v2/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "neptune_api_v2"
4-
__version__ = "0.3.0" # x-release-please-version
4+
__version__ = "0.4.0" # x-release-please-version

src/neptune_api_v2/resources/analytics/market/history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def get_loans_originated_by_asset(
152152
timeout: float | httpx.Timeout | None | NotGiven = not_given,
153153
) -> HistoryGetLoansOriginatedByAssetResponse:
154154
"""
155-
Get cumulative lending value history assets
155+
Get loans originated history
156156
157157
Args:
158158
end: End timestamp for interval range (inclusive)
@@ -347,7 +347,7 @@ async def get_loans_originated_by_asset(
347347
timeout: float | httpx.Timeout | None | NotGiven = not_given,
348348
) -> HistoryGetLoansOriginatedByAssetResponse:
349349
"""
350-
Get cumulative lending value history assets
350+
Get loans originated history
351351
352352
Args:
353353
end: End timestamp for interval range (inclusive)

src/neptune_api_v2/types/user/market/lend_list_response.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List
4-
53
from ...._models import BaseModel
64
from .user_lend_market import UserLendMarket
75

86
__all__ = ["LendListResponse"]
97

108

119
class LendListResponse(BaseModel):
12-
count: int
13-
"""Total number of objects irrespective of any pagination parameters."""
14-
15-
data: List[UserLendMarket]
10+
data: UserLendMarket
1611

1712
error: None = None
1813
"""Error data. Guaranteed `null` for successful response."""

src/neptune_api_v2/types/user/nept/staking_get_unstaking_response.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List
4-
53
from ...._models import BaseModel
6-
from .user_stake_unbonding_entry import UserStakeUnbondingEntry
7-
8-
__all__ = ["StakingGetUnstakingResponse", "Data"]
9-
10-
11-
class Data(BaseModel):
12-
amount_sum: str
13-
"""Total amount of all unbond entries
4+
from .user_stake_unbonding import UserStakeUnbonding
145

15-
**NOTE:** this value is affected by active filters, if any (e.g. filtering over
16-
account index)
17-
"""
18-
19-
contents: List[UserStakeUnbondingEntry]
20-
"""Unbonding/unstake entries
21-
22-
**NOTE:** cascade unbondings from pool >= 2 are contained in the bondings list
23-
of the lower adjacent pool from which the unbond occurred.
24-
"""
6+
__all__ = ["StakingGetUnstakingResponse"]
257

268

279
class StakingGetUnstakingResponse(BaseModel):
28-
data: Data
10+
data: UserStakeUnbonding
2911

3012
error: None = None
3113
"""Error data. Guaranteed `null` for successful response."""

src/neptune_api_v2/types/user/wallet_get_balances_response.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
4-
53
from ..._models import BaseModel
6-
from .wallet_balance import WalletBalance
7-
8-
__all__ = ["WalletGetBalancesResponse", "Data"]
9-
10-
11-
class Data(BaseModel):
12-
balances: List[WalletBalance]
13-
"""Array of each wallet balance"""
4+
from .user_wallet_portfolio import UserWalletPortfolio
145

15-
total_value: Optional[str] = None
16-
"""
17-
Sum value in USD. Guaranteed null if value calculation is disabled / guaranteed
18-
non-null if calculation is enabled.
19-
20-
**NOTE:** this only accounts for assets which are internally known & tracked.
21-
See the `/assets` endpoint for a list of supported assets.
22-
"""
6+
__all__ = ["WalletGetBalancesResponse"]
237

248

259
class WalletGetBalancesResponse(BaseModel):
26-
data: Data
10+
data: UserWalletPortfolio
2711

2812
error: None = None
2913
"""Error data. Guaranteed `null` for successful response."""

0 commit comments

Comments
 (0)