Skip to content

Commit 83d3a03

Browse files
author
meorphis
committed
chore(internal): fix
1 parent 0992ca8 commit 83d3a03

20 files changed

Lines changed: 394 additions & 464 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 49
1+
configured_endpoints: 50
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-05e0ec4b9b945a8c8e3542d34f0759f4eed2046a37750700fd40619f8a0cd6d7.yml
33
openapi_spec_hash: 3911018927f898449898cc6cc5685273
4-
config_hash: f5ca3bc259f95069f0db4114d34e29ef
4+
config_hash: fdcc5ae6c783dda7176ace266f7ad0fd

api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ Types:
6262
from neptune_api_v2.types import (
6363
GlobalMarketConfig,
6464
MarketRate,
65+
MarketSupplyPool,
6566
MergedMarket,
6667
Tvl,
6768
MarketGetMergedResponse,
6869
MarketGetMergedByAssetResponse,
6970
MarketGetOverviewResponse,
7071
MarketGetParamsResponse,
72+
MarketGetSupplyResponse,
7173
)
7274
```
7375

@@ -77,6 +79,7 @@ Methods:
7779
- <code title="get /api/v1/markets/merged/lookup">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_merged_by_asset</a>(\*\*<a href="src/neptune_api_v2/types/market_get_merged_by_asset_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_merged_by_asset_response.py">MarketGetMergedByAssetResponse</a></code>
7880
- <code title="get /api/v1/markets">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_overview</a>(\*\*<a href="src/neptune_api_v2/types/market_get_overview_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_overview_response.py">MarketGetOverviewResponse</a></code>
7981
- <code title="get /api/v1/markets/config">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_params</a>(\*\*<a href="src/neptune_api_v2/types/market_get_params_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_params_response.py">MarketGetParamsResponse</a></code>
82+
- <code title="get /api/v1/markets/supply">client.markets.<a href="./src/neptune_api_v2/resources/markets/markets.py">get_supply</a>(\*\*<a href="src/neptune_api_v2/types/market_get_supply_params.py">params</a>) -> <a href="./src/neptune_api_v2/types/market_get_supply_response.py">MarketGetSupplyResponse</a></code>
8083

8184
## Lend
8285

@@ -87,6 +90,8 @@ from neptune_api_v2.types.markets import (
8790
LendMarket,
8891
LendMarketData,
8992
LendMarketState,
93+
LendMarketSupply,
94+
LendOverview,
9095
LendListResponse,
9196
LendGetByAssetResponse,
9297
LendGetRateHistoryResponse,
@@ -125,6 +130,8 @@ from neptune_api_v2.types.markets.borrow import (
125130
BorrowCollateralConfig,
126131
BorrowCollateralMarket,
127132
BorrowCollateralMarketData,
133+
BorrowCollateralMarketSupply,
134+
BorrowCollateralOverview,
128135
BorrowCollateralState,
129136
CollateralListResponse,
130137
CollateralGetByAssetResponse,
@@ -145,6 +152,7 @@ from neptune_api_v2.types.markets.borrow import (
145152
BorrowDebtConfig,
146153
BorrowDebtMarket,
147154
BorrowDebtMarketData,
155+
BorrowDebtOverview,
148156
BorrowDebtState,
149157
DebtListResponse,
150158
DebtGetByAssetResponse,

src/neptune_api_v2/resources/markets/markets.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from ...types import (
1616
market_get_merged_params,
1717
market_get_params_params,
18+
market_get_supply_params,
1819
market_get_overview_params,
1920
market_get_merged_by_asset_params,
2021
)
@@ -39,6 +40,7 @@
3940
from ..._base_client import make_request_options
4041
from ...types.market_get_merged_response import MarketGetMergedResponse
4142
from ...types.market_get_params_response import MarketGetParamsResponse
43+
from ...types.market_get_supply_response import MarketGetSupplyResponse
4244
from ...types.market_get_overview_response import MarketGetOverviewResponse
4345
from ...types.market_get_merged_by_asset_response import MarketGetMergedByAssetResponse
4446

@@ -252,6 +254,43 @@ def get_params(
252254
cast_to=MarketGetParamsResponse,
253255
)
254256

257+
def get_supply(
258+
self,
259+
*,
260+
with_text: bool | Omit = omit,
261+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262+
# The extra values given here take precedence over values defined on the client or passed to this method.
263+
extra_headers: Headers | None = None,
264+
extra_query: Query | None = None,
265+
extra_body: Body | None = None,
266+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
267+
) -> MarketGetSupplyResponse:
268+
"""
269+
Get market supply
270+
271+
Args:
272+
with_text: Include text variation fields
273+
274+
extra_headers: Send extra headers
275+
276+
extra_query: Add additional query parameters to the request
277+
278+
extra_body: Add additional JSON properties to the request
279+
280+
timeout: Override the client-level default timeout for this request, in seconds
281+
"""
282+
return self._get(
283+
"/api/v1/markets/supply",
284+
options=make_request_options(
285+
extra_headers=extra_headers,
286+
extra_query=extra_query,
287+
extra_body=extra_body,
288+
timeout=timeout,
289+
query=maybe_transform({"with_text": with_text}, market_get_supply_params.MarketGetSupplyParams),
290+
),
291+
cast_to=MarketGetSupplyResponse,
292+
)
293+
255294

256295
class AsyncMarketsResource(AsyncAPIResource):
257296
@cached_property
@@ -462,6 +501,45 @@ async def get_params(
462501
cast_to=MarketGetParamsResponse,
463502
)
464503

504+
async def get_supply(
505+
self,
506+
*,
507+
with_text: bool | Omit = omit,
508+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
509+
# The extra values given here take precedence over values defined on the client or passed to this method.
510+
extra_headers: Headers | None = None,
511+
extra_query: Query | None = None,
512+
extra_body: Body | None = None,
513+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
514+
) -> MarketGetSupplyResponse:
515+
"""
516+
Get market supply
517+
518+
Args:
519+
with_text: Include text variation fields
520+
521+
extra_headers: Send extra headers
522+
523+
extra_query: Add additional query parameters to the request
524+
525+
extra_body: Add additional JSON properties to the request
526+
527+
timeout: Override the client-level default timeout for this request, in seconds
528+
"""
529+
return await self._get(
530+
"/api/v1/markets/supply",
531+
options=make_request_options(
532+
extra_headers=extra_headers,
533+
extra_query=extra_query,
534+
extra_body=extra_body,
535+
timeout=timeout,
536+
query=await async_maybe_transform(
537+
{"with_text": with_text}, market_get_supply_params.MarketGetSupplyParams
538+
),
539+
),
540+
cast_to=MarketGetSupplyResponse,
541+
)
542+
465543

466544
class MarketsResourceWithRawResponse:
467545
def __init__(self, markets: MarketsResource) -> None:
@@ -479,6 +557,9 @@ def __init__(self, markets: MarketsResource) -> None:
479557
self.get_params = to_raw_response_wrapper(
480558
markets.get_params,
481559
)
560+
self.get_supply = to_raw_response_wrapper(
561+
markets.get_supply,
562+
)
482563

483564
@cached_property
484565
def lend(self) -> LendResourceWithRawResponse:
@@ -505,6 +586,9 @@ def __init__(self, markets: AsyncMarketsResource) -> None:
505586
self.get_params = async_to_raw_response_wrapper(
506587
markets.get_params,
507588
)
589+
self.get_supply = async_to_raw_response_wrapper(
590+
markets.get_supply,
591+
)
508592

509593
@cached_property
510594
def lend(self) -> AsyncLendResourceWithRawResponse:
@@ -531,6 +615,9 @@ def __init__(self, markets: MarketsResource) -> None:
531615
self.get_params = to_streamed_response_wrapper(
532616
markets.get_params,
533617
)
618+
self.get_supply = to_streamed_response_wrapper(
619+
markets.get_supply,
620+
)
534621

535622
@cached_property
536623
def lend(self) -> LendResourceWithStreamingResponse:
@@ -557,6 +644,9 @@ def __init__(self, markets: AsyncMarketsResource) -> None:
557644
self.get_params = async_to_streamed_response_wrapper(
558645
markets.get_params,
559646
)
647+
self.get_supply = async_to_streamed_response_wrapper(
648+
markets.get_supply,
649+
)
560650

561651
@cached_property
562652
def lend(self) -> AsyncLendResourceWithStreamingResponse:

src/neptune_api_v2/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from .asset_metadata import AssetMetadata as AssetMetadata
2121
from .staking_pool_full import StakingPoolFull as StakingPoolFull
2222
from .asset_rate_history import AssetRateHistory as AssetRateHistory
23+
from .market_supply_pool import MarketSupplyPool as MarketSupplyPool
2324
from .staking_pool_state import StakingPoolState as StakingPoolState
2425
from .asset_list_response import AssetListResponse as AssetListResponse
2526
from .asset_price_history import AssetPriceHistory as AssetPriceHistory
@@ -35,11 +36,13 @@
3536
from .asset_list_prices_params import AssetListPricesParams as AssetListPricesParams
3637
from .market_get_merged_params import MarketGetMergedParams as MarketGetMergedParams
3738
from .market_get_params_params import MarketGetParamsParams as MarketGetParamsParams
39+
from .market_get_supply_params import MarketGetSupplyParams as MarketGetSupplyParams
3840
from .nept_get_params_response import NeptGetParamsResponse as NeptGetParamsResponse
3941
from .asset_list_prices_response import AssetListPricesResponse as AssetListPricesResponse
4042
from .market_get_merged_response import MarketGetMergedResponse as MarketGetMergedResponse
4143
from .market_get_overview_params import MarketGetOverviewParams as MarketGetOverviewParams
4244
from .market_get_params_response import MarketGetParamsResponse as MarketGetParamsResponse
45+
from .market_get_supply_response import MarketGetSupplyResponse as MarketGetSupplyResponse
4346
from .user_get_tx_history_params import UserGetTxHistoryParams as UserGetTxHistoryParams
4447
from .market_get_overview_response import MarketGetOverviewResponse as MarketGetOverviewResponse
4548
from .status_check_health_response import StatusCheckHealthResponse as StatusCheckHealthResponse

src/neptune_api_v2/types/market_get_overview_response.py

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

3-
from typing import List, Optional
4-
53
from .tvl import Tvl
64
from .._models import BaseModel
7-
from .markets.lend_market import LendMarket
85
from .global_market_config import GlobalMarketConfig
6+
from .markets.lend_overview import LendOverview
97
from .markets.borrow_market_overview import BorrowMarketOverview
108

11-
__all__ = [
12-
"MarketGetOverviewResponse",
13-
"Data",
14-
"DataLend",
15-
"DataLendSupply",
16-
"DataLendSupplyExtra",
17-
"DataLendSupplyExtraText",
18-
]
19-
20-
21-
class DataLendSupplyExtraText(BaseModel):
22-
"""Human-readable field variants.
23-
24-
Will not be null when query param `with_text` is `true`.
25-
"""
26-
27-
principal: str
28-
29-
30-
class DataLendSupplyExtra(BaseModel):
31-
text: Optional[DataLendSupplyExtraText] = None
32-
"""Human-readable field variants.
33-
34-
Will not be null when query param `with_text` is `true`.
35-
"""
36-
37-
38-
class DataLendSupply(BaseModel):
39-
"""Supply breakdown for lending markets"""
40-
41-
extra: DataLendSupplyExtra
42-
43-
principal: str
44-
"""Sum USD value of lending principal"""
45-
46-
47-
class DataLend(BaseModel):
48-
"""Lending markets overview"""
49-
50-
contents: List[LendMarket]
51-
"""Lending markets"""
52-
53-
supply: DataLendSupply
54-
"""Supply breakdown for lending markets"""
9+
__all__ = ["MarketGetOverviewResponse", "Data"]
5510

5611

5712
class Data(BaseModel):
@@ -61,7 +16,7 @@ class Data(BaseModel):
6116
global_config: GlobalMarketConfig
6217
"""Market runtime parameters"""
6318

64-
lend: DataLend
19+
lend: LendOverview
6520
"""Lending markets overview"""
6621

6722
tvl: Tvl
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypedDict
6+
7+
__all__ = ["MarketGetSupplyParams"]
8+
9+
10+
class MarketGetSupplyParams(TypedDict, total=False):
11+
with_text: bool
12+
"""Include text variation fields"""
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .tvl import Tvl
4+
from .._models import BaseModel
5+
from .market_supply_pool import MarketSupplyPool
6+
from .markets.lend_market_supply import LendMarketSupply
7+
from .markets.borrow.borrow_collateral_market_supply import BorrowCollateralMarketSupply
8+
9+
__all__ = ["MarketGetSupplyResponse", "Data"]
10+
11+
12+
class Data(BaseModel):
13+
borrow_collateral: BorrowCollateralMarketSupply
14+
"""Borrowing market supply - collaterals"""
15+
16+
borrow_debt: MarketSupplyPool
17+
"""Borrowing market supply - debts"""
18+
19+
lend: LendMarketSupply
20+
"""Lending market supply"""
21+
22+
tvl: Tvl
23+
"""Market TVL"""
24+
25+
26+
class MarketGetSupplyResponse(BaseModel):
27+
data: Data
28+
29+
error: None = None
30+
"""Error data. Guaranteed `null` for successful response."""
31+
32+
status: int
33+
"""HTTP status.
34+
35+
Successful responses are guaranteed to be < `400`. Conversely, error responses
36+
are guaranteed to be >= `400`.
37+
"""
38+
39+
status_text: str
40+
"""HTTP status text"""
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from .._models import BaseModel
6+
7+
__all__ = ["MarketSupplyPool", "Extra", "ExtraText"]
8+
9+
10+
class ExtraText(BaseModel):
11+
"""Human-readable field variants.
12+
13+
Will not be null when query param `with_text` is `true`.
14+
"""
15+
16+
balance: str
17+
18+
shares: str
19+
20+
21+
class Extra(BaseModel):
22+
text: Optional[ExtraText] = None
23+
"""Human-readable field variants.
24+
25+
Will not be null when query param `with_text` is `true`.
26+
"""
27+
28+
29+
class MarketSupplyPool(BaseModel):
30+
balance: str
31+
"""Sum USD value of market balance"""
32+
33+
extra: Extra
34+
35+
shares: str
36+
"""Sum USD value of market shares"""

src/neptune_api_v2/types/markets/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
from __future__ import annotations
44

55
from .lend_market import LendMarket as LendMarket
6+
from .lend_overview import LendOverview as LendOverview
67
from .lend_list_params import LendListParams as LendListParams
78
from .lend_market_data import LendMarketData as LendMarketData
89
from .lend_market_state import LendMarketState as LendMarketState
910
from .lend_list_response import LendListResponse as LendListResponse
11+
from .lend_market_supply import LendMarketSupply as LendMarketSupply
1012
from .borrow_market_overview import BorrowMarketOverview as BorrowMarketOverview
1113
from .lend_get_by_asset_params import LendGetByAssetParams as LendGetByAssetParams
1214
from .borrow_get_overview_params import BorrowGetOverviewParams as BorrowGetOverviewParams

0 commit comments

Comments
 (0)