Skip to content

Commit b6c29db

Browse files
feat(api): api update
1 parent 03d9eb0 commit b6c29db

68 files changed

Lines changed: 820 additions & 661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-8f59b54c563a672d33805b74f3b27f4157f632bab1586f7e33cec66437f5d9e9.yml
3-
openapi_spec_hash: 5475bbe23061c76aa754a61bcd0b2df5
4-
config_hash: c31f660ae992403120ee4f523f626fd3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-65d147ca43891623187340ff0aa56887343ee8e60d19ad156b65e241ebea8a99.yml
3+
openapi_spec_hash: c063aafd7db98b2572545d87247fc8a1
4+
config_hash: 8a15725f9f0e7bdf072a3c089d80c452

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Types:
44

55
```python
6-
from neptune_api_v2.types import ErrorData, Interval, IntervalUnit
6+
from neptune_api_v2.types import Interval, IntervalUnit
77
```
88

99
# Status

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from ....types import IntervalUnit
@@ -136,7 +138,7 @@ def get_loans_originated_by_asset(
136138
end: int,
137139
period: IntervalUnit,
138140
start: int,
139-
asset_ids: str | Omit = omit,
141+
asset_ids: Optional[str] | Omit = omit,
140142
interval: int | Omit = omit,
141143
limit: int | Omit = omit,
142144
offset: int | Omit = omit,
@@ -330,7 +332,7 @@ async def get_loans_originated_by_asset(
330332
end: int,
331333
period: IntervalUnit,
332334
start: int,
333-
asset_ids: str | Omit = omit,
335+
asset_ids: Optional[str] | Omit = omit,
334336
interval: int | Omit = omit,
335337
limit: int | Omit = omit,
336338
offset: int | Omit = omit,

src/neptune_api_v2/resources/assets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from ..types import IntervalUnit, asset_list_prices_params, asset_get_price_history_params
@@ -69,7 +71,7 @@ def get_price_history(
6971
end: int,
7072
period: IntervalUnit,
7173
start: int,
72-
asset_ids: str | Omit = omit,
74+
asset_ids: Optional[str] | Omit = omit,
7375
interval: int | Omit = omit,
7476
limit: int | Omit = omit,
7577
offset: int | Omit = omit,
@@ -235,7 +237,7 @@ async def get_price_history(
235237
end: int,
236238
period: IntervalUnit,
237239
start: int,
238-
asset_ids: str | Omit = omit,
240+
asset_ids: Optional[str] | Omit = omit,
239241
interval: int | Omit = omit,
240242
limit: int | Omit = omit,
241243
offset: int | Omit = omit,

src/neptune_api_v2/resources/markets/borrow/borrow.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from .debts import (
@@ -120,7 +122,7 @@ def get_rate_history(
120122
end: int,
121123
period: IntervalUnit,
122124
start: int,
123-
asset_ids: str | Omit = omit,
125+
asset_ids: Optional[str] | Omit = omit,
124126
interval: int | Omit = omit,
125127
limit: int | Omit = omit,
126128
offset: int | Omit = omit,
@@ -284,7 +286,7 @@ async def get_rate_history(
284286
end: int,
285287
period: IntervalUnit,
286288
start: int,
287-
asset_ids: str | Omit = omit,
289+
asset_ids: Optional[str] | Omit = omit,
288290
interval: int | Omit = omit,
289291
limit: int | Omit = omit,
290292
offset: int | Omit = omit,

src/neptune_api_v2/resources/markets/lend.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from ...types import IntervalUnit
@@ -147,7 +149,7 @@ def get_rate_history(
147149
end: int,
148150
period: IntervalUnit,
149151
start: int,
150-
asset_ids: str | Omit = omit,
152+
asset_ids: Optional[str] | Omit = omit,
151153
interval: int | Omit = omit,
152154
limit: int | Omit = omit,
153155
offset: int | Omit = omit,
@@ -353,7 +355,7 @@ async def get_rate_history(
353355
end: int,
354356
period: IntervalUnit,
355357
start: int,
356-
asset_ids: str | Omit = omit,
358+
asset_ids: Optional[str] | Omit = omit,
357359
interval: int | Omit = omit,
358360
limit: int | Omit = omit,
359361
offset: int | Omit = omit,

src/neptune_api_v2/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from .interval import Interval as Interval
66
from .asset_info import AssetInfo as AssetInfo
77
from .asset_spec import AssetSpec as AssetSpec
8-
from .error_data import ErrorData as ErrorData
98
from .event_action import EventAction as EventAction
109
from .interval_unit import IntervalUnit as IntervalUnit
1110
from .merged_market import MergedMarket as MergedMarket

src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Required, TypedDict
67

78
from ...interval_unit import IntervalUnit
@@ -36,7 +37,7 @@ class HistoryGetLoansOriginatedByAssetParams(TypedDict, total=False):
3637
Must be provided as unix timestamp (in seconds)
3738
"""
3839

39-
asset_ids: str
40+
asset_ids: Optional[str]
4041
"""Optional comma-separated list of asset IDs to filter for.
4142
4243
If excluded, values will be returned for all assets.

src/neptune_api_v2/types/analytics/market/history_get_loans_originated_by_asset_response.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from ...._models import BaseModel
77
from ...interval import Interval
88
from ...asset_spec import AssetSpec
9-
from ...error_data import ErrorData
109

1110
__all__ = [
1211
"HistoryGetLoansOriginatedByAssetResponse",
@@ -66,7 +65,7 @@ class DataSeries(BaseModel):
6665

6766

6867
class Data(BaseModel):
69-
"""Historical cumulative lend value for assets"""
68+
"""Primary response content (object)"""
7069

7170
pagination: DataPagination
7271
"""Values used for paginating the time series data"""
@@ -82,14 +81,20 @@ class Data(BaseModel):
8281

8382

8483
class HistoryGetLoansOriginatedByAssetResponse(BaseModel):
85-
data: Optional[Data] = None
86-
"""Historical cumulative lend value for assets"""
84+
"""Object data success response"""
8785

88-
error: Optional[ErrorData] = None
89-
"""Error content, only set if an error occurs"""
86+
data: Data
87+
"""Primary response content (object)"""
88+
89+
error: None = None
90+
"""Error data. Guaranteed `null` for successful response."""
9091

9192
status: int
92-
"""Request status"""
93+
"""HTTP status.
94+
95+
Successful responses are guaranteed to be < `400`. Conversely, error responses
96+
are guaranteed to be >= `400`.
97+
"""
9398

9499
status_text: str
95-
"""Request status text"""
100+
"""HTTP status text"""

src/neptune_api_v2/types/analytics/market/history_get_loans_originated_response.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from ...._models import BaseModel
77
from ...interval import Interval
8-
from ...error_data import ErrorData
98

109
__all__ = ["HistoryGetLoansOriginatedResponse", "Data", "DataPagination", "DataPoint", "DataRange"]
1110

@@ -46,7 +45,7 @@ class DataRange(BaseModel):
4645

4746

4847
class Data(BaseModel):
49-
"""Historical cumulative lend value for assets"""
48+
"""Primary response content (object)"""
5049

5150
pagination: DataPagination
5251
"""Pagination parameters for the interval response"""
@@ -58,14 +57,20 @@ class Data(BaseModel):
5857

5958

6059
class HistoryGetLoansOriginatedResponse(BaseModel):
61-
data: Optional[Data] = None
62-
"""Historical cumulative lend value for assets"""
60+
"""Object data success response"""
6361

64-
error: Optional[ErrorData] = None
65-
"""Error content, only set if an error occurs"""
62+
data: Data
63+
"""Primary response content (object)"""
64+
65+
error: None = None
66+
"""Error data. Guaranteed `null` for successful response."""
6667

6768
status: int
68-
"""Request status"""
69+
"""HTTP status.
70+
71+
Successful responses are guaranteed to be < `400`. Conversely, error responses
72+
are guaranteed to be >= `400`.
73+
"""
6974

7075
status_text: str
71-
"""Request status text"""
76+
"""HTTP status text"""

0 commit comments

Comments
 (0)