Skip to content

Commit a2daaa3

Browse files
feat(api): api update
1 parent 64bfdf0 commit a2daaa3

34 files changed

Lines changed: 557 additions & 233 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 48
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-09b5978b7e7d59cea96f054720bdf341353c0678caacf5ba5a1667027805e60d.yml
3-
openapi_spec_hash: 67359dbd4d14a0f1a5c11e25084c33f0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-3e68b318eeaab1241ee6ed696300829c9eae836a937905e7389788413f9daa8a.yml
3+
openapi_spec_hash: b76569f104863b1e7b3c5271f53df840
44
config_hash: fa0efc29593602eac57523d55bc83fa6

src/neptune_api_v2/types/asset_price.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class ExtraText(BaseModel):
1212
"""Human-readable field variants.
1313
14-
Will not be null when query param `with-text` is `true`.
14+
Will not be null when query param `with_text` is `true`.
1515
"""
1616

1717
last_updated_at: str
@@ -23,7 +23,7 @@ class Extra(BaseModel):
2323
text: Optional[ExtraText] = None
2424
"""Human-readable field variants.
2525
26-
Will not be null when query param `with-text` is `true`.
26+
Will not be null when query param `with_text` is `true`.
2727
"""
2828

2929

src/neptune_api_v2/types/markets/borrow/borrow_collateral_config.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class ExtraValueExtraText(BaseModel):
3030
Will not be null when query params `with_text` and `with_value` are `true`.
3131
"""
3232

33-
collateral_cap: str
33+
collateral_cap: Optional[str] = None
34+
35+
price: Optional[str] = None
36+
"""Text representation of price"""
3437

3538

3639
class ExtraValueExtra(BaseModel):
@@ -45,12 +48,21 @@ class ExtraValue(BaseModel):
4548
"""USD values for the corresponding amounts above.
4649
4750
Will not be null when query param `with_value` is `true`.
51+
52+
### Note
53+
54+
This variant group contains an additional `price` field (set to the number used in value calculation).
55+
56+
The embedded text group will contain the text variant if `with_text` was specified as well.
4857
"""
4958

5059
collateral_cap: Optional[str] = None
5160

5261
extra: ExtraValueExtra
5362

63+
price: str
64+
"""Price used in value calculations"""
65+
5466

5567
class Extra(BaseModel):
5668
text: Optional[ExtraText] = None
@@ -63,6 +75,14 @@ class Extra(BaseModel):
6375
"""USD values for the corresponding amounts above.
6476
6577
Will not be null when query param `with_value` is `true`.
78+
79+
### Note
80+
81+
This variant group contains an additional `price` field (set to the number used
82+
in value calculation).
83+
84+
The embedded text group will contain the text variant if `with_text` was
85+
specified as well.
6686
"""
6787

6888

src/neptune_api_v2/types/markets/borrow/borrow_collateral_state.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class ExtraValueExtraText(BaseModel):
2424

2525
collateral_sum: str
2626

27+
price: str
28+
"""Text representation of price"""
29+
2730

2831
class ExtraValueExtra(BaseModel):
2932
text: Optional[ExtraValueExtraText] = None
@@ -37,12 +40,21 @@ class ExtraValue(BaseModel):
3740
"""USD values for the corresponding amounts above.
3841
3942
Will not be null when query param `with_value` is `true`.
43+
44+
### Note
45+
46+
This variant group contains an additional `price` field (set to the number used in value calculation).
47+
48+
The embedded text group will contain the text variant if `with_text` was specified as well.
4049
"""
4150

4251
collateral_sum: str
4352

4453
extra: ExtraValueExtra
4554

55+
price: str
56+
"""Price used in value calculations"""
57+
4658

4759
class Extra(BaseModel):
4860
text: Optional[ExtraText] = None
@@ -55,6 +67,14 @@ class Extra(BaseModel):
5567
"""USD values for the corresponding amounts above.
5668
5769
Will not be null when query param `with_value` is `true`.
70+
71+
### Note
72+
73+
This variant group contains an additional `price` field (set to the number used
74+
in value calculation).
75+
76+
The embedded text group will contain the text variant if `with_text` was
77+
specified as well.
5878
"""
5979

6080

src/neptune_api_v2/types/markets/borrow/borrow_debt_config.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ class ExtraValueExtraText(BaseModel):
2626
Will not be null when query params `with_text` and `with_value` are `true`.
2727
"""
2828

29-
borrow_cap: str
29+
borrow_cap: Optional[str] = None
30+
31+
price: Optional[str] = None
32+
"""Text representation of price"""
3033

3134

3235
class ExtraValueExtra(BaseModel):
@@ -41,12 +44,21 @@ class ExtraValue(BaseModel):
4144
"""USD values for the corresponding amounts above.
4245
4346
Will not be null when query param `with_value` is `true`.
47+
48+
### Note
49+
50+
This variant group contains an additional `price` field (set to the number used in value calculation).
51+
52+
The embedded text group will contain the text variant if `with_text` was specified as well.
4453
"""
4554

4655
borrow_cap: Optional[str] = None
4756

4857
extra: ExtraValueExtra
4958

59+
price: str
60+
"""Price used in value calculations"""
61+
5062

5163
class Extra(BaseModel):
5264
text: Optional[ExtraText] = None
@@ -59,6 +71,14 @@ class Extra(BaseModel):
5971
"""USD values for the corresponding amounts above.
6072
6173
Will not be null when query param `with_value` is `true`.
74+
75+
### Note
76+
77+
This variant group contains an additional `price` field (set to the number used
78+
in value calculation).
79+
80+
The embedded text group will contain the text variant if `with_text` was
81+
specified as well.
6282
"""
6383

6484

src/neptune_api_v2/types/markets/borrow/borrow_debt_market.py

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

3-
from typing import Optional
4-
53
from ...._models import BaseModel
64
from ...asset_info import AssetInfo
75
from ...market_rate import MarketRate
@@ -20,7 +18,7 @@ class BorrowDebtMarket(BaseModel):
2018
config: BorrowDebtConfig
2119
"""Debt market configuration parameters"""
2220

23-
rate: Optional[MarketRate] = None
21+
rate: MarketRate
2422
"""Market rates"""
2523

2624
state: BorrowDebtState

src/neptune_api_v2/types/markets/borrow/borrow_debt_market_data.py

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

3-
from typing import Optional
4-
53
from ...._models import BaseModel
64
from ...market_rate import MarketRate
75
from .borrow_debt_state import BorrowDebtState
@@ -14,7 +12,7 @@ class BorrowDebtMarketData(BaseModel):
1412
config: BorrowDebtConfig
1513
"""Debt market configuration parameters"""
1614

17-
rate: Optional[MarketRate] = None
15+
rate: MarketRate
1816
"""Market rates"""
1917

2018
state: BorrowDebtState

src/neptune_api_v2/types/markets/borrow/borrow_debt_state.py

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ class ExtraText(BaseModel):
1414
Will not be null when query param `with_text` is `true`.
1515
"""
1616

17-
debt_sum: str
18-
19-
interest_sum: str
17+
balance_sum: str
2018

2119
principal_sum: str
2220

@@ -29,9 +27,10 @@ class ExtraValueExtraText(BaseModel):
2927
Will not be null when query params `with_text` and `with_value` are `true`.
3028
"""
3129

32-
debt_sum: str
30+
balance_sum: str
3331

34-
interest_sum: str
32+
price: str
33+
"""Text representation of price"""
3534

3635
principal_sum: str
3736

@@ -48,13 +47,20 @@ class ExtraValue(BaseModel):
4847
"""USD values for the corresponding amounts above.
4948
5049
Will not be null when query param `with_value` is `true`.
50+
51+
### Note
52+
53+
This variant group contains an additional `price` field (set to the number used in value calculation).
54+
55+
The embedded text group will contain the text variant if `with_text` was specified as well.
5156
"""
5257

53-
debt_sum: str
58+
balance_sum: str
5459

5560
extra: ExtraValueExtra
5661

57-
interest_sum: str
62+
price: str
63+
"""Price used in value calculations"""
5864

5965
principal_sum: str
6066

@@ -70,26 +76,23 @@ class Extra(BaseModel):
7076
"""USD values for the corresponding amounts above.
7177
7278
Will not be null when query param `with_value` is `true`.
79+
80+
### Note
81+
82+
This variant group contains an additional `price` field (set to the number used
83+
in value calculation).
84+
85+
The embedded text group will contain the text variant if `with_text` was
86+
specified as well.
7387
"""
7488

7589

7690
class BorrowDebtState(BaseModel):
77-
debt_sum: str
78-
"""Sum open debt amount (this is simply the principal sum + interest sum)"""
91+
balance_sum: str
7992

8093
extra: Extra
8194

82-
interest_sum: str
83-
"""
84-
Sum of accrued interest for all open debts (those which have not yet been
85-
repaid)
86-
"""
87-
8895
principal_sum: str
89-
"""
90-
Sum of initial amount borrowed for all open debts (those which have not yet been
91-
repaid)
92-
"""
9396

9497
time_last_distributed_interest: datetime
9598
"""Timestamp used to keep track of the last time interest was distributed."""

src/neptune_api_v2/types/markets/lend_market.py

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

3-
from typing import Optional
4-
53
from ..._models import BaseModel
64
from ..asset_info import AssetInfo
75
from ..market_rate import MarketRate
@@ -16,7 +14,7 @@ class LendMarket(BaseModel):
1614
asset_info: AssetInfo
1715
"""Asset identifiers with associated metadata"""
1816

19-
rate: Optional[MarketRate] = None
17+
rate: MarketRate
2018
"""Lending market rates"""
2119

2220
state: LendMarketState

src/neptune_api_v2/types/markets/lend_market_data.py

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

3-
from typing import Optional
4-
53
from ..._models import BaseModel
64
from ..market_rate import MarketRate
75
from .lend_market_state import LendMarketState
@@ -10,7 +8,7 @@
108

119

1210
class LendMarketData(BaseModel):
13-
rate: Optional[MarketRate] = None
11+
rate: MarketRate
1412
"""Lending market rates"""
1513

1614
state: LendMarketState

0 commit comments

Comments
 (0)