compass_api_sdk 0.9.35__py3-none-any.whl → 2.0.21rc1__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.
Files changed (322) hide show
  1. compass_api_sdk/_hooks/sdkhooks.py +4 -4
  2. compass_api_sdk/_hooks/types.py +1 -2
  3. compass_api_sdk/_version.py +3 -3
  4. compass_api_sdk/aave_v3.py +971 -728
  5. compass_api_sdk/aerodrome_slipstream.py +367 -390
  6. compass_api_sdk/basesdk.py +21 -5
  7. compass_api_sdk/bridge.py +536 -0
  8. compass_api_sdk/earn.py +1780 -0
  9. compass_api_sdk/erc_4626_vaults.py +127 -154
  10. compass_api_sdk/errors/__init__.py +38 -4
  11. compass_api_sdk/errors/apierror.py +32 -14
  12. compass_api_sdk/errors/compassapierror.py +30 -0
  13. compass_api_sdk/errors/httpvalidationerror.py +15 -8
  14. compass_api_sdk/errors/mintpreparenotfoundresponse_error.py +49 -0
  15. compass_api_sdk/errors/no_response_error.py +17 -0
  16. compass_api_sdk/errors/responsevalidationerror.py +27 -0
  17. compass_api_sdk/{token_sdk.py → ethena.py} +318 -293
  18. compass_api_sdk/gas_sponsorship.py +446 -0
  19. compass_api_sdk/httpclient.py +0 -1
  20. compass_api_sdk/models/__init__.py +1701 -945
  21. compass_api_sdk/models/aaveborrowparams.py +4 -13
  22. compass_api_sdk/models/aaveborrowrequest.py +19 -19
  23. compass_api_sdk/models/aavehistoricaltransactionsresponse.py +8 -8
  24. compass_api_sdk/models/aavelooprequest.py +88 -36
  25. compass_api_sdk/models/aaveposition.py +49 -0
  26. compass_api_sdk/models/aaverepayparams.py +4 -13
  27. compass_api_sdk/models/aaverepayrequest.py +19 -19
  28. compass_api_sdk/models/aavereserveoverviewresponse.py +34 -3
  29. compass_api_sdk/models/aavesetuseremodeparams.py +28 -0
  30. compass_api_sdk/models/aavesetuseremoderequest.py +48 -0
  31. compass_api_sdk/models/aavesupplyparams.py +4 -13
  32. compass_api_sdk/models/aavesupplyrequest.py +19 -19
  33. compass_api_sdk/models/aavesupportedtokenmetadata.py +30 -0
  34. compass_api_sdk/models/aavesupportedtokensresponse.py +20 -0
  35. compass_api_sdk/models/aavevenue.py +27 -0
  36. compass_api_sdk/models/aavewithdrawparams.py +4 -13
  37. compass_api_sdk/models/aavewithdrawrequest.py +19 -19
  38. compass_api_sdk/models/aerodromeenrichedposition.py +109 -0
  39. compass_api_sdk/models/aerodromelppositionsresponse.py +10 -7
  40. compass_api_sdk/models/aerodromeslipstreambuyexactlyparams.py +8 -25
  41. compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +21 -31
  42. compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +13 -6
  43. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionparams.py +8 -25
  44. compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +21 -31
  45. compass_api_sdk/models/aerodromeslipstreampoolpriceresponse.py +8 -25
  46. compass_api_sdk/models/aerodromeslipstreamsellexactlyparams.py +8 -25
  47. compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +20 -30
  48. compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +13 -6
  49. compass_api_sdk/models/approvetransferrequest.py +32 -0
  50. compass_api_sdk/models/{curator.py → approvetransferresponse.py} +12 -13
  51. compass_api_sdk/models/apy.py +3 -0
  52. compass_api_sdk/models/batchedsafeoperationsresponse_input.py +52 -0
  53. compass_api_sdk/models/batchedsafeoperationsresponse_output.py +52 -0
  54. compass_api_sdk/models/batcheduseroperationsrequest.py +24 -9
  55. compass_api_sdk/models/bundlertransactionresponse.py +17 -0
  56. compass_api_sdk/models/chain.py +3 -3
  57. compass_api_sdk/models/chainmarketinfo.py +29 -0
  58. compass_api_sdk/models/{compass_api_backend_models_generic_read_response_portfolio_tokenbalance.py → compass_api_backend_v1_models_generic_read_response_portfolio_tokenbalance.py} +6 -15
  59. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_apydata.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_apydata.py} +2 -2
  60. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_asset.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_asset.py} +2 -2
  61. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_marketstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_marketstate.py} +4 -2
  62. compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultposition.py +30 -0
  63. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_check_user_position_vaultstate.py → compass_api_backend_v1_models_morpho_read_response_check_user_position_vaultstate.py} +2 -2
  64. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_apydata.py → compass_api_backend_v1_models_morpho_read_response_get_market_apydata.py} +2 -2
  65. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vault_asset.py → compass_api_backend_v1_models_morpho_read_response_get_market_asset.py} +5 -5
  66. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_market_marketstate.py} +4 -2
  67. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_asset.py → compass_api_backend_v1_models_morpho_read_response_get_markets_asset.py} +2 -2
  68. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_markets_marketstate.py → compass_api_backend_v1_models_morpho_read_response_get_markets_marketstate.py} +2 -2
  69. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_vaults_asset.py → compass_api_backend_v1_models_morpho_read_response_get_vaults_asset.py} +2 -2
  70. compass_api_sdk/models/compass_api_backend_v1_models_morpho_read_response_get_vaults_vaultstate.py +73 -0
  71. compass_api_sdk/models/compass_api_backend_v1_models_pendle_read_response_market_userposition.py +82 -0
  72. compass_api_sdk/models/{compass_api_backend_models_pendle_read_response_positions_tokenbalance.py → compass_api_backend_v1_models_pendle_read_response_positions_tokenbalance.py} +2 -2
  73. compass_api_sdk/models/compass_api_backend_v1_models_vaults_read_response_vault_userposition.py +20 -0
  74. compass_api_sdk/models/compass_api_backend_v1_models_wildcat_read_response_market_userposition.py +22 -0
  75. compass_api_sdk/models/compass_api_backend_v2_models_earn_read_response_positions_vaultposition.py +49 -0
  76. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712domain.py +36 -0
  77. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_2_typed_data_eip712types.py +36 -0
  78. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712domain.py +37 -0
  79. compass_api_sdk/models/compass_api_backend_v2_models_gas_sponsorship_permit_typed_data_eip712types.py +32 -0
  80. compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712domain.py +29 -0
  81. compass_api_sdk/models/compass_api_backend_v2_models_safe_transact_response_batched_safe_operations_eip712types.py +34 -0
  82. compass_api_sdk/models/cooldownposition.py +35 -0
  83. compass_api_sdk/models/createaccountrequest.py +40 -0
  84. compass_api_sdk/models/createaccountresponse.py +56 -0
  85. compass_api_sdk/models/depositforburnrequest.py +77 -0
  86. compass_api_sdk/models/depositforburnresponse.py +100 -0
  87. compass_api_sdk/models/details.py +44 -7
  88. compass_api_sdk/models/earnmanageparams.py +74 -0
  89. compass_api_sdk/models/earnmanagerequest.py +130 -0
  90. compass_api_sdk/models/{compass_api_backend_models_morpho_read_response_get_market_asset.py → earnmanageresponse.py} +13 -21
  91. compass_api_sdk/models/earnpositionsresponse.py +39 -0
  92. compass_api_sdk/models/earnswapparams.py +74 -0
  93. compass_api_sdk/models/earnswaprequest.py +90 -0
  94. compass_api_sdk/models/earnswapresponse.py +55 -0
  95. compass_api_sdk/models/earntransferrequest.py +104 -0
  96. compass_api_sdk/models/earntransferresponse.py +71 -0
  97. compass_api_sdk/models/eip712domainfield.py +20 -0
  98. compass_api_sdk/models/eip712field.py +20 -0
  99. compass_api_sdk/models/ethenadepositparams.py +82 -0
  100. compass_api_sdk/models/ethenadepositrequest.py +100 -0
  101. compass_api_sdk/models/ethenagetvaultresponse.py +109 -0
  102. compass_api_sdk/models/ethenarequesttowithdrawparams.py +28 -0
  103. compass_api_sdk/models/ethenarequesttowithdrawrequest.py +46 -0
  104. compass_api_sdk/models/ethenarequesttowithdrawtransactionresponse.py +37 -0
  105. compass_api_sdk/models/ethenaunstakeparams.py +65 -0
  106. compass_api_sdk/models/ethenaunstakerequest.py +83 -0
  107. compass_api_sdk/models/fee.py +42 -0
  108. compass_api_sdk/models/listaavemarketsresponse.py +21 -0
  109. compass_api_sdk/models/marketposition.py +5 -5
  110. compass_api_sdk/models/maxsupplyapyinfo.py +34 -0
  111. compass_api_sdk/models/mintpreparecompletedresponse.py +46 -0
  112. compass_api_sdk/models/mintpreparependingresponse.py +65 -0
  113. compass_api_sdk/models/mintpreparereadyresponse.py +43 -0
  114. compass_api_sdk/models/mintpreparerequest.py +25 -0
  115. compass_api_sdk/models/morphoborrowrequest.py +9 -3
  116. compass_api_sdk/models/morphocheckuserpositionresponse.py +9 -3
  117. compass_api_sdk/models/morphodepositrequest.py +9 -3
  118. compass_api_sdk/models/morphogetmarketresponse.py +72 -31
  119. compass_api_sdk/models/morphomarket.py +26 -20
  120. compass_api_sdk/models/morphorepayrequest.py +14 -3
  121. compass_api_sdk/models/morphosupplycollateralrequest.py +14 -3
  122. compass_api_sdk/models/morphovault.py +10 -10
  123. compass_api_sdk/models/morphowithdrawcollateralrequest.py +9 -3
  124. compass_api_sdk/models/morphowithdrawrequest.py +9 -3
  125. compass_api_sdk/models/movement10percent.py +65 -10
  126. compass_api_sdk/models/multicallauthorizationrequest.py +9 -9
  127. compass_api_sdk/models/multicallexecuterequest.py +59 -11
  128. compass_api_sdk/models/odosswapparams.py +52 -0
  129. compass_api_sdk/models/odosswaprequest.py +72 -0
  130. compass_api_sdk/models/odostransactionresponse.py +37 -0
  131. compass_api_sdk/models/oneinchswapparams.py +59 -0
  132. compass_api_sdk/models/openposition.py +7 -7
  133. compass_api_sdk/models/operationtype.py +11 -0
  134. compass_api_sdk/models/pendlegetmarketresponse.py +52 -2
  135. compass_api_sdk/models/pendlemanageliquidityparams.py +68 -0
  136. compass_api_sdk/models/pendlemanageliquidityrequest.py +87 -0
  137. compass_api_sdk/models/pendleredeemyieldrequest.py +15 -6
  138. compass_api_sdk/models/pendletradeptparams.py +68 -0
  139. compass_api_sdk/models/pendletradeptrequest.py +87 -0
  140. compass_api_sdk/models/pendletradeytparams.py +68 -0
  141. compass_api_sdk/models/pendletradeytrequest.py +87 -0
  142. compass_api_sdk/models/pendletxresponse.py +36 -0
  143. compass_api_sdk/models/permit2typeddata_input.py +46 -0
  144. compass_api_sdk/models/permit2typeddata_output.py +46 -0
  145. compass_api_sdk/models/permitfield.py +20 -0
  146. compass_api_sdk/models/permitmessage.py +39 -0
  147. compass_api_sdk/models/permittransferfrommessage.py +29 -0
  148. compass_api_sdk/models/permittypeddataresponse_input.py +50 -0
  149. compass_api_sdk/models/permittypeddataresponse_output.py +50 -0
  150. compass_api_sdk/models/portfolio.py +5 -5
  151. compass_api_sdk/models/protocol.py +13 -0
  152. compass_api_sdk/models/reserve.py +6 -15
  153. compass_api_sdk/models/safetransactionparams.py +78 -0
  154. compass_api_sdk/models/safetransactionresponse.py +28 -0
  155. compass_api_sdk/models/safetxfield.py +20 -0
  156. compass_api_sdk/models/safetxmessage.py +66 -0
  157. compass_api_sdk/models/setallowanceparams.py +5 -16
  158. compass_api_sdk/models/setallowancerequest.py +19 -22
  159. compass_api_sdk/models/skybuyrequest.py +12 -9
  160. compass_api_sdk/models/skydepositrequest.py +13 -9
  161. compass_api_sdk/models/skysellrequest.py +12 -9
  162. compass_api_sdk/models/skywithdrawrequest.py +13 -9
  163. compass_api_sdk/models/sponsorgasrequest.py +71 -0
  164. compass_api_sdk/models/sponsorgasresponse.py +14 -0
  165. compass_api_sdk/models/supportedchaininfo.py +19 -0
  166. compass_api_sdk/models/tokenbalanceresponse.py +5 -15
  167. compass_api_sdk/models/tokenconfig.py +30 -0
  168. compass_api_sdk/models/tokenlistresponse.py +21 -0
  169. compass_api_sdk/models/tokenmarketdata.py +27 -0
  170. compass_api_sdk/models/tokenpermissions.py +20 -0
  171. compass_api_sdk/models/tokentransferparams.py +54 -0
  172. compass_api_sdk/models/tokentransferrequest.py +23 -27
  173. compass_api_sdk/models/transactionresponse.py +31 -0
  174. compass_api_sdk/models/{compass_api_backend_models_vaults_read_response_vault_asset.py → underlyingtoken.py} +2 -2
  175. compass_api_sdk/models/uniswapbuyexactlyparams.py +19 -41
  176. compass_api_sdk/models/uniswapbuyexactlyrequest.py +31 -44
  177. compass_api_sdk/models/uniswapbuyexactlytransactionresponse.py +37 -0
  178. compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +15 -6
  179. compass_api_sdk/models/uniswapmintliquidityprovisionparams.py +8 -25
  180. compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +23 -31
  181. compass_api_sdk/models/uniswappoolpriceresponse.py +8 -25
  182. compass_api_sdk/models/uniswappositionssolidityresponse.py +42 -2
  183. compass_api_sdk/models/uniswapsellexactlyparams.py +19 -41
  184. compass_api_sdk/models/uniswapsellexactlyrequest.py +31 -44
  185. compass_api_sdk/models/uniswapsellexactlytransactionresponse.py +37 -0
  186. compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +15 -6
  187. compass_api_sdk/models/unsignedmulticalltransaction.py +44 -13
  188. compass_api_sdk/models/unsignedtransaction.py +44 -13
  189. compass_api_sdk/models/unwrapwethrequest.py +15 -6
  190. compass_api_sdk/models/useroperation.py +61 -49
  191. compass_api_sdk/models/useroperationresponse.py +2 -2
  192. compass_api_sdk/models/userstate.py +3 -3
  193. compass_api_sdk/models/v1_aave_aave_supported_tokensop.py +69 -0
  194. compass_api_sdk/models/v1_aave_avg_rateop.py +83 -0
  195. compass_api_sdk/models/{aave_historical_transactionsop.py → v1_aave_historical_transactionsop.py} +21 -25
  196. compass_api_sdk/models/v1_aave_liquidity_changeop.py +45 -0
  197. compass_api_sdk/models/{pendle_marketop.py → v1_aave_rateop.py} +16 -20
  198. compass_api_sdk/models/v1_aave_reserve_overviewop.py +76 -0
  199. compass_api_sdk/models/v1_aave_std_rateop.py +83 -0
  200. compass_api_sdk/models/v1_aave_token_priceop.py +76 -0
  201. compass_api_sdk/models/v1_aave_user_position_per_tokenop.py +83 -0
  202. compass_api_sdk/models/{aave_user_position_summaryop.py → v1_aave_user_position_summaryop.py} +16 -20
  203. compass_api_sdk/models/v1_aerodrome_slipstream_liquidity_provision_positionsop.py +76 -0
  204. compass_api_sdk/models/v1_aerodrome_slipstream_pool_priceop.py +45 -0
  205. compass_api_sdk/models/v1_ethena_vaultop.py +75 -0
  206. compass_api_sdk/models/{generic_allowanceop.py → v1_generic_allowanceop.py} +28 -41
  207. compass_api_sdk/models/{generic_ensop.py → v1_generic_ensop.py} +8 -14
  208. compass_api_sdk/models/{generic_portfolioop.py → v1_generic_portfolioop.py} +10 -14
  209. compass_api_sdk/models/v1_generic_supported_chainsop.py +57 -0
  210. compass_api_sdk/models/{morpho_market_positionop.py → v1_morpho_market_positionop.py} +11 -10
  211. compass_api_sdk/models/{morpho_marketop.py → v1_morpho_marketop.py} +10 -9
  212. compass_api_sdk/models/{morpho_marketsop.py → v1_morpho_marketsop.py} +13 -12
  213. compass_api_sdk/models/{morpho_user_positionop.py → v1_morpho_user_positionop.py} +10 -9
  214. compass_api_sdk/models/{vaults_vaultop.py → v1_morpho_vaultop.py} +16 -20
  215. compass_api_sdk/models/{morpho_vaultsop.py → v1_morpho_vaultsop.py} +11 -10
  216. compass_api_sdk/models/{pendle_positionop.py → v1_pendle_marketop.py} +24 -27
  217. compass_api_sdk/models/v1_pendle_marketsop.py +24 -0
  218. compass_api_sdk/models/{pendle_positionsop.py → v1_pendle_positionsop.py} +10 -14
  219. compass_api_sdk/models/v1_sky_positionop.py +29 -0
  220. compass_api_sdk/models/v1_token_balanceop.py +38 -0
  221. compass_api_sdk/models/v1_token_listop.py +24 -0
  222. compass_api_sdk/models/v1_token_priceop.py +76 -0
  223. compass_api_sdk/models/v1_transaction_bundler_aave_loopop.py +27 -0
  224. compass_api_sdk/models/{uniswap_liquidity_provision_in_rangeop.py → v1_uniswap_liquidity_provision_in_rangeop.py} +10 -14
  225. compass_api_sdk/models/{uniswap_liquidity_provision_positionsop.py → v1_uniswap_liquidity_provision_positionsop.py} +10 -14
  226. compass_api_sdk/models/v1_uniswap_pool_priceop.py +58 -0
  227. compass_api_sdk/models/v1_uniswap_quote_buy_exactlyop.py +79 -0
  228. compass_api_sdk/models/v1_uniswap_quote_sell_exactlyop.py +79 -0
  229. compass_api_sdk/models/v1_vaults_vaultop.py +84 -0
  230. compass_api_sdk/models/v1_wildcat_marketop.py +82 -0
  231. compass_api_sdk/models/v2_cctp_mintop.py +47 -0
  232. compass_api_sdk/models/v2_earn_aave_marketsop.py +57 -0
  233. compass_api_sdk/models/v2_earn_positionsop.py +56 -0
  234. compass_api_sdk/models/v2_earn_vaultsop.py +105 -0
  235. compass_api_sdk/models/v2bundlerequest.py +33 -0
  236. compass_api_sdk/models/v2bundleresponse.py +67 -0
  237. compass_api_sdk/models/v2useroperation.py +37 -0
  238. compass_api_sdk/models/vault.py +14 -14
  239. compass_api_sdk/models/vaultdepositparams.py +85 -0
  240. compass_api_sdk/models/vaultdepositrequest.py +15 -6
  241. compass_api_sdk/models/vaultgetvaultresponse.py +21 -11
  242. compass_api_sdk/models/vaultinfo.py +129 -0
  243. compass_api_sdk/models/vaultsresponse.py +30 -0
  244. compass_api_sdk/models/vaultvenue.py +27 -0
  245. compass_api_sdk/models/vaultwithdrawparams.py +75 -0
  246. compass_api_sdk/models/vaultwithdrawrequest.py +15 -6
  247. compass_api_sdk/models/wildcatgetmarketresponse.py +151 -0
  248. compass_api_sdk/models/{redeemunderlying.py → withdraw.py} +2 -2
  249. compass_api_sdk/models/wrapethrequest.py +15 -6
  250. compass_api_sdk/morpho.py +481 -816
  251. compass_api_sdk/pendle.py +495 -1384
  252. compass_api_sdk/sdk.py +39 -13
  253. compass_api_sdk/sky.py +275 -240
  254. compass_api_sdk/smart_account.py +37 -50
  255. compass_api_sdk/swap.py +248 -0
  256. compass_api_sdk/token.py +1192 -0
  257. compass_api_sdk/transaction_bundler.py +151 -184
  258. compass_api_sdk/uniswap_v3.py +531 -620
  259. compass_api_sdk/universal.py +181 -932
  260. compass_api_sdk/utils/__init__.py +18 -5
  261. compass_api_sdk/utils/annotations.py +32 -8
  262. compass_api_sdk/utils/eventstreaming.py +10 -0
  263. compass_api_sdk/utils/forms.py +21 -10
  264. compass_api_sdk/utils/queryparams.py +14 -2
  265. compass_api_sdk/utils/retries.py +69 -5
  266. compass_api_sdk/utils/serializers.py +3 -2
  267. compass_api_sdk/utils/unmarshal_json_response.py +38 -0
  268. compass_api_sdk/wildcat.py +208 -0
  269. compass_api_sdk-2.0.21rc1.dist-info/METADATA +623 -0
  270. compass_api_sdk-2.0.21rc1.dist-info/RECORD +346 -0
  271. {compass_api_sdk-0.9.35.dist-info → compass_api_sdk-2.0.21rc1.dist-info}/WHEEL +1 -1
  272. compass_api_sdk/models/aave_avg_rateop.py +0 -141
  273. compass_api_sdk/models/aave_liquidity_changeop.py +0 -103
  274. compass_api_sdk/models/aave_rateop.py +0 -134
  275. compass_api_sdk/models/aave_reserve_overviewop.py +0 -134
  276. compass_api_sdk/models/aave_std_rateop.py +0 -141
  277. compass_api_sdk/models/aave_token_priceop.py +0 -134
  278. compass_api_sdk/models/aave_user_position_per_tokenop.py +0 -141
  279. compass_api_sdk/models/aerodrome_slipstream_liquidity_provision_positionsop.py +0 -37
  280. compass_api_sdk/models/aerodrome_slipstream_pool_priceop.py +0 -159
  281. compass_api_sdk/models/aerodromeposition.py +0 -70
  282. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vault_vaultstate.py +0 -53
  283. compass_api_sdk/models/compass_api_backend_models_morpho_read_response_get_vaults_vaultstate.py +0 -32
  284. compass_api_sdk/models/generic_supported_tokensop.py +0 -28
  285. compass_api_sdk/models/generic_visualize_portfolioop.py +0 -37
  286. compass_api_sdk/models/image.py +0 -15
  287. compass_api_sdk/models/liquidity.py +0 -16
  288. compass_api_sdk/models/metadata.py +0 -50
  289. compass_api_sdk/models/morpho_vault_positionop.py +0 -37
  290. compass_api_sdk/models/morpho_vaultop.py +0 -30
  291. compass_api_sdk/models/morphocheckvaultpositionresponse.py +0 -20
  292. compass_api_sdk/models/morphogetvaultresponse.py +0 -86
  293. compass_api_sdk/models/pendle_marketsop.py +0 -28
  294. compass_api_sdk/models/pendleaddliquidityparams.py +0 -50
  295. compass_api_sdk/models/pendleaddliquidityrequest.py +0 -61
  296. compass_api_sdk/models/pendlebuyptparams.py +0 -48
  297. compass_api_sdk/models/pendlebuyptrequest.py +0 -59
  298. compass_api_sdk/models/pendlebuyytparams.py +0 -48
  299. compass_api_sdk/models/pendlebuyytrequest.py +0 -59
  300. compass_api_sdk/models/pendlegetuserpositionresponse.py +0 -56
  301. compass_api_sdk/models/pendleremoveliquidityparams.py +0 -50
  302. compass_api_sdk/models/pendleremoveliquidityrequest.py +0 -61
  303. compass_api_sdk/models/pendlesellptparams.py +0 -48
  304. compass_api_sdk/models/pendlesellptrequest.py +0 -61
  305. compass_api_sdk/models/pendlesellytparams.py +0 -48
  306. compass_api_sdk/models/pendlesellytrequest.py +0 -61
  307. compass_api_sdk/models/sky_positionop.py +0 -31
  308. compass_api_sdk/models/token_addressop.py +0 -89
  309. compass_api_sdk/models/token_balanceop.py +0 -55
  310. compass_api_sdk/models/token_enum.py +0 -57
  311. compass_api_sdk/models/token_priceop.py +0 -89
  312. compass_api_sdk/models/tokenaddressresponse.py +0 -15
  313. compass_api_sdk/models/tokeninfo.py +0 -17
  314. compass_api_sdk/models/tokentransfererc20params.py +0 -63
  315. compass_api_sdk/models/txresponse.py +0 -27
  316. compass_api_sdk/models/uniswap_pool_priceop.py +0 -170
  317. compass_api_sdk/models/uniswap_quote_buy_exactlyop.py +0 -191
  318. compass_api_sdk/models/uniswap_quote_sell_exactlyop.py +0 -191
  319. compass_api_sdk/models/userposition.py +0 -16
  320. compass_api_sdk/models/vaultposition.py +0 -24
  321. compass_api_sdk-0.9.35.dist-info/METADATA +0 -558
  322. compass_api_sdk-0.9.35.dist-info/RECORD +0 -260
@@ -0,0 +1,623 @@
1
+ Metadata-Version: 2.4
2
+ Name: compass_api_sdk
3
+ Version: 2.0.21rc1
4
+ Summary: Compass API SDK.
5
+ Author: royalnine
6
+ Requires-Python: >=3.9.2
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Dist: httpcore (>=1.0.9)
14
+ Requires-Dist: httpx (>=0.28.1)
15
+ Requires-Dist: pydantic (>=2.11.2)
16
+ Project-URL: Repository, https://github.com/CompassLabs/mono.git
17
+ Description-Content-Type: text/markdown
18
+
19
+ # compass_api_sdk
20
+
21
+ Developer-friendly & type-safe Python SDK specifically catered to leverage *compass_api_sdk* API.
22
+
23
+
24
+
25
+
26
+ <!-- Start Summary [summary] -->
27
+ ## Summary
28
+
29
+ Compass API: Compass Labs DeFi API
30
+ <!-- End Summary [summary] -->
31
+
32
+ <!-- Start Table of Contents [toc] -->
33
+ ## Table of Contents
34
+ <!-- $toc-max-depth=2 -->
35
+ * [compass_api_sdk](#compassapisdk)
36
+ * [SDK Installation](#sdk-installation)
37
+ * [IDE Support](#ide-support)
38
+ * [SDK Example Usage](#sdk-example-usage)
39
+ * [Authentication](#authentication)
40
+ * [Available Resources and Operations](#available-resources-and-operations)
41
+ * [Retries](#retries)
42
+ * [Error Handling](#error-handling)
43
+ * [Server Selection](#server-selection)
44
+ * [Custom HTTP Client](#custom-http-client)
45
+ * [Resource Management](#resource-management)
46
+ * [Debugging](#debugging)
47
+ * [Development](#development)
48
+ * [Maturity](#maturity)
49
+ * [Contributions](#contributions)
50
+
51
+ <!-- End Table of Contents [toc] -->
52
+
53
+ <!-- Start SDK Installation [installation] -->
54
+ ## SDK Installation
55
+
56
+
57
+
58
+ >
59
+
60
+ The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
61
+
62
+ ### uv
63
+
64
+ *uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
65
+
66
+ ```bash
67
+ uv add git+https://github.com/CompassLabs/mono.git#subdirectory=python-sdk
68
+ ```
69
+
70
+ ### PIP
71
+
72
+ *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
73
+
74
+ ```bash
75
+ pip install git+https://github.com/CompassLabs/mono.git#subdirectory=python-sdk
76
+ ```
77
+
78
+ ### Poetry
79
+
80
+ *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
81
+
82
+ ```bash
83
+ poetry add git+https://github.com/CompassLabs/mono.git#subdirectory=python-sdk
84
+ ```
85
+
86
+ ### Shell and script usage with `uv`
87
+
88
+ You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
89
+
90
+ ```shell
91
+ uvx --from compass_api_sdk python
92
+ ```
93
+
94
+ It's also possible to write a standalone Python script without needing to set up a whole project like so:
95
+
96
+ ```python
97
+ #!/usr/bin/env -S uv run --script
98
+ # /// script
99
+ # requires-python = ">=3.9"
100
+ # dependencies = [
101
+ # "compass_api_sdk",
102
+ # ]
103
+ # ///
104
+
105
+ from compass_api_sdk import CompassAPI
106
+
107
+ sdk = CompassAPI(
108
+ # SDK arguments
109
+ )
110
+
111
+ # Rest of script here...
112
+ ```
113
+
114
+ Once that is saved to a file, you can run it with `uv run script.py` where
115
+ `script.py` can be replaced with the actual file name.
116
+ <!-- End SDK Installation [installation] -->
117
+
118
+ <!-- Start IDE Support [idesupport] -->
119
+ ## IDE Support
120
+
121
+ ### PyCharm
122
+
123
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
124
+
125
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
126
+ <!-- End IDE Support [idesupport] -->
127
+
128
+ <!-- Start SDK Example Usage [usage] -->
129
+ ## SDK Example Usage
130
+
131
+ ### Example
132
+
133
+ ```python
134
+ # Synchronous Example
135
+ from compass_api_sdk import CompassAPI, models
136
+
137
+
138
+ with CompassAPI(
139
+ api_key_auth="<YOUR_API_KEY_HERE>",
140
+ ) as compass_api:
141
+
142
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
143
+
144
+ # Handle response
145
+ print(res)
146
+ ```
147
+
148
+ </br>
149
+
150
+ The same SDK client can also be used to make asynchronous requests by importing asyncio.
151
+
152
+ ```python
153
+ # Asynchronous Example
154
+ import asyncio
155
+ from compass_api_sdk import CompassAPI, models
156
+
157
+ async def main():
158
+
159
+ async with CompassAPI(
160
+ api_key_auth="<YOUR_API_KEY_HERE>",
161
+ ) as compass_api:
162
+
163
+ res = await compass_api.aave_v3.aave_aave_supported_tokens_async(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
164
+
165
+ # Handle response
166
+ print(res)
167
+
168
+ asyncio.run(main())
169
+ ```
170
+ <!-- End SDK Example Usage [usage] -->
171
+
172
+ <!-- Start Authentication [security] -->
173
+ ## Authentication
174
+
175
+ ### Per-Client Security Schemes
176
+
177
+ This SDK supports the following security scheme globally:
178
+
179
+ | Name | Type | Scheme |
180
+ | -------------- | ------ | ------- |
181
+ | `api_key_auth` | apiKey | API key |
182
+
183
+ To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
184
+ ```python
185
+ from compass_api_sdk import CompassAPI, models
186
+
187
+
188
+ with CompassAPI(
189
+ api_key_auth="<YOUR_API_KEY_HERE>",
190
+ ) as compass_api:
191
+
192
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
193
+
194
+ # Handle response
195
+ print(res)
196
+
197
+ ```
198
+ <!-- End Authentication [security] -->
199
+
200
+ <!-- Start Available Resources and Operations [operations] -->
201
+ ## Available Resources and Operations
202
+
203
+ <details open>
204
+ <summary>Available methods</summary>
205
+
206
+ ### [AaveV3](docs/sdks/aavev3/README.md)
207
+
208
+ * [aave_aave_supported_tokens](docs/sdks/aavev3/README.md#aave_aave_supported_tokens) - Aave Supported Tokens
209
+ * [aave_rate](docs/sdks/aavev3/README.md#aave_rate) - Interest Rates
210
+ * [aave_avg_rate](docs/sdks/aavev3/README.md#aave_avg_rate) - Interest Rates: Time Average
211
+ * [aave_std_rate](docs/sdks/aavev3/README.md#aave_std_rate) - Interest Rates: Standard Deviation
212
+ * [aave_reserve_overview](docs/sdks/aavev3/README.md#aave_reserve_overview) - Reserve Overview
213
+ * [aave_token_price](docs/sdks/aavev3/README.md#aave_token_price) - Token Prices
214
+ * [aave_liquidity_change](docs/sdks/aavev3/README.md#aave_liquidity_change) - Liquidity Index
215
+ * [aave_user_position_summary](docs/sdks/aavev3/README.md#aave_user_position_summary) - Positions - Total
216
+ * [aave_user_position_per_token](docs/sdks/aavev3/README.md#aave_user_position_per_token) - Positions - per Token
217
+ * [aave_historical_transactions](docs/sdks/aavev3/README.md#aave_historical_transactions) - Historical Transactions
218
+ * [aave_supply](docs/sdks/aavev3/README.md#aave_supply) - Supply/Lend
219
+ * [aave_borrow](docs/sdks/aavev3/README.md#aave_borrow) - Borrow
220
+ * [aave_repay](docs/sdks/aavev3/README.md#aave_repay) - Repay Loans
221
+ * [aave_withdraw](docs/sdks/aavev3/README.md#aave_withdraw) - Unstake
222
+ * [aave_set_user_emode](docs/sdks/aavev3/README.md#aave_set_user_emode) - Set User eMode
223
+
224
+ ### [AerodromeSlipstream](docs/sdks/aerodromeslipstream/README.md)
225
+
226
+ * [aerodrome_slipstream_liquidity_provision_positions](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_positions) - List LP Positions
227
+ * [aerodrome_slipstream_pool_price](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_pool_price) - Pool Price
228
+ * [aerodrome_slipstream_swap_sell_exactly](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_sell_exactly) - Swap - from Specified Amount
229
+ * [aerodrome_slipstream_swap_buy_exactly](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_swap_buy_exactly) - Swap - into Specified Amount
230
+ * [aerodrome_slipstream_liquidity_provision_mint](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_mint) - Open a New LP Position
231
+ * [aerodrome_slipstream_liquidity_provision_increase](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_increase) - Increase an LP Position
232
+ * [aerodrome_slipstream_liquidity_provision_withdraw](docs/sdks/aerodromeslipstream/README.md#aerodrome_slipstream_liquidity_provision_withdraw) - Withdraw an LP Position
233
+
234
+ ### [Bridge](docs/sdks/bridge/README.md)
235
+
236
+ * [cctp_burn](docs/sdks/bridge/README.md#cctp_burn) - Initiate USDC bridging
237
+ * [cctp_mint](docs/sdks/bridge/README.md#cctp_mint) - Complete USDC bridging
238
+
239
+ ### [Earn](docs/sdks/earn/README.md)
240
+
241
+ * [earn_positions](docs/sdks/earn/README.md#earn_positions) - List earn positions
242
+ * [earn_vaults](docs/sdks/earn/README.md#earn_vaults) - List vaults
243
+ * [earn_aave_markets](docs/sdks/earn/README.md#earn_aave_markets) - List aave markets
244
+ * [earn_create_account](docs/sdks/earn/README.md#earn_create_account) - Create earn account
245
+ * [earn_transfer](docs/sdks/earn/README.md#earn_transfer) - Transfer tokens to/from account
246
+ * [earn_manage](docs/sdks/earn/README.md#earn_manage) - Manage earn position
247
+ * [earn_swap](docs/sdks/earn/README.md#earn_swap) - Swap tokens within Earn Account
248
+ * [earn_bundle](docs/sdks/earn/README.md#earn_bundle) - Execute multiple earn actions
249
+
250
+ ### [ERC4626Vaults](docs/sdks/erc4626vaults/README.md)
251
+
252
+ * [vaults_vault](docs/sdks/erc4626vaults/README.md#vaults_vault) - Get Vault & User Position
253
+ * [vaults_deposit](docs/sdks/erc4626vaults/README.md#vaults_deposit) - Deposit to Vault
254
+ * [vaults_withdraw](docs/sdks/erc4626vaults/README.md#vaults_withdraw) - Withdraw from Vault
255
+
256
+ ### [Ethena](docs/sdks/ethena/README.md)
257
+
258
+ * [ethena_vault](docs/sdks/ethena/README.md#ethena_vault) - Get Vault & User Position
259
+ * [ethena_deposit](docs/sdks/ethena/README.md#ethena_deposit) - Deposit USDe
260
+ * [ethena_request](docs/sdks/ethena/README.md#ethena_request) - Request to Withdraw USDe
261
+ * [ethena_unstake](docs/sdks/ethena/README.md#ethena_unstake) - Unstake USDe
262
+
263
+ ### [GasSponsorship](docs/sdks/gassponsorship/README.md)
264
+
265
+ * [gas_sponsorship_prepare](docs/sdks/gassponsorship/README.md#gas_sponsorship_prepare) - Prepare gas-sponsored transaction
266
+ * [gas_sponsorship_approve_transfer](docs/sdks/gassponsorship/README.md#gas_sponsorship_approve_transfer) - Approve token transfer
267
+
268
+ ### [Morpho](docs/sdks/morpho/README.md)
269
+
270
+ * [morpho_vaults](docs/sdks/morpho/README.md#morpho_vaults) - Get Vaults
271
+ * [morpho_vault](docs/sdks/morpho/README.md#morpho_vault) - Get Vault & User Position
272
+ * [morpho_markets](docs/sdks/morpho/README.md#morpho_markets) - Get Markets
273
+ * [morpho_market](docs/sdks/morpho/README.md#morpho_market) - Get Market
274
+ * [morpho_market_position](docs/sdks/morpho/README.md#morpho_market_position) - Check Market Position
275
+ * [morpho_user_position](docs/sdks/morpho/README.md#morpho_user_position) - Check User Position
276
+ * [morpho_deposit](docs/sdks/morpho/README.md#morpho_deposit) - Deposit to Vault
277
+ * [morpho_withdraw](docs/sdks/morpho/README.md#morpho_withdraw) - Withdraw from Vault
278
+ * [morpho_supply_collateral](docs/sdks/morpho/README.md#morpho_supply_collateral) - Supply Collateral to Market
279
+ * [morpho_withdraw_collateral](docs/sdks/morpho/README.md#morpho_withdraw_collateral) - Withdraw Collateral from Market
280
+ * [morpho_borrow](docs/sdks/morpho/README.md#morpho_borrow) - Borrow from Market
281
+ * [morpho_repay](docs/sdks/morpho/README.md#morpho_repay) - Repay to Market
282
+
283
+ ### [Pendle](docs/sdks/pendle/README.md)
284
+
285
+ * [pendle_market](docs/sdks/pendle/README.md#pendle_market) - Get Market & User Position
286
+ * [pendle_positions](docs/sdks/pendle/README.md#pendle_positions) - List User's Market Positions
287
+ * [pendle_markets](docs/sdks/pendle/README.md#pendle_markets) - List Market Data
288
+ * [pendle_pt](docs/sdks/pendle/README.md#pendle_pt) - Trade Principal Token (PT)
289
+ * [pendle_yt](docs/sdks/pendle/README.md#pendle_yt) - Trade Yield Token (YT)
290
+ * [pendle_liquidity](docs/sdks/pendle/README.md#pendle_liquidity) - Manage Liquidity (LP)
291
+ * [pendle_redeem_yield](docs/sdks/pendle/README.md#pendle_redeem_yield) - Redeem Claimable Yield
292
+
293
+ ### [Sky](docs/sdks/sky/README.md)
294
+
295
+ * [sky_position](docs/sdks/sky/README.md#sky_position) - Check USDS Position
296
+ * [sky_buy](docs/sdks/sky/README.md#sky_buy) - Buy USDS
297
+ * [sky_sell](docs/sdks/sky/README.md#sky_sell) - Sell USDS
298
+ * [sky_deposit](docs/sdks/sky/README.md#sky_deposit) - Deposit USDS
299
+ * [sky_withdraw](docs/sdks/sky/README.md#sky_withdraw) - Withdraw USDS
300
+
301
+ ### [SmartAccount](docs/sdks/smartaccount/README.md)
302
+
303
+ * [smart_account_batched_user_operations](docs/sdks/smartaccount/README.md#smart_account_batched_user_operations) - Get Smart Account Batched User Operations
304
+
305
+ ### [Swap](docs/sdks/swap/README.md)
306
+
307
+ * [swap_odos](docs/sdks/swap/README.md#swap_odos) - Odos Swap
308
+
309
+ ### [Token](docs/sdks/token/README.md)
310
+
311
+ * [token_price](docs/sdks/token/README.md#token_price) - Token Price
312
+ * [token_balance](docs/sdks/token/README.md#token_balance) - Token Balance
313
+ * [token_list](docs/sdks/token/README.md#token_list) - List known tokens
314
+ * [token_transfer](docs/sdks/token/README.md#token_transfer) - Transfer Tokens
315
+ * [token_wrap_eth](docs/sdks/token/README.md#token_wrap_eth) - Wrap ETH
316
+ * [token_unwrap_weth](docs/sdks/token/README.md#token_unwrap_weth) - Unwrap WETH
317
+
318
+ ### [TransactionBundler](docs/sdks/transactionbundler/README.md)
319
+
320
+ * [transaction_bundler_authorization](docs/sdks/transactionbundler/README.md#transaction_bundler_authorization) - Enable Transaction Bundling
321
+ * [transaction_bundler_execute](docs/sdks/transactionbundler/README.md#transaction_bundler_execute) - Construct Bundled Transaction
322
+ * [transaction_bundler_aave_loop](docs/sdks/transactionbundler/README.md#transaction_bundler_aave_loop) - AAVE Leverage Long/Short
323
+
324
+ ### [UniswapV3](docs/sdks/uniswapv3/README.md)
325
+
326
+ * [uniswap_quote_buy_exactly](docs/sdks/uniswapv3/README.md#uniswap_quote_buy_exactly) - Get Quote - to Specified Amount
327
+ * [uniswap_quote_sell_exactly](docs/sdks/uniswapv3/README.md#uniswap_quote_sell_exactly) - Get quote - From Specified Amount
328
+ * [uniswap_pool_price](docs/sdks/uniswapv3/README.md#uniswap_pool_price) - Pool Price
329
+ * [uniswap_liquidity_provision_in_range](docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_in_range) - Check if LP is Active.
330
+ * [uniswap_liquidity_provision_positions](docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_positions) - List LP
331
+ * [uniswap_swap_buy_exactly](docs/sdks/uniswapv3/README.md#uniswap_swap_buy_exactly) - Buy exact amount
332
+ * [uniswap_swap_sell_exactly](docs/sdks/uniswapv3/README.md#uniswap_swap_sell_exactly) - Sell exact amount
333
+ * [uniswap_liquidity_provision_mint](docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_mint) - Open a new LP position
334
+ * [uniswap_liquidity_provision_increase](docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_increase) - Increase an LP position
335
+ * [uniswap_liquidity_provision_withdraw](docs/sdks/uniswapv3/README.md#uniswap_liquidity_provision_withdraw) - Withdraw an LP position
336
+
337
+ ### [Universal](docs/sdks/universal/README.md)
338
+
339
+ * [generic_portfolio](docs/sdks/universal/README.md#generic_portfolio) - List User Portfolio
340
+ * [generic_supported_chains](docs/sdks/universal/README.md#generic_supported_chains) - List Supported Chains
341
+ * [generic_allowance](docs/sdks/universal/README.md#generic_allowance) - Get Allowance
342
+ * [generic_ens](docs/sdks/universal/README.md#generic_ens) - Resolve ENS
343
+ * [generic_allowance_set](docs/sdks/universal/README.md#generic_allowance_set) - Set Allowance
344
+
345
+ ### [Wildcat](docs/sdks/wildcat/README.md)
346
+
347
+ * [wildcat_market](docs/sdks/wildcat/README.md#wildcat_market) - Get Market & User Position
348
+
349
+ </details>
350
+ <!-- End Available Resources and Operations [operations] -->
351
+
352
+ <!-- Start Retries [retries] -->
353
+ ## Retries
354
+
355
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
356
+
357
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
358
+ ```python
359
+ from compass_api_sdk import CompassAPI, models
360
+ from compass_api_sdk.utils import BackoffStrategy, RetryConfig
361
+
362
+
363
+ with CompassAPI(
364
+ api_key_auth="<YOUR_API_KEY_HERE>",
365
+ ) as compass_api:
366
+
367
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM,
368
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
369
+
370
+ # Handle response
371
+ print(res)
372
+
373
+ ```
374
+
375
+ If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
376
+ ```python
377
+ from compass_api_sdk import CompassAPI, models
378
+ from compass_api_sdk.utils import BackoffStrategy, RetryConfig
379
+
380
+
381
+ with CompassAPI(
382
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
383
+ api_key_auth="<YOUR_API_KEY_HERE>",
384
+ ) as compass_api:
385
+
386
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
387
+
388
+ # Handle response
389
+ print(res)
390
+
391
+ ```
392
+ <!-- End Retries [retries] -->
393
+
394
+ <!-- Start Error Handling [errors] -->
395
+ ## Error Handling
396
+
397
+ [`CompassAPIError`](./src/compass_api_sdk/errors/compassapierror.py) is the base class for all HTTP error responses. It has the following properties:
398
+
399
+ | Property | Type | Description |
400
+ | ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
401
+ | `err.message` | `str` | Error message |
402
+ | `err.status_code` | `int` | HTTP response status code eg `404` |
403
+ | `err.headers` | `httpx.Headers` | HTTP response headers |
404
+ | `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
405
+ | `err.raw_response` | `httpx.Response` | Raw HTTP response |
406
+ | `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
407
+
408
+ ### Example
409
+ ```python
410
+ from compass_api_sdk import CompassAPI, errors, models
411
+
412
+
413
+ with CompassAPI(
414
+ api_key_auth="<YOUR_API_KEY_HERE>",
415
+ ) as compass_api:
416
+ res = None
417
+ try:
418
+
419
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
420
+
421
+ # Handle response
422
+ print(res)
423
+
424
+
425
+ except errors.CompassAPIError as e:
426
+ # The base class for HTTP error responses
427
+ print(e.message)
428
+ print(e.status_code)
429
+ print(e.body)
430
+ print(e.headers)
431
+ print(e.raw_response)
432
+
433
+ # Depending on the method different errors may be thrown
434
+ if isinstance(e, errors.HTTPValidationError):
435
+ print(e.data.detail) # Optional[List[models.ValidationError]]
436
+ ```
437
+
438
+ ### Error Classes
439
+ **Primary errors:**
440
+ * [`CompassAPIError`](./src/compass_api_sdk/errors/compassapierror.py): The base class for HTTP error responses.
441
+ * [`HTTPValidationError`](./src/compass_api_sdk/errors/httpvalidationerror.py): Validation Error. Status code `422`.
442
+
443
+ <details><summary>Less common errors (6)</summary>
444
+
445
+ <br />
446
+
447
+ **Network errors:**
448
+ * [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
449
+ * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
450
+ * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
451
+
452
+
453
+ **Inherit from [`CompassAPIError`](./src/compass_api_sdk/errors/compassapierror.py)**:
454
+ * [`MintPrepareNotFoundResponseError`](./src/compass_api_sdk/errors/mintpreparenotfoundresponseerror.py): Response when the burn event has not been found yet. This means the burn transaction hasn't been confirmed on-chain yet, or the user hasn't broadcast the burn transaction. Status code `404`. Applicable to 1 of 92 methods.*
455
+ * [`ResponseValidationError`](./src/compass_api_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
456
+
457
+ </details>
458
+
459
+ \* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
460
+ <!-- End Error Handling [errors] -->
461
+
462
+ <!-- Start Server Selection [server] -->
463
+ ## Server Selection
464
+
465
+ ### Override Server URL Per-Client
466
+
467
+ The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
468
+ ```python
469
+ from compass_api_sdk import CompassAPI, models
470
+
471
+
472
+ with CompassAPI(
473
+ server_url="https://api.compasslabs.ai",
474
+ api_key_auth="<YOUR_API_KEY_HERE>",
475
+ ) as compass_api:
476
+
477
+ res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM)
478
+
479
+ # Handle response
480
+ print(res)
481
+
482
+ ```
483
+ <!-- End Server Selection [server] -->
484
+
485
+ <!-- Start Custom HTTP Client [http-client] -->
486
+ ## Custom HTTP Client
487
+
488
+ The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
489
+ Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
490
+ This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
491
+
492
+ For example, you could specify a header for every request that this sdk makes as follows:
493
+ ```python
494
+ from compass_api_sdk import CompassAPI
495
+ import httpx
496
+
497
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
498
+ s = CompassAPI(client=http_client)
499
+ ```
500
+
501
+ or you could wrap the client with your own custom logic:
502
+ ```python
503
+ from compass_api_sdk import CompassAPI
504
+ from compass_api_sdk.httpclient import AsyncHttpClient
505
+ import httpx
506
+
507
+ class CustomClient(AsyncHttpClient):
508
+ client: AsyncHttpClient
509
+
510
+ def __init__(self, client: AsyncHttpClient):
511
+ self.client = client
512
+
513
+ async def send(
514
+ self,
515
+ request: httpx.Request,
516
+ *,
517
+ stream: bool = False,
518
+ auth: Union[
519
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
520
+ ] = httpx.USE_CLIENT_DEFAULT,
521
+ follow_redirects: Union[
522
+ bool, httpx._client.UseClientDefault
523
+ ] = httpx.USE_CLIENT_DEFAULT,
524
+ ) -> httpx.Response:
525
+ request.headers["Client-Level-Header"] = "added by client"
526
+
527
+ return await self.client.send(
528
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
529
+ )
530
+
531
+ def build_request(
532
+ self,
533
+ method: str,
534
+ url: httpx._types.URLTypes,
535
+ *,
536
+ content: Optional[httpx._types.RequestContent] = None,
537
+ data: Optional[httpx._types.RequestData] = None,
538
+ files: Optional[httpx._types.RequestFiles] = None,
539
+ json: Optional[Any] = None,
540
+ params: Optional[httpx._types.QueryParamTypes] = None,
541
+ headers: Optional[httpx._types.HeaderTypes] = None,
542
+ cookies: Optional[httpx._types.CookieTypes] = None,
543
+ timeout: Union[
544
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
545
+ ] = httpx.USE_CLIENT_DEFAULT,
546
+ extensions: Optional[httpx._types.RequestExtensions] = None,
547
+ ) -> httpx.Request:
548
+ return self.client.build_request(
549
+ method,
550
+ url,
551
+ content=content,
552
+ data=data,
553
+ files=files,
554
+ json=json,
555
+ params=params,
556
+ headers=headers,
557
+ cookies=cookies,
558
+ timeout=timeout,
559
+ extensions=extensions,
560
+ )
561
+
562
+ s = CompassAPI(async_client=CustomClient(httpx.AsyncClient()))
563
+ ```
564
+ <!-- End Custom HTTP Client [http-client] -->
565
+
566
+ <!-- Start Resource Management [resource-management] -->
567
+ ## Resource Management
568
+
569
+ The `CompassAPI` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
570
+
571
+ [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
572
+
573
+ ```python
574
+ from compass_api_sdk import CompassAPI
575
+ def main():
576
+
577
+ with CompassAPI(
578
+ api_key_auth="<YOUR_API_KEY_HERE>",
579
+ ) as compass_api:
580
+ # Rest of application here...
581
+
582
+
583
+ # Or when using async:
584
+ async def amain():
585
+
586
+ async with CompassAPI(
587
+ api_key_auth="<YOUR_API_KEY_HERE>",
588
+ ) as compass_api:
589
+ # Rest of application here...
590
+ ```
591
+ <!-- End Resource Management [resource-management] -->
592
+
593
+ <!-- Start Debugging [debug] -->
594
+ ## Debugging
595
+
596
+ You can setup your SDK to emit debug logs for SDK requests and responses.
597
+
598
+ You can pass your own logger class directly into your SDK.
599
+ ```python
600
+ from compass_api_sdk import CompassAPI
601
+ import logging
602
+
603
+ logging.basicConfig(level=logging.DEBUG)
604
+ s = CompassAPI(debug_logger=logging.getLogger("compass_api_sdk"))
605
+ ```
606
+ <!-- End Debugging [debug] -->
607
+
608
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
609
+
610
+ # Development
611
+
612
+ ## Maturity
613
+
614
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
615
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
616
+ looking for the latest version.
617
+
618
+ ## Contributions
619
+
620
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
621
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
622
+
623
+