{ "openapi": "3.1.0", "info": { "title": "Compass API", "description": "Compass Labs DeFi API", "version": "0.0.1" }, "servers": [ { "url": "https://api.compasslabs.ai", "description": "Production server" } ], "paths": { "/v1/aave/aave_supported_tokens": { "get": { "tags": [ "Aave V3" ], "summary": "Aave Supported Tokens", "description": "Returns the list of supported tokens on Aave for the specified network, along\nwith key metadata.\n\nFor each token, the response includes:\n- The symbol and contract address.\n- Whether the token is currently enabled for supplying (depositing).\n- Whether it is enabled for borrowing.", "operationId": "v1_aave_aave_supported_tokens", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveSupportedTokensResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_aave_supported_tokens", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_aave_supported_tokens(chain=models.V1AaveAaveSupportedTokensChain.ARBITRUM, block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveAaveSupportedTokens({\n chain: \"arbitrum\",\n block: null,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/rate": { "get": { "tags": [ "Aave V3" ], "summary": "Interest Rates", "description": "Returns the latest APY and APR rates for a specified token on Aave, for both\ndeposits and loans.\n\n**Annual percentage yield (APY)** is the yearly return/cost after continuous\ncompounding of the per-second rate stored on-chain. This value is the same value as\nseen the on [app.aave.com](\nhttps://app.aave.com/)\nbut more up-to-date as it is taken directly from the\nblockchain every time this endpoint is called.\n\n**Annual percentage rate (APR)** is the yearly simple interest rate (no\ncompounding).\n\nFor APY/APR on loans Aave offers both stable and fixed rates on certain tokens.", "operationId": "v1_aave_rate", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token to fetch the user's position on.." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveRateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_rate", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_rate(chain=models.V1AaveRateChain.ARBITRUM, token=\"USDC\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveRate({\n chain: \"arbitrum\",\n block: null,\n token: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/avg_rate": { "get": { "tags": [ "Aave V3" ], "summary": "Interest Rates: Time Average", "description": "Provides time-weighted averages of deposit and borrow rates for Aave reserves.", "operationId": "v1_aave_avg_rate", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token.." }, { "name": "days", "in": "query", "required": true, "schema": { "type": "integer", "maximum": 30, "minimum": 1, "title": "Days", "example": 2 }, "description": "The number of days for which the average shall be calculated." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveAvgRateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_avg_rate", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_avg_rate(chain=models.V1AaveAvgRateChain.ETHEREUM, token=\"USDC\", days=2, block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveAvgRate({\n chain: \"ethereum\",\n block: null,\n token: \"USDC\",\n days: 2,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/std_rate": { "get": { "tags": [ "Aave V3" ], "summary": "Interest Rates: Standard Deviation", "description": "Returns the historical standard deviation of lending and borrowing rates for Aave\nreserves, illustrating market volatility.", "operationId": "v1_aave_std_rate", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token.." }, { "name": "days", "in": "query", "required": true, "schema": { "type": "integer", "maximum": 30, "minimum": 1, "title": "Days", "example": 7 }, "description": "The number of days for which the standard deviation shall be calculated." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveSTDRateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_std_rate", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_std_rate(chain=models.V1AaveStdRateChain.ETHEREUM, token=\"USDC\", days=7, block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveStdRate({\n chain: \"ethereum\",\n block: null,\n token: \"USDC\",\n days: 7,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/reserve_overview": { "get": { "tags": [ "Aave V3" ], "summary": "Reserve Overview", "description": "Returns key metrics for Aave Reserves:\n- Total Supplied (TVL) in USD\n- Total Borrowed in USD\n- Utilization Ratio\n\nSee below for more info:", "operationId": "v1_aave_reserve_overview", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the asset.." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveReserveOverviewResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_reserve_overview", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_reserve_overview(chain=models.V1AaveReserveOverviewChain.ARBITRUM, token=\"USDC\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveReserveOverview({\n chain: \"arbitrum\",\n block: null,\n token: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/token_price": { "get": { "tags": [ "Aave V3" ], "summary": "Token Prices", "description": "This endpoint retrieves the current price of a specified token in USD as\ndetermined by the Aave protocol.\n\nIt utilizes the Aave V3 Oracle to fetch the token price, ensuring accurate and up-\nto-date information. The request requires the token identifier and the blockchain\nnetwork (chain) on which the token resides. The response provides the token price in\na standardized format, converted from Wei to the base currency decimals defined by\nAave.", "operationId": "v1_aave_token_price", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the asset whose price you want.." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveTokenPriceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_token_price", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_token_price(chain=models.V1AaveTokenPriceChain.ARBITRUM, token=\"USDC\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveTokenPrice({\n chain: \"arbitrum\",\n block: null,\n token: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/liquidity/change": { "get": { "tags": [ "Aave V3" ], "summary": "Liquidity Index", "description": "This endpoint retrieves the change in the reserve liquidity index between two\nprovided blocks.\n\nThis is then converted to a percentage change. The liquidity index represents the\nchange in debt and interest accrual over each block. Aave does not store individual\nuser balances directly. Instead, it keeps a scaled balance and uses the liquidity\nindex to compute real balances dynamically. If a user was to have deposited tokens\nat the start block, a positive liquidity index change will represent accrued\ninterest and a profit. If tokens were borrowed at the start block, this debt will\nincrease, compound on itself and represent large debt. The reverse in both cases is\ntrue if the liquidity index is negative.", "operationId": "v1_aave_liquidity_change", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the asset to get liquidity change for.." }, { "name": "start_block", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 0, "title": "Start Block", "example": 0 }, "description": "The start block to calculate liquidity change from." }, { "name": "end_block", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 0, "title": "End Block", "example": 319407231 }, "description": "The end block to calculate liquidity change to." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveLiquidityChangeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_liquidity_change", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_liquidity_change(chain=models.V1AaveLiquidityChangeChain.ARBITRUM, token=\"USDC\", start_block=0, end_block=319407231)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveLiquidityChange({\n chain: \"arbitrum\",\n token: \"USDC\",\n startBlock: 0,\n endBlock: 319407231,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/user_position_summary": { "get": { "tags": [ "Aave V3" ], "summary": "Positions - Total", "description": "This endpoint retrieves a comprehensive summary of a user's position on the AAVE\nplatform.\n\nIt provides key financial metrics including the total collateral deposited, total\ndebt accrued, available borrowing capacity, liquidation threshold, maximum loan-to-\nvalue ratio, and the health factor of the user's account. These metrics are\ncalculated by aggregating data across all open positions held by the user, offering\na holistic view of their financial standing within the AAVE ecosystem.", "operationId": "v1_aave_user_position_summary", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User", "example": "0x3254f3b1918637ba924e3F18968Cb74219974b63" }, "description": "The user to get position summary for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveUserPositionSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_user_position_summary", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_user_position_summary(chain=models.V1AaveUserPositionSummaryChain.BASE, user=\"0x3254f3b1918637ba924e3F18968Cb74219974b63\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveUserPositionSummary({\n chain: \"base\",\n block: null,\n user: \"0x3254f3b1918637ba924e3F18968Cb74219974b63\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/user_position_per_token": { "get": { "tags": [ "Aave V3" ], "summary": "Positions - per Token", "description": "This endpoint retrieves the user's position for a specific token on the AAVE\nplatform.\n\nIt provides key financial metrics including the current aToken balance, current\nstable debt, current variable debt, principal stable debt, principal variable debt,\nstable borrow rate, stable borrow rate for new loans, variable borrow rate, and\nliquidity rate. These metrics are calculated by aggregating data across all open\npositions held by the user for the specified token, offering a detailed view of\ntheir financial standing within the AAVE ecosystem.", "operationId": "v1_aave_user_position_per_token", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User", "example": "0x3254f3b1918637ba924e3F18968Cb74219974b63" }, "description": "The user to fetch the token-specific position of." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the asset to fetch the user's position on.." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveUserPositionPerTokenResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_user_position_per_token", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_user_position_per_token(chain=models.V1AaveUserPositionPerTokenChain.BASE, user=\"0x3254f3b1918637ba924e3F18968Cb74219974b63\", token=\"USDC\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveUserPositionPerToken({\n chain: \"base\",\n block: null,\n user: \"0x3254f3b1918637ba924e3F18968Cb74219974b63\",\n token: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/historical_transactions": { "get": { "tags": [ "Aave V3" ], "summary": "Historical Transactions", "description": "This endpoint retrieves historical transactions for a user on the AAVE platform.\n\nIt returns a list of transactions including deposits, withdrawals, borrows, and\nrepayments. Each transaction includes details such as the token, amount, timestamp,\nand transaction type. This provides a comprehensive view of the user's historical\nactivity within the AAVE protocol.\n\n⚠️ Data comes from the official Aave subgraph (\nhttps://github.com/aave/protocol-subgraphs)\nand thus this particular endpoint may be less reliable than our other endpoints. ⚠️", "operationId": "v1_aave_historical_transactions", "parameters": [ { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "title": "Offset", "example": 0 }, "description": "The offset of the first item to return." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "exclusiveMinimum": 0, "title": "Limit", "example": 100 }, "description": "The number of items to return." }, { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "user_address", "in": "query", "required": true, "schema": { "type": "string", "title": "User Address", "example": "0x3254f3b1918637ba924e3F18968Cb74219974b63" }, "description": "The address of the user to get historical transactions for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveHistoricalTransactionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_historical_transactions", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_historical_transactions(chain=models.V1AaveHistoricalTransactionsChain.BASE, user_address=\"0x3254f3b1918637ba924e3F18968Cb74219974b63\", offset=0, limit=100)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveHistoricalTransactions({\n offset: 0,\n limit: 100,\n chain: \"base\",\n userAddress: \"0x3254f3b1918637ba924e3F18968Cb74219974b63\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/supply": { "post": { "tags": [ "Aave V3" ], "summary": "Supply/Lend", "description": "By supplying assets, users can earn interest on their deposits.\n\nThe supplied collateral can be used as a basis for borrowing other assets, allowing\nusers to leverage their positions. In combination with a trading protocol, this can\ncreate leverage.\n\nOverall, this endpoint is a critical component for users looking to maximize their\nasset utility within the AAVEv3 ecosystem, providing both earning potential and\nborrowing flexibility.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AaveV3Pool`\n \u003c/Info\u003e\n ", "operationId": "v1_aave_supply", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveSupplyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_supply", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_supply(token=\"USDC\", amount=\"0.5\", chain=models.AaveSupplyRequestChain.BASE, sender=\"0x466C298e40c57e1DfD364443B364DFB2717BF882\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveSupply({\n token: \"USDC\",\n amount: \"0.5\",\n chain: \"base\",\n sender: \"0x466C298e40c57e1DfD364443B364DFB2717BF882\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/borrow": { "post": { "tags": [ "Aave V3" ], "summary": "Borrow", "description": "You will pay interest for your borrows.\n\nPrice changes in the assets may lead to some or all of your collateral being\nliquidated, if the borrow position becomes unhealthy.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AaveV3Pool`\n \u003c/Info\u003e\n ", "operationId": "v1_aave_borrow", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveBorrowRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_borrow", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_borrow(token=\"USDC\", amount=0.3, interest_rate_mode=models.InterestRateMode.VARIABLE, chain=models.AaveBorrowRequestChain.BASE, sender=\"0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08\", on_behalf_of=\"0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveBorrow({\n token: \"USDC\",\n amount: 0.3,\n interestRateMode: \"variable\",\n onBehalfOf: \"0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08\",\n chain: \"base\",\n sender: \"0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/repay": { "post": { "tags": [ "Aave V3" ], "summary": "Repay Loans", "description": "This endpoint allows users to repay a portion or the entirety of their borrowed\ntokens on the Aave platform.\n\nBy repaying borrowed amounts, users can improve their health factor, which is a\nmeasure of the safety of their loan position. A higher health factor reduces the\nrisk of liquidation, ensuring a more secure borrowing experience. The endpoint\nrequires specifying the chain and the details of the repayment transaction,\nincluding the amount and the asset to be repaid.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AaveV3Pool`\n \u003c/Info\u003e\n ", "operationId": "v1_aave_repay", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveRepayRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_repay", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_repay(token=\"USDC\", amount=\"0.2\", interest_rate_mode=models.InterestRateMode.VARIABLE, chain=models.AaveRepayRequestChain.BASE, sender=\"0x3254f3b1918637ba924e3F18968Cb74219974b63\", on_behalf_of=\"0x3254f3b1918637ba924e3F18968Cb74219974b63\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveRepay({\n token: \"USDC\",\n amount: \"0.2\",\n interestRateMode: \"variable\",\n onBehalfOf: \"0x3254f3b1918637ba924e3F18968Cb74219974b63\",\n chain: \"base\",\n sender: \"0x3254f3b1918637ba924e3F18968Cb74219974b63\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aave/withdraw": { "post": { "tags": [ "Aave V3" ], "summary": "Unstake", "description": "This endpoint facilitates the withdrawal of collateral from the Aave protocol.\n\nUsers can withdraw a portion or all of their collateral, which may increase the risk\nof liquidation if there are outstanding borrows. The withdrawal process also\nincludes the collection of any interest earned on the collateral. It is important\nfor users to carefully consider their outstanding debts and the potential impact on\ntheir liquidation threshold before proceeding with a withdrawal. This endpoint is\ndesigned to provide a seamless and efficient way to manage your collateral within\nthe Aave ecosystem.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AaveV3Pool`\n \u003c/Info\u003e\n ", "operationId": "v1_aave_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveWithdrawRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aave_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aave_v3.aave_withdraw(token=\"USDC\", amount=\"0.5\", recipient=\"0x388f03DABdc414E11da8Da63198D183C82836866\", chain=models.AaveWithdrawRequestChain.BASE, sender=\"0x388f03DABdc414E11da8Da63198D183C82836866\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aaveV3.aaveWithdraw({\n token: \"USDC\",\n amount: \"0.5\",\n recipient: \"0x388f03DABdc414E11da8Da63198D183C82836866\",\n chain: \"base\",\n sender: \"0x388f03DABdc414E11da8Da63198D183C82836866\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/liquidity_provision/positions": { "get": { "tags": [ "Aerodrome Slipstream" ], "summary": "List LP Positions", "description": "Retrieve the total number of Liquidity Provider (LP) positions associated with a\nspecific sender.\n\nThis endpoint allows users to query and obtain detailed information about their LP\npositions, including the number of active positions they hold. The response model,\nAerodromeLPPositionsInfo, provides a structured representation of the LP positions\ndata, ensuring clarity and ease of use. This functionality is essential for users\nmanaging their liquidity provision activities, enabling them to make informed\ndecisions based on their current positions.", "operationId": "v1_aerodrome_slipstream_liquidity_provision_positions", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "base" ], "title": "Chain", "example": "base" } }, { "name": "user", "in": "query", "required": false, "schema": { "type": "string", "title": "User", "example": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" }, "description": "The user to get positions for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeLPPositionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_liquidity_provision_positions", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_liquidity_provision_positions(chain=models.V1AerodromeSlipstreamLiquidityProvisionPositionsChain.BASE, user=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamLiquidityProvisionPositions({\n chain: \"base\",\n user: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/pool_price": { "get": { "tags": [ "Aerodrome Slipstream" ], "summary": "Pool Price", "description": "This endpoint retrieves the current price of a pool, indicating how many token0\nyou can purchase for 1 token1.\n\nNote that this is an instantaneous price and may change during any trade. For a more\naccurate representation of the trade ratios between the two assets, consider using\nthe quote endpoint.", "operationId": "v1_aerodrome_slipstream_pool_price", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "base" ], "title": "Chain", "example": "base" } }, { "name": "token_in", "in": "query", "required": true, "schema": { "type": "string", "title": "Token In", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of a token in the pool." }, { "name": "token_out", "in": "query", "required": true, "schema": { "type": "string", "title": "Token Out", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "WETH" }, "description": "The symbol or address of a token in the pool." }, { "name": "tick_spacing", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "example": 100 }, "description": "The tick spacing of the pool" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamPoolPriceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_pool_price", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_pool_price(chain=models.V1AerodromeSlipstreamPoolPriceChain.BASE, token_in=\"USDC\", token_out=\"WETH\", tick_spacing=100)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamPoolPrice({\n chain: \"base\",\n tokenIn: \"USDC\",\n tokenOut: \"WETH\",\n tickSpacing: 100,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/swap/sell_exactly": { "post": { "tags": [ "Aerodrome Slipstream" ], "summary": "Swap - from Specified Amount", "description": "This endpoint allows users to trade a specific amount of one token into another\ntoken using the Aerodrome Slipstream protocol.\n\nThe transaction is executed by specifying the exact amount of the input token to be\nsold, and the system calculates the amount of the output token that will be\nreceived. The operation ensures that the trade is conducted within the constraints\nof the current market conditions, taking into account the liquidity and price\nimpact. This endpoint is suitable for users who want to sell a precise quantity of a\ntoken and are willing to accept the resulting amount of the other token.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_aerodrome_slipstream_swap_sell_exactly", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamSellExactlyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_swap_sell_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_swap_sell_exactly(token_in=\"USDC\", token_out=\"WETH\", tick_spacing=100, amount_in=0.5, chain=models.AerodromeSlipstreamSellExactlyRequestChain.BASE, sender=\"0xED954266764e163cE73A0bC2aC717226cf73B03E\", amount_out_minimum=0, estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamSwapSellExactly({\n tokenIn: \"USDC\",\n tokenOut: \"WETH\",\n tickSpacing: 100,\n amountIn: 0.5,\n amountOutMinimum: 0,\n chain: \"base\",\n sender: \"0xED954266764e163cE73A0bC2aC717226cf73B03E\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/swap/buy_exactly": { "post": { "tags": [ "Aerodrome Slipstream" ], "summary": "Swap - into Specified Amount", "description": "This endpoint facilitates the trading of tokens by allowing users to specify the\nexact amount of the output token they wish to receive.\n\nUtilizing the Aerodrome Slipstream protocol, the system calculates the necessary\namount of the input token required to achieve the desired output. This operation is\nparticularly useful for users who have a specific target amount of the output token\nin mind and are willing to provide the corresponding input token amount. The\ntransaction is executed with consideration of current market conditions, including\nliquidity and price impact, ensuring that the trade is completed efficiently and\neffectively.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_aerodrome_slipstream_swap_buy_exactly", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamBuyExactlyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_swap_buy_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_swap_buy_exactly(token_in=\"USDC\", token_out=\"WETH\", tick_spacing=100, amount_out=0.00001, amount_in_maximum=0.1, chain=models.AerodromeSlipstreamBuyExactlyRequestChain.BASE, sender=\"0xA4C4fB06093C91E70528d4029050f358c4B065EE\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamSwapBuyExactly({\n tokenIn: \"USDC\",\n tokenOut: \"WETH\",\n tickSpacing: 100,\n amountOut: 0.00001,\n amountInMaximum: 0.1,\n chain: \"base\",\n sender: \"0xA4C4fB06093C91E70528d4029050f358c4B065EE\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/liquidity_provision/mint": { "post": { "tags": [ "Aerodrome Slipstream" ], "summary": "Open a New LP Position", "description": "Initiate a new Liquidity Provider (LP) position by minting tokens.\n\nThis endpoint allows users to open a new LP position, enabling them to participate\nin liquidity provision. The minting process involves creating a new position with\nspecified parameters, such as token amounts and pool details. The response will\nconfirm the successful creation of the LP position, providing users with the\nnecessary information to manage their newly minted position. This functionality is\ncrucial for users looking to expand their liquidity provision activities, offering\nthem the opportunity to engage in decentralized finance (DeFi) markets effectively.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamNonfungiblePositionManager`\n \u003c/Info\u003e\n ", "operationId": "v1_aerodrome_slipstream_liquidity_provision_mint", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamMintLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_liquidity_provision_mint", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_liquidity_provision_mint(token0=\"USDC\", token1=\"USDT\", tick_spacing=1, tick_lower=100, tick_upper=200, amount0_desired=0.01, amount1_desired=0, amount0_min=0, amount1_min=0, chain=models.AerodromeSlipstreamMintLiquidityProvisionRequestChain.BASE, sender=\"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\", recipient=\"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamLiquidityProvisionMint({\n token0: \"USDC\",\n token1: \"USDT\",\n tickSpacing: 1,\n tickLower: 100,\n tickUpper: 200,\n amount0Desired: 0.01,\n amount1Desired: 0,\n amount0Min: 0,\n amount1Min: 0,\n recipient: \"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\",\n chain: \"base\",\n sender: \"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/liquidity_provision/increase": { "post": { "tags": [ "Aerodrome Slipstream" ], "summary": "Increase an LP Position", "description": "Increase the liquidity of an existing Liquidity Provider (LP) position.\n\nThis endpoint allows users to add more tokens to their current LP position,\nenhancing their participation in liquidity provision. By increasing liquidity, users\ncan potentially earn more rewards and improve their position in the pool. The\nprocess involves specifying additional token amounts and updating the pool details.\nThe response will confirm the successful increase of the LP position, providing\nusers with updated information about their enhanced position. This functionality is\nvital for users aiming to optimize their liquidity provision strategy, enabling them\nto adapt to market conditions and maximize their returns in decentralized finance\n(DeFi) markets.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_aerodrome_slipstream_liquidity_provision_increase", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamIncreaseLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_liquidity_provision_increase", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_liquidity_provision_increase(token_id=17570780, amount0_desired=0.02, amount1_desired=0.01, amount0_min=0, amount1_min=0, chain=models.AerodromeSlipstreamIncreaseLiquidityProvisionRequestChain.BASE, sender=\"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamLiquidityProvisionIncrease({\n tokenId: 17570780,\n amount0Desired: 0.02,\n amount1Desired: 0.01,\n amount0Min: 0,\n amount1Min: 0,\n chain: \"base\",\n sender: \"0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/aerodrome_slipstream/liquidity_provision/withdraw": { "post": { "tags": [ "Aerodrome Slipstream" ], "summary": "Withdraw an LP Position", "description": "Withdraw an existing Liquidity Provider (LP) position.\n\nThis endpoint allows users to remove their tokens from an LP position, effectively\nclosing their participation in the liquidity pool. The withdrawal process involves\nspecifying the LP position to be closed, and the response will confirm the\nsuccessful removal of liquidity, providing users with details about the withdrawn\ntokens and any remaining balances. This functionality is essential for users who\nwish to exit their liquidity provision activities, enabling them to reclaim their\nassets and potentially reallocate them to other investment opportunities. The\nendpoint ensures a smooth and secure withdrawal process, facilitating users'\nstrategic management of their decentralized finance (DeFi) portfolios.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamNonfungiblePositionManager`\n \u003c/Info\u003e\n ", "operationId": "v1_aerodrome_slipstream_liquidity_provision_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AerodromeSlipstreamWithdrawLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "aerodrome_slipstream_liquidity_provision_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.aerodrome_slipstream.aerodrome_slipstream_liquidity_provision_withdraw(token_id=10433247, percentage_for_withdrawal=1, chain=models.AerodromeSlipstreamWithdrawLiquidityProvisionRequestChain.BASE, sender=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.aerodromeSlipstream.aerodromeSlipstreamLiquidityProvisionWithdraw({\n tokenId: 10433247,\n percentageForWithdrawal: 1,\n chain: \"base\",\n sender: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/vaults": { "get": { "tags": [ "Morpho" ], "summary": "Get Vaults", "description": "Query a list of vaults you can deposit into.\n\nEach vault has one unique token that can be deposited. In exchange for depositing\ntokens into a vault you receive shares. You earn yield on these shares by their\nexchange value increasing over time.", "operationId": "v1_morpho_vaults", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "deposit_token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)" }, { "type": "null" } ], "title": "Deposit Token", "example": "USDC" }, "description": "Symbol or address of the deposit token to filter vaults by. Optional parameter." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoGetVaultsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_vaults", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_vaults(chain=models.V1MorphoVaultsChain.BASE, deposit_token=\"USDC\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoVaults({\n chain: \"base\",\n depositToken: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/vault": { "get": { "tags": [ "Morpho" ], "summary": "Get Vault \u0026 User Position", "description": "Get Vault data \u0026 User Position.\n\nThe user position is only included if 'user_address' parameter is included.", "operationId": "v1_morpho_vault", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "vault_address", "in": "query", "required": true, "schema": { "type": "string", "title": "Vault Address", "example": "0x182863131F9a4630fF9E27830d945B1413e347E8" }, "description": "The vault address of the desired vault position." }, { "name": "user_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Address", "example": "0xb8340945eBc917D2Aa0368a5e4E79C849c461511" }, "description": "The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VaultGetVaultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_vault", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_vault(chain=models.V1MorphoVaultChain.ETHEREUM, vault_address=\"0x182863131F9a4630fF9E27830d945B1413e347E8\", block=None, user_address=\"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoVault({\n chain: \"ethereum\",\n block: null,\n vaultAddress: \"0x182863131F9a4630fF9E27830d945B1413e347E8\",\n userAddress: \"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/markets": { "get": { "tags": [ "Morpho" ], "summary": "Get Markets", "description": "Query a list of markets you can borrow from.\n\nEach market has one unique token that can be borrowed against one unique token that\ncan be used as collateral.", "operationId": "v1_morpho_markets", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "collateral_token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)" }, { "type": "null" } ], "title": "Collateral Token", "example": "USDC" }, "description": "Symbol or address of the collateral token to filter markets by. Optional parameter." }, { "name": "loan_token", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)" }, { "type": "null" } ], "title": "Loan Token", "example": "WETH" }, "description": "Symbol or address of the loan token to filter markets by. Optional parameter." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoGetMarketsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_markets", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_markets(chain=models.V1MorphoMarketsChain.BASE, collateral_token=\"USDC\", loan_token=\"WETH\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoMarkets({\n chain: \"base\",\n collateralToken: \"USDC\",\n loanToken: \"WETH\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/market": { "get": { "tags": [ "Morpho" ], "summary": "Get Market", "description": "Get data \u0026 metrics for a specific Morpho market.\n\nIncluding:\n- Current, daily, weekly, monthly, yearly APY\n- Collateral \u0026 loan asset data\n- Liquidation loan-to-value ratio\n- Collateral, borrow \u0026 liquidity value\n- Utilization ratio\n- Pertinent metadata\n- Whitelist status", "operationId": "v1_morpho_market", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "unique_market_key", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "example": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" }, "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoGetMarketResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_market", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_market(chain=models.V1MorphoMarketChain.BASE, unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoMarket({\n chain: \"base\",\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/market_position": { "get": { "tags": [ "Morpho" ], "summary": "Check Market Position", "description": "Check how many shares you've borrowed and the equivalent token amount of a given\nmarket.", "operationId": "v1_morpho_market_position", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "user_address", "in": "query", "required": true, "schema": { "type": "string", "title": "User Address", "example": "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4" }, "description": "The user address of the desired market position." }, { "name": "unique_market_key", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "example": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" }, "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoCheckMarketPositionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_market_position", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_market_position(chain=models.V1MorphoMarketPositionChain.BASE, user_address=\"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\", unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoMarketPosition({\n chain: \"base\",\n userAddress: \"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\",\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/user_position": { "get": { "tags": [ "Morpho" ], "summary": "Check User Position", "description": "Check user's overall position across the entire Morpho ecosystem.\n\nInlcuding all vault and market position metrics and relavant metadata of said vaults\nand markets.", "operationId": "v1_morpho_user_position", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" } }, { "name": "user_address", "in": "query", "required": true, "schema": { "type": "string", "title": "User Address", "example": "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4" }, "description": "The user wallet address of the desired user position." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoCheckUserPositionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_user_position", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_user_position(chain=models.V1MorphoUserPositionChain.BASE, user_address=\"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoUserPosition({\n chain: \"base\",\n userAddress: \"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/deposit": { "post": { "tags": [ "Morpho" ], "summary": "Deposit to Vault", "description": "Deposit tokens into a Morpho Vault to earn passive yield from interest paid by\nborrowers.\n\nEach vault accepts one unique token that can be deposited.\n\nA Morpho Vault has one loan asset and can allocate deposits to multiple Morpho\nmarkets. Users can deposit into a vault to start earning passive yield from interest\npaid by borrowers. Vaults feature automated risk management, actively curating risk\nexposure for all deposited assets so users don't need to make these decisions\nthemselves. Users maintain full control over their assets, can monitor the vault's\nstate at any time, and withdraw their liquidity at their discretion.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `\u003cvault-contract-address\u003e`\n \u003c/Info\u003e\n ", "operationId": "v1_morpho_deposit", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoDepositRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_deposit", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_deposit(vault_address=\"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca\", amount=0.5, chain=models.MorphoDepositRequestChain.BASE, sender=\"0xF85272345eDa6aA3c6469C97065a676737e73f87\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoDeposit({\n vaultAddress: \"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca\",\n amount: 0.5,\n chain: \"base\",\n sender: \"0xF85272345eDa6aA3c6469C97065a676737e73f87\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/withdraw": { "post": { "tags": [ "Morpho" ], "summary": "Withdraw from Vault", "description": "Withdraw deposited tokens from a Morpho Vault.\n\nThe passive yield earned on token deposits is represented by the increased value of\nthe shares received upon depositing tokens.\n\nA Morpho Vault has one loan asset and can allocate deposits to multiple Morpho\nmarkets. Users can deposit into a vault to start earning passive yield from interest\npaid by borrowers. Vaults feature automated risk management, actively curating risk\nexposure for all deposited assets so users don't need to make these decisions\nthemselves. Users maintain full control over their assets, can monitor the vault's\nstate at any time, and withdraw their liquidity at their discretion.", "operationId": "v1_morpho_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoWithdrawRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_withdraw(vault_address=\"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca\", amount=\"ALL\", chain=models.MorphoWithdrawRequestChain.BASE, sender=\"0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoWithdraw({\n vaultAddress: \"0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca\",\n amount: \"ALL\",\n chain: \"base\",\n sender: \"0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/supply_collateral": { "post": { "tags": [ "Morpho" ], "summary": "Supply Collateral to Market", "description": "Supply collateral to a Morpho Market in order to borrow against it.\n\nA Morpho Market is a primitive lending pool that pairs one collateral asset with one\nloan asset. Each market is isolated (meaning risks are contained within each\nindividual market), immutable (cannot be changed after deployment), and will persist\nas long as the blockchain it is deployed on is live.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `Morpho`\n \u003c/Info\u003e\n ", "operationId": "v1_morpho_supply_collateral", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoSupplyCollateralRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_supply_collateral", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_supply_collateral(amount=0.5, unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\", chain=models.MorphoSupplyCollateralRequestChain.BASE, sender=\"0x62e25C7CAADca07b5dFB6C52E01329451048632E\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoSupplyCollateral({\n amount: 0.5,\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n chain: \"base\",\n sender: \"0x62e25C7CAADca07b5dFB6C52E01329451048632E\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/withdraw_collateral": { "post": { "tags": [ "Morpho" ], "summary": "Withdraw Collateral from Market", "description": "Withdraw collateral that has been supplied to a Morpho Market.\n\nA Morpho Market is a primitive lending pool that pairs one collateral asset with one\nloan asset. Each market is isolated (meaning risks are contained within each\nindividual market), immutable (cannot be changed after deployment), and will persist\nas long as the blockchain it is deployed on is live.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `Morpho`\n \u003c/Info\u003e\n ", "operationId": "v1_morpho_withdraw_collateral", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoWithdrawCollateralRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_withdraw_collateral", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_withdraw_collateral(amount=0.5, unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\", chain=models.MorphoWithdrawCollateralRequestChain.BASE, sender=\"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoWithdrawCollateral({\n amount: 0.5,\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n chain: \"base\",\n sender: \"0x81d310Eb515E05EB26322e2DeDE9e75b754885A4\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/borrow": { "post": { "tags": [ "Morpho" ], "summary": "Borrow from Market", "description": "Borrow tokens from a Morpho Market against supplied collateral.\n\nThe position could be liquidated when a borrower's Loan-To-Value (LTV) exceeds the\nLiquidation Loan-To-Value (LLTV) threshold of the market.\n\nA Morpho Market is a primitive lending pool that pairs one collateral asset with one\nloan asset. Each market is isolated (meaning risks are contained within each\nindividual market), immutable (cannot be changed after deployment), and will persist\nas long as the blockchain it is deployed on is live.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `Morpho`\n \u003c/Info\u003e\n ", "operationId": "v1_morpho_borrow", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoBorrowRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_borrow", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_borrow(amount=0.00005, unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\", chain=models.MorphoBorrowRequestChain.BASE, sender=\"0x7c90Ee2D90160B072940498DB129E0D6eC14F830\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoBorrow({\n amount: 0.00005,\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n chain: \"base\",\n sender: \"0x7c90Ee2D90160B072940498DB129E0D6eC14F830\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/morpho/repay": { "post": { "tags": [ "Morpho" ], "summary": "Repay to Market", "description": "Repay borrowed tokens to a market in order to reduce or eliminate debt.\n\nA Morpho Market is a primitive lending pool that pairs one collateral asset with one\nloan asset. Each market is isolated (meaning risks are contained within each\nindividual market), immutable (cannot be changed after deployment), and will persist\nas long as the blockchain it is deployed on is live.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `Morpho`\n \u003c/Info\u003e\n ", "operationId": "v1_morpho_repay", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MorphoRepayRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "morpho_repay", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.morpho.morpho_repay(amount=0.000005, unique_market_key=\"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\", chain=models.MorphoRepayRequestChain.BASE, sender=\"0xbc267D24E58b429347026346c0C103b8Fa95D93d\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.morpho.morphoRepay({\n amount: 0.000005,\n uniqueMarketKey: \"0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5\",\n chain: \"base\",\n sender: \"0xbc267D24E58b429347026346c0C103b8Fa95D93d\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/sky/position": { "get": { "tags": [ "Sky" ], "summary": "Check USDS Position", "description": "Check the USDS overall position.", "operationId": "v1_sky_position", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "user_address", "in": "query", "required": true, "schema": { "type": "string", "title": "User Address", "example": "0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60" }, "description": "The user-address of the desired position." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkyCheckPositionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "sky_position", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.sky.sky_position(chain=models.V1SkyPositionChain.ETHEREUM, user_address=\"0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.sky.skyPosition({\n chain: \"ethereum\",\n userAddress: \"0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/sky/buy": { "post": { "tags": [ "Sky" ], "summary": "Buy USDS", "description": "Buy USDS with DAI or USDC on a 1:1 basis. There are no fees.\n\nIf buying with DAI, user will need to set an allowance on the DAI contract for the\n'SkyDaiUsdsConverter' contract beforehand.\n\nIf buying with USDC, user will need to set an allowance on the USDC contract for the\n'SkyUsdcUsdsConverter' contract beforehand.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `SkyUsdcUsdsConverter`\n - `SkyDaiUsdsConverter`\n \u003c/Info\u003e\n ", "operationId": "v1_sky_buy", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkyBuyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "sky_buy", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.sky.sky_buy(token_in=models.SkyBuyRequestTokenIn.USDC, amount=0.5, chain=models.SkyBuyRequestChain.ETHEREUM, sender=\"0xeF61F94a856a20f4fdD831B823e8B3CF09BEec3B\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.sky.skyBuy({\n tokenIn: \"USDC\",\n amount: 0.5,\n chain: \"ethereum\",\n sender: \"0xeF61F94a856a20f4fdD831B823e8B3CF09BEec3B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/sky/sell": { "post": { "tags": [ "Sky" ], "summary": "Sell USDS", "description": "Sell USDS for DAI or USDC on a 1:1 basis. There are no fees.\n\nIf swapping to DAI, user will need to set an allowance on the USDS contract for the\n'SkyDaiUsdsConverter' contract beforehand.\n\nIf swapping to USDC, user will need to set an allowance on the USDS contract for the\n'SkyUsdcUsdsConverter' contract beforehand.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `SkyUsdcUsdsConverter`\n - `SkyDaiUsdsConverter`\n \u003c/Info\u003e\n ", "operationId": "v1_sky_sell", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkySellRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "sky_sell", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.sky.sky_sell(token_out=models.SkySellRequestTokenOut.USDC, amount=0.2, chain=models.SkySellRequestChain.ETHEREUM, sender=\"0x0ca38b6Ed5e12bbaf5fAf380c05a806D3a8d1CBC\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.sky.skySell({\n tokenOut: \"USDC\",\n amount: 0.2,\n chain: \"ethereum\",\n sender: \"0x0ca38b6Ed5e12bbaf5fAf380c05a806D3a8d1CBC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/sky/deposit": { "post": { "tags": [ "Sky" ], "summary": "Deposit USDS", "description": "Deposit USDS to earn yield. Deposited USDS is represented as sUSDS.\n\nAllowance must be set on USDS contract for UsdsVault.\n\nThere are no fees.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `SkyUsdsVault`\n \u003c/Info\u003e\n ", "operationId": "v1_sky_deposit", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkyDepositRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "sky_deposit", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.sky.sky_deposit(amount=0.2, sender=\"0x7F6063e2237a6b2aE32eDc48EF9cD1B2A8F3aD5D\", chain=models.SkyDepositRequestChain.ETHEREUM, estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.sky.skyDeposit({\n amount: 0.2,\n chain: \"ethereum\",\n sender: \"0x7F6063e2237a6b2aE32eDc48EF9cD1B2A8F3aD5D\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/sky/withdraw": { "post": { "tags": [ "Sky" ], "summary": "Withdraw USDS", "description": "Withdraw USDS. Exchange yield-bearing sUSDS for USDS.\n\nAllowance must be set on USDS contract for UsdsVault.\n\nThere are no fees.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `SkyUsdsVault`\n \u003c/Info\u003e\n ", "operationId": "v1_sky_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkyWithdrawRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "sky_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.sky.sky_withdraw(amount=\"ALL\", sender=\"0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60\", chain=models.SkyWithdrawRequestChain.ETHEREUM, estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.sky.skyWithdraw({\n amount: \"ALL\",\n chain: \"ethereum\",\n sender: \"0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/token/price": { "get": { "tags": [ "Token" ], "summary": "Token Price", "description": "Retrieves the price of a token in USD.", "operationId": "v1_token_price", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "AAVE" }, "description": "The symbol or address of the token for which to get the price.." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenPriceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "token_price", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.token.token_price(chain=models.V1TokenPriceChain.ETHEREUM, token=\"AAVE\", block=None)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.token.tokenPrice({\n chain: \"ethereum\",\n block: null,\n token: \"AAVE\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/token/balance": { "get": { "tags": [ "Token" ], "summary": "Token Balance", "description": "Returns the balance of a specific ERC20 token for a given user address.", "operationId": "v1_token_balance", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "user", "in": "query", "required": true, "schema": { "type": "string", "title": "User", "example": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" }, "description": "The user to get the token balance of." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token for which the balance is checked." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenBalanceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "token_balance", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.token.token_balance(chain=models.V1TokenBalanceChain.ARBITRUM, user=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\", token=\"USDC\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.token.tokenBalance({\n chain: \"arbitrum\",\n user: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n token: \"USDC\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/token/transfer": { "post": { "tags": [ "Token" ], "summary": "Transfer Tokens", "description": "Sends native ETH or ERC20 tokens from the sender's address to another address.", "operationId": "v1_token_transfer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenTransferRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "token_transfer", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.token.token_transfer(to=\"0x01E62835dd7F52173546A325294762143eE4a882\", token=\"USDC\", amount=0.1, chain=models.TokenTransferRequestChain.BASE, sender=\"0xA06a2D62D71BeAf93FA0a684A92c28729297eC81\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.token.tokenTransfer({\n to: \"0x01E62835dd7F52173546A325294762143eE4a882\",\n token: \"USDC\",\n amount: 0.1,\n chain: \"base\",\n sender: \"0xA06a2D62D71BeAf93FA0a684A92c28729297eC81\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/quote/buy_exactly": { "get": { "tags": [ "Uniswap V3" ], "summary": "Get Quote - to Specified Amount", "description": "This endpoint calculates the amount of input tokens required to purchase a\nspecified amount of output tokens from a Uniswap pool.\n\nIt also provides the resulting price after the transaction. The calculation takes\ninto account the current pool state and the specified fee tier.", "operationId": "v1_uniswap_quote_buy_exactly", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "token_in", "in": "query", "required": true, "schema": { "type": "string", "title": "Token In", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token to swap from." }, { "name": "token_out", "in": "query", "required": true, "schema": { "type": "string", "title": "Token Out", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDT" }, "description": "The symbol or address of the token to swap to." }, { "name": "fee", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "0.01", "0.05", "0.3", "1.0" ], "title": "FeeEnum", "description": "The transaction fee of a Uniswap pool in bips.\n\nUniswap supports 4 different fee levels.", "example": "0.01" }, "description": "The fee to pay for the swap" }, { "name": "amount_out", "in": "query", "required": true, "schema": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out", "example": 1 }, "description": "The amount of the token to swap to" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapBuyQuoteInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_quote_buy_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_quote_buy_exactly(chain=models.V1UniswapQuoteBuyExactlyChain.ARBITRUM, token_in=\"USDC\", token_out=\"USDT\", fee=models.V1UniswapQuoteBuyExactlyFeeEnum.ZERO_DOT_01, amount_out=1)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapQuoteBuyExactly({\n chain: \"arbitrum\",\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n fee: \"0.01\",\n amountOut: 1,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/quote/sell_exactly": { "get": { "tags": [ "Uniswap V3" ], "summary": "Get quote - From Specified Amount", "description": "This endpoint calculates the amount of input tokens required to purchase a\nspecified amount of output tokens from a Uniswap pool.\n\nIt also provides the resulting price after the transaction. The calculation takes\ninto account the current pool state and the specified fee tier.", "operationId": "v1_uniswap_quote_sell_exactly", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "token_in", "in": "query", "required": true, "schema": { "type": "string", "title": "Token In", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token to swap from." }, { "name": "token_out", "in": "query", "required": true, "schema": { "type": "string", "title": "Token Out", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDT" }, "description": "The symbol or address of the token to swap to." }, { "name": "fee", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "0.01", "0.05", "0.3", "1.0" ], "title": "FeeEnum", "description": "The transaction fee of a Uniswap pool in bips.\n\nUniswap supports 4 different fee levels.", "example": "0.01" }, "description": "The fee to pay for the swap" }, { "name": "amount_in", "in": "query", "required": true, "schema": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "example": 1 }, "description": "The amount of the token to swap from" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapSellQuoteInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_quote_sell_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_quote_sell_exactly(chain=models.V1UniswapQuoteSellExactlyChain.ARBITRUM, token_in=\"USDC\", token_out=\"USDT\", fee=models.V1UniswapQuoteSellExactlyFeeEnum.ZERO_DOT_01, amount_in=1)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapQuoteSellExactly({\n chain: \"arbitrum\",\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n fee: \"0.01\",\n amountIn: 1,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/pool_price": { "get": { "tags": [ "Uniswap V3" ], "summary": "Pool Price", "description": "This endpoint calculates the price of a token in a Uniswap pool.\n\nThe price is calculated based on the current pool state and the specified fee tier.", "operationId": "v1_uniswap_pool_price", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "token_in", "in": "query", "required": true, "schema": { "type": "string", "title": "Token In", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of a token in the pool" }, { "name": "token_out", "in": "query", "required": true, "schema": { "type": "string", "title": "Token Out", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDT" }, "description": "The symbol or address of a token in the pool" }, { "name": "fee", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "0.01", "0.05", "0.3", "1.0" ], "title": "FeeEnum", "description": "The transaction fee of a Uniswap pool in bips.\n\nUniswap supports 4 different fee levels.", "example": "0.01" }, "description": "The fee of the pool" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapPoolPriceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_pool_price", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_pool_price(chain=models.V1UniswapPoolPriceChain.ARBITRUM, token_in=\"USDC\", token_out=\"USDT\", fee=models.V1UniswapPoolPriceFeeEnum.ZERO_DOT_01)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapPoolPrice({\n chain: \"arbitrum\",\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n fee: \"0.01\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/liquidity_provision/in_range": { "get": { "tags": [ "Uniswap V3" ], "summary": "Check if LP is Active.", "description": "This endpoint allows users to check whether a specific liquidity provider ()\nposition is within the active tick range on the uniswap platform.\n\nby providing the token id associated with the position, users can verify if the\nposition is currently within the tick range where trading occurs. this information\nis essential for users to monitor the status of their lp positions and ensure that\nthey are actively participating in the trading activities within the liquidity pool\nand earning trading fees.", "operationId": "v1_uniswap_liquidity_provision_in_range", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "token_id", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 0, "title": "Token Id", "example": 4318185 }, "description": "Token ID of the NFT representing the liquidity provisioned position." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapCheckInRangeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_liquidity_provision_in_range", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_liquidity_provision_in_range(chain=models.V1UniswapLiquidityProvisionInRangeChain.ARBITRUM, token_id=4318185)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionInRange({\n chain: \"arbitrum\",\n tokenId: 4318185,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/liquidity_provision/positions": { "get": { "tags": [ "Uniswap V3" ], "summary": "List LP", "description": "This endpoint retrieves the number of Liquidity Provider (LP) positions\nassociated with a specific sender address on the Uniswap platform.\n\nUsers can query this endpoint to obtain detailed information about their LP\npositions, including the total number of positions and relevant metadata. This\ninformation is crucial for users to manage and analyze their liquidity provision\nactivities effectively.", "operationId": "v1_uniswap_liquidity_provision_positions", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "user", "in": "query", "required": false, "schema": { "type": "string", "title": "User", "example": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" }, "description": "The user to get positions for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapLPPositionsInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_liquidity_provision_positions", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_liquidity_provision_positions(chain=models.V1UniswapLiquidityProvisionPositionsChain.ARBITRUM, user=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionPositions({\n chain: \"arbitrum\",\n user: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/swap/buy_exactly": { "post": { "tags": [ "Uniswap V3" ], "summary": "Buy exact amount", "description": "This endpoint allows users to trade a variable amount of one token to receive an\nexact amount of another token using the Uniswap protocol.\n\nThe transaction is executed on the specified blockchain network, and the user must\nprovide the necessary transaction details, including the token to buy, the token to\npay with, and the exact amount to receive. If the token being paid with is ETH and\nneeds to be wrapped, the appropriate amount will be wrapped automatically.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `UniswapV3Router`\n \u003c/Info\u003e\n ", "operationId": "v1_uniswap_swap_buy_exactly", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapBuyExactlyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapBuyExactlyTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_swap_buy_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_swap_buy_exactly(token_in=\"USDC\", token_out=\"USDT\", fee=models.FeeEnum.ZERO_DOT_01, amount_out=0.1, max_slippage_percent=0.5, chain=models.UniswapBuyExactlyRequestChain.BASE, sender=\"0x7a27794511C14F6afFDE618D3d8ef7B9C24058Ac\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapSwapBuyExactly({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n fee: \"0.01\",\n amountOut: 0.1,\n maxSlippagePercent: 0.5,\n chain: \"base\",\n sender: \"0x7a27794511C14F6afFDE618D3d8ef7B9C24058Ac\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/swap/sell_exactly": { "post": { "tags": [ "Uniswap V3" ], "summary": "Sell exact amount", "description": "This endpoint allows users to trade a specific amount of one token into another\ntoken using the Uniswap protocol.\n\nThe transaction is executed on the specified blockchain network, and the user must\nprovide the necessary transaction details, including the token to sell, the token to\nreceive, and the amount to sell. If the token being sold is ETH and needs to be\nwrapped, the appropriate amount will be wrapped automatically.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `UniswapV3Router`\n \u003c/Info\u003e\n ", "operationId": "v1_uniswap_swap_sell_exactly", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapSellExactlyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapSellExactlyTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_swap_sell_exactly", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_swap_sell_exactly(token_in=\"USDC\", token_out=\"USDT\", fee=models.FeeEnum.ZERO_DOT_01, amount_in=0.1, max_slippage_percent=0.5, chain=models.UniswapSellExactlyRequestChain.BASE, sender=\"0xA7DeA16238DdF6ed8AaC73A348bbdE6da20C20B5\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapSwapSellExactly({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n fee: \"0.01\",\n amountIn: 0.1,\n maxSlippagePercent: 0.5,\n chain: \"base\",\n sender: \"0xA7DeA16238DdF6ed8AaC73A348bbdE6da20C20B5\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/liquidity_provision/mint": { "post": { "tags": [ "Uniswap V3" ], "summary": "Open a new LP position", "description": "This endpoint allows users to open a new Liquidity Provider (LP) position on the\nUniswap platform.\n\nBy providing the necessary parameters, users can initiate a minting process to\ncreate a new LP token, which represents their stake in a specific liquidity pool.\nThis operation is essential for users looking to participate in liquidity provision,\nenabling them to earn fees from trades that occur within the pool. The endpoint\nrequires details such as the token pair, amount, and any additional parameters\nneeded for the minting process.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `UniswapV3NFTPositionManager`\n \u003c/Info\u003e\n ", "operationId": "v1_uniswap_liquidity_provision_mint", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapMintLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_liquidity_provision_mint", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_liquidity_provision_mint(token0=\"USDC\", token1=\"USDT\", fee=models.FeeEnum.ONE_DOT_0, tick_lower=1823, tick_upper=2623, amount0_desired=\"0.05\", amount1_desired=\"0.00\", amount0_min=\"0\", amount1_min=\"0\", chain=models.UniswapMintLiquidityProvisionRequestChain.BASE, sender=\"0x41096de529D54718a5600185F8C4460979ed75C9\", recipient=\"0x41096de529D54718a5600185F8C4460979ed75C9\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionMint({\n token0: \"USDC\",\n token1: \"USDT\",\n fee: \"1.0\",\n tickLower: 1823,\n tickUpper: 2623,\n amount0Desired: \"0.05\",\n amount1Desired: \"0.00\",\n amount0Min: \"0\",\n amount1Min: \"0\",\n recipient: \"0x41096de529D54718a5600185F8C4460979ed75C9\",\n chain: \"base\",\n sender: \"0x41096de529D54718a5600185F8C4460979ed75C9\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/liquidity_provision/increase": { "post": { "tags": [ "Uniswap V3" ], "summary": "Increase an LP position", "description": "This endpoint allows users to increase their existing Liquidity Provider (LP)\npositions on the Uniswap platform.\n\nBy providing the necessary parameters, users can add more liquidity to their current\npositions, thereby increasing their stake in the liquidity pool. This operation is\nbeneficial for users who wish to enhance their potential earnings from trading fees\nwithin the pool. The endpoint requires details such as the token pair, additional\namount to be added, and any other parameters necessary for the liquidity increase\nprocess.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `AerodromeSlipstreamRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_uniswap_liquidity_provision_increase", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapIncreaseLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_liquidity_provision_increase", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_liquidity_provision_increase(token_id=3432182, amount0_desired=\"0.3\", amount1_desired=\"0.0\", amount0_min=\"0.00\", amount1_min=\"0.00\", chain=models.UniswapIncreaseLiquidityProvisionRequestChain.BASE, sender=\"0x41096de529D54718a5600185F8C4460979ed75C9\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionIncrease({\n tokenId: 3432182,\n amount0Desired: \"0.3\",\n amount1Desired: \"0.0\",\n amount0Min: \"0.00\",\n amount1Min: \"0.00\",\n chain: \"base\",\n sender: \"0x41096de529D54718a5600185F8C4460979ed75C9\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/uniswap/liquidity_provision/withdraw": { "post": { "tags": [ "Uniswap V3" ], "summary": "Withdraw an LP position", "description": "This endpoint allows users to withdraw their Liquidity Provider (LP) positions\nfrom the Uniswap platform.\n\nBy specifying the necessary parameters, users can initiate the withdrawal process to\nremove their stake from a specific liquidity pool. This operation is crucial for\nusers who wish to reclaim their assets or reallocate their liquidity to different\npools or investments. The endpoint requires details such as the token pair, the\namount to be withdrawn, and any additional parameters needed for the withdrawal\nprocess. Users should ensure they meet any protocol requirements or conditions\nbefore initiating a withdrawal to avoid potential issues or penalties.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `UniswapV3NFTPositionManager`\n \u003c/Info\u003e\n ", "operationId": "v1_uniswap_liquidity_provision_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UniswapWithdrawLiquidityProvisionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "uniswap_liquidity_provision_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.uniswap_v3.uniswap_liquidity_provision_withdraw(token_id=3432182, percentage_for_withdrawal=1, chain=models.UniswapWithdrawLiquidityProvisionRequestChain.BASE, sender=\"0x41096de529D54718a5600185F8C4460979ed75C9\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionWithdraw({\n tokenId: 3432182,\n percentageForWithdrawal: 1,\n chain: \"base\",\n sender: \"0x41096de529D54718a5600185F8C4460979ed75C9\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/portfolio": { "get": { "tags": [ "Universal" ], "summary": "List User Portfolio", "description": "Fetch the detailed portfolio of a specific wallet address on a given blockchain.\n\nThis includes the total value of the portfolio in USD and a breakdown of token\nbalances, including their respective values and quantities.", "operationId": "v1_generic_portfolio", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "user", "in": "query", "required": false, "schema": { "type": "string", "title": "User", "example": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" }, "description": "The user to get portfolio for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Portfolio" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_portfolio", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_portfolio(chain=models.V1GenericPortfolioChain.ARBITRUM, user=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericPortfolio({\n chain: \"arbitrum\",\n user: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/supported_chains": { "get": { "tags": [ "Universal" ], "summary": "List Supported Chains", "description": "Get the list of supported chains by the Compass API.", "operationId": "v1_generic_supported_chains", "parameters": [ { "name": "protocol", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/Protocol" }, { "type": "null" } ], "title": "Protocol", "example": "aave" }, "description": "The protocol to get the supported chains for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SupportedChainInfo" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_supported_chains", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_supported_chains(protocol=models.Protocol.AAVE)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericSupportedChains({\n protocol: \"aave\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/allowance": { "get": { "tags": [ "Universal" ], "summary": "Get Allowance", "description": "In decentralized finance (DeFi) protocols such as Uniswap or AAVE, users must set\na token allowance to authorize the protocol to spend a specified amount of their\ntokens on their behalf.\n\nThis is a crucial step before engaging in any transactions or operations within\nthese protocols, ensuring that the protocol has the necessary permissions to manage\nthe user's tokens securely and efficiently.", "operationId": "v1_generic_allowance", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "user", "in": "query", "required": false, "schema": { "type": "string", "title": "User", "example": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" }, "description": "The user to get the ERC20 allowance of." }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "title": "Token", "description": "A token identifier - either a supported symbol (e.g., USDC, WETH) or a valid Ethereum address (0x...)", "example": "USDC" }, "description": "The symbol or address of the token for which the allowance is checked." }, { "name": "contract", "in": "query", "required": true, "schema": { "anyOf": [ { "enum": [ "AaveV3Pool", "AerodromeBasicRouter", "AerodromeSlipstreamRouter", "AerodromeSlipstreamNonfungiblePositionManager", "UniswapV3Router", "UniswapV3NFTPositionManager", "Morpho", "SkyDaiUsdsConverter", "SkyUsdcUsdsConverter", "SkyUsdsVault", "PendleRouter", "OdosRouter", "EthenaVault" ], "type": "string" }, { "type": "string" } ], "title": "Contract", "example": "AaveV3Pool" }, "description": "The name or address of the contract to check allowance for." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AllowanceInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_allowance", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_allowance(chain=models.V1GenericAllowanceChain.ARBITRUM, token=\"USDC\", contract=models.V1GenericAllowanceContractEnum.AAVE_V3_POOL, user=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericAllowance({\n chain: \"arbitrum\",\n user: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n token: \"USDC\",\n contract: \"AaveV3Pool\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/ens": { "get": { "tags": [ "Universal" ], "summary": "Resolve ENS", "description": "An ENS name is a string ending in `.eth`.\n\nE.g. `vitalik.eth`. This endpoint can be used to\nquery the actual ethereum wallet address behind the ENS name.", "operationId": "v1_generic_ens", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "ens_name", "in": "query", "required": false, "schema": { "type": "string", "title": "Ens Name", "example": "vitalik.eth" }, "description": "The ENS name to resolve." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnsNameInfoResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_ens", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_ens(chain=models.V1GenericEnsChain.ETHEREUM, ens_name=\"vitalik.eth\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericEns({\n chain: \"ethereum\",\n ensName: \"vitalik.eth\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/wrap_eth": { "post": { "tags": [ "Universal" ], "summary": "Wrap ETH", "description": "Wrapping ETH creates an ERC20 compliant form of ETH that is typically needed for\nit to be traded on DeFi protocols.", "operationId": "v1_generic_wrap_eth", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WrapEthRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_wrap_eth", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_wrap_eth(amount=\"0.000001\", chain=models.WrapEthRequestChain.BASE, sender=\"0xdc3db667461DeE4881E73469c144FAe21eE920A2\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericWrapEth({\n amount: \"0.000001\",\n chain: \"base\",\n sender: \"0xdc3db667461DeE4881E73469c144FAe21eE920A2\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/unwrap_weth": { "post": { "tags": [ "Universal" ], "summary": "Unwrap WETH", "description": "Unwrapping WETH converts the ERC-20 compliant form of ETH back to native ETH that\ncan be used for gas and other native purposes.", "operationId": "v1_generic_unwrap_weth", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnwrapWethRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_unwrap_weth", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_unwrap_weth(amount=\"0.00004\", chain=models.UnwrapWethRequestChain.BASE, sender=\"0x0E9E8986823aF26F6b18702C31AfF6a10C1e9E7A\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericUnwrapWeth({\n amount: \"0.00004\",\n chain: \"base\",\n sender: \"0x0E9E8986823aF26F6b18702C31AfF6a10C1e9E7A\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/generic/allowance/set": { "post": { "tags": [ "Universal" ], "summary": "Set Allowance", "description": "This endpoint allows users to modify the token allowance on any ERC-20 token for\na specific protocol.\n\nIn decentralized finance (DeFi), setting an allowance is a necessary step to\nauthorize a protocol to spend a specified amount of tokens on behalf of the user.\nThis operation is crucial for ensuring that the protocol can manage the user's\ntokens securely and efficiently, enabling seamless transactions and operations\nwithin the DeFi ecosystem.", "operationId": "v1_generic_allowance_set", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetAllowanceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "generic_allowance_set", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.universal.generic_allowance_set(token=\"USDC\", contract=models.SetAllowanceRequestContractEnum.AAVE_V3_POOL, amount=\"0.1\", chain=models.SetAllowanceRequestChain.BASE, sender=\"0xa16d82c668317bF20091fA9D6D2CAE09Ee05d7c8\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.universal.genericAllowanceSet({\n token: \"USDC\",\n contract: \"AaveV3Pool\",\n amount: \"0.1\",\n chain: \"base\",\n sender: \"0xa16d82c668317bF20091fA9D6D2CAE09Ee05d7c8\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/market": { "get": { "tags": [ "Pendle" ], "summary": "Get Market \u0026 User Position", "description": "Get the market's implied APY, maturity date and the associated token data.\n\nThe user position is only included if 'user_address' parameter is included.", "operationId": "v1_pendle_market", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "market_address", "in": "query", "required": true, "schema": { "type": "string", "title": "Market Address", "example": "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538" }, "description": "The market address of the desired position." }, { "name": "user_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Address", "example": "0x68C314e30b543a35819e5625da563E6Da65D5dd4" }, "description": "The user address of the desired market position. Only include if you would like the user position included in the response. Defaults to `None`." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleGetMarketResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_market", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_market(chain=models.V1PendleMarketChain.ARBITRUM, market_address=\"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\", block=None, user_address=\"0x68C314e30b543a35819e5625da563E6Da65D5dd4\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendleMarket({\n chain: \"arbitrum\",\n block: null,\n marketAddress: \"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\",\n userAddress: \"0x68C314e30b543a35819e5625da563E6Da65D5dd4\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/positions": { "get": { "tags": [ "Pendle" ], "summary": "List User's Market Positions", "description": "List the user's SY, PT, YT and LP positions for all markets on a given chain.", "operationId": "v1_pendle_positions", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } }, { "name": "user_address", "in": "query", "required": true, "schema": { "type": "string", "title": "User Address", "example": "0x68C314e30b543a35819e5625da563E6Da65D5dd4" }, "description": "The user address of the desired position." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleListUserPositionsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_positions", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_positions(chain=models.V1PendlePositionsChain.ARBITRUM, user_address=\"0x68C314e30b543a35819e5625da563E6Da65D5dd4\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendlePositions({\n chain: \"arbitrum\",\n userAddress: \"0x68C314e30b543a35819e5625da563E6Da65D5dd4\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/markets": { "get": { "tags": [ "Pendle" ], "summary": "List Market Data", "description": "Get a list of active markets.", "operationId": "v1_pendle_markets", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "arbitrum" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleListMarketsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_markets", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_markets(chain=models.V1PendleMarketsChain.ARBITRUM)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendleMarkets({\n chain: \"arbitrum\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/pt": { "post": { "tags": [ "Pendle" ], "summary": "Trade Principal Token (PT)", "description": "Trade market's Principal Token (PT) for fixed yield.\n\nPT is traded with a token of the user's choice.\n\nA sufficient allowance for the Pendle Router on the appropriate token contract must be set\nbeforehand. For `action` set to `BUY`, this is the `token` contract. For `action` set to `SELL`, this is the PT contract.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `PendleRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_pendle_pt", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleTradePtRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleTxResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_pt", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_pt(market_address=\"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\", action=models.PendleTradePtRequestAction.BUY, token=\"ETH\", amount_in=0.0001, max_slippage_percent=1, chain=models.PendleTradePtRequestChain.ARBITRUM, sender=\"0x68C314e30b543a35819e5625da563E6Da65D5dd4\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendlePt({\n marketAddress: \"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\",\n action: \"BUY\",\n token: \"ETH\",\n amountIn: 0.0001,\n maxSlippagePercent: 1,\n chain: \"arbitrum\",\n sender: \"0x68C314e30b543a35819e5625da563E6Da65D5dd4\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/yt": { "post": { "tags": [ "Pendle" ], "summary": "Trade Yield Token (YT)", "description": "Trade Yield Token (YT) for variable yield.\n\nYT is traded with a token of the user's choice.\n\nA sufficient allowance for the Pendle Router on the appropriate token contract must be set\nbeforehand. For `action` set to `BUY`, this is the `token` contract. For `action` set to `SELL`, this is the YT contract.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `PendleRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_pendle_yt", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleTradeYtRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleTxResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_yt", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_yt(market_address=\"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\", action=models.PendleTradeYtRequestAction.BUY, token=\"ETH\", amount_in=0.0001, max_slippage_percent=1, chain=models.PendleTradeYtRequestChain.ARBITRUM, sender=\"0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendleYt({\n marketAddress: \"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\",\n action: \"BUY\",\n token: \"ETH\",\n amountIn: 0.0001,\n maxSlippagePercent: 1,\n chain: \"arbitrum\",\n sender: \"0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/liquidity": { "post": { "tags": [ "Pendle" ], "summary": "Manage Liquidity (LP)", "description": "Manage liquidity in a Pendle Market.\n\nLiquidity is supplied to or withdrawn from the market with a token of the user's choice.\n\nRepresentation of the liquidity provided is in the form of market's Liquidity\nProvider Token (LP) received by the user.\n\nA sufficient allowance for the Pendle Router on the appropriate token contract must be set\nbeforehand. For `action` set to `SUPPLY`, this is the `token` contract. For `action` set to `WTIHDRAW`, this is the market contract (LP).\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `PendleRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_pendle_liquidity", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleManageLiquidityRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleTxResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_liquidity", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_liquidity(market_address=\"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\", action=models.PendleManageLiquidityRequestAction.SUPPLY, token=\"ETH\", amount_in=0.0001, max_slippage_percent=1, chain=models.PendleManageLiquidityRequestChain.ARBITRUM, sender=\"0x931C470a20B4B8428C80F5f63e193EE97C86094F\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendleLiquidity({\n marketAddress: \"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\",\n action: \"SUPPLY\",\n token: \"ETH\",\n amountIn: 0.0001,\n maxSlippagePercent: 1,\n chain: \"arbitrum\",\n sender: \"0x931C470a20B4B8428C80F5f63e193EE97C86094F\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/pendle/redeem_yield": { "post": { "tags": [ "Pendle" ], "summary": "Redeem Claimable Yield", "description": "Redeem claimable yield from the market's associated Yield Token (YT).\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `PendleRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_pendle_redeem_yield", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendleRedeemYieldRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "pendle_redeem_yield", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.pendle.pendle_redeem_yield(market_address=\"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\", chain=models.PendleRedeemYieldRequestChain.ARBITRUM, sender=\"0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.pendle.pendleRedeemYield({\n marketAddress: \"0x46d62a8dede1bf2d0de04f2ed863245cbba5e538\",\n chain: \"arbitrum\",\n sender: \"0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/swap/odos": { "post": { "tags": [ "Swap" ], "summary": "Odos Swap", "description": "Swap between two tokens using Odos Smart Order Routing.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `OdosRouter`\n \u003c/Info\u003e\n ", "operationId": "v1_swap_odos", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OdosSwapRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OdosTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "swap_odos", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.swap.swap_odos(token_in=\"0x0000000000000000000000000000000000000000\", token_out=\"USDT\", amount=0.0001, max_slippage_percent=1, chain=models.OdosSwapRequestChain.ARBITRUM, sender=\"0xBA5c2548003aDD027489EeDE2C90BE6f1c81cBb9\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.swap.swapOdos({\n tokenIn: \"0x0000000000000000000000000000000000000000\",\n tokenOut: \"USDT\",\n amount: 0.0001,\n maxSlippagePercent: 1,\n chain: \"arbitrum\",\n sender: \"0xBA5c2548003aDD027489EeDE2C90BE6f1c81cBb9\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/transaction_bundler/authorization": { "post": { "tags": [ "Transaction Bundler" ], "summary": "Enable Transaction Bundling", "description": "Get authorization for bundling transactions.\n\nCurrently this is required for every transaction bundle to prevent replay attacks\nand ensure transaction ordering when batching multiple actions into a single\ntransaction. The authorization includes a nonce and chain ID to guarantee\ntransaction uniqueness and proper network targeting.", "operationId": "v1_transaction_bundler_authorization", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MulticallAuthorizationRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MulticallAuthorizationResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "transaction_bundler_authorization", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.transaction_bundler.transaction_bundler_authorization(chain=models.MulticallAuthorizationRequestChain.ARBITRUM, sender=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.transactionBundler.transactionBundlerAuthorization({\n chain: \"arbitrum\",\n sender: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/transaction_bundler/execute": { "post": { "tags": [ "Transaction Bundler" ], "summary": "Construct Bundled Transaction", "description": "Bundle arbitrary transactions together into a single multicall transaction using\nEIP-7702.\n\nThis endpoint allows bundling multiple contract calls into a single atomic\ntransaction, reducing gas costs and ensuring all operations succeed or fail\ntogether. The transaction must be authorized using the /authorization endpoint to\nprevent replay attacks.", "operationId": "v1_transaction_bundler_execute", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MulticallExecuteRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BundlerTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "transaction_bundler_execute", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.transaction_bundler.transaction_bundler_execute(chain=models.MulticallExecuteRequestChain.ARBITRUM, sender=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\", actions=[\n models.UserOperation(\n body=models.SetAllowanceParams(\n token=\"WETH\",\n contract=models.SetAllowanceParamsContractEnum.UNISWAP_V3_ROUTER,\n amount=\"1000\",\n ),\n ),\n models.UserOperation(\n body=models.UniswapBuyExactlyParams(\n token_in=\"WETH\",\n token_out=\"USDC\",\n fee=models.FeeEnum.ZERO_DOT_01,\n amount_out=\"1000\",\n max_slippage_percent=0.5,\n ),\n ),\n models.UserOperation(\n body=models.SetAllowanceParams(\n token=\"USDC\",\n contract=models.SetAllowanceParamsContractEnum.AAVE_V3_POOL,\n amount=\"1000\",\n ),\n ),\n models.UserOperation(\n body=models.SetAllowanceParams(\n token=\"WETH\",\n contract=models.SetAllowanceParamsContractEnum.AAVE_V3_POOL,\n amount=\"0.1\",\n ),\n ),\n models.UserOperation(\n body=models.AaveSupplyParams(\n token=\"USDC\",\n amount=\"1000\",\n ),\n ),\n models.UserOperation(\n body=models.AaveBorrowParams(\n token=\"WETH\",\n amount=\"0.1\",\n interest_rate_mode=models.InterestRateMode.VARIABLE,\n ),\n ),\n ], estimate_gas=True, signed_authorization={\n \"nonce\": 1000,\n \"address\": \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n \"chain_id\": 42161,\n \"r\": \"0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615\",\n \"s\": \"0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c\",\n \"y_parity\": 0,\n })\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.transactionBundler.transactionBundlerExecute({\n chain: \"arbitrum\",\n sender: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n estimateGas: true,\n signedAuthorization: {\n nonce: 1000,\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n chainId: 42161,\n r: \"0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615\",\n s: \"0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c\",\n yParity: 0,\n },\n actions: [\n {\n body: {\n actionType: \"SET_ALLOWANCE\",\n token: \"WETH\",\n contract: \"UniswapV3Router\",\n amount: \"1000\",\n },\n },\n {\n body: {\n actionType: \"UNISWAP_BUY_EXACTLY\",\n tokenIn: \"WETH\",\n tokenOut: \"USDC\",\n fee: \"0.01\",\n amountOut: \"1000\",\n maxSlippagePercent: 0.5,\n },\n },\n {\n body: {\n actionType: \"SET_ALLOWANCE\",\n token: \"USDC\",\n contract: \"AaveV3Pool\",\n amount: \"1000\",\n },\n },\n {\n body: {\n actionType: \"SET_ALLOWANCE\",\n token: \"WETH\",\n contract: \"AaveV3Pool\",\n amount: \"0.1\",\n },\n },\n {\n body: {\n actionType: \"AAVE_SUPPLY\",\n token: \"USDC\",\n amount: \"1000\",\n },\n },\n {\n body: {\n actionType: \"AAVE_BORROW\",\n token: \"WETH\",\n amount: \"0.1\",\n interestRateMode: \"variable\",\n },\n },\n ],\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/transaction_bundler/aave/loop": { "post": { "tags": [ "Transaction Bundler" ], "summary": "AAVE Leverage Long/Short", "description": "Execute an Aave looping strategy that involves repeated supply and borrow\noperations.\n\nThis endpoint creates a multicall transaction that performs a series of operations:\n1. Approves and supplies initial token\n2. For each loop:\n - Borrows another token\n - Swaps borrowed token back to supply token\n - Supplies the swapped tokens\n\nThe transaction must be authorized using the /authorization endpoint to prevent replay attacks.", "operationId": "v1_transaction_bundler_aave_loop", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AaveLoopRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/BundlerTransactionResponse" }, { "$ref": "#/components/schemas/BatchedUserOperationsResponse" } ], "title": "Response V1 Transaction Bundler Aave Loop" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "transaction_bundler_aave_loop", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.transaction_bundler.transaction_bundler_aave_loop(chain=models.AaveLoopRequestChain.ARBITRUM, sender=\"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\", collateral_token=\"USDC\", borrow_token=\"WETH\", initial_collateral_amount=\"1000\", multiplier=\"2.5\", max_slippage_percent=\"0.5\", loan_to_value=\"60\", estimate_gas=True, signed_authorization={\n \"nonce\": 1000,\n \"address\": \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n \"chain_id\": 42161,\n \"r\": \"0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615\",\n \"s\": \"0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c\",\n \"y_parity\": 0,\n }, is_account_abstraction=False)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.transactionBundler.transactionBundlerAaveLoop({\n chain: \"arbitrum\",\n sender: \"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B\",\n estimateGas: true,\n signedAuthorization: {\n nonce: 1000,\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n chainId: 42161,\n r: \"0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615\",\n s: \"0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c\",\n yParity: 0,\n },\n collateralToken: \"USDC\",\n borrowToken: \"WETH\",\n initialCollateralAmount: \"1000\",\n multiplier: \"2.5\",\n maxSlippagePercent: \"0.5\",\n loanToValue: \"60\",\n isAccountAbstraction: false,\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/smart_account/batched_user_operations": { "post": { "tags": [ "Smart Account" ], "summary": "Get Smart Account Batched User Operations", "description": "Generate a list of user operations for smart account batching.", "operationId": "v1_smart_account_batched_user_operations", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchedUserOperationsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchedUserOperationsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "smart_account_batched_user_operations", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.smart_account.smart_account_batched_user_operations(chain=models.BatchedUserOperationsRequestChain.ARBITRUM, sender=\"\u003cvalue\u003e\", operations=[\n models.UserOperation(\n body=models.SetAllowanceParams(\n token=\"USDC\",\n contract=models.SetAllowanceParamsContractEnum.UNISWAP_V3_ROUTER,\n amount=\"1000\",\n ),\n ),\n ], estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.smartAccount.smartAccountBatchedUserOperations({\n chain: \"arbitrum\",\n sender: \"\u003cvalue\u003e\",\n estimateGas: true,\n operations: [\n {\n body: {\n actionType: \"SET_ALLOWANCE\",\n token: \"USDC\",\n contract: \"UniswapV3Router\",\n amount: \"1000\",\n },\n },\n ],\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/vaults/vault": { "get": { "tags": [ "ERC-4626 Vaults" ], "summary": "Get Vault \u0026 User Position", "description": "Get Vault data \u0026 User Position.\n\nThe user position is only included if 'user_address' parameter is included.", "operationId": "v1_vaults_vault", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "vault_address", "in": "query", "required": true, "schema": { "type": "string", "title": "Vault Address", "example": "0x182863131F9a4630fF9E27830d945B1413e347E8" }, "description": "The vault address of the desired vault position." }, { "name": "user_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Address", "example": "0xb8340945eBc917D2Aa0368a5e4E79C849c461511" }, "description": "The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VaultGetVaultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "vaults_vault", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.erc_4626_vaults.vaults_vault(chain=models.V1VaultsVaultChain.ETHEREUM, vault_address=\"0x182863131F9a4630fF9E27830d945B1413e347E8\", block=None, user_address=\"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.erc4626Vaults.vaultsVault({\n chain: \"ethereum\",\n block: null,\n vaultAddress: \"0x182863131F9a4630fF9E27830d945B1413e347E8\",\n userAddress: \"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/vaults/deposit": { "post": { "tags": [ "ERC-4626 Vaults" ], "summary": "Deposit to Vault", "description": "Deposit tokens into a Vault (ERC-4626 Standard) to earn passive yield.\n\nEach vault accepts one unique token that can be deposited.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `\u003cvault_address\u003e`\n \u003c/Info\u003e\n ", "operationId": "v1_vaults_deposit", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VaultDepositRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "vaults_deposit", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.erc_4626_vaults.vaults_deposit(vault_address=\"0xfdB431E661372fA1146efB70bf120ECDed944a78\", amount=0.5, chain=models.VaultDepositRequestChain.BASE, sender=\"0x38EBf6c7D836f476cEE7DD093Ca43Bbc08e4Cc91\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.erc4626Vaults.vaultsDeposit({\n vaultAddress: \"0xfdB431E661372fA1146efB70bf120ECDed944a78\",\n amount: 0.5,\n chain: \"base\",\n sender: \"0x38EBf6c7D836f476cEE7DD093Ca43Bbc08e4Cc91\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/vaults/withdraw": { "post": { "tags": [ "ERC-4626 Vaults" ], "summary": "Withdraw from Vault", "description": "Withdraw deposited tokens from a Vault (ERC-4626 Standard).\n\nThe passive yield earned on token deposits is represented by the increased value of\nthe shares received upon depositing tokens. Trade in these shares for the tokens you\ndeposited plus any accrued yield.", "operationId": "v1_vaults_withdraw", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VaultWithdrawRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "vaults_withdraw", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.erc_4626_vaults.vaults_withdraw(vault_address=\"0xfdB431E661372fA1146efB70bf120ECDed944a78\", amount=\"ALL\", chain=models.VaultWithdrawRequestChain.BASE, sender=\"0x52680FEe4CC87AFB748F98F9B2f8D80190b8EF2c\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.erc4626Vaults.vaultsWithdraw({\n vaultAddress: \"0xfdB431E661372fA1146efB70bf120ECDed944a78\",\n amount: \"ALL\",\n chain: \"base\",\n sender: \"0x52680FEe4CC87AFB748F98F9B2f8D80190b8EF2c\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/ethena/vault": { "get": { "tags": [ "Ethena" ], "summary": "Get Vault \u0026 User Position", "description": "Get data \u0026 user Position for the Ethena vault on Ethereum.\n\nVault address: 0x9d39a5de30e57443bff2a8307a4256c8797a3497\n\nThe user position is only included in the response if 'user_address' parameter is included in the request.", "operationId": "v1_ethena_vault", "parameters": [ { "name": "chain", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "ethereum" ], "title": "Chain", "example": "ethereum" } }, { "name": "block", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Block", "example": null }, "description": "Optional block number (defaults to latest)." }, { "name": "user_address", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Address", "example": "0xb8340945eBc917D2Aa0368a5e4E79C849c461511" }, "description": "The user address of the desired vault position. Only include if you would like the user position included in the response. Defaults to `None`." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EthenaGetVaultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "ethena_vault", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.ethena.ethena_vault(chain=models.V1EthenaVaultChain.ETHEREUM, block=None, user_address=\"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\")\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.ethena.ethenaVault({\n chain: \"ethereum\",\n block: null,\n userAddress: \"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/ethena/deposit": { "post": { "tags": [ "Ethena" ], "summary": "Deposit USDe", "description": "Deposit USDe into a Ethena's Vault to earn passive yield.\n\nThe shares of a deposit are respresented as sUSDe.\n \u003cInfo\u003e\n **Required Allowances**\n\n In order to make this transaction, token allowances need to be set for the following contracts.\n\n - `EthenaVault`\n \u003c/Info\u003e\n ", "operationId": "v1_ethena_deposit", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EthenaDepositRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "ethena_deposit", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.ethena.ethena_deposit(amount=0.4, chain=models.EthenaDepositRequestChain.ETHEREUM, sender=\"0x5283A28b694ce2748e2dE1071417E5830de06518\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.ethena.ethenaDeposit({\n amount: 0.4,\n chain: \"ethereum\",\n sender: \"0x5283A28b694ce2748e2dE1071417E5830de06518\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/ethena/request": { "post": { "tags": [ "Ethena" ], "summary": "Request to Withdraw USDe", "description": "Request to withdraw deposited USDe from Ethena's vault.\n\nThe Ethena vault requires a cooldown period. Once a request to withdraw a specified\namount of USDe has been submitted, the alloted cooldown period must pass before the\nwithdraw USDe transaction can be submitted.\n\nIf an additional amount of USDe is requested to be withdrawn anytime before\nwithdrawing the originally requested amount, the cooldown period restarts.\n\nYield is not earned on USDe while in its cooldown period.\n\nAn allowance does not have to be set to initiate the cooldown period.", "operationId": "v1_ethena_request", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EthenaRequestToWithdrawRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EthenaRequestToWithdrawTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "ethena_request", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.ethena.ethena_request(amount=\"ALL\", chain=models.EthenaRequestToWithdrawRequestChain.ETHEREUM, sender=\"0x85b049df4E74AFF38c6D79F3c71Ae4C998b69342\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.ethena.ethenaRequest({\n amount: \"ALL\",\n chain: \"ethereum\",\n sender: \"0x85b049df4E74AFF38c6D79F3c71Ae4C998b69342\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } }, "/v1/ethena/unstake": { "post": { "tags": [ "Ethena" ], "summary": "Unstake USDe", "description": "Unstake deposited USDe from Ethena's vault.\n\nVerify that the USDe being unstaked has completed its mandatory cooldown period\nusing the Ethena 'Get Vault \u0026 User Position' endpoint.\n\nThis is an all or nothing action. All of the USDe that has completed its cooldown\nperiod must be withdrawn.\n\nThe passive yield earned on USDe deposits is represented by the increased value of\nthe shares received (sUSDe) upon depositing USDe. Trade in these shares in exchange\nfor the intial USDe deposited and any accrued yield since depositing.\n\nAn allowance does not have to be set to unstake USDe that has completed its cooldown\nperiod.", "operationId": "v1_ethena_unstake", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EthenaUnstakeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "ethena_unstake", "x-codeSamples": [ { "lang": "python", "label": "Python (SDK)", "source": "from compass_api_sdk import CompassAPI, models\n\n\nwith CompassAPI(\n api_key_auth=\"\u003cYOUR_API_KEY_HERE\u003e\",\n) as compass_api:\n\n res = compass_api.ethena.ethena_unstake(chain=models.EthenaUnstakeRequestChain.ETHEREUM, sender=\"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\", estimate_gas=True)\n\n # Handle response\n print(res)" }, { "lang": "typescript", "label": "Typescript (SDK)", "source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await compassApiSDK.ethena.ethenaUnstake({\n chain: \"ethereum\",\n sender: \"0xb8340945eBc917D2Aa0368a5e4E79C849c461511\",\n });\n\n console.log(result);\n}\n\nrun();" } ] } } }, "components": { "schemas": { "AaveAvgRateResponse": { "properties": { "supply_apy_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Supply Apy Variable Rate", "description": "Mean of the variable rate APY for deposits." }, "supply_apr_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Supply Apr Variable Rate", "description": "Mean of the variable rate APR for deposits." }, "borrow_apy_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apy Variable Rate", "description": "Mean of the variable rate APY for loans." }, "borrow_apr_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apr Variable Rate", "description": "Mean of the variable rate APR for loans." }, "borrow_apy_fixed_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apy Fixed Rate", "description": "Mean of the fixed rate APY for loans." }, "borrow_apr_fixed_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apr Fixed Rate", "description": "Mean of the fixed rate APR for loans." } }, "type": "object", "required": [ "supply_apy_variable_rate", "supply_apr_variable_rate", "borrow_apy_variable_rate", "borrow_apr_variable_rate", "borrow_apy_fixed_rate", "borrow_apr_fixed_rate" ], "title": "AaveAvgRateResponse" }, "AaveBorrowParams": { "properties": { "action_type": { "type": "string", "const": "AAVE_BORROW", "title": "Action Type", "example": "AAVE_BORROW" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the underlying asset to borrow.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to borrow" }, "interest_rate_mode": { "$ref": "#/components/schemas/InterestRateMode", "description": "The interest rate mode to borrow" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made" } }, "type": "object", "required": [ "token", "amount", "interest_rate_mode" ], "title": "AaveBorrowParams" }, "AaveBorrowRequest": { "properties": { "action_type": { "type": "string", "const": "AAVE_BORROW", "title": "Action Type", "example": "AAVE_BORROW" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the underlying asset to borrow..", "example": "USDC" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to borrow", "example": 0.3 }, "interest_rate_mode": { "$ref": "#/components/schemas/InterestRateMode", "description": "The interest rate mode to borrow", "example": "variable" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made", "example": "0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08" }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain", "example": "base" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender.", "example": "0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08" }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token", "amount", "interest_rate_mode", "chain", "sender" ], "title": "AaveBorrowRequest", "required_allowances": [ "AaveV3Pool" ], "example": { "chain": "base", "sender": "0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08", "token": "USDC", "amount": 0.3, "interest_rate_mode": "variable", "on_behalf_of": "0x4d20E7dE18219cBf60E8382cDbBa65e97E45Fd08" } }, "AaveHistoricalTransactionsResponse": { "properties": { "offset": { "type": "integer", "title": "Offset", "description": "Specifies how many transactions to skip before returning results, letting you choose the starting point for the data you want to receive." }, "limit": { "type": "integer", "title": "Limit", "description": "Sets the maximum number of transactions to include in the response, helping control the size of the returned dataset." }, "transactions": { "items": { "oneOf": [ { "$ref": "#/components/schemas/Borrow" }, { "$ref": "#/components/schemas/LiquidationCall" }, { "$ref": "#/components/schemas/Withdraw" }, { "$ref": "#/components/schemas/Repay" }, { "$ref": "#/components/schemas/Supply" }, { "$ref": "#/components/schemas/SwapBorrowRate" }, { "$ref": "#/components/schemas/UsageAsCollateral" } ], "discriminator": { "propertyName": "action", "mapping": { "Borrow": "#/components/schemas/Borrow", "LiquidationCall": "#/components/schemas/LiquidationCall", "Withdraw": "#/components/schemas/Withdraw", "Repay": "#/components/schemas/Repay", "Supply": "#/components/schemas/Supply", "SwapBorrowRate": "#/components/schemas/SwapBorrowRate", "UsageAsCollateral": "#/components/schemas/UsageAsCollateral" } } }, "type": "array", "title": "Transactions" } }, "type": "object", "required": [ "offset", "limit", "transactions" ], "title": "AaveHistoricalTransactionsResponse", "description": "Response model for getting Aave historical transactions." }, "AaveLiquidityChangeResponse": { "properties": { "liquidity_change": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Liquidity Change", "description": "The change in the liquidity index between the two times, expressed as a percentage." }, "start_time": { "type": "string", "format": "date-time", "title": "Start Time", "description": "Dateime of starting block" }, "end_time": { "type": "string", "format": "date-time", "title": "End Time", "description": "Datetime of ending block" } }, "type": "object", "required": [ "liquidity_change", "start_time", "end_time" ], "title": "AaveLiquidityChangeResponse" }, "AaveLoopRequest": { "properties": { "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true }, "signed_authorization": { "anyOf": [ { "$ref": "#/components/schemas/SignedAuthorization" }, { "type": "null" } ], "description": "EIP-7702 authorization. Required when `is_account_abstraction` is False." }, "collateral_token": { "type": "string", "title": "Token", "description": "Symbol or address of token to supply to Aave.." }, "borrow_token": { "type": "string", "title": "Token", "description": "Symbol or address of token to borrow from Aave.." }, "initial_collateral_amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Initial Collateral Amount", "description": "Amount of collateral token to supply to Aave" }, "multiplier": { "anyOf": [ { "type": "number", "exclusiveMinimum": 1 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Multiplier", "description": "Leverage multiplier. Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`" }, "max_slippage_percent": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Max Slippage Percent", "description": "Maximum allowed slippage for token swaps in percentage" }, "loan_to_value": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Loan To Value", "description": "Loan To Value percentage of the loop" }, "is_account_abstraction": { "type": "boolean", "title": "Is Account Abstraction", "description": "Whether to use account abstraction for the transaction.", "example": false } }, "type": "object", "required": [ "chain", "sender", "collateral_token", "borrow_token", "initial_collateral_amount", "multiplier", "max_slippage_percent", "loan_to_value" ], "title": "AaveLoopRequest", "description": "Request model for executing an Aave loop strategy.", "required_allowances": [], "example": { "chain": "arbitrum", "sender": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B", "estimate_gas": true, "signed_authorization": { "address": "0xcA11bde05977b3631167028862bE2a173976CA11", "chainId": 42161, "nonce": 1000, "r": "0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615", "s": "0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c", "yParity": 0 }, "collateral_token": "USDC", "borrow_token": "WETH", "initial_collateral_amount": "1000", "multiplier": "2.5", "max_slippage_percent": "0.5", "loan_to_value": "60", "is_account_abstraction": false } }, "AaveRateResponse": { "properties": { "supply_apy_variable_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supply Apy Variable Rate", "description": "Variable rate APY for deposits." }, "supply_apr_variable_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supply Apr Variable Rate", "description": "Variable rate APR for deposits." }, "borrow_apy_variable_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrow Apy Variable Rate", "description": "Variable rate APY for loans." }, "borrow_apr_variable_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrow Apr Variable Rate", "description": "Variable rate APR for loans." }, "borrow_apy_fixed_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrow Apy Fixed Rate", "description": "Fixed rate APY for loans." }, "borrow_apr_fixed_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrow Apr Fixed Rate", "description": "Fixed rate APR for loans." } }, "type": "object", "required": [ "supply_apy_variable_rate", "supply_apr_variable_rate", "borrow_apy_variable_rate", "borrow_apr_variable_rate", "borrow_apy_fixed_rate", "borrow_apr_fixed_rate" ], "title": "AaveRateResponse" }, "AaveRepayParams": { "properties": { "action_type": { "type": "string", "const": "AAVE_REPAY", "title": "Action Type", "example": "AAVE_REPAY" }, "token": { "type": "string", "title": "Token", "description": "The symbol of the underlying asset to repay.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to repay" }, "interest_rate_mode": { "$ref": "#/components/schemas/InterestRateMode", "description": "The interest rate mode to repay" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made" } }, "type": "object", "required": [ "token", "amount", "interest_rate_mode" ], "title": "AaveRepayParams" }, "AaveRepayRequest": { "properties": { "action_type": { "type": "string", "const": "AAVE_REPAY", "title": "Action Type", "example": "AAVE_REPAY" }, "token": { "type": "string", "title": "Token", "description": "The symbol of the underlying asset to repay.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to repay" }, "interest_rate_mode": { "$ref": "#/components/schemas/InterestRateMode", "description": "The interest rate mode to repay" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made" }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token", "amount", "interest_rate_mode", "chain", "sender" ], "title": "AaveRepayRequest", "required_allowances": [ "AaveV3Pool" ], "example": { "chain": "base", "sender": "0x3254f3b1918637ba924e3F18968Cb74219974b63", "token": "USDC", "amount": "0.2", "interest_rate_mode": "variable", "on_behalf_of": "0x3254f3b1918637ba924e3F18968Cb74219974b63" } }, "AaveReserveOverviewResponse": { "properties": { "tvl": { "type": "number", "minimum": 0, "title": "Tvl", "description": "Total tokens supplied in an Aave Reserve in USD. E.G. How much WBTC has been supplied on Aave in USD." }, "total_borrowed": { "type": "number", "minimum": 0, "title": "Total Borrowed", "description": "Total tokens borrowed in an Aave Reserve converted to USD. E.G. How much WBTC has been supplied on Aave (in USD)." }, "utilization_ratio": { "anyOf": [ { "type": "number", "maximum": 1, "minimum": 0 }, { "type": "null" } ], "title": "Utilization Ratio", "description": "Total borrowed divided by total supplied in an Aave Reserve. E.G. How much WBTC has been borrowed on Aaave divided by the amount supplied" } }, "type": "object", "required": [ "tvl", "total_borrowed", "utilization_ratio" ], "title": "AaveReserveOverviewResponse" }, "AaveSTDRateResponse": { "properties": { "supply_apy_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Supply Apy Variable Rate", "description": "Standard deviation of the variable rate APY for deposits." }, "supply_apr_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Supply Apr Variable Rate", "description": "Standard deviation of the variable rate APR for deposits." }, "borrow_apy_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apy Variable Rate", "description": "Standard deviation of the variable rate APY for loans." }, "borrow_apr_variable_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apr Variable Rate", "description": "Standard deviation of the variable rate APR for loans." }, "borrow_apy_fixed_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apy Fixed Rate", "description": "Standard deviation of the fixed rate APY for loans." }, "borrow_apr_fixed_rate": { "type": "number", "maximum": 1, "minimum": 0, "title": "Borrow Apr Fixed Rate", "description": "Standard deviation of the fixed rate APR for loans." } }, "type": "object", "required": [ "supply_apy_variable_rate", "supply_apr_variable_rate", "borrow_apy_variable_rate", "borrow_apr_variable_rate", "borrow_apy_fixed_rate", "borrow_apr_fixed_rate" ], "title": "AaveSTDRateResponse" }, "AaveSupplyParams": { "properties": { "action_type": { "type": "string", "const": "AAVE_SUPPLY", "title": "Action Type", "example": "AAVE_SUPPLY" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the underlying asset to supply as collateral. You can borrow against it.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to supply" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made. Defaults to the transaction sender." } }, "type": "object", "required": [ "token", "amount" ], "title": "AaveSupplyParams" }, "AaveSupplyRequest": { "properties": { "action_type": { "type": "string", "const": "AAVE_SUPPLY", "title": "Action Type", "example": "AAVE_SUPPLY" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the underlying asset to supply as collateral. You can borrow against it.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to supply" }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supply is made. Defaults to the transaction sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token", "amount", "chain", "sender" ], "title": "AaveSupplyRequest", "required_allowances": [ "AaveV3Pool" ], "example": { "chain": "base", "sender": "0x466C298e40c57e1DfD364443B364DFB2717BF882", "token": "USDC", "amount": "0.5" } }, "AaveSupportedTokenMetadata": { "properties": { "symbol": { "type": "string", "title": "Symbol", "description": "Token symbol (e.g., 'WETH', 'DAI')." }, "address": { "type": "string", "title": "Address", "description": "Token contract address." }, "supplying_enabled": { "type": "boolean", "title": "Supplying Enabled", "description": "Whether the token can be used as collateral." }, "borrowing_enabled": { "type": "boolean", "title": "Borrowing Enabled", "description": "Whether the token can be borrowed." } }, "type": "object", "required": [ "symbol", "address", "supplying_enabled", "borrowing_enabled" ], "title": "AaveSupportedTokenMetadata" }, "AaveSupportedTokensResponse": { "properties": { "tokens": { "items": { "$ref": "#/components/schemas/AaveSupportedTokenMetadata" }, "type": "array", "title": "Tokens", "description": "List of supported tokens with configuration metadata for a given chain." } }, "type": "object", "required": [ "tokens" ], "title": "AaveSupportedTokensResponse" }, "AaveTokenPriceResponse": { "properties": { "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "The price of the asset in USD." } }, "type": "object", "required": [ "price" ], "title": "AaveTokenPriceResponse" }, "AaveUserPositionPerTokenResponse": { "properties": { "token_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Token Balance", "description": "The balance of AAVE aTokens (interest-bearing representations of your deposits)." }, "stable_debt": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Stable Debt", "description": "The amount of the user's debt with a fixed interest rate." }, "variable_debt": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Variable Debt", "description": "The amount of the user's debt with a variable interest rate." }, "principal_stable_debt": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Principal Stable Debt", "description": "The amount of the user's debt that was part of the initial principal of all\n loans with a stable interest rate." }, "principal_variable_debt": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Principal Variable Debt", "description": "The amount of the user's debt that was part of the initial principal of all\n loans with a variable interest rate. This is the value stored by AAVE, which may be slightly\n inaccurate, but reflects what AAVE believes you initially paid." }, "stable_borrow_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Stable Borrow Rate", "description": "The current average annualised interest rate for all your stable loans in\n this pool." }, "stable_borrow_rate_for_new_loans": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Stable Borrow Rate For New Loans", "description": "The annualised interest rate you would pay on a new stable loan." }, "variable_borrow_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Variable Borrow Rate", "description": "The current annualised interest rate for variable rate loans in this pool.\n (This applies to both current and new loans.)" }, "liquidity_rate": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Liquidity Rate", "description": "The annualised interest rate for deposited supplies." } }, "type": "object", "required": [ "token_balance", "stable_debt", "variable_debt", "principal_stable_debt", "principal_variable_debt", "stable_borrow_rate", "stable_borrow_rate_for_new_loans", "variable_borrow_rate", "liquidity_rate" ], "title": "AaveUserPositionPerTokenResponse" }, "AaveUserPositionSummaryResponse": { "properties": { "maximum_loan_to_value_ratio": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Maximum Loan To Value Ratio", "description": "The loan to value ratio of a user." }, "health_factor": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Health Factor", "description": "The health factor of a user. If this is above 1 it is safe; below 1 and the\n user is in risk of liquidation. This number might be very high (which would mean the user is\n safe!)" }, "total_collateral": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Collateral", "description": "The total collateral (in USD) of a user." }, "total_debt": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Debt", "description": "The total debt (in USD) of a user." }, "available_borrows": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Available Borrows", "description": "The available borrows (in USD) of a user." }, "liquidation_threshold": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Liquidation Threshold", "description": "The liquidation threshold of a user. A user might exceed this due to changing\n asset values." } }, "type": "object", "required": [ "maximum_loan_to_value_ratio", "health_factor", "total_collateral", "total_debt", "available_borrows", "liquidation_threshold" ], "title": "AaveUserPositionSummaryResponse" }, "AaveWithdrawParams": { "properties": { "action_type": { "type": "string", "const": "AAVE_WITHDRAW", "title": "Action Type", "example": "AAVE_WITHDRAW" }, "token": { "type": "string", "title": "Token", "description": "The symbol of the underlying asset to withdraw.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to withdraw" }, "recipient": { "type": "string", "title": "Recipient", "description": "The address of the recipient of the withdrawn funds." } }, "type": "object", "required": [ "token", "amount", "recipient" ], "title": "AaveWithdrawParams" }, "AaveWithdrawRequest": { "properties": { "action_type": { "type": "string", "const": "AAVE_WITHDRAW", "title": "Action Type", "example": "AAVE_WITHDRAW" }, "token": { "type": "string", "title": "Token", "description": "The symbol of the underlying asset to withdraw.." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of the asset to withdraw" }, "recipient": { "type": "string", "title": "Recipient", "description": "The address of the recipient of the withdrawn funds." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token", "amount", "recipient", "chain", "sender" ], "title": "AaveWithdrawRequest", "required_allowances": [ "AaveV3Pool" ], "example": { "chain": "base", "sender": "0x388f03DABdc414E11da8Da63198D183C82836866", "token": "USDC", "amount": "0.5", "recipient": "0x388f03DABdc414E11da8Da63198D183C82836866" } }, "AerodromeLPPositionsResponse": { "properties": { "positions": { "additionalProperties": { "$ref": "#/components/schemas/AerodromePosition" }, "type": "object", "title": "Positions", "description": "Liquidity provision positions belonging to a particular user. The key is a\ntuple of the token0, token1, tick_spacing, tick_lower, and tick_upper of the position." } }, "type": "object", "required": [ "positions" ], "title": "AerodromeLPPositionsResponse" }, "AerodromePosition": { "properties": { "nonce": { "type": "integer", "title": "Nonce" }, "operator": { "type": "string", "title": "Operator" }, "token0": { "type": "string", "title": "Token0" }, "token1": { "type": "string", "title": "Token1" }, "tick_spacing": { "type": "integer", "title": "Tick Spacing" }, "tick_lower": { "type": "integer", "title": "Tick Lower" }, "tick_upper": { "type": "integer", "title": "Tick Upper" }, "liquidity": { "type": "integer", "title": "Liquidity" }, "fee_growth_inside0_last_x128": { "type": "integer", "title": "Fee Growth Inside0 Last X128" }, "fee_growth_inside1_last_x128": { "type": "integer", "title": "Fee Growth Inside1 Last X128" }, "tokens_owed0": { "type": "integer", "title": "Tokens Owed0" }, "tokens_owed1": { "type": "integer", "title": "Tokens Owed1" }, "token_id": { "type": "integer", "title": "Token Id" } }, "type": "object", "required": [ "nonce", "operator", "token0", "token1", "tick_spacing", "tick_lower", "tick_upper", "liquidity", "fee_growth_inside0_last_x128", "fee_growth_inside1_last_x128", "tokens_owed0", "tokens_owed1", "token_id" ], "title": "AerodromePosition" }, "AerodromeSlipstreamBuyExactlyParams": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_BUY_EXACTLY", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_BUY_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol of the token to swap from." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol of the token to swap to." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "amount_out": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out", "description": "The amount of the token to swap to" }, "amount_in_maximum": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In Maximum", "description": "The maximum amount of the token to swap from" } }, "type": "object", "required": [ "token_in", "token_out", "tick_spacing", "amount_out", "amount_in_maximum" ], "title": "AerodromeSlipstreamBuyExactlyParams", "description": "Parameters model for buying exactly an amount of tokens." }, "AerodromeSlipstreamBuyExactlyRequest": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_BUY_EXACTLY", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_BUY_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol of the token to swap from." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol of the token to swap to." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "amount_out": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out", "description": "The amount of the token to swap to" }, "amount_in_maximum": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In Maximum", "description": "The maximum amount of the token to swap from" }, "chain": { "type": "string", "enum": [ "base" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "token_out", "tick_spacing", "amount_out", "amount_in_maximum", "chain", "sender" ], "title": "AerodromeSlipstreamBuyExactlyRequest", "description": "Request model for buying exactly an amount of tokens.", "required_allowances": [ "AerodromeSlipstreamRouter" ], "example": { "chain": "base", "sender": "0xA4C4fB06093C91E70528d4029050f358c4B065EE", "token_in": "USDC", "token_out": "WETH", "tick_spacing": 100, "amount_out": 0.00001, "amount_in_maximum": 0.1 } }, "AerodromeSlipstreamIncreaseLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" } }, "type": "object", "required": [ "token_id", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min" ], "title": "AerodromeSlipstreamIncreaseLiquidityProvisionParams", "description": "Endpoint parameters for increasing liquidity provision on aerodrome slipstream.\n\nThis action is performed on the NonfungiblePosition Manager to increase the\nliquidity of an existing position." }, "AerodromeSlipstreamIncreaseLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "chain": { "type": "string", "enum": [ "base" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_id", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min", "chain", "sender" ], "title": "AerodromeSlipstreamIncreaseLiquidityProvisionRequest", "required_allowances": [ "AerodromeSlipstreamRouter" ], "example": { "sender": "0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a", "chain": "base", "token_id": 17570780, "amount0_desired": 0.02, "amount1_desired": 0.01, "amount0_min": 0, "amount1_min": 0 } }, "AerodromeSlipstreamMintLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION" }, "token0": { "type": "string", "title": "Token", "description": "The symbol or address of the first token in the pair." }, "token1": { "type": "string", "title": "Token", "description": "The symbol or address of the second token in the pair." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "tick_lower": { "type": "integer", "title": "Tick Lower", "description": "The lower tick of the range to mint the position in" }, "tick_upper": { "type": "integer", "title": "Tick Upper", "description": "The upper tick of the range to mint the position in" }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "recipient": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recipient", "description": "The address that will receive the LP tokens" } }, "type": "object", "required": [ "token0", "token1", "tick_spacing", "tick_lower", "tick_upper", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min" ], "title": "AerodromeSlipstreamMintLiquidityProvisionParams", "description": "Parameters model for minting a new liquidity position." }, "AerodromeSlipstreamMintLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION" }, "token0": { "type": "string", "title": "Token", "description": "The symbol or address of the first token in the pair." }, "token1": { "type": "string", "title": "Token", "description": "The symbol or address of the second token in the pair." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "tick_lower": { "type": "integer", "title": "Tick Lower", "description": "The lower tick of the range to mint the position in" }, "tick_upper": { "type": "integer", "title": "Tick Upper", "description": "The upper tick of the range to mint the position in" }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "recipient": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recipient", "description": "The address that will receive the LP tokens" }, "chain": { "type": "string", "enum": [ "base" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token0", "token1", "tick_spacing", "tick_lower", "tick_upper", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min", "chain", "sender" ], "title": "AerodromeSlipstreamMintLiquidityProvisionRequest", "description": "Request model for minting a new liquidity position.", "required_allowances": [ "AerodromeSlipstreamNonfungiblePositionManager" ], "example": { "sender": "0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a", "chain": "base", "token0": "USDC", "token1": "USDT", "tick_spacing": 1, "tick_lower": 100, "tick_upper": 200, "amount0_desired": 0.01, "amount1_desired": 0, "amount0_min": 0, "amount1_min": 0, "recipient": "0x46D00E3Dc6E9B788B9730Ab38433a16CB55EDd7a" } }, "AerodromeSlipstreamPoolPriceResponse": { "properties": { "token_in": { "type": "string", "title": "Token In", "description": "The first token in the pool." }, "token_out": { "type": "string", "title": "Token Out", "description": "The second token in the pool." }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "The price of the pool. This is expressed as an instantaneous amount of how\nmany token0 you need to buy 1 token1. In any swap this will not change during the trade; use\nthe quote endpoint to get a better idea of how much you will pay!" }, "tick": { "type": "integer", "title": "Tick", "description": "The current tick in the pool. This is a number that represents the price of\nthe pool according to the aerodrome_slipstream v3 concentrated liquidity concept." } }, "type": "object", "required": [ "token_in", "token_out", "price", "tick" ], "title": "AerodromeSlipstreamPoolPriceResponse" }, "AerodromeSlipstreamSellExactlyParams": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_SELL_EXACTLY", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_SELL_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap from." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap to." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "The amount of the token to swap from" }, "amount_out_minimum": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out Minimum", "description": "The minimum amount of the token to swap to, defaults to 0", "example": "0" } }, "type": "object", "required": [ "token_in", "token_out", "tick_spacing", "amount_in" ], "title": "AerodromeSlipstreamSellExactlyParams", "description": "Parameters model for selling exactly an amount of tokens." }, "AerodromeSlipstreamSellExactlyRequest": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_SELL_EXACTLY", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_SELL_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap from." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap to." }, "tick_spacing": { "type": "integer", "minimum": 1, "title": "Tick Spacing", "description": "The tick spacing of the pool" }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "The amount of the token to swap from" }, "amount_out_minimum": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out Minimum", "description": "The minimum amount of the token to swap to, defaults to 0", "example": "0" }, "chain": { "type": "string", "enum": [ "base" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "token_out", "tick_spacing", "amount_in", "chain", "sender" ], "title": "AerodromeSlipstreamSellExactlyRequest", "description": "Request model for selling exactly an amount of tokens.", "required_allowances": [ "AerodromeSlipstreamRouter" ], "example": { "chain": "base", "sender": "0xED954266764e163cE73A0bC2aC717226cf73B03E", "token_in": "USDC", "token_out": "WETH", "tick_spacing": 100, "amount_in": 0.5, "amount_out_minimum": 0 } }, "AerodromeSlipstreamWithdrawLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "percentage_for_withdrawal": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Percentage For Withdrawal", "description": "How much liquidity to take out in percentage." } }, "type": "object", "required": [ "token_id", "percentage_for_withdrawal" ], "title": "AerodromeSlipstreamWithdrawLiquidityProvisionParams", "description": "Endpoint parameters for liquidity provision withdrawal on aerodrome slipstream.\n\nThis action is performed in a multicall on the NonfungiblePosition Manager: https://github.com/AerodromeSlipstream/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/base/Multicall.sol#L11-L27\nFirst, we call decrease liquidity then collect the tokens owed to the user." }, "AerodromeSlipstreamWithdrawLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION", "title": "Action Type", "example": "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "percentage_for_withdrawal": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Percentage For Withdrawal", "description": "How much liquidity to take out in percentage." }, "chain": { "type": "string", "enum": [ "base" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_id", "percentage_for_withdrawal", "chain", "sender" ], "title": "AerodromeSlipstreamWithdrawLiquidityProvisionRequest", "required_allowances": [ "AerodromeSlipstreamNonfungiblePositionManager" ], "example": { "sender": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B", "chain": "base", "token_id": 10433247, "percentage_for_withdrawal": 1 } }, "AllowanceInfoResponse": { "properties": { "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Amount of tokens allowed to be spent by spender" }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals of the token" }, "token_symbol": { "type": "string", "title": "Token Symbol", "description": "Symbol of the token." }, "token_address": { "type": "string", "title": "Token Address", "description": "Address of the token" }, "contract_address": { "type": "string", "title": "Contract Address", "description": "Address of the contract" } }, "type": "object", "required": [ "amount", "decimals", "token_symbol", "token_address", "contract_address" ], "title": "AllowanceInfoResponse", "description": "Response model for token allowance information." }, "Apy": { "properties": { "current": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Current" }, "apy_1_day": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Apy 1 Day" }, "apy_7_day": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Apy 7 Day" }, "apy_30_day": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Apy 30 Day" } }, "type": "object", "required": [ "current", "apy_1_day", "apy_7_day", "apy_30_day" ], "title": "Apy" }, "BatchedUserOperationsRequest": { "properties": { "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true }, "operations": { "items": { "$ref": "#/components/schemas/UserOperation" }, "type": "array", "title": "Operations", "description": "List of possible user operations" } }, "type": "object", "required": [ "chain", "sender", "operations" ], "title": "BatchedUserOperationsRequest", "description": "Request model for batching user operations.\n\nUsed for smart account batching and 5792 batching.", "required_allowances": [], "example": { "chain": "arbitrum", "sender_": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B", "estimate_gas": true, "operations": [ { "body": { "action_type": "SET_ALLOWANCE", "amount": "1000", "contract": "UniswapV3Router", "token": "USDC" } } ] } }, "BatchedUserOperationsResponse": { "properties": { "operations": { "items": { "$ref": "#/components/schemas/UserOperationResponse" }, "type": "array", "title": "Operations", "description": "List of user operations to be batched and executed by the smart account." } }, "type": "object", "required": [ "operations" ], "title": "BatchedUserOperationsResponse" }, "Borrow": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "amount": { "type": "number", "minimum": 0, "title": "Amount", "description": "Quantity of token" }, "borrowRateMode": { "type": "integer", "enum": [ 1, 2 ], "title": "Borrowratemode", "description": "The interest rate mode to borrow: 1 represents stable interest rate mode. 2 represents variable interest rate mode" }, "reserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "assetPriceUSD": { "type": "number", "minimum": 0, "title": "Assetpriceusd", "description": "Price of token in USD" }, "action": { "type": "string", "const": "Borrow", "title": "Action", "description": "The type of transaction" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "amount", "borrowRateMode", "reserve", "assetPriceUSD", "action", "block" ], "title": "Borrow" }, "BundlerTransactionResponse": { "properties": { "transaction": { "$ref": "#/components/schemas/UnsignedMulticallTransaction", "description": "The unsigned multicall transaction data. User must sign and broadcast to network." } }, "type": "object", "required": [ "transaction" ], "title": "BundlerTransactionResponse" }, "Chain": { "type": "string", "enum": [ "base", "ethereum", "arbitrum" ], "title": "Chain", "description": "The chain to use." }, "ChainInfo": { "properties": { "id": { "type": "integer", "title": "Id" }, "network": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Network" } }, "type": "object", "required": [ "id" ], "title": "ChainInfo" }, "CooldownPosition": { "properties": { "amount_in_underlying_asset": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount In Underlying Asset", "description": "The amount of USDe currently in a cooldown period." }, "cooldown_end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "boolean", "const": false } ], "title": "Cooldown End", "description": "When the cooldown period ends. ISO 8601 format. UTC timezone." }, "can_be_withdrawn": { "type": "boolean", "title": "Can Be Withdrawn", "description": "Whether the USDe in cooldown can be withdrawn at this moment." } }, "type": "object", "required": [ "amount_in_underlying_asset", "cooldown_end", "can_be_withdrawn" ], "title": "CooldownPosition" }, "Details": { "properties": { "liquidity": { "type": "number", "title": "Liquidity" }, "pendleApy": { "type": "number", "title": "Pendleapy" }, "impliedApy": { "type": "number", "title": "Impliedapy" }, "feeRate": { "type": "number", "title": "Feerate" }, "movement10Percent": { "anyOf": [ { "$ref": "#/components/schemas/Movement10Percent" }, { "type": "null" } ] }, "yieldRange": { "$ref": "#/components/schemas/YieldRange" }, "aggregatedApy": { "type": "number", "title": "Aggregatedapy" }, "maxBoostedApy": { "type": "number", "title": "Maxboostedapy" } }, "type": "object", "required": [ "liquidity", "pendleApy", "impliedApy", "feeRate", "yieldRange", "aggregatedApy", "maxBoostedApy" ], "title": "Details" }, "EnsNameInfoResponse": { "properties": { "wallet_address": { "type": "string", "title": "Wallet Address", "description": "The wallet address of the user" }, "registrant": { "type": "string", "title": "Registrant", "description": "The registrant of the ENS" } }, "type": "object", "required": [ "wallet_address", "registrant" ], "title": "EnsNameInfoResponse", "description": "Response model for ENS name details." }, "Erc20Data": { "properties": { "address": { "type": "string", "title": "Address" }, "symbol": { "type": "string", "title": "Symbol" }, "name": { "type": "string", "title": "Name" }, "decimals": { "type": "integer", "title": "Decimals" } }, "type": "object", "required": [ "address", "symbol", "name", "decimals" ], "title": "Erc20Data" }, "EthenaDepositParams": { "properties": { "action_type": { "type": "string", "const": "ETHENA_DEPOSIT", "title": "Action Type", "example": "ETHENA_DEPOSIT" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDe to deposit into Ethena's vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender." } }, "type": "object", "required": [ "amount" ], "title": "EthenaDepositParams" }, "EthenaDepositRequest": { "properties": { "action_type": { "type": "string", "const": "ETHENA_DEPOSIT", "title": "Action Type", "example": "ETHENA_DEPOSIT" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDe to deposit into Ethena's vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "chain", "sender" ], "title": "EthenaDepositRequest", "required_allowances": [ "EthenaVault" ], "example": { "chain": "ethereum", "sender": "0x5283A28b694ce2748e2dE1071417E5830de06518", "amount": 0.4 } }, "EthenaGetVaultResponse": { "properties": { "name": { "type": "string", "title": "Name", "description": "Name of the vault." }, "symbol": { "type": "string", "title": "Symbol", "description": "Symbol of the vault." }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals used for the vault's share precision." }, "total_assets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Assets", "description": "Total amount of assets deposited in the vault." }, "total_supply": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Supply", "description": "Total amount of shares issued from the vault." }, "share_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Share Price", "description": "The price of one vault share in terms of the underlying asset." }, "underlying_token": { "$ref": "#/components/schemas/UnderlyingToken", "description": "Underlying token (asset) used by the vault." }, "apy": { "$ref": "#/components/schemas/Apy", "description": "Average APY over various time periods." }, "user_position": { "anyOf": [ { "$ref": "#/components/schemas/compass__api_backend__models__vaults__read__response__vault__UserPosition" }, { "type": "null" } ], "description": "The user's position in the vault." }, "cooldown_duration_days": { "type": "integer", "title": "Cooldown Duration Days", "description": "The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made." }, "cooldown_position": { "anyOf": [ { "$ref": "#/components/schemas/CooldownPosition" }, { "type": "null" } ], "description": "The user's cooldown position." } }, "type": "object", "required": [ "name", "symbol", "decimals", "total_assets", "total_supply", "share_price", "underlying_token", "apy", "cooldown_duration_days" ], "title": "EthenaGetVaultResponse" }, "EthenaRequestToWithdrawParams": { "properties": { "action_type": { "type": "string", "const": "ETHENA_REQUEST_WITHDRAW", "title": "Action Type", "example": "ETHENA_REQUEST_WITHDRAW" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn." } }, "type": "object", "required": [ "amount" ], "title": "EthenaRequestToWithdrawParams" }, "EthenaRequestToWithdrawRequest": { "properties": { "action_type": { "type": "string", "const": "ETHENA_REQUEST_WITHDRAW", "title": "Action Type", "example": "ETHENA_REQUEST_WITHDRAW" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of USDe to request to withdraw from Ethena's vault. If set to 'ALL', your total deposited USDe amount will be requested to be withdrawn." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "chain", "sender" ], "title": "EthenaRequestToWithdrawRequest", "required_allowances": [], "example": { "chain": "ethereum", "sender": "0x85b049df4E74AFF38c6D79F3c71Ae4C998b69342", "amount": "ALL" } }, "EthenaRequestToWithdrawTransactionResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." }, "cooldown_duration_days": { "type": "integer", "title": "Cooldown Duration Days", "description": "The duration of days that must pass before a position can be withdrawn from the Ethena vault after a request to withdraw has been made." } }, "type": "object", "required": [ "transaction", "cooldown_duration_days" ], "title": "EthenaRequestToWithdrawTransactionResponse" }, "EthenaUnstakeParams": { "properties": { "action_type": { "type": "string", "const": "ETHENA_UNSTAKE", "title": "Action Type", "example": "ETHENA_UNSTAKE" }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the unstaked USDe. Defaults to the sender." } }, "type": "object", "title": "EthenaUnstakeParams" }, "EthenaUnstakeRequest": { "properties": { "action_type": { "type": "string", "const": "ETHENA_UNSTAKE", "title": "Action Type", "example": "ETHENA_UNSTAKE" }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the unstaked USDe. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "chain", "sender" ], "title": "EthenaUnstakeRequest", "required_allowances": [], "example": { "chain": "ethereum", "sender": "0xb8340945eBc917D2Aa0368a5e4E79C849c461511" } }, "FeeEnum": { "type": "string", "enum": [ "0.01", "0.05", "0.3", "1.0" ], "title": "FeeEnum", "description": "The transaction fee of a Uniswap pool in bips.\n\nUniswap supports 4 different fee levels." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "InterestRateMode": { "type": "string", "enum": [ "stable", "variable" ], "title": "InterestRateMode", "description": "On AAVE there are 2 different interest modes.\n\nA stable (but typically higher rate), or a variable rate." }, "LiquidationCall": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "collateralAmount": { "type": "number", "title": "Collateralamount" }, "collateralReserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "principalAmount": { "type": "number", "title": "Principalamount" }, "principalReserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "collateralAssetPriceUSD": { "type": "number", "title": "Collateralassetpriceusd" }, "borrowAssetPriceUSD": { "type": "number", "title": "Borrowassetpriceusd" }, "action": { "type": "string", "const": "LiquidationCall", "title": "Action" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "collateralAmount", "collateralReserve", "principalAmount", "principalReserve", "collateralAssetPriceUSD", "borrowAssetPriceUSD", "action", "block" ], "title": "LiquidationCall" }, "LpBalance": { "properties": { "valuation": { "type": "number", "title": "Valuation" }, "balance": { "type": "string", "title": "Balance" }, "activeBalance": { "type": "string", "title": "Activebalance" } }, "type": "object", "required": [ "valuation", "balance", "activeBalance" ], "title": "LpBalance" }, "Market": { "properties": { "uniqueKey": { "type": "string", "title": "Uniquekey" } }, "type": "object", "required": [ "uniqueKey" ], "title": "Market" }, "MarketPosition": { "properties": { "market": { "$ref": "#/components/schemas/Market" }, "healthFactor": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Healthfactor" }, "priceVariationToLiquidationPrice": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Pricevariationtoliquidationprice" }, "state": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__MarketState" } }, "type": "object", "required": [ "market", "healthFactor", "priceVariationToLiquidationPrice", "state" ], "title": "MarketPosition" }, "MarketTokens": { "properties": { "underlying_token": { "$ref": "#/components/schemas/Erc20Data" }, "sy": { "$ref": "#/components/schemas/Erc20Data" }, "pt": { "$ref": "#/components/schemas/Erc20Data" }, "yt": { "$ref": "#/components/schemas/Erc20Data" }, "accounting_asset": { "anyOf": [ { "$ref": "#/components/schemas/Erc20Data" }, { "type": "null" } ] } }, "type": "object", "required": [ "underlying_token", "sy", "pt", "yt", "accounting_asset" ], "title": "MarketTokens" }, "MorphoBorrowParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_BORROW", "title": "Action Type", "example": "MORPHO_BORROW" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to borrow from the market." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address where the collateral is borrowed against. Defaults to sender." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address of the receiver of the tokens borrowed. Defaults to the transaction sender." } }, "type": "object", "required": [ "amount", "unique_market_key" ], "title": "MorphoBorrowParams" }, "MorphoBorrowRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_BORROW", "title": "Action Type", "example": "MORPHO_BORROW" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to borrow from the market." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address where the collateral is borrowed against. Defaults to sender." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address of the receiver of the tokens borrowed. Defaults to the transaction sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "unique_market_key", "chain", "sender" ], "title": "MorphoBorrowRequest", "required_allowances": [ "Morpho" ], "example": { "chain": "base", "sender": "0x7c90Ee2D90160B072940498DB129E0D6eC14F830", "amount": 0.00005, "unique_market_key": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" } }, "MorphoCheckMarketPositionResponse": { "properties": { "borrow_shares": { "type": "integer", "title": "Borrow Shares" }, "borrow_amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrow Amount", "description": "The amount of the loan token borrowed." }, "collateral_amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Collateral Amount", "description": "The amount of the collateral token supplied." }, "current_loan_to_value": { "type": "string", "title": "Current Loan To Value", "description": "The Loan-To-Value ratio measures the proportion of debt relative to collateral value. If this ratio exceeds the 'liquidation_loan_to_value_threshold', the position is liquidatable." }, "liquidation_loan_to_value_threshold": { "type": "string", "title": "Liquidation Loan To Value Threshold", "description": "Maximum borrowing percentage before liquidation risk. E.g: LLTV of 80% means for a collateral value equivalent of $100, the maximum one can borrow in value is $80. If above like $80.0001, the position is liquidatable." } }, "type": "object", "required": [ "borrow_shares", "borrow_amount", "collateral_amount", "current_loan_to_value", "liquidation_loan_to_value_threshold" ], "title": "MorphoCheckMarketPositionResponse" }, "MorphoCheckUserPositionResponse": { "properties": { "state": { "$ref": "#/components/schemas/UserState", "description": "A snapshot of the user's overall state in the Morpho ecosystem." }, "vaultPositions": { "items": { "$ref": "#/components/schemas/VaultPosition" }, "type": "array", "title": "Vaultpositions", "description": "A list of the user's vault positions." }, "marketPositions": { "items": { "$ref": "#/components/schemas/MarketPosition" }, "type": "array", "title": "Marketpositions", "description": "A list of the user's market positions." } }, "type": "object", "required": [ "state", "vaultPositions", "marketPositions" ], "title": "MorphoCheckUserPositionResponse" }, "MorphoDepositParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_DEPOSIT", "title": "Action Type", "example": "MORPHO_DEPOSIT" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are depositing to." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of tokens to deposit into the vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender." } }, "type": "object", "required": [ "vault_address", "amount" ], "title": "MorphoDepositParams" }, "MorphoDepositRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_DEPOSIT", "title": "Action Type", "example": "MORPHO_DEPOSIT" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are depositing to." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of tokens to deposit into the vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "vault_address", "amount", "chain", "sender" ], "title": "MorphoDepositRequest", "required_allowances": [ "\u003cvault-contract-address\u003e" ], "example": { "chain": "base", "sender": "0xF85272345eDa6aA3c6469C97065a676737e73f87", "vault_address": "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", "amount": 0.5 } }, "MorphoGetMarketResponse": { "properties": { "whitelisted": { "type": "boolean", "title": "Whitelisted", "description": "Whether the market is whitelisted or not." }, "lltv": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Lltv", "description": "(Liquidation Loan-To-Value) Maximum borrowing percentage before liquidation risk. Scaled by 1e18." }, "dailyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__ApyData", "description": "The daily APYs of the market." }, "weeklyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__ApyData", "description": "The weekly APYs of the market." }, "monthlyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__ApyData", "description": "The monthly APYs of the market." }, "yearlyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__ApyData", "description": "The yearly APYs of the market." }, "allTimeApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__ApyData", "description": "The all-time APYs of the market." }, "collateralAsset": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__Asset", "description": "Data of the underlying collateral asset of the market." }, "loanAsset": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__Asset", "description": "Data of the underlying loan asset of the market." }, "state": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_market__MarketState", "description": "The current state of the Morpho market." } }, "type": "object", "required": [ "whitelisted", "lltv", "dailyApys", "weeklyApys", "monthlyApys", "yearlyApys", "allTimeApys", "collateralAsset", "loanAsset", "state" ], "title": "MorphoGetMarketResponse" }, "MorphoGetMarketsResponse": { "properties": { "markets": { "items": { "$ref": "#/components/schemas/MorphoMarket" }, "type": "array", "title": "Markets", "description": " A list of markets matching the query." } }, "type": "object", "required": [ "markets" ], "title": "MorphoGetMarketsResponse" }, "MorphoGetVaultsResponse": { "properties": { "vaults": { "items": { "$ref": "#/components/schemas/MorphoVault" }, "type": "array", "title": "Vaults", "description": " A list of vaults matching the query." } }, "type": "object", "required": [ "vaults" ], "title": "MorphoGetVaultsResponse" }, "MorphoMarket": { "properties": { "uniqueKey": { "type": "string", "title": "Uniquekey" }, "lltv": { "type": "integer", "title": "Lltv" }, "oracleAddress": { "type": "string", "title": "Oracleaddress" }, "irmAddress": { "type": "string", "title": "Irmaddress" }, "state": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_markets__MarketState" }, "weeklyApys": { "$ref": "#/components/schemas/WeeklyApys" }, "collateralAsset": { "anyOf": [ { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_markets__Asset" }, { "type": "null" } ] }, "loanAsset": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_markets__Asset" } }, "type": "object", "required": [ "uniqueKey", "lltv", "oracleAddress", "irmAddress", "state", "weeklyApys", "collateralAsset", "loanAsset" ], "title": "MorphoMarket" }, "MorphoRepayParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_REPAY", "title": "Action Type", "example": "MORPHO_REPAY" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "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." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the repayment is made. Defaults to sender." }, "callback_data": { "anyOf": [ { "type": "string", "format": "binary" }, { "type": "null" } ], "title": "Callback Data", "description": "An optional field for callback byte data that will be triggered upon successful repaying of debt." } }, "type": "object", "required": [ "amount", "unique_market_key" ], "title": "MorphoRepayParams" }, "MorphoRepayRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_REPAY", "title": "Action Type", "example": "MORPHO_REPAY" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "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." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the repayment is made. Defaults to sender." }, "callback_data": { "anyOf": [ { "type": "string", "format": "binary" }, { "type": "null" } ], "title": "Callback Data", "description": "An optional field for callback byte data that will be triggered upon successful repaying of debt." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "unique_market_key", "chain", "sender" ], "title": "MorphoRepayRequest", "required_allowances": [ "Morpho" ], "example": { "chain": "base", "sender": "0xbc267D24E58b429347026346c0C103b8Fa95D93d", "amount": 0.000005, "unique_market_key": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" } }, "MorphoSupplyCollateralParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_SUPPLY_COLLATERAL", "title": "Action Type", "example": "MORPHO_SUPPLY_COLLATERAL" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to supply to the market as collateral." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supplied collateral is made. Defaults to sender." }, "callback_data": { "anyOf": [ { "type": "string", "format": "binary" }, { "type": "null" } ], "title": "Callback Data", "description": "An optional field for callback byte data that will be triggered upon successful supplying of collateral." } }, "type": "object", "required": [ "amount", "unique_market_key" ], "title": "MorphoSupplyCollateralParams" }, "MorphoSupplyCollateralRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_SUPPLY_COLLATERAL", "title": "Action Type", "example": "MORPHO_SUPPLY_COLLATERAL" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to supply to the market as collateral." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the supplied collateral is made. Defaults to sender." }, "callback_data": { "anyOf": [ { "type": "string", "format": "binary" }, { "type": "null" } ], "title": "Callback Data", "description": "An optional field for callback byte data that will be triggered upon successful supplying of collateral." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "unique_market_key", "chain", "sender" ], "title": "MorphoSupplyCollateralRequest", "required_allowances": [ "Morpho" ], "example": { "chain": "base", "sender": "0x62e25C7CAADca07b5dFB6C52E01329451048632E", "amount": 0.5, "unique_market_key": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" } }, "MorphoVault": { "properties": { "address": { "type": "string", "title": "Address" }, "symbol": { "type": "string", "title": "Symbol" }, "name": { "type": "string", "title": "Name" }, "creationBlockNumber": { "type": "integer", "title": "Creationblocknumber" }, "creationTimestamp": { "type": "integer", "title": "Creationtimestamp" }, "creatorAddress": { "type": "string", "title": "Creatoraddress" }, "whitelisted": { "type": "boolean", "title": "Whitelisted" }, "asset": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_vaults__Asset" }, "chain": { "$ref": "#/components/schemas/ChainInfo" }, "state": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__get_vaults__VaultState" } }, "type": "object", "required": [ "address", "symbol", "name", "creationBlockNumber", "creationTimestamp", "creatorAddress", "whitelisted", "asset", "chain", "state" ], "title": "MorphoVault" }, "MorphoWithdrawCollateralParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_WITHDRAW_COLLATERAL", "title": "Action Type", "example": "MORPHO_WITHDRAW_COLLATERAL" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to supply to the market as collateral." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the withdraw is made. Defaults to sender." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address where the withdrawn collateral will be received. Defaults to sender." } }, "type": "object", "required": [ "amount", "unique_market_key" ], "title": "MorphoWithdrawCollateralParams" }, "MorphoWithdrawCollateralRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_WITHDRAW_COLLATERAL", "title": "Action Type", "example": "MORPHO_WITHDRAW_COLLATERAL" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of the token to supply to the market as collateral." }, "unique_market_key": { "type": "string", "pattern": "^0x.*", "title": "Unique Market Key", "description": "The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint." }, "on_behalf_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Behalf Of", "description": "The address on behalf of whom the withdraw is made. Defaults to sender." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address where the withdrawn collateral will be received. Defaults to sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "unique_market_key", "chain", "sender" ], "title": "MorphoWithdrawCollateralRequest", "required_allowances": [ "Morpho" ], "example": { "chain": "base", "sender": "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4", "amount": 0.5, "unique_market_key": "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5" } }, "MorphoWithdrawParams": { "properties": { "action_type": { "type": "string", "const": "MORPHO_WITHDRAW", "title": "Action Type", "example": "MORPHO_WITHDRAW" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are withdrawing from." }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the tokens withdrawn. Defaults to the sender." } }, "type": "object", "required": [ "vault_address", "amount" ], "title": "MorphoWithdrawParams" }, "MorphoWithdrawRequest": { "properties": { "action_type": { "type": "string", "const": "MORPHO_WITHDRAW", "title": "Action Type", "example": "MORPHO_WITHDRAW" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are withdrawing from." }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the tokens withdrawn. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "vault_address", "amount", "chain", "sender" ], "title": "MorphoWithdrawRequest", "required_allowances": [], "example": { "chain": "base", "sender": "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418", "vault_address": "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca", "amount": "ALL" } }, "Movement10Percent": { "properties": { "ptMovementUpUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ptmovementupusd" }, "ptMovementDownUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ptmovementdownusd" }, "ytMovementUpUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ytmovementupusd" }, "ytMovementDownUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Ytmovementdownusd" } }, "type": "object", "title": "Movement10Percent" }, "MulticallAuthorizationRequest": { "properties": { "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The Ethereum address to use for authorization" } }, "type": "object", "required": [ "chain", "sender" ], "title": "MulticallAuthorizationRequest", "description": "Request model for getting a multicall authorization.\n\nThis model is used to authorize a sender address to perform multicall operations,\nallowing it to call multiple functions on multiple contracts in a single\ntransaction.", "required_allowances": [], "example": { "chain": "arbitrum", "sender": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B" } }, "MulticallAuthorizationResponse": { "properties": { "nonce": { "type": "integer", "title": "Nonce", "description": "A unique nonce value for this authorization" }, "address": { "type": "string", "title": "Address", "description": "The Ethereum address authorized for multicall" }, "chainId": { "type": "integer", "title": "Chainid", "description": "The chain ID for the blockchain network" } }, "type": "object", "required": [ "nonce", "address", "chainId" ], "title": "MulticallAuthorizationResponse", "description": "Response model for multicall authorization." }, "MulticallExecuteRequest": { "properties": { "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true }, "signed_authorization": { "anyOf": [ { "$ref": "#/components/schemas/SignedAuthorization" }, { "type": "null" } ], "description": "EIP-7702 authorization" }, "actions": { "items": { "$ref": "#/components/schemas/UserOperation" }, "type": "array", "title": "Actions", "description": "List of possible actions for multicall" } }, "type": "object", "required": [ "chain", "sender", "actions" ], "title": "MulticallExecuteRequest", "description": "Request model for executing a multicall.", "required_allowances": [], "example": { "chain": "arbitrum", "sender": "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B", "estimate_gas": true, "signed_authorization": { "address": "0xcA11bde05977b3631167028862bE2a173976CA11", "chainId": 42161, "nonce": 1000, "r": "0x5f9f3f3226ac91bc01a72dd117141f6c6de1ed30d3af9f95c3423316dc21d615", "s": "0x78f7982ede9dabc53d7153974c5692fda8a21fc73bdafc42aaf135505e22817c", "yParity": 0 }, "actions": [ { "body": { "action_type": "SET_ALLOWANCE", "amount": "1000", "contract": "UniswapV3Router", "token": "WETH" } }, { "body": { "action_type": "UNISWAP_BUY_EXACTLY", "amount_out": "1000", "fee": "0.01", "max_slippage_percent": 0.5, "token_in": "WETH", "token_out": "USDC" } }, { "body": { "action_type": "SET_ALLOWANCE", "amount": "1000", "contract": "AaveV3Pool", "token": "USDC" } }, { "body": { "action_type": "SET_ALLOWANCE", "amount": "0.1", "contract": "AaveV3Pool", "token": "WETH" } }, { "body": { "action_type": "AAVE_SUPPLY", "amount": "1000", "token": "USDC" } }, { "body": { "action_type": "AAVE_BORROW", "amount": "0.1", "interest_rate_mode": "variable", "token": "WETH" } } ] } }, "OdosSwapParams": { "properties": { "action_type": { "type": "string", "const": "ODOS_SWAP", "title": "Action Type", "example": "ODOS_SWAP" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token that is to be sold." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token that is to be bought." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of token_in to be sold." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." } }, "type": "object", "required": [ "token_in", "token_out", "amount", "max_slippage_percent" ], "title": "OdosSwapParams" }, "OdosSwapRequest": { "properties": { "action_type": { "type": "string", "const": "ODOS_SWAP", "title": "Action Type", "example": "ODOS_SWAP" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token that is to be sold." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token that is to be bought." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of token_in to be sold." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "token_out", "amount", "max_slippage_percent", "chain", "sender" ], "title": "OdosSwapRequest", "required_allowances": [ "OdosRouter" ], "example": { "chain": "arbitrum", "sender": "0xBA5c2548003aDD027489EeDE2C90BE6f1c81cBb9", "token_in": "0x0000000000000000000000000000000000000000", "token_out": "USDT", "amount": 0.0001, "max_slippage_percent": 1 } }, "OdosTransactionResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." }, "amount_out_quote": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Out Quote", "description": "The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote." } }, "type": "object", "required": [ "transaction", "amount_out_quote" ], "title": "OdosTransactionResponse" }, "OpenPosition": { "properties": { "marketId": { "type": "string", "title": "Marketid" }, "pt": { "$ref": "#/components/schemas/compass__api_backend__models__pendle__read__response__positions__TokenBalance" }, "yt": { "$ref": "#/components/schemas/compass__api_backend__models__pendle__read__response__positions__TokenBalance" }, "lp": { "$ref": "#/components/schemas/LpBalance" } }, "type": "object", "required": [ "marketId", "pt", "yt", "lp" ], "title": "OpenPosition" }, "PendleGetMarketResponse": { "properties": { "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market." }, "implied_apy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Implied Apy", "description": "The implied APY of the market." }, "maturity_date": { "type": "string", "format": "date-time", "title": "Maturity Date", "description": "The maturity date of the market. ISO 8601 format. UTC timezone." }, "tokens": { "$ref": "#/components/schemas/MarketTokens", "description": "Token data relevant to the market." }, "user_position": { "anyOf": [ { "$ref": "#/components/schemas/compass__api_backend__models__pendle__read__response__market__UserPosition" }, { "type": "null" } ], "description": "The user's position in the market." } }, "type": "object", "required": [ "market_address", "implied_apy", "maturity_date", "tokens" ], "title": "PendleGetMarketResponse" }, "PendleListMarketsResponse": { "properties": { "markets": { "items": { "$ref": "#/components/schemas/PendleMarket" }, "type": "array", "title": "Markets", "description": "A list of active markets on the inputted chain." } }, "type": "object", "required": [ "markets" ], "title": "PendleListMarketsResponse" }, "PendleListUserPositionsResponse": { "properties": { "positions": { "items": { "$ref": "#/components/schemas/Position" }, "type": "array", "title": "Positions", "description": "A list of the user's positions on the given chain." } }, "type": "object", "required": [ "positions" ], "title": "PendleListUserPositionsResponse" }, "PendleManageLiquidityParams": { "properties": { "action_type": { "type": "string", "const": "PENDLE_MANAGE_LIQUIDITY", "title": "Action Type", "example": "PENDLE_MANAGE_LIQUIDITY" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address identifying which Pendle Market you would like to add liquidity to." }, "action": { "type": "string", "enum": [ "SUPPLY", "WITHDRAW" ], "title": "Action", "description": "Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)." }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent" ], "title": "PendleManageLiquidityParams" }, "PendleManageLiquidityRequest": { "properties": { "action_type": { "type": "string", "const": "PENDLE_MANAGE_LIQUIDITY", "title": "Action Type", "example": "PENDLE_MANAGE_LIQUIDITY" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address identifying which Pendle Market you would like to add liquidity to." }, "action": { "type": "string", "enum": [ "SUPPLY", "WITHDRAW" ], "title": "Action", "description": "Specifies the direction of the liquidity operation for the Pendle market. Valid values are `SUPPLY` (to add liquidity) or `WITHDRAW` (to remove liquidity)." }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token to manage liquidity with. For `action` set to `SUPPLY`, this is the token to add as liquidity. For `action` set to `WITHDRAW`, this is the token to remove from liquidity." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `SUPPLY`, this is the amount in of `token` to add as liquidity in exchange for Liquidity Provider (LP) tokens. For `action` set to `WITHDRAW`, this is the amount in of LP tokens to redeem for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent", "chain", "sender" ], "title": "PendleManageLiquidityRequest", "required_allowances": [ "PendleRouter" ], "example": { "chain": "arbitrum", "sender": "0x931C470a20B4B8428C80F5f63e193EE97C86094F", "market_address": "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538", "action": "SUPPLY", "token": "ETH", "amount_in": 0.0001, "max_slippage_percent": 1 } }, "PendleMarket": { "properties": { "name": { "type": "string", "title": "Name" }, "address": { "type": "string", "title": "Address" }, "expiry": { "type": "string", "format": "date-time", "title": "Expiry" }, "pt": { "type": "string", "title": "Pt" }, "yt": { "type": "string", "title": "Yt" }, "sy": { "type": "string", "title": "Sy" }, "underlyingAsset": { "type": "string", "title": "Underlyingasset" }, "details": { "$ref": "#/components/schemas/Details" }, "isNew": { "type": "boolean", "title": "Isnew" }, "isPrime": { "type": "boolean", "title": "Isprime" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" } }, "type": "object", "required": [ "name", "address", "expiry", "pt", "yt", "sy", "underlyingAsset", "details", "isNew", "isPrime", "timestamp" ], "title": "PendleMarket" }, "PendleRedeemYieldParams": { "properties": { "action_type": { "type": "string", "const": "PENDLE_REDEEM_YIELD", "title": "Action Type", "example": "PENDLE_REDEEM_YIELD" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Yield Token (YT) you would like to claim yield from." } }, "type": "object", "required": [ "market_address" ], "title": "PendleRedeemYieldParams" }, "PendleRedeemYieldRequest": { "properties": { "action_type": { "type": "string", "const": "PENDLE_REDEEM_YIELD", "title": "Action Type", "example": "PENDLE_REDEEM_YIELD" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Yield Token (YT) you would like to claim yield from." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "market_address", "chain", "sender" ], "title": "PendleRedeemYieldRequest", "required_allowances": [ "PendleRouter" ], "example": { "chain": "arbitrum", "sender": "0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126", "market_address": "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538" } }, "PendleTradePtParams": { "properties": { "action_type": { "type": "string", "const": "PENDLE_TRADE_PT", "title": "Action Type", "example": "PENDLE_TRADE_PT" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Principal Token (PT) you would like to trade." }, "action": { "type": "string", "enum": [ "BUY", "SELL" ], "title": "Action", "description": "Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)." }, "token": { "type": "string", "title": "Token", "description": "TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent" ], "title": "PendleTradePtParams" }, "PendleTradePtRequest": { "properties": { "action_type": { "type": "string", "const": "PENDLE_TRADE_PT", "title": "Action Type", "example": "PENDLE_TRADE_PT" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Principal Token (PT) you would like to trade." }, "action": { "type": "string", "enum": [ "BUY", "SELL" ], "title": "Action", "description": "Specifies the direction of the PT trade. Valid values are `BUY` (to buy PT) or `SELL` (to sell PT)." }, "token": { "type": "string", "title": "Token", "description": "TThe symbol or address of the token to trade PT with. For `action` set to `BUY`, this is the token to buy PT with. For `action` set to `SELL`, this is the token to sell PT for." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `BUY`, this is the amount in of `token` to buy PT with. For `action` set to `SELL`, this is the amount in of PT to sell for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent", "chain", "sender" ], "title": "PendleTradePtRequest", "required_allowances": [ "PendleRouter" ], "example": { "chain": "arbitrum", "sender": "0x68C314e30b543a35819e5625da563E6Da65D5dd4", "market_address": "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538", "action": "BUY", "token": "ETH", "amount_in": 0.0001, "max_slippage_percent": 1 } }, "PendleTradeYtParams": { "properties": { "action_type": { "type": "string", "const": "PENDLE_TRADE_YT", "title": "Action Type", "example": "PENDLE_TRADE_YT" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Yield Token (YT) you would like to trade." }, "action": { "type": "string", "enum": [ "BUY", "SELL" ], "title": "Action", "description": "Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)." }, "token": { "type": "string", "title": "Token", "description": "TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent" ], "title": "PendleTradeYtParams" }, "PendleTradeYtRequest": { "properties": { "action_type": { "type": "string", "const": "PENDLE_TRADE_YT", "title": "Action Type", "example": "PENDLE_TRADE_YT" }, "market_address": { "type": "string", "title": "Market Address", "description": "The address of the market identifying which Yield Token (YT) you would like to trade." }, "action": { "type": "string", "enum": [ "BUY", "SELL" ], "title": "Action", "description": "Specifies the direction of the YT trade. Valid values are `BUY` (to buy YT) or `SELL` (to sell YT)." }, "token": { "type": "string", "title": "Token", "description": "TThe symbol or address of the token to trade YT with. For `action` set to `BUY`, this is the token to buy YT with. For `action` set to `SELL`, this is the token to sell YT for." }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "For `action` set to `BUY`, this is the amount in of `token` to buy YT with. For `action` set to `SELL`, this is the amount in of YT to sell for `token`." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1%` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "market_address", "action", "token", "amount_in", "max_slippage_percent", "chain", "sender" ], "title": "PendleTradeYtRequest", "required_allowances": [ "PendleRouter" ], "example": { "chain": "arbitrum", "sender": "0xDB5282f99C964B2Cd72354fFf33Ad7eE482A0126", "market_address": "0x46d62a8dede1bf2d0de04f2ed863245cbba5e538", "action": "BUY", "token": "ETH", "amount_in": 0.0001, "max_slippage_percent": 1 } }, "PendleTxResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." }, "amount_out_quote": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Out Quote", "description": "The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote." } }, "type": "object", "required": [ "transaction", "amount_out_quote" ], "title": "PendleTxResponse" }, "Portfolio": { "properties": { "total_value_in_usd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Value In Usd", "description": "Total value of the portfolio in USD" }, "token_balances": { "items": { "$ref": "#/components/schemas/compass__api_backend__models__generic__read__response__portfolio__TokenBalance" }, "type": "array", "title": "Token Balances", "description": "List of token balances in the portfolio" } }, "type": "object", "required": [ "total_value_in_usd", "token_balances" ], "title": "Portfolio" }, "Position": { "properties": { "chainId": { "type": "integer", "title": "Chainid" }, "totalOpen": { "type": "integer", "title": "Totalopen" }, "totalClosed": { "type": "integer", "title": "Totalclosed" }, "totalSy": { "type": "integer", "title": "Totalsy" }, "openPositions": { "items": { "$ref": "#/components/schemas/OpenPosition" }, "type": "array", "title": "Openpositions" }, "closedPositions": { "items": { "$ref": "#/components/schemas/OpenPosition" }, "type": "array", "title": "Closedpositions" }, "syPositions": { "items": { "$ref": "#/components/schemas/SyPosition" }, "type": "array", "title": "Sypositions" }, "updatedAt": { "type": "string", "format": "date-time", "title": "Updatedat" } }, "type": "object", "required": [ "chainId", "totalOpen", "totalClosed", "totalSy", "openPositions", "closedPositions", "syPositions", "updatedAt" ], "title": "Position" }, "Protocol": { "type": "string", "enum": [ "aave", "aerodrome", "morpho", "sky", "uniswap", "pendle" ], "title": "Protocol" }, "Withdraw": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "amount": { "type": "number", "minimum": 0, "title": "Amount", "description": "Quantity of token" }, "reserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "assetPriceUSD": { "type": "number", "minimum": 0, "title": "Assetpriceusd", "description": "Price of token in USD" }, "action": { "type": "string", "title": "Action", "description": "The type of transaction" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "amount", "reserve", "assetPriceUSD", "action", "block" ], "title": "Withdraw" }, "Repay": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "amount": { "type": "number", "minimum": 0, "title": "Amount", "description": "Quantity of token" }, "reserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "assetPriceUSD": { "type": "number", "title": "Assetpriceusd" }, "action": { "type": "string", "const": "Repay", "title": "Action", "description": "The type of transaction" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "amount", "reserve", "assetPriceUSD", "action", "block" ], "title": "Repay" }, "Reserve": { "properties": { "symbol": { "type": "string", "title": "Symbol", "description": "Symbol of token." }, "decimals": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Decimals", "description": "Number of decimals of token." }, "name": { "type": "string", "title": "Name", "description": "Name of token" }, "underlyingAsset": { "type": "string", "title": "Underlyingasset", "description": "Checksum address of Token." } }, "type": "object", "required": [ "symbol", "name", "underlyingAsset" ], "title": "Reserve" }, "SetAllowanceParams": { "properties": { "action_type": { "type": "string", "const": "SET_ALLOWANCE", "title": "Action Type", "example": "SET_ALLOWANCE" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token for which the allowance is set.." }, "contract": { "anyOf": [ { "type": "string", "enum": [ "AaveV3Pool", "AerodromeBasicRouter", "AerodromeSlipstreamRouter", "AerodromeSlipstreamNonfungiblePositionManager", "UniswapV3Router", "UniswapV3NFTPositionManager", "Morpho", "SkyDaiUsdsConverter", "SkyUsdcUsdsConverter", "SkyUsdsVault", "PendleRouter", "OdosRouter", "EthenaVault" ] }, { "type": "string" } ], "title": "Contract", "description": "The name or address of the contract to set spending allowance for." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount to set the allowance to." } }, "type": "object", "required": [ "token", "contract", "amount" ], "title": "SetAllowanceParams", "description": "Parameters model for setting the token allowance for a given contract." }, "SetAllowanceRequest": { "properties": { "action_type": { "type": "string", "const": "SET_ALLOWANCE", "title": "Action Type", "example": "SET_ALLOWANCE" }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token for which the allowance is set.." }, "contract": { "anyOf": [ { "type": "string", "enum": [ "AaveV3Pool", "AerodromeBasicRouter", "AerodromeSlipstreamRouter", "AerodromeSlipstreamNonfungiblePositionManager", "UniswapV3Router", "UniswapV3NFTPositionManager", "Morpho", "SkyDaiUsdsConverter", "SkyUsdcUsdsConverter", "SkyUsdsVault", "PendleRouter", "OdosRouter", "EthenaVault" ] }, { "type": "string" } ], "title": "Contract", "description": "The name or address of the contract to set spending allowance for." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount to set the allowance to." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token", "contract", "amount", "chain", "sender" ], "title": "SetAllowanceRequest", "description": "Request model for increasing token allowance for a contract.", "required_allowances": [], "example": { "chain": "base", "sender": "0xa16d82c668317bF20091fA9D6D2CAE09Ee05d7c8", "token": "USDC", "contract": "AaveV3Pool", "amount": "0.1" } }, "SignedAuthorization": { "properties": { "nonce": { "type": "integer", "title": "Nonce", "description": "The nonce of the authorization" }, "address": { "type": "string", "title": "Address", "description": "The address of the authorization" }, "chainId": { "type": "integer", "title": "Chainid", "description": "The chain ID" }, "r": { "anyOf": [ { "type": "integer" }, { "type": "string" } ], "title": "R", "description": "The r value of the signature" }, "s": { "anyOf": [ { "type": "integer" }, { "type": "string" } ], "title": "S", "description": "The s value of the signature" }, "yParity": { "type": "integer", "title": "Yparity", "description": "The y-parity of the signature (0 or 1)" } }, "type": "object", "required": [ "nonce", "address", "chainId", "r", "s", "yParity" ], "title": "SignedAuthorization" }, "SkyBuyParams": { "properties": { "action_type": { "type": "string", "const": "SKY_BUY", "title": "Action Type", "example": "SKY_BUY" }, "token_in": { "type": "string", "enum": [ "DAI", "USDC" ], "title": "Token In", "description": "The token you would like to swap 1:1 for USDS. Choose from DAI or USDC." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to buy 1:1 with 'token_in'." } }, "type": "object", "required": [ "token_in", "amount" ], "title": "SkyBuyParams" }, "SkyBuyRequest": { "properties": { "action_type": { "type": "string", "const": "SKY_BUY", "title": "Action Type", "example": "SKY_BUY" }, "token_in": { "type": "string", "enum": [ "DAI", "USDC" ], "title": "Token In", "description": "The token you would like to swap 1:1 for USDS. Choose from DAI or USDC." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to buy 1:1 with 'token_in'." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "amount", "chain", "sender" ], "title": "SkyBuyRequest", "required_allowances": [ "SkyUsdcUsdsConverter", "SkyDaiUsdsConverter" ], "example": { "chain": "ethereum", "sender": "0xeF61F94a856a20f4fdD831B823e8B3CF09BEec3B", "token_in": "USDC", "amount": 0.5 } }, "SkyCheckPositionResponse": { "properties": { "usds_value_of_deposits": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Usds Value Of Deposits", "description": "The USDS equivalent value of the user's deposits thus far (principal + yield)." }, "shares": { "type": "integer", "title": "Shares" } }, "type": "object", "required": [ "usds_value_of_deposits", "shares" ], "title": "SkyCheckPositionResponse" }, "SkyDepositParams": { "properties": { "action_type": { "type": "string", "const": "SKY_DEPOSIT", "title": "Action Type", "example": "SKY_DEPOSIT" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to deposit for sUSDS to earn yield." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the sUSDS. Defaults to the sender." } }, "type": "object", "required": [ "amount" ], "title": "SkyDepositParams" }, "SkyDepositRequest": { "properties": { "action_type": { "type": "string", "const": "SKY_DEPOSIT", "title": "Action Type", "example": "SKY_DEPOSIT" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to deposit for sUSDS to earn yield." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the sUSDS. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain", "example": "ethereum" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "sender" ], "title": "SkyDepositRequest", "required_allowances": [ "SkyUsdsVault" ], "example": { "chain": "ethereum", "sender": "0x7F6063e2237a6b2aE32eDc48EF9cD1B2A8F3aD5D", "amount": 0.2 } }, "SkySellParams": { "properties": { "action_type": { "type": "string", "const": "SKY_SELL", "title": "Action Type", "example": "SKY_SELL" }, "token_out": { "type": "string", "enum": [ "DAI", "USDC" ], "title": "Token Out", "description": "The token you would like to swap 1:1 with USDS. Choose from DAI or USDC." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to sell 1:1 for 'token_out'." } }, "type": "object", "required": [ "token_out", "amount" ], "title": "SkySellParams" }, "SkySellRequest": { "properties": { "action_type": { "type": "string", "const": "SKY_SELL", "title": "Action Type", "example": "SKY_SELL" }, "token_out": { "type": "string", "enum": [ "DAI", "USDC" ], "title": "Token Out", "description": "The token you would like to swap 1:1 with USDS. Choose from DAI or USDC." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of USDS you would like to sell 1:1 for 'token_out'." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_out", "amount", "chain", "sender" ], "title": "SkySellRequest", "required_allowances": [ "SkyUsdcUsdsConverter", "SkyDaiUsdsConverter" ], "example": { "chain": "ethereum", "sender": "0x0ca38b6Ed5e12bbaf5fAf380c05a806D3a8d1CBC", "token_out": "USDC", "amount": 0.2 } }, "SkyWithdrawParams": { "properties": { "action_type": { "type": "string", "const": "SKY_WITHDRAW", "title": "Action Type", "example": "SKY_WITHDRAW" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the withdrawn USDS. Defaults to the sender." } }, "type": "object", "required": [ "amount" ], "title": "SkyWithdrawParams" }, "SkyWithdrawRequest": { "properties": { "action_type": { "type": "string", "const": "SKY_WITHDRAW", "title": "Action Type", "example": "SKY_WITHDRAW" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of USDS you would like to withdraw. If set to 'ALL', your total deposited USDS amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the withdrawn USDS. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "ethereum" ], "title": "Chain", "example": "ethereum" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "sender" ], "title": "SkyWithdrawRequest", "required_allowances": [ "SkyUsdsVault" ], "example": { "chain": "ethereum", "sender": "0xacCEE9C7A5a759f814C7A770e2D8F78d662b1F60", "amount": "ALL" } }, "Supply": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "amount": { "type": "number", "minimum": 0, "title": "Amount", "description": "Quantity of token" }, "reserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "assetPriceUSD": { "type": "number", "minimum": 0, "title": "Assetpriceusd", "description": "Price of token in USD" }, "action": { "type": "string", "const": "Supply", "title": "Action", "description": "The type of transaction" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "amount", "reserve", "assetPriceUSD", "action", "block" ], "title": "Supply" }, "SupportedChainInfo": { "properties": { "chains": { "items": { "$ref": "#/components/schemas/Chain" }, "type": "array", "title": "Chains" } }, "type": "object", "required": [ "chains" ], "title": "SupportedChainInfo", "description": "Response model for a chain." }, "SwapBorrowRate": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "borrowRateModeFrom": { "type": "integer", "title": "Borrowratemodefrom" }, "borrowRateModeTo": { "type": "integer", "title": "Borrowratemodeto" }, "variableBorrowRate": { "type": "integer", "title": "Variableborrowrate" }, "stableBorrowRate": { "type": "integer", "title": "Stableborrowrate" }, "reserve": { "$ref": "#/components/schemas/Reserve", "description": "Stores information about Token" }, "action": { "type": "string", "const": "SwapBorrowRate", "title": "Action" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "borrowRateModeFrom", "borrowRateModeTo", "variableBorrowRate", "stableBorrowRate", "reserve", "action", "block" ], "title": "SwapBorrowRate" }, "SyPosition": { "properties": { "syId": { "type": "string", "title": "Syid" }, "balance": { "type": "string", "title": "Balance" } }, "type": "object", "required": [ "syId", "balance" ], "title": "SyPosition" }, "TokenBalanceResponse": { "properties": { "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Amount of tokens a particular address holds" }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals of the token" }, "token_symbol": { "type": "string", "title": "Token Symbol", "description": "Symbol of the token" }, "token_address": { "type": "string", "title": "Token Address", "description": "Address of the token" } }, "type": "object", "required": [ "amount", "decimals", "token_symbol", "token_address" ], "title": "TokenBalanceResponse", "description": "Response model for token balance information." }, "TokenPriceResponse": { "properties": { "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "Price of the token in USD" } }, "type": "object", "required": [ "price" ], "title": "TokenPriceResponse" }, "TokenTransferParams": { "properties": { "action_type": { "type": "string", "const": "TOKEN_TRANSFER", "title": "Action Type", "example": "TOKEN_TRANSFER" }, "to": { "type": "string", "title": "To", "description": "The recipient of the tokens." }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token to transfer." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of token to transfer" } }, "type": "object", "required": [ "to", "token", "amount" ], "title": "TokenTransferParams", "description": "Parameters model for transferring ETH or ERC20 tokens." }, "TokenTransferRequest": { "properties": { "action_type": { "type": "string", "const": "TOKEN_TRANSFER", "title": "Action Type", "example": "TOKEN_TRANSFER" }, "to": { "type": "string", "title": "To", "description": "The recipient of the tokens." }, "token": { "type": "string", "title": "Token", "description": "The symbol or address of the token to transfer." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "Amount of token to transfer" }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "to", "token", "amount", "chain", "sender" ], "title": "TokenTransferRequest", "description": "Request model for transferring ETH or ERC20 tokens.", "required_allowances": [], "example": { "chain": "base", "to": "0x01E62835dd7F52173546A325294762143eE4a882", "sender": "0xA06a2D62D71BeAf93FA0a684A92c28729297eC81", "token": "USDC", "amount": 0.1 } }, "TransactionResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." } }, "type": "object", "required": [ "transaction" ], "title": "TransactionResponse" }, "UnderlyingToken": { "properties": { "address": { "type": "string", "title": "Address" }, "name": { "type": "string", "title": "Name" }, "symbol": { "type": "string", "title": "Symbol" }, "decimals": { "type": "integer", "title": "Decimals" } }, "type": "object", "required": [ "address", "name", "symbol", "decimals" ], "title": "UnderlyingToken" }, "UniswapBuyExactlyParams": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_BUY_EXACTLY", "title": "Action Type", "example": "UNISWAP_BUY_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap from.." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap to.." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "amount_out": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out", "description": "The amount of 'token_out' to buy." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed." } }, "type": "object", "required": [ "token_in", "token_out", "fee", "amount_out", "max_slippage_percent" ], "title": "UniswapBuyExactlyParams" }, "UniswapBuyExactlyRequest": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_BUY_EXACTLY", "title": "Action Type", "example": "UNISWAP_BUY_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap from.." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to swap to.." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "amount_out": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount Out", "description": "The amount of 'token_out' to buy." }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "token_out", "fee", "amount_out", "max_slippage_percent", "chain", "sender" ], "title": "UniswapBuyExactlyRequest", "description": "Request model for buying an exact amount of tokens.", "required_allowances": [ "UniswapV3Router" ], "example": { "chain": "base", "sender": "0x7a27794511C14F6afFDE618D3d8ef7B9C24058Ac", "token_in": "USDC", "token_out": "USDT", "fee": "0.01", "amount_out": 0.1, "max_slippage_percent": 0.5, "wrap_eth": false } }, "UniswapBuyExactlyTransactionResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." }, "amount_in_quote": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount In Quote", "description": "The estimated amount in for the transaction. The actual input amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote." } }, "type": "object", "required": [ "transaction", "amount_in_quote" ], "title": "UniswapBuyExactlyTransactionResponse" }, "UniswapBuyQuoteInfoResponse": { "properties": { "amount_in": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount In", "description": "The amount of token_in you would need to give to the pool." }, "price_after": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price After", "description": "The price of the pool after this trade would happen. (How much token0 you need to buy 1 token1.)" } }, "type": "object", "required": [ "amount_in", "price_after" ], "title": "UniswapBuyQuoteInfoResponse" }, "UniswapCheckInRangeResponse": { "properties": { "in_range": { "type": "boolean", "title": "In Range", "description": "Whether the position is in active tick range or not. If not in range, the position is not earning trading fees." } }, "type": "object", "required": [ "in_range" ], "title": "UniswapCheckInRangeResponse" }, "UniswapIncreaseLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_ADD_LIQUIDITY", "title": "Action Type", "example": "UNISWAP_ADD_LIQUIDITY" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "amount0_desired": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" } }, "type": "object", "required": [ "token_id", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min" ], "title": "UniswapIncreaseLiquidityProvisionParams" }, "UniswapIncreaseLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_ADD_LIQUIDITY", "title": "Action Type", "example": "UNISWAP_ADD_LIQUIDITY" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "amount0_desired": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_id", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min", "chain", "sender" ], "title": "UniswapIncreaseLiquidityProvisionRequest", "description": "Request model for increasing liquidity provision in Uniswap V3.", "required_allowances": [ "AerodromeSlipstreamRouter" ], "example": { "chain": "base", "sender": "0x41096de529D54718a5600185F8C4460979ed75C9", "token_id": 3432182, "amount0_desired": "0.3", "amount1_desired": "0.0", "amount0_min": "0.00", "amount1_min": "0.00" } }, "UniswapLPPositionsInfoResponse": { "properties": { "positions": { "additionalProperties": { "$ref": "#/components/schemas/UniswapPositionsSolidityResponse" }, "type": "object", "title": "Positions", "description": " Liquidity provision positions belonging to a particular user keyed by the\n token of owner index of the position. " } }, "type": "object", "required": [ "positions" ], "title": "UniswapLPPositionsInfoResponse" }, "UniswapMintLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_MINT_LIQUIDITY_PROVISION", "title": "Action Type", "example": "UNISWAP_MINT_LIQUIDITY_PROVISION" }, "token0": { "type": "string", "title": "Token", "description": "The symbol or address of the first token in the pair." }, "token1": { "type": "string", "title": "Token", "description": "The symbol or address of the second token in the pair." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "tick_lower": { "type": "integer", "maximum": 887272, "minimum": -887272, "title": "Tick Lower", "description": "The lower tick of the range to mint the position in" }, "tick_upper": { "type": "integer", "maximum": 887272, "minimum": -887272, "title": "Tick Upper", "description": "The upper tick of the range to mint the position in" }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "recipient": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recipient", "description": "The address that will receive the LP tokens" } }, "type": "object", "required": [ "token0", "token1", "fee", "tick_lower", "tick_upper", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min" ], "title": "UniswapMintLiquidityProvisionParams" }, "UniswapMintLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_MINT_LIQUIDITY_PROVISION", "title": "Action Type", "example": "UNISWAP_MINT_LIQUIDITY_PROVISION" }, "token0": { "type": "string", "title": "Token", "description": "The symbol or address of the first token in the pair." }, "token1": { "type": "string", "title": "Token", "description": "The symbol or address of the second token in the pair." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "tick_lower": { "type": "integer", "maximum": 887272, "minimum": -887272, "title": "Tick Lower", "description": "The lower tick of the range to mint the position in" }, "tick_upper": { "type": "integer", "maximum": 887272, "minimum": -887272, "title": "Tick Upper", "description": "The upper tick of the range to mint the position in" }, "amount0_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Desired", "description": "The desired amount of the first token to deposit" }, "amount1_desired": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Desired", "description": "The desired amount of the second token to deposit" }, "amount0_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount0 Min", "description": "The minimum amount of the first token to deposit" }, "amount1_min": { "anyOf": [ { "type": "number", "minimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount1 Min", "description": "The minimum amount of the second token to deposit" }, "recipient": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recipient", "description": "The address that will receive the LP tokens" }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token0", "token1", "fee", "tick_lower", "tick_upper", "amount0_desired", "amount1_desired", "amount0_min", "amount1_min", "chain", "sender" ], "title": "UniswapMintLiquidityProvisionRequest", "description": "Request model for minting a new liquidity position.", "required_allowances": [ "UniswapV3NFTPositionManager" ], "example": { "chain": "base", "sender": "0x41096de529D54718a5600185F8C4460979ed75C9", "token0": "USDC", "token1": "USDT", "fee": "1.0", "tick_lower": 1823, "tick_upper": 2623, "amount0_desired": "0.05", "amount1_desired": "0.00", "amount0_min": "0", "amount1_min": "0", "recipient": "0x41096de529D54718a5600185F8C4460979ed75C9" } }, "UniswapPoolPriceResponse": { "properties": { "token_in": { "type": "string", "title": "Token In", "description": "The first token in the pool" }, "token_out": { "type": "string", "title": "Token Out", "description": "The second token in the pool" }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "The price of the pool. This is expressed as an instantanteous amount of how many token0 you need to buy 1 token1. In any swap this will not change during the trade; use the quote endpoint to get a better idea of how much you will pay!" }, "tick": { "type": "integer", "title": "Tick", "description": "The current tick in the pool. This is a number that represents the price of the pool according to the uniswap v3 concentrated liquidity concept." } }, "type": "object", "required": [ "token_in", "token_out", "price", "tick" ], "title": "UniswapPoolPriceResponse" }, "UniswapPositionsSolidityResponse": { "properties": { "nonce": { "type": "integer", "title": "Nonce" }, "operator": { "type": "string", "title": "Operator" }, "token0": { "type": "string", "title": "Token0" }, "token1": { "type": "string", "title": "Token1" }, "fee": { "type": "integer", "title": "Fee" }, "tick_lower": { "type": "integer", "title": "Tick Lower" }, "tick_upper": { "type": "integer", "title": "Tick Upper" }, "liquidity": { "type": "integer", "title": "Liquidity" }, "fee_growth_inside0_last_x128": { "type": "integer", "title": "Fee Growth Inside0 Last X128" }, "fee_growth_inside1_last_x128": { "type": "integer", "title": "Fee Growth Inside1 Last X128" }, "tokens_owed0": { "type": "integer", "title": "Tokens Owed0" }, "tokens_owed1": { "type": "integer", "title": "Tokens Owed1" }, "lp_token_address": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lp Token Address" } }, "type": "object", "required": [ "nonce", "operator", "token0", "token1", "fee", "tick_lower", "tick_upper", "liquidity", "fee_growth_inside0_last_x128", "fee_growth_inside1_last_x128", "tokens_owed0", "tokens_owed1" ], "title": "UniswapPositionsSolidityResponse" }, "UniswapSellExactlyParams": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_SELL_EXACTLY", "title": "Action Type", "example": "UNISWAP_SELL_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to sell.." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to buy.." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "The amount of the `token_in` to sell" }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed." } }, "type": "object", "required": [ "token_in", "token_out", "fee", "amount_in", "max_slippage_percent" ], "title": "UniswapSellExactlyParams", "description": "Parameters model for selling exactly an amount of tokens." }, "UniswapSellExactlyRequest": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_SELL_EXACTLY", "title": "Action Type", "example": "UNISWAP_SELL_EXACTLY" }, "token_in": { "type": "string", "title": "Token", "description": "The symbol or address of the token to sell.." }, "token_out": { "type": "string", "title": "Token", "description": "The symbol or address of the token to buy.." }, "fee": { "$ref": "#/components/schemas/FeeEnum", "description": "The swap fee of the pool" }, "amount_in": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount In", "description": "The amount of the `token_in` to sell" }, "max_slippage_percent": { "type": "number", "maximum": 10, "minimum": 0, "title": "Max Slippage Percent", "description": "The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_in", "token_out", "fee", "amount_in", "max_slippage_percent", "chain", "sender" ], "title": "UniswapSellExactlyRequest", "description": "Request model for selling exactly an amount of tokens.", "required_allowances": [ "UniswapV3Router" ], "example": { "chain": "base", "sender": "0xA7DeA16238DdF6ed8AaC73A348bbdE6da20C20B5", "token_in": "USDC", "token_out": "USDT", "fee": "0.01", "amount_in": 0.1, "max_slippage_percent": 0.5 } }, "UniswapSellExactlyTransactionResponse": { "properties": { "transaction": { "anyOf": [ { "$ref": "#/components/schemas/UnsignedTransaction" }, { "$ref": "#/components/schemas/UserOperationResponse" } ], "title": "Transaction", "description": "The unsigned transaction data. User must sign and broadcast to network." }, "amount_out_quote": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Out Quote", "description": "The estimated amount out for the transaction. The actual output amount for this transaction is guaranteed be within the acceptable threshold, defined by the `max_slippage_percent`, relative to this quote." } }, "type": "object", "required": [ "transaction", "amount_out_quote" ], "title": "UniswapSellExactlyTransactionResponse" }, "UniswapSellQuoteInfoResponse": { "properties": { "amount_out": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Out", "description": "The amount of token_out you would receive from the pool." }, "price_after": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price After", "description": "The price of the pool after this trade would happen. (How much token0 you need to buy 1 token1.)" } }, "type": "object", "required": [ "amount_out", "price_after" ], "title": "UniswapSellQuoteInfoResponse" }, "UniswapWithdrawLiquidityProvisionParams": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION", "title": "Action Type", "example": "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "percentage_for_withdrawal": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Percentage For Withdrawal", "description": "How much liquidity to take out in percentage." } }, "type": "object", "required": [ "token_id", "percentage_for_withdrawal" ], "title": "UniswapWithdrawLiquidityProvisionParams", "description": "Endpoint parameters for liquidity provision withdrawal on uniswap v3.\n\nThis action is performed in a multicall on the NonfungiblePosition Manager: https://github.com/Uniswap/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/base/Multicall.sol#L11-L27\nFirst, we call decrease liquidity then collect the tokens owed to the user." }, "UniswapWithdrawLiquidityProvisionRequest": { "properties": { "action_type": { "type": "string", "const": "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION", "title": "Action Type", "example": "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION" }, "token_id": { "type": "integer", "title": "Token Id", "description": "Token ID of the NFT representing the liquidity provisioned position." }, "percentage_for_withdrawal": { "anyOf": [ { "type": "number", "maximum": 100, "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Percentage For Withdrawal", "description": "How much liquidity to take out in percentage." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "token_id", "percentage_for_withdrawal", "chain", "sender" ], "title": "UniswapWithdrawLiquidityProvisionRequest", "required_allowances": [ "UniswapV3NFTPositionManager" ], "example": { "chain": "base", "sender": "0x41096de529D54718a5600185F8C4460979ed75C9", "token_id": 3432182, "percentage_for_withdrawal": 1 } }, "UnsignedMulticallTransaction": { "properties": { "chainId": { "type": "string", "title": "Chainid", "description": "The chain id of the transaction" }, "data": { "type": "string", "title": "Data", "description": "The data of the transaction" }, "from": { "type": "string", "title": "From", "description": "The sender of the transaction" }, "gas": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gas", "description": "The gas of the transaction" }, "to": { "type": "string", "title": "To", "description": "The recipient of the transaction" }, "value": { "type": "string", "title": "Value", "description": "The value of the transaction" }, "nonce": { "type": "string", "title": "Nonce", "description": "The nonce of the address" }, "maxFeePerGas": { "type": "string", "title": "Maxfeepergas", "description": "The max fee per gas of the transaction" }, "maxPriorityFeePerGas": { "type": "string", "title": "Maxpriorityfeepergas", "description": "The max priority fee per gas of the transaction" }, "authorizationList": { "items": { "$ref": "#/components/schemas/SignedAuthorization" }, "type": "array", "title": "Authorizationlist", "description": "EIP-7702 authorization", "example": [] } }, "type": "object", "required": [ "chainId", "data", "from", "gas", "to", "value", "nonce", "maxFeePerGas", "maxPriorityFeePerGas" ], "title": "UnsignedMulticallTransaction" }, "UnsignedTransaction": { "properties": { "chainId": { "type": "string", "title": "Chainid", "description": "The chain id of the transaction" }, "data": { "type": "string", "title": "Data", "description": "The data of the transaction" }, "from": { "type": "string", "title": "From", "description": "The sender of the transaction" }, "gas": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gas", "description": "The gas of the transaction" }, "to": { "type": "string", "title": "To", "description": "The recipient of the transaction" }, "value": { "type": "string", "title": "Value", "description": "The value of the transaction" }, "nonce": { "type": "string", "title": "Nonce", "description": "The nonce of the address" }, "maxFeePerGas": { "type": "string", "title": "Maxfeepergas", "description": "The max fee per gas of the transaction" }, "maxPriorityFeePerGas": { "type": "string", "title": "Maxpriorityfeepergas", "description": "The max priority fee per gas of the transaction" } }, "type": "object", "required": [ "chainId", "data", "from", "gas", "to", "value", "nonce", "maxFeePerGas", "maxPriorityFeePerGas" ], "title": "UnsignedTransaction" }, "UnwrapWethParams": { "properties": { "action_type": { "type": "string", "const": "UNWRAP_WETH", "title": "Action Type", "example": "UNWRAP_WETH" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of WETH to unwrap." } }, "type": "object", "required": [ "amount" ], "title": "UnwrapWethParams", "description": "Parameters model for unwrapping WETH back to native ETH." }, "UnwrapWethRequest": { "properties": { "action_type": { "type": "string", "const": "UNWRAP_WETH", "title": "Action Type", "example": "UNWRAP_WETH" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of WETH to unwrap." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "chain", "sender" ], "title": "UnwrapWethRequest", "description": "Request model for unwrapping WETH back to native ETH.", "required_allowances": [], "example": { "chain": "base", "sender": "0x0E9E8986823aF26F6b18702C31AfF6a10C1e9E7A", "amount": "0.00004" } }, "UsageAsCollateral": { "properties": { "id": { "type": "string", "title": "Id", "description": "The id of a historical transaction on aave" }, "timestamp": { "type": "integer", "title": "Timestamp", "description": "Timestamp in unix time" }, "txHash": { "type": "string", "title": "Txhash", "description": "Transaction hash. You can paste these into the search bar on etherscan" }, "fromState": { "type": "boolean", "title": "Fromstate" }, "toState": { "type": "boolean", "title": "Tostate" }, "reserve": { "$ref": "#/components/schemas/Reserve" }, "action": { "type": "string", "const": "UsageAsCollateral", "title": "Action", "description": "The type of transaction" }, "block": { "type": "integer", "title": "Block", "readOnly": true } }, "type": "object", "required": [ "id", "timestamp", "txHash", "fromState", "toState", "reserve", "action", "block" ], "title": "UsageAsCollateral" }, "UserOperation": { "properties": { "body": { "oneOf": [ { "$ref": "#/components/schemas/AaveBorrowParams" }, { "$ref": "#/components/schemas/AaveRepayParams" }, { "$ref": "#/components/schemas/AaveSupplyParams" }, { "$ref": "#/components/schemas/AaveWithdrawParams" }, { "$ref": "#/components/schemas/AerodromeSlipstreamBuyExactlyParams" }, { "$ref": "#/components/schemas/AerodromeSlipstreamIncreaseLiquidityProvisionParams" }, { "$ref": "#/components/schemas/AerodromeSlipstreamMintLiquidityProvisionParams" }, { "$ref": "#/components/schemas/AerodromeSlipstreamSellExactlyParams" }, { "$ref": "#/components/schemas/AerodromeSlipstreamWithdrawLiquidityProvisionParams" }, { "$ref": "#/components/schemas/EthenaDepositParams" }, { "$ref": "#/components/schemas/EthenaRequestToWithdrawParams" }, { "$ref": "#/components/schemas/EthenaUnstakeParams" }, { "$ref": "#/components/schemas/MorphoBorrowParams" }, { "$ref": "#/components/schemas/MorphoDepositParams" }, { "$ref": "#/components/schemas/MorphoRepayParams" }, { "$ref": "#/components/schemas/MorphoSupplyCollateralParams" }, { "$ref": "#/components/schemas/MorphoWithdrawParams" }, { "$ref": "#/components/schemas/MorphoWithdrawCollateralParams" }, { "$ref": "#/components/schemas/OdosSwapParams" }, { "$ref": "#/components/schemas/PendleManageLiquidityParams" }, { "$ref": "#/components/schemas/PendleRedeemYieldParams" }, { "$ref": "#/components/schemas/PendleTradePtParams" }, { "$ref": "#/components/schemas/PendleTradeYtParams" }, { "$ref": "#/components/schemas/SetAllowanceParams" }, { "$ref": "#/components/schemas/SkyBuyParams" }, { "$ref": "#/components/schemas/SkyDepositParams" }, { "$ref": "#/components/schemas/SkySellParams" }, { "$ref": "#/components/schemas/SkyWithdrawParams" }, { "$ref": "#/components/schemas/TokenTransferParams" }, { "$ref": "#/components/schemas/UniswapIncreaseLiquidityProvisionParams" }, { "$ref": "#/components/schemas/UniswapBuyExactlyParams" }, { "$ref": "#/components/schemas/UniswapMintLiquidityProvisionParams" }, { "$ref": "#/components/schemas/UniswapSellExactlyParams" }, { "$ref": "#/components/schemas/UniswapWithdrawLiquidityProvisionParams" }, { "$ref": "#/components/schemas/UnwrapWethParams" }, { "$ref": "#/components/schemas/VaultDepositParams" }, { "$ref": "#/components/schemas/VaultWithdrawParams" }, { "$ref": "#/components/schemas/WrapEthParams" } ], "discriminator": { "propertyName": "action_type", "mapping": { "AAVE_BORROW": "#/components/schemas/AaveBorrowParams", "AAVE_REPAY": "#/components/schemas/AaveRepayParams", "AAVE_SUPPLY": "#/components/schemas/AaveSupplyParams", "AAVE_WITHDRAW": "#/components/schemas/AaveWithdrawParams", "AERODROME_SLIPSTREAM_BUY_EXACTLY": "#/components/schemas/AerodromeSlipstreamBuyExactlyParams", "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION": "#/components/schemas/AerodromeSlipstreamIncreaseLiquidityProvisionParams", "AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION": "#/components/schemas/AerodromeSlipstreamMintLiquidityProvisionParams", "AERODROME_SLIPSTREAM_SELL_EXACTLY": "#/components/schemas/AerodromeSlipstreamSellExactlyParams", "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION": "#/components/schemas/AerodromeSlipstreamWithdrawLiquidityProvisionParams", "ETHENA_DEPOSIT": "#/components/schemas/EthenaDepositParams", "ETHENA_REQUEST_WITHDRAW": "#/components/schemas/EthenaRequestToWithdrawParams", "ETHENA_UNSTAKE": "#/components/schemas/EthenaUnstakeParams", "MORPHO_BORROW": "#/components/schemas/MorphoBorrowParams", "MORPHO_DEPOSIT": "#/components/schemas/MorphoDepositParams", "MORPHO_REPAY": "#/components/schemas/MorphoRepayParams", "MORPHO_SUPPLY_COLLATERAL": "#/components/schemas/MorphoSupplyCollateralParams", "MORPHO_WITHDRAW": "#/components/schemas/MorphoWithdrawParams", "MORPHO_WITHDRAW_COLLATERAL": "#/components/schemas/MorphoWithdrawCollateralParams", "ODOS_SWAP": "#/components/schemas/OdosSwapParams", "PENDLE_MANAGE_LIQUIDITY": "#/components/schemas/PendleManageLiquidityParams", "PENDLE_REDEEM_YIELD": "#/components/schemas/PendleRedeemYieldParams", "PENDLE_TRADE_PT": "#/components/schemas/PendleTradePtParams", "PENDLE_TRADE_YT": "#/components/schemas/PendleTradeYtParams", "SET_ALLOWANCE": "#/components/schemas/SetAllowanceParams", "SKY_BUY": "#/components/schemas/SkyBuyParams", "SKY_DEPOSIT": "#/components/schemas/SkyDepositParams", "SKY_SELL": "#/components/schemas/SkySellParams", "SKY_WITHDRAW": "#/components/schemas/SkyWithdrawParams", "TOKEN_TRANSFER": "#/components/schemas/TokenTransferParams", "UNISWAP_ADD_LIQUIDITY": "#/components/schemas/UniswapIncreaseLiquidityProvisionParams", "UNISWAP_BUY_EXACTLY": "#/components/schemas/UniswapBuyExactlyParams", "UNISWAP_MINT_LIQUIDITY_PROVISION": "#/components/schemas/UniswapMintLiquidityProvisionParams", "UNISWAP_SELL_EXACTLY": "#/components/schemas/UniswapSellExactlyParams", "UNISWAP_WITHDRAW_LIQUIDITY_PROVISION": "#/components/schemas/UniswapWithdrawLiquidityProvisionParams", "UNWRAP_WETH": "#/components/schemas/UnwrapWethParams", "VAULT_DEPOSIT": "#/components/schemas/VaultDepositParams", "VAULT_WITHDRAW": "#/components/schemas/VaultWithdrawParams", "WRAP_ETH": "#/components/schemas/WrapEthParams" } } } }, "type": "object", "required": [ "action_type", "body" ], "title": "UserOperation" }, "UserOperationResponse": { "properties": { "to": { "type": "string", "title": "To", "description": "The target contract address for the operation" }, "data": { "type": "string", "title": "Data", "description": "The calldata for the operation" }, "value": { "type": "string", "title": "Value", "description": "The ETH value to send with the operation" } }, "type": "object", "required": [ "to", "data", "value" ], "title": "UserOperationResponse" }, "UserState": { "properties": { "vaultsPnlUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Vaultspnlusd" }, "vaultsAssetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Vaultsassetsusd" }, "marketsPnlUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Marketspnlusd" }, "marketsBorrowAssetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Marketsborrowassetsusd" }, "marketsCollateralUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Marketscollateralusd" }, "marketsSupplyAssetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Marketssupplyassetsusd" } }, "type": "object", "required": [ "vaultsPnlUsd", "vaultsAssetsUsd", "marketsPnlUsd", "marketsBorrowAssetsUsd", "marketsCollateralUsd", "marketsSupplyAssetsUsd" ], "title": "UserState" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "Vault": { "properties": { "address": { "type": "string", "title": "Address" }, "name": { "type": "string", "title": "Name" }, "symbol": { "type": "string", "title": "Symbol" }, "whitelisted": { "type": "boolean", "title": "Whitelisted" }, "asset": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__Asset" }, "dailyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__ApyData" }, "weeklyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__ApyData" }, "monthlyApys": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__ApyData" } }, "type": "object", "required": [ "address", "name", "symbol", "whitelisted", "asset", "dailyApys", "weeklyApys", "monthlyApys" ], "title": "Vault" }, "VaultDepositParams": { "properties": { "action_type": { "type": "string", "const": "VAULT_DEPOSIT", "title": "Action Type", "example": "VAULT_DEPOSIT" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are depositing to." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of tokens to deposit into the vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender." } }, "type": "object", "required": [ "vault_address", "amount" ], "title": "VaultDepositParams" }, "VaultDepositRequest": { "properties": { "action_type": { "type": "string", "const": "VAULT_DEPOSIT", "title": "Action Type", "example": "VAULT_DEPOSIT" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are depositing to." }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of tokens to deposit into the vault." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "vault_address", "amount", "chain", "sender" ], "title": "VaultDepositRequest", "required_allowances": [ "\u003cvault_address\u003e" ], "example": { "chain": "base", "sender": "0x38EBf6c7D836f476cEE7DD093Ca43Bbc08e4Cc91", "vault_address": "0xfdB431E661372fA1146efB70bf120ECDed944a78", "amount": 0.5 } }, "VaultGetVaultResponse": { "properties": { "name": { "type": "string", "title": "Name", "description": "Name of the vault." }, "symbol": { "type": "string", "title": "Symbol", "description": "Symbol of the vault." }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals used for the vault's share precision." }, "total_assets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Assets", "description": "Total amount of assets deposited in the vault." }, "total_supply": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Total Supply", "description": "Total amount of shares issued from the vault." }, "share_price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Share Price", "description": "The price of one vault share in terms of the underlying asset." }, "underlying_token": { "$ref": "#/components/schemas/UnderlyingToken", "description": "Underlying token (asset) used by the vault." }, "apy": { "$ref": "#/components/schemas/Apy", "description": "Average APY over various time periods." }, "user_position": { "anyOf": [ { "$ref": "#/components/schemas/compass__api_backend__models__vaults__read__response__vault__UserPosition" }, { "type": "null" } ], "description": "The user's position in the vault." } }, "type": "object", "required": [ "name", "symbol", "decimals", "total_assets", "total_supply", "share_price", "underlying_token", "apy" ], "title": "VaultGetVaultResponse" }, "VaultPosition": { "properties": { "id": { "type": "string", "title": "Id" }, "state": { "$ref": "#/components/schemas/compass__api_backend__models__morpho__read__response__check_user_position__VaultState" }, "vault": { "$ref": "#/components/schemas/Vault" } }, "type": "object", "required": [ "id", "state", "vault" ], "title": "VaultPosition" }, "VaultWithdrawParams": { "properties": { "action_type": { "type": "string", "const": "VAULT_WITHDRAW", "title": "Action Type", "example": "VAULT_WITHDRAW" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are withdrawing from." }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the tokens withdrawn. Defaults to the sender." } }, "type": "object", "required": [ "vault_address", "amount" ], "title": "VaultWithdrawParams" }, "VaultWithdrawRequest": { "properties": { "action_type": { "type": "string", "const": "VAULT_WITHDRAW", "title": "Action Type", "example": "VAULT_WITHDRAW" }, "vault_address": { "type": "string", "title": "Vault Address", "description": "The vault address you are withdrawing from." }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "string", "const": "ALL" } ], "title": "Amount", "description": "The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn." }, "receiver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Receiver", "description": "The address which will receive the tokens withdrawn. Defaults to the sender." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "vault_address", "amount", "chain", "sender" ], "title": "VaultWithdrawRequest", "required_allowances": [], "example": { "chain": "base", "sender": "0x52680FEe4CC87AFB748F98F9B2f8D80190b8EF2c", "vault_address": "0xfdB431E661372fA1146efB70bf120ECDed944a78", "amount": "ALL" } }, "WeeklyApys": { "properties": { "supplyApy": { "type": "number", "title": "Supplyapy" }, "netSupplyApy": { "type": "number", "title": "Netsupplyapy" }, "borrowApy": { "type": "number", "title": "Borrowapy" }, "netBorrowApy": { "type": "number", "title": "Netborrowapy" } }, "type": "object", "required": [ "supplyApy", "netSupplyApy", "borrowApy", "netBorrowApy" ], "title": "WeeklyApys" }, "WrapEthParams": { "properties": { "action_type": { "type": "string", "const": "WRAP_ETH", "title": "Action Type", "example": "WRAP_ETH" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of ETH to wrap." } }, "type": "object", "required": [ "amount" ], "title": "WrapEthParams", "description": "Parameters model for wrapping ETH into WETH." }, "WrapEthRequest": { "properties": { "action_type": { "type": "string", "const": "WRAP_ETH", "title": "Action Type", "example": "WRAP_ETH" }, "amount": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" } ], "title": "Amount", "description": "The amount of ETH to wrap." }, "chain": { "type": "string", "enum": [ "arbitrum", "base", "ethereum" ], "title": "Chain" }, "sender": { "type": "string", "title": "Sender", "description": "The address of the transaction sender." }, "estimate_gas": { "type": "boolean", "title": "Estimate Gas", "description": "Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed.", "example": true } }, "type": "object", "required": [ "amount", "chain", "sender" ], "title": "WrapEthRequest", "description": "Request model for wrapping ETH into WETH.", "required_allowances": [], "example": { "chain": "base", "sender": "0xdc3db667461DeE4881E73469c144FAe21eE920A2", "amount": "0.000001" } }, "YieldRange": { "properties": { "min": { "type": "number", "title": "Min" }, "max": { "type": "number", "title": "Max" } }, "type": "object", "required": [ "min", "max" ], "title": "YieldRange" }, "compass__api_backend__models__generic__read__response__portfolio__TokenBalance": { "properties": { "amount": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount", "description": "Amount of tokens a particular address holds" }, "decimals": { "type": "integer", "title": "Decimals", "description": "Number of decimals of the token" }, "token_symbol": { "type": "string", "title": "Token Symbol", "description": "Symbol of the token." }, "token_address": { "type": "string", "title": "Token Address", "description": "Address of the token" }, "price": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Price", "description": "Price of the token in USD" }, "token_value_in_usd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Token Value In Usd", "description": "Value of the token balance in USD" } }, "type": "object", "required": [ "amount", "decimals", "token_symbol", "token_address", "price", "token_value_in_usd" ], "title": "TokenBalance" }, "compass__api_backend__models__morpho__read__response__check_user_position__ApyData": { "properties": { "apy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Apy" }, "netApy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Netapy" } }, "type": "object", "required": [ "apy", "netApy" ], "title": "ApyData" }, "compass__api_backend__models__morpho__read__response__check_user_position__Asset": { "properties": { "name": { "type": "string", "title": "Name" }, "symbol": { "type": "string", "title": "Symbol" }, "address": { "type": "string", "title": "Address" }, "decimals": { "type": "integer", "title": "Decimals" }, "priceUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Priceusd" }, "logoURI": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logouri" } }, "type": "object", "required": [ "name", "symbol", "address", "decimals", "priceUsd", "logoURI" ], "title": "Asset" }, "compass__api_backend__models__morpho__read__response__check_user_position__MarketState": { "properties": { "pnlUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Pnlusd" }, "borrowAssets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrowassets" }, "borrowShares": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrowshares" }, "borrowAssetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrowassetsusd" }, "collateral": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Collateral" }, "collateralUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Collateralusd" }, "supplyAssets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supplyassets" }, "supplyShares": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supplyshares" }, "supplyAssetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supplyassetsusd" } }, "type": "object", "required": [ "pnlUsd", "borrowAssets", "borrowShares", "borrowAssetsUsd", "collateral", "collateralUsd", "supplyAssets", "supplyShares", "supplyAssetsUsd" ], "title": "MarketState" }, "compass__api_backend__models__morpho__read__response__check_user_position__VaultState": { "properties": { "pnlUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Pnlusd" }, "assets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Assets" }, "assetsUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Assetsusd" }, "shares": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Shares" } }, "type": "object", "required": [ "pnlUsd", "assets", "assetsUsd", "shares" ], "title": "VaultState" }, "compass__api_backend__models__morpho__read__response__get_market__ApyData": { "properties": { "borrowApy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrowapy" }, "netBorrowApy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Netborrowapy" }, "netSupplyApy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Netsupplyapy" }, "supplyApy": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Supplyapy" } }, "type": "object", "required": [ "borrowApy", "netBorrowApy", "netSupplyApy", "supplyApy" ], "title": "ApyData" }, "compass__api_backend__models__morpho__read__response__get_market__Asset": { "properties": { "address": { "type": "string", "title": "Address" }, "symbol": { "type": "string", "title": "Symbol" }, "name": { "type": "string", "title": "Name" }, "decimals": { "type": "integer", "title": "Decimals" }, "priceUsd": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Priceusd" }, "logoURI": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Logouri" } }, "type": "object", "required": [ "address", "symbol", "name", "decimals", "priceUsd", "logoURI" ], "title": "Asset" }, "compass__api_backend__models__morpho__read__response__get_market__MarketState": { "properties": { "utilization": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Utilization" }, "collateralAssets": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Collateralassets" }, "collateralAssetsUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Collateralassetsusd" }, "borrowAssets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Borrowassets" }, "borrowAssetsUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Borrowassetsusd" }, "liquidityAssets": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Liquidityassets" }, "liquidityAssetsUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Liquidityassetsusd" }, "totalLiquidity": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Totalliquidity" }, "totalLiquidityUsd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Totalliquidityusd" } }, "type": "object", "required": [ "utilization", "borrowAssets", "liquidityAssets", "totalLiquidity" ], "title": "MarketState" }, "compass__api_backend__models__morpho__read__response__get_markets__Asset": { "properties": { "address": { "type": "string", "title": "Address" }, "symbol": { "type": "string", "title": "Symbol" }, "name": { "type": "string", "title": "Name" }, "decimals": { "type": "integer", "title": "Decimals" } }, "type": "object", "required": [ "address", "symbol", "name", "decimals" ], "title": "Asset" }, "compass__api_backend__models__morpho__read__response__get_markets__MarketState": { "properties": { "borrowApy": { "type": "number", "title": "Borrowapy" }, "borrowAssets": { "type": "integer", "title": "Borrowassets" }, "borrowAssetsUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Borrowassetsusd" }, "supplyApy": { "type": "number", "title": "Supplyapy" }, "supplyAssets": { "type": "integer", "title": "Supplyassets" }, "supplyAssetsUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Supplyassetsusd" }, "fee": { "type": "number", "title": "Fee" }, "utilization": { "type": "number", "title": "Utilization" } }, "type": "object", "required": [ "borrowApy", "borrowAssets", "borrowAssetsUsd", "supplyApy", "supplyAssets", "supplyAssetsUsd", "fee", "utilization" ], "title": "MarketState" }, "compass__api_backend__models__morpho__read__response__get_vaults__Asset": { "properties": { "symbol": { "type": "string", "title": "Symbol" }, "address": { "type": "string", "title": "Address" }, "decimals": { "type": "integer", "title": "Decimals" }, "chain": { "$ref": "#/components/schemas/ChainInfo" } }, "type": "object", "required": [ "symbol", "address", "decimals", "chain" ], "title": "Asset" }, "compass__api_backend__models__morpho__read__response__get_vaults__VaultState": { "properties": { "id": { "type": "string", "title": "Id" }, "apy": { "type": "number", "title": "Apy" }, "netApy": { "type": "number", "title": "Netapy" }, "totalAssets": { "type": "integer", "title": "Totalassets" }, "totalAssetsUsd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Totalassetsusd" }, "fee": { "type": "number", "title": "Fee" }, "timelock": { "type": "integer", "title": "Timelock" } }, "type": "object", "required": [ "id", "apy", "netApy", "totalAssets", "fee", "timelock" ], "title": "VaultState" }, "compass__api_backend__models__pendle__read__response__market__UserPosition": { "properties": { "claimable_yield": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Claimable Yield", "description": "The amount of yield that can be claimed in the underlying token." }, "sy_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Sy Balance", "description": "The amount of SY tokens the user currently holds." }, "pt_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Pt Balance", "description": "The amount of PT tokens the user currently holds." }, "yt_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Yt Balance", "description": "The amount of YT tokens the user currently holds." }, "lp_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Lp Balance", "description": "The amount of LP tokens the user currently holds." }, "underlying_token_balance": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Underlying Token Balance", "description": "The amount of underlying tokens the user currently holds." }, "accounting_asset_balance": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Accounting Asset Balance", "description": "The amount of accounting assets the user currently holds." } }, "type": "object", "required": [ "claimable_yield", "sy_balance", "pt_balance", "yt_balance", "lp_balance", "underlying_token_balance" ], "title": "UserPosition" }, "compass__api_backend__models__pendle__read__response__positions__TokenBalance": { "properties": { "valuation": { "type": "number", "title": "Valuation" }, "balance": { "type": "string", "title": "Balance" } }, "type": "object", "required": [ "valuation", "balance" ], "title": "TokenBalance" }, "compass__api_backend__models__vaults__read__response__vault__UserPosition": { "properties": { "amount_of_shares": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount Of Shares", "description": "The number of vault share tokens representing the user’s proportional ownership of the assets in the vault." }, "amount_in_underlying_token": { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$", "title": "Amount In Underlying Token", "description": "The equivalent value of the user’s vault shares, denominated in the vault’s underlying asset (deposit token)." } }, "type": "object", "required": [ "amount_of_shares", "amount_in_underlying_token" ], "title": "UserPosition" } }, "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "x-api-key", "description": "Your Compass API Key. Get your key [here](https://api.compasslabs.ai/auth/get_api_token)." } } }, "security": [ { "ApiKeyAuth": [] } ] }