compass_api_sdk 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- {compass_api_sdk-0.3.1.dist-info → compass_api_sdk-0.3.3.dist-info}/METADATA +10 -9
- {compass_api_sdk-0.3.1.dist-info → compass_api_sdk-0.3.3.dist-info}/RECORD +24 -11
- compassapisdk/_version.py +3 -3
- compassapisdk/aave_v3.py +206 -0
- compassapisdk/models/__init__.py +110 -4
- compassapisdk/models/aave_avg_rateop.py +96 -0
- compassapisdk/models/aaveavgrateresponse.py +40 -0
- compassapisdk/models/morphoborrowparams.py +78 -0
- compassapisdk/models/morphodepositparams.py +75 -0
- compassapisdk/models/morphorepayparams.py +68 -0
- compassapisdk/models/morphosetvaultallowanceparams.py +33 -0
- compassapisdk/models/morphosupplycollateralparams.py +80 -0
- compassapisdk/models/morphowithdrawcollateralparams.py +80 -0
- compassapisdk/models/morphowithdrawparams.py +63 -0
- compassapisdk/models/multicallaction.py +54 -12
- compassapisdk/models/multicallactiontype.py +11 -0
- compassapisdk/models/skybuyparams.py +39 -0
- compassapisdk/models/skybuyrequest.py +3 -3
- compassapisdk/models/skydepositparams.py +68 -0
- compassapisdk/models/skysellparams.py +39 -0
- compassapisdk/models/skysellrequest.py +3 -3
- compassapisdk/models/skywithdrawparams.py +58 -0
- compassapisdk/sky.py +4 -4
- {compass_api_sdk-0.3.1.dist-info → compass_api_sdk-0.3.3.dist-info}/WHEEL +0 -0
compassapisdk/models/__init__.py
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
|
+
from .aave_avg_rateop import (
|
|
4
|
+
AaveAvgRateChain,
|
|
5
|
+
AaveAvgRateRequest,
|
|
6
|
+
AaveAvgRateRequestTypedDict,
|
|
7
|
+
AaveAvgRateToken,
|
|
8
|
+
)
|
|
3
9
|
from .aave_historical_transactionsop import (
|
|
4
10
|
AaveHistoricalTransactionsChain,
|
|
5
11
|
AaveHistoricalTransactionsRequest,
|
|
@@ -40,6 +46,7 @@ from .aave_user_position_summaryop import (
|
|
|
40
46
|
AaveUserPositionSummaryRequest,
|
|
41
47
|
AaveUserPositionSummaryRequestTypedDict,
|
|
42
48
|
)
|
|
49
|
+
from .aaveavgrateresponse import AaveAvgRateResponse, AaveAvgRateResponseTypedDict
|
|
43
50
|
from .aaveborrowparams import (
|
|
44
51
|
AaveBorrowParams,
|
|
45
52
|
AaveBorrowParamsAmount,
|
|
@@ -320,6 +327,12 @@ from .morpho_vaultsop import (
|
|
|
320
327
|
MorphoVaultsRequest,
|
|
321
328
|
MorphoVaultsRequestTypedDict,
|
|
322
329
|
)
|
|
330
|
+
from .morphoborrowparams import (
|
|
331
|
+
MorphoBorrowParams,
|
|
332
|
+
MorphoBorrowParamsAmount,
|
|
333
|
+
MorphoBorrowParamsAmountTypedDict,
|
|
334
|
+
MorphoBorrowParamsTypedDict,
|
|
335
|
+
)
|
|
323
336
|
from .morphoborrowrequest import (
|
|
324
337
|
MorphoBorrowRequest,
|
|
325
338
|
MorphoBorrowRequestAmount,
|
|
@@ -335,6 +348,12 @@ from .morphocheckvaultpositionresponse import (
|
|
|
335
348
|
MorphoCheckVaultPositionResponse,
|
|
336
349
|
MorphoCheckVaultPositionResponseTypedDict,
|
|
337
350
|
)
|
|
351
|
+
from .morphodepositparams import (
|
|
352
|
+
MorphoDepositParams,
|
|
353
|
+
MorphoDepositParamsAmount,
|
|
354
|
+
MorphoDepositParamsAmountTypedDict,
|
|
355
|
+
MorphoDepositParamsTypedDict,
|
|
356
|
+
)
|
|
338
357
|
from .morphodepositrequest import (
|
|
339
358
|
MorphoDepositRequest,
|
|
340
359
|
MorphoDepositRequestAmount,
|
|
@@ -351,11 +370,18 @@ from .morphogetvaultsresponse import (
|
|
|
351
370
|
MorphoGetVaultsResponseTypedDict,
|
|
352
371
|
)
|
|
353
372
|
from .morphomarket import MorphoMarket, MorphoMarketTypedDict
|
|
373
|
+
from .morphorepayparams import MorphoRepayParams, MorphoRepayParamsTypedDict
|
|
354
374
|
from .morphorepayrequest import (
|
|
355
375
|
MorphoRepayRequest,
|
|
356
376
|
MorphoRepayRequestChain,
|
|
357
377
|
MorphoRepayRequestTypedDict,
|
|
358
378
|
)
|
|
379
|
+
from .morphosetvaultallowanceparams import (
|
|
380
|
+
MorphoSetVaultAllowanceParams,
|
|
381
|
+
MorphoSetVaultAllowanceParamsAmount,
|
|
382
|
+
MorphoSetVaultAllowanceParamsAmountTypedDict,
|
|
383
|
+
MorphoSetVaultAllowanceParamsTypedDict,
|
|
384
|
+
)
|
|
359
385
|
from .morphosetvaultallowancerequest import (
|
|
360
386
|
MorphoSetVaultAllowanceRequest,
|
|
361
387
|
MorphoSetVaultAllowanceRequestAmount,
|
|
@@ -363,6 +389,12 @@ from .morphosetvaultallowancerequest import (
|
|
|
363
389
|
MorphoSetVaultAllowanceRequestChain,
|
|
364
390
|
MorphoSetVaultAllowanceRequestTypedDict,
|
|
365
391
|
)
|
|
392
|
+
from .morphosupplycollateralparams import (
|
|
393
|
+
MorphoSupplyCollateralParams,
|
|
394
|
+
MorphoSupplyCollateralParamsAmount,
|
|
395
|
+
MorphoSupplyCollateralParamsAmountTypedDict,
|
|
396
|
+
MorphoSupplyCollateralParamsTypedDict,
|
|
397
|
+
)
|
|
366
398
|
from .morphosupplycollateralrequest import (
|
|
367
399
|
MorphoSupplyCollateralRequest,
|
|
368
400
|
MorphoSupplyCollateralRequestAmount,
|
|
@@ -371,6 +403,12 @@ from .morphosupplycollateralrequest import (
|
|
|
371
403
|
MorphoSupplyCollateralRequestTypedDict,
|
|
372
404
|
)
|
|
373
405
|
from .morphovault import MorphoVault, MorphoVaultTypedDict
|
|
406
|
+
from .morphowithdrawcollateralparams import (
|
|
407
|
+
MorphoWithdrawCollateralParams,
|
|
408
|
+
MorphoWithdrawCollateralParamsAmount,
|
|
409
|
+
MorphoWithdrawCollateralParamsAmountTypedDict,
|
|
410
|
+
MorphoWithdrawCollateralParamsTypedDict,
|
|
411
|
+
)
|
|
374
412
|
from .morphowithdrawcollateralrequest import (
|
|
375
413
|
MorphoWithdrawCollateralRequest,
|
|
376
414
|
MorphoWithdrawCollateralRequestAmount,
|
|
@@ -378,6 +416,7 @@ from .morphowithdrawcollateralrequest import (
|
|
|
378
416
|
MorphoWithdrawCollateralRequestChain,
|
|
379
417
|
MorphoWithdrawCollateralRequestTypedDict,
|
|
380
418
|
)
|
|
419
|
+
from .morphowithdrawparams import MorphoWithdrawParams, MorphoWithdrawParamsTypedDict
|
|
381
420
|
from .morphowithdrawrequest import (
|
|
382
421
|
MorphoWithdrawRequest,
|
|
383
422
|
MorphoWithdrawRequestChain,
|
|
@@ -416,30 +455,51 @@ from .signedauthorization import (
|
|
|
416
455
|
SignedAuthorizationTypedDict,
|
|
417
456
|
)
|
|
418
457
|
from .sky_positionop import SkyPositionRequest, SkyPositionRequestTypedDict
|
|
458
|
+
from .skybuyparams import (
|
|
459
|
+
SkyBuyParams,
|
|
460
|
+
SkyBuyParamsAmount,
|
|
461
|
+
SkyBuyParamsAmountTypedDict,
|
|
462
|
+
SkyBuyParamsTokenIn,
|
|
463
|
+
SkyBuyParamsTypedDict,
|
|
464
|
+
)
|
|
419
465
|
from .skybuyrequest import (
|
|
420
466
|
SkyBuyRequest,
|
|
421
467
|
SkyBuyRequestAmount,
|
|
422
468
|
SkyBuyRequestAmountTypedDict,
|
|
469
|
+
SkyBuyRequestTokenIn,
|
|
423
470
|
SkyBuyRequestTypedDict,
|
|
424
|
-
TokenIn,
|
|
425
471
|
)
|
|
426
472
|
from .skycheckpositionresponse import (
|
|
427
473
|
SkyCheckPositionResponse,
|
|
428
474
|
SkyCheckPositionResponseTypedDict,
|
|
429
475
|
)
|
|
476
|
+
from .skydepositparams import (
|
|
477
|
+
SkyDepositParams,
|
|
478
|
+
SkyDepositParamsAmount,
|
|
479
|
+
SkyDepositParamsAmountTypedDict,
|
|
480
|
+
SkyDepositParamsTypedDict,
|
|
481
|
+
)
|
|
430
482
|
from .skydepositrequest import (
|
|
431
483
|
SkyDepositRequest,
|
|
432
484
|
SkyDepositRequestAmount,
|
|
433
485
|
SkyDepositRequestAmountTypedDict,
|
|
434
486
|
SkyDepositRequestTypedDict,
|
|
435
487
|
)
|
|
488
|
+
from .skysellparams import (
|
|
489
|
+
SkySellParams,
|
|
490
|
+
SkySellParamsAmount,
|
|
491
|
+
SkySellParamsAmountTypedDict,
|
|
492
|
+
SkySellParamsTokenOut,
|
|
493
|
+
SkySellParamsTypedDict,
|
|
494
|
+
)
|
|
436
495
|
from .skysellrequest import (
|
|
437
496
|
SkySellRequest,
|
|
438
497
|
SkySellRequestAmount,
|
|
439
498
|
SkySellRequestAmountTypedDict,
|
|
499
|
+
SkySellRequestTokenOut,
|
|
440
500
|
SkySellRequestTypedDict,
|
|
441
|
-
TokenOut,
|
|
442
501
|
)
|
|
502
|
+
from .skywithdrawparams import SkyWithdrawParams, SkyWithdrawParamsTypedDict
|
|
443
503
|
from .skywithdrawrequest import SkyWithdrawRequest, SkyWithdrawRequestTypedDict
|
|
444
504
|
from .supply import Supply, SupplyTypedDict
|
|
445
505
|
from .swapborrowrate import SwapBorrowRate, SwapBorrowRateTypedDict
|
|
@@ -674,6 +734,12 @@ from .wrapethrequest import (
|
|
|
674
734
|
|
|
675
735
|
|
|
676
736
|
__all__ = [
|
|
737
|
+
"AaveAvgRateChain",
|
|
738
|
+
"AaveAvgRateRequest",
|
|
739
|
+
"AaveAvgRateRequestTypedDict",
|
|
740
|
+
"AaveAvgRateResponse",
|
|
741
|
+
"AaveAvgRateResponseTypedDict",
|
|
742
|
+
"AaveAvgRateToken",
|
|
677
743
|
"AaveBorrowParams",
|
|
678
744
|
"AaveBorrowParamsAmount",
|
|
679
745
|
"AaveBorrowParamsAmountTypedDict",
|
|
@@ -894,6 +960,10 @@ __all__ = [
|
|
|
894
960
|
"LocTypedDict",
|
|
895
961
|
"MarketState",
|
|
896
962
|
"MarketStateTypedDict",
|
|
963
|
+
"MorphoBorrowParams",
|
|
964
|
+
"MorphoBorrowParamsAmount",
|
|
965
|
+
"MorphoBorrowParamsAmountTypedDict",
|
|
966
|
+
"MorphoBorrowParamsTypedDict",
|
|
897
967
|
"MorphoBorrowRequest",
|
|
898
968
|
"MorphoBorrowRequestAmount",
|
|
899
969
|
"MorphoBorrowRequestAmountTypedDict",
|
|
@@ -903,6 +973,10 @@ __all__ = [
|
|
|
903
973
|
"MorphoCheckMarketPositionResponseTypedDict",
|
|
904
974
|
"MorphoCheckVaultPositionResponse",
|
|
905
975
|
"MorphoCheckVaultPositionResponseTypedDict",
|
|
976
|
+
"MorphoDepositParams",
|
|
977
|
+
"MorphoDepositParamsAmount",
|
|
978
|
+
"MorphoDepositParamsAmountTypedDict",
|
|
979
|
+
"MorphoDepositParamsTypedDict",
|
|
906
980
|
"MorphoDepositRequest",
|
|
907
981
|
"MorphoDepositRequestAmount",
|
|
908
982
|
"MorphoDepositRequestAmountTypedDict",
|
|
@@ -920,14 +994,24 @@ __all__ = [
|
|
|
920
994
|
"MorphoMarketsChain",
|
|
921
995
|
"MorphoMarketsRequest",
|
|
922
996
|
"MorphoMarketsRequestTypedDict",
|
|
997
|
+
"MorphoRepayParams",
|
|
998
|
+
"MorphoRepayParamsTypedDict",
|
|
923
999
|
"MorphoRepayRequest",
|
|
924
1000
|
"MorphoRepayRequestChain",
|
|
925
1001
|
"MorphoRepayRequestTypedDict",
|
|
1002
|
+
"MorphoSetVaultAllowanceParams",
|
|
1003
|
+
"MorphoSetVaultAllowanceParamsAmount",
|
|
1004
|
+
"MorphoSetVaultAllowanceParamsAmountTypedDict",
|
|
1005
|
+
"MorphoSetVaultAllowanceParamsTypedDict",
|
|
926
1006
|
"MorphoSetVaultAllowanceRequest",
|
|
927
1007
|
"MorphoSetVaultAllowanceRequestAmount",
|
|
928
1008
|
"MorphoSetVaultAllowanceRequestAmountTypedDict",
|
|
929
1009
|
"MorphoSetVaultAllowanceRequestChain",
|
|
930
1010
|
"MorphoSetVaultAllowanceRequestTypedDict",
|
|
1011
|
+
"MorphoSupplyCollateralParams",
|
|
1012
|
+
"MorphoSupplyCollateralParamsAmount",
|
|
1013
|
+
"MorphoSupplyCollateralParamsAmountTypedDict",
|
|
1014
|
+
"MorphoSupplyCollateralParamsTypedDict",
|
|
931
1015
|
"MorphoSupplyCollateralRequest",
|
|
932
1016
|
"MorphoSupplyCollateralRequestAmount",
|
|
933
1017
|
"MorphoSupplyCollateralRequestAmountTypedDict",
|
|
@@ -941,11 +1025,17 @@ __all__ = [
|
|
|
941
1025
|
"MorphoVaultsChain",
|
|
942
1026
|
"MorphoVaultsRequest",
|
|
943
1027
|
"MorphoVaultsRequestTypedDict",
|
|
1028
|
+
"MorphoWithdrawCollateralParams",
|
|
1029
|
+
"MorphoWithdrawCollateralParamsAmount",
|
|
1030
|
+
"MorphoWithdrawCollateralParamsAmountTypedDict",
|
|
1031
|
+
"MorphoWithdrawCollateralParamsTypedDict",
|
|
944
1032
|
"MorphoWithdrawCollateralRequest",
|
|
945
1033
|
"MorphoWithdrawCollateralRequestAmount",
|
|
946
1034
|
"MorphoWithdrawCollateralRequestAmountTypedDict",
|
|
947
1035
|
"MorphoWithdrawCollateralRequestChain",
|
|
948
1036
|
"MorphoWithdrawCollateralRequestTypedDict",
|
|
1037
|
+
"MorphoWithdrawParams",
|
|
1038
|
+
"MorphoWithdrawParamsTypedDict",
|
|
949
1039
|
"MorphoWithdrawRequest",
|
|
950
1040
|
"MorphoWithdrawRequestChain",
|
|
951
1041
|
"MorphoWithdrawRequestTypedDict",
|
|
@@ -974,22 +1064,40 @@ __all__ = [
|
|
|
974
1064
|
"SecurityTypedDict",
|
|
975
1065
|
"SignedAuthorization",
|
|
976
1066
|
"SignedAuthorizationTypedDict",
|
|
1067
|
+
"SkyBuyParams",
|
|
1068
|
+
"SkyBuyParamsAmount",
|
|
1069
|
+
"SkyBuyParamsAmountTypedDict",
|
|
1070
|
+
"SkyBuyParamsTokenIn",
|
|
1071
|
+
"SkyBuyParamsTypedDict",
|
|
977
1072
|
"SkyBuyRequest",
|
|
978
1073
|
"SkyBuyRequestAmount",
|
|
979
1074
|
"SkyBuyRequestAmountTypedDict",
|
|
1075
|
+
"SkyBuyRequestTokenIn",
|
|
980
1076
|
"SkyBuyRequestTypedDict",
|
|
981
1077
|
"SkyCheckPositionResponse",
|
|
982
1078
|
"SkyCheckPositionResponseTypedDict",
|
|
1079
|
+
"SkyDepositParams",
|
|
1080
|
+
"SkyDepositParamsAmount",
|
|
1081
|
+
"SkyDepositParamsAmountTypedDict",
|
|
1082
|
+
"SkyDepositParamsTypedDict",
|
|
983
1083
|
"SkyDepositRequest",
|
|
984
1084
|
"SkyDepositRequestAmount",
|
|
985
1085
|
"SkyDepositRequestAmountTypedDict",
|
|
986
1086
|
"SkyDepositRequestTypedDict",
|
|
987
1087
|
"SkyPositionRequest",
|
|
988
1088
|
"SkyPositionRequestTypedDict",
|
|
1089
|
+
"SkySellParams",
|
|
1090
|
+
"SkySellParamsAmount",
|
|
1091
|
+
"SkySellParamsAmountTypedDict",
|
|
1092
|
+
"SkySellParamsTokenOut",
|
|
1093
|
+
"SkySellParamsTypedDict",
|
|
989
1094
|
"SkySellRequest",
|
|
990
1095
|
"SkySellRequestAmount",
|
|
991
1096
|
"SkySellRequestAmountTypedDict",
|
|
1097
|
+
"SkySellRequestTokenOut",
|
|
992
1098
|
"SkySellRequestTypedDict",
|
|
1099
|
+
"SkyWithdrawParams",
|
|
1100
|
+
"SkyWithdrawParamsTypedDict",
|
|
993
1101
|
"SkyWithdrawRequest",
|
|
994
1102
|
"SkyWithdrawRequestTypedDict",
|
|
995
1103
|
"Supply",
|
|
@@ -1012,10 +1120,8 @@ __all__ = [
|
|
|
1012
1120
|
"TokenBalanceTokenTypedDict",
|
|
1013
1121
|
"TokenBalanceTypedDict",
|
|
1014
1122
|
"TokenEnum",
|
|
1015
|
-
"TokenIn",
|
|
1016
1123
|
"TokenInfo",
|
|
1017
1124
|
"TokenInfoTypedDict",
|
|
1018
|
-
"TokenOut",
|
|
1019
1125
|
"TokenPriceChain",
|
|
1020
1126
|
"TokenPriceRequest",
|
|
1021
1127
|
"TokenPriceRequestTypedDict",
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import BaseModel
|
|
5
|
+
from compassapisdk.utils import FieldMetadata, QueryParamMetadata
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing_extensions import Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AaveAvgRateChain(str, Enum):
|
|
11
|
+
r"""The chain to use."""
|
|
12
|
+
|
|
13
|
+
BASE_MAINNET = "base:mainnet"
|
|
14
|
+
ETHEREUM_MAINNET = "ethereum:mainnet"
|
|
15
|
+
ARBITRUM_MAINNET = "arbitrum:mainnet"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AaveAvgRateToken(str, Enum):
|
|
19
|
+
r"""A class representing the token.
|
|
20
|
+
|
|
21
|
+
This class is used to represent the token in the system. Notice individual
|
|
22
|
+
endpoints' documentation where per chain tokens are presented.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
ONE_INCH = "1INCH"
|
|
26
|
+
AAVE = "AAVE"
|
|
27
|
+
BAL = "BAL"
|
|
28
|
+
CB_BTC = "cbBTC"
|
|
29
|
+
CB_ETH = "cbETH"
|
|
30
|
+
CRV = "CRV"
|
|
31
|
+
CRV_USD = "crvUSD"
|
|
32
|
+
DAI = "DAI"
|
|
33
|
+
ENS = "ENS"
|
|
34
|
+
ET_HX = "ETHx"
|
|
35
|
+
FRAX = "FRAX"
|
|
36
|
+
FXS = "FXS"
|
|
37
|
+
GHO = "GHO"
|
|
38
|
+
KNC = "KNC"
|
|
39
|
+
LDO = "LDO"
|
|
40
|
+
LINK = "LINK"
|
|
41
|
+
LUSD = "LUSD"
|
|
42
|
+
MKR = "MKR"
|
|
43
|
+
OS_ETH = "osETH"
|
|
44
|
+
PYUSD = "PYUSD"
|
|
45
|
+
R_ETH = "rETH"
|
|
46
|
+
RPL = "RPL"
|
|
47
|
+
RS_ETH = "rsETH"
|
|
48
|
+
S_DAI = "sDAI"
|
|
49
|
+
SNX = "SNX"
|
|
50
|
+
STG = "STG"
|
|
51
|
+
S_US_DE = "sUSDe"
|
|
52
|
+
T_BTC = "tBTC"
|
|
53
|
+
UNI = "UNI"
|
|
54
|
+
USDC = "USDC"
|
|
55
|
+
US_DE = "USDe"
|
|
56
|
+
USDS = "USDS"
|
|
57
|
+
USDT = "USDT"
|
|
58
|
+
WBTC = "WBTC"
|
|
59
|
+
WE_ETH = "weETH"
|
|
60
|
+
WETH = "WETH"
|
|
61
|
+
WST_ETH = "wstETH"
|
|
62
|
+
ARB = "ARB"
|
|
63
|
+
EURS = "EURS"
|
|
64
|
+
MAI = "MAI"
|
|
65
|
+
USD_CE = "USDCe"
|
|
66
|
+
AERO = "AERO"
|
|
67
|
+
EUR = "EUR"
|
|
68
|
+
VIRTUAL = "VIRTUAL"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class AaveAvgRateRequestTypedDict(TypedDict):
|
|
72
|
+
chain: AaveAvgRateChain
|
|
73
|
+
r"""The chain to use."""
|
|
74
|
+
token: AaveAvgRateToken
|
|
75
|
+
r"""The symbol of the asset to fetch the user's position on.."""
|
|
76
|
+
days: int
|
|
77
|
+
r"""The number of days to fetch the user's position on."""
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class AaveAvgRateRequest(BaseModel):
|
|
81
|
+
chain: Annotated[
|
|
82
|
+
AaveAvgRateChain,
|
|
83
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
84
|
+
] = AaveAvgRateChain.ETHEREUM_MAINNET
|
|
85
|
+
r"""The chain to use."""
|
|
86
|
+
|
|
87
|
+
token: Annotated[
|
|
88
|
+
AaveAvgRateToken,
|
|
89
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
90
|
+
] = AaveAvgRateToken.USDC
|
|
91
|
+
r"""The symbol of the asset to fetch the user's position on.."""
|
|
92
|
+
|
|
93
|
+
days: Annotated[
|
|
94
|
+
int, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
95
|
+
] = 7
|
|
96
|
+
r"""The number of days to fetch the user's position on."""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import BaseModel
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AaveAvgRateResponseTypedDict(TypedDict):
|
|
9
|
+
supply_apy_variable_rate: float
|
|
10
|
+
r"""Variable rate APY for deposits."""
|
|
11
|
+
supply_apr_variable_rate: float
|
|
12
|
+
r"""Variable rate APR for deposits."""
|
|
13
|
+
borrow_apy_variable_rate: float
|
|
14
|
+
r"""Variable rate APY for loans."""
|
|
15
|
+
borrow_apr_variable_rate: float
|
|
16
|
+
r"""Variable rate APR for loans."""
|
|
17
|
+
borrow_apy_fixed_rate: float
|
|
18
|
+
r"""Fixed rate APY for loans."""
|
|
19
|
+
borrow_apr_fixed_rate: float
|
|
20
|
+
r"""Fixed rate APR for loans."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AaveAvgRateResponse(BaseModel):
|
|
24
|
+
supply_apy_variable_rate: float
|
|
25
|
+
r"""Variable rate APY for deposits."""
|
|
26
|
+
|
|
27
|
+
supply_apr_variable_rate: float
|
|
28
|
+
r"""Variable rate APR for deposits."""
|
|
29
|
+
|
|
30
|
+
borrow_apy_variable_rate: float
|
|
31
|
+
r"""Variable rate APY for loans."""
|
|
32
|
+
|
|
33
|
+
borrow_apr_variable_rate: float
|
|
34
|
+
r"""Variable rate APR for loans."""
|
|
35
|
+
|
|
36
|
+
borrow_apy_fixed_rate: float
|
|
37
|
+
r"""Fixed rate APY for loans."""
|
|
38
|
+
|
|
39
|
+
borrow_apr_fixed_rate: float
|
|
40
|
+
r"""Fixed rate APR for loans."""
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing import Union
|
|
13
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MorphoBorrowParamsAmountTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoBorrowParamsAmountTypedDict", Union[float, str]
|
|
18
|
+
)
|
|
19
|
+
r"""Amount of the token to borrow from the market."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoBorrowParamsAmount = TypeAliasType("MorphoBorrowParamsAmount", Union[float, str])
|
|
23
|
+
r"""Amount of the token to borrow from the market."""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MorphoBorrowParamsTypedDict(TypedDict):
|
|
27
|
+
amount: MorphoBorrowParamsAmountTypedDict
|
|
28
|
+
r"""Amount of the token to borrow from the market."""
|
|
29
|
+
unique_market_key: str
|
|
30
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
31
|
+
on_behalf_of: NotRequired[Nullable[str]]
|
|
32
|
+
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
33
|
+
receiver: NotRequired[Nullable[str]]
|
|
34
|
+
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction sender."""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class MorphoBorrowParams(BaseModel):
|
|
38
|
+
amount: MorphoBorrowParamsAmount
|
|
39
|
+
r"""Amount of the token to borrow from the market."""
|
|
40
|
+
|
|
41
|
+
unique_market_key: str
|
|
42
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
43
|
+
|
|
44
|
+
on_behalf_of: OptionalNullable[str] = UNSET
|
|
45
|
+
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
46
|
+
|
|
47
|
+
receiver: OptionalNullable[str] = UNSET
|
|
48
|
+
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction sender."""
|
|
49
|
+
|
|
50
|
+
@model_serializer(mode="wrap")
|
|
51
|
+
def serialize_model(self, handler):
|
|
52
|
+
optional_fields = ["on_behalf_of", "receiver"]
|
|
53
|
+
nullable_fields = ["on_behalf_of", "receiver"]
|
|
54
|
+
null_default_fields = []
|
|
55
|
+
|
|
56
|
+
serialized = handler(self)
|
|
57
|
+
|
|
58
|
+
m = {}
|
|
59
|
+
|
|
60
|
+
for n, f in type(self).model_fields.items():
|
|
61
|
+
k = f.alias or n
|
|
62
|
+
val = serialized.get(k)
|
|
63
|
+
serialized.pop(k, None)
|
|
64
|
+
|
|
65
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
66
|
+
is_set = (
|
|
67
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
68
|
+
or k in null_default_fields
|
|
69
|
+
) # pylint: disable=no-member
|
|
70
|
+
|
|
71
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
72
|
+
m[k] = val
|
|
73
|
+
elif val != UNSET_SENTINEL and (
|
|
74
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
75
|
+
):
|
|
76
|
+
m[k] = val
|
|
77
|
+
|
|
78
|
+
return m
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing import Union
|
|
13
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MorphoDepositParamsAmountTypedDict = TypeAliasType(
|
|
17
|
+
"MorphoDepositParamsAmountTypedDict", Union[float, str]
|
|
18
|
+
)
|
|
19
|
+
r"""The amount of tokens to deposit into the vault."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
MorphoDepositParamsAmount = TypeAliasType(
|
|
23
|
+
"MorphoDepositParamsAmount", Union[float, str]
|
|
24
|
+
)
|
|
25
|
+
r"""The amount of tokens to deposit into the vault."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class MorphoDepositParamsTypedDict(TypedDict):
|
|
29
|
+
vault_address: str
|
|
30
|
+
r"""The vault address you are depositing to."""
|
|
31
|
+
amount: MorphoDepositParamsAmountTypedDict
|
|
32
|
+
r"""The amount of tokens to deposit into the vault."""
|
|
33
|
+
receiver: NotRequired[Nullable[str]]
|
|
34
|
+
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class MorphoDepositParams(BaseModel):
|
|
38
|
+
vault_address: str
|
|
39
|
+
r"""The vault address you are depositing to."""
|
|
40
|
+
|
|
41
|
+
amount: MorphoDepositParamsAmount
|
|
42
|
+
r"""The amount of tokens to deposit into the vault."""
|
|
43
|
+
|
|
44
|
+
receiver: OptionalNullable[str] = UNSET
|
|
45
|
+
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
46
|
+
|
|
47
|
+
@model_serializer(mode="wrap")
|
|
48
|
+
def serialize_model(self, handler):
|
|
49
|
+
optional_fields = ["receiver"]
|
|
50
|
+
nullable_fields = ["receiver"]
|
|
51
|
+
null_default_fields = []
|
|
52
|
+
|
|
53
|
+
serialized = handler(self)
|
|
54
|
+
|
|
55
|
+
m = {}
|
|
56
|
+
|
|
57
|
+
for n, f in type(self).model_fields.items():
|
|
58
|
+
k = f.alias or n
|
|
59
|
+
val = serialized.get(k)
|
|
60
|
+
serialized.pop(k, None)
|
|
61
|
+
|
|
62
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
63
|
+
is_set = (
|
|
64
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
65
|
+
or k in null_default_fields
|
|
66
|
+
) # pylint: disable=no-member
|
|
67
|
+
|
|
68
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
69
|
+
m[k] = val
|
|
70
|
+
elif val != UNSET_SENTINEL and (
|
|
71
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
72
|
+
):
|
|
73
|
+
m[k] = val
|
|
74
|
+
|
|
75
|
+
return m
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import (
|
|
5
|
+
BaseModel,
|
|
6
|
+
Nullable,
|
|
7
|
+
OptionalNullable,
|
|
8
|
+
UNSET,
|
|
9
|
+
UNSET_SENTINEL,
|
|
10
|
+
)
|
|
11
|
+
from pydantic import model_serializer
|
|
12
|
+
from typing import Any
|
|
13
|
+
from typing_extensions import NotRequired, TypedDict
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class MorphoRepayParamsTypedDict(TypedDict):
|
|
17
|
+
amount: Any
|
|
18
|
+
r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
|
|
19
|
+
unique_market_key: str
|
|
20
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
21
|
+
on_behalf_of: NotRequired[Nullable[str]]
|
|
22
|
+
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
23
|
+
callback_data: NotRequired[Nullable[bytes]]
|
|
24
|
+
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MorphoRepayParams(BaseModel):
|
|
28
|
+
amount: Any
|
|
29
|
+
r"""Amount of the token to repay to the market. If set to 'ALL', all debt plus interest will be paid back if the user has a sufficient token balance in their wallet."""
|
|
30
|
+
|
|
31
|
+
unique_market_key: str
|
|
32
|
+
r"""The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint."""
|
|
33
|
+
|
|
34
|
+
on_behalf_of: OptionalNullable[str] = UNSET
|
|
35
|
+
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
36
|
+
|
|
37
|
+
callback_data: OptionalNullable[bytes] = UNSET
|
|
38
|
+
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
39
|
+
|
|
40
|
+
@model_serializer(mode="wrap")
|
|
41
|
+
def serialize_model(self, handler):
|
|
42
|
+
optional_fields = ["on_behalf_of", "callback_data"]
|
|
43
|
+
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
44
|
+
null_default_fields = []
|
|
45
|
+
|
|
46
|
+
serialized = handler(self)
|
|
47
|
+
|
|
48
|
+
m = {}
|
|
49
|
+
|
|
50
|
+
for n, f in type(self).model_fields.items():
|
|
51
|
+
k = f.alias or n
|
|
52
|
+
val = serialized.get(k)
|
|
53
|
+
serialized.pop(k, None)
|
|
54
|
+
|
|
55
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
56
|
+
is_set = (
|
|
57
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
58
|
+
or k in null_default_fields
|
|
59
|
+
) # pylint: disable=no-member
|
|
60
|
+
|
|
61
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
62
|
+
m[k] = val
|
|
63
|
+
elif val != UNSET_SENTINEL and (
|
|
64
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
65
|
+
):
|
|
66
|
+
m[k] = val
|
|
67
|
+
|
|
68
|
+
return m
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from compassapisdk.types import BaseModel
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import TypeAliasType, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
MorphoSetVaultAllowanceParamsAmountTypedDict = TypeAliasType(
|
|
10
|
+
"MorphoSetVaultAllowanceParamsAmountTypedDict", Union[float, str]
|
|
11
|
+
)
|
|
12
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
MorphoSetVaultAllowanceParamsAmount = TypeAliasType(
|
|
16
|
+
"MorphoSetVaultAllowanceParamsAmount", Union[float, str]
|
|
17
|
+
)
|
|
18
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class MorphoSetVaultAllowanceParamsTypedDict(TypedDict):
|
|
22
|
+
vault_address: str
|
|
23
|
+
r"""The vault address you are increasing the allowance for."""
|
|
24
|
+
amount: MorphoSetVaultAllowanceParamsAmountTypedDict
|
|
25
|
+
r"""The amount of tokens to increase the allowance by."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class MorphoSetVaultAllowanceParams(BaseModel):
|
|
29
|
+
vault_address: str
|
|
30
|
+
r"""The vault address you are increasing the allowance for."""
|
|
31
|
+
|
|
32
|
+
amount: MorphoSetVaultAllowanceParamsAmount
|
|
33
|
+
r"""The amount of tokens to increase the allowance by."""
|