stake_quote
Generate a stake quote for token swaps by submitting a StakeQuoteRequestContainer, returning a SwapQuoteRequestContainer for blockchain staking operations.
Instructions
Retrieve a stake quote.
Expects a StakeQuoteRequestContainer, returns a SwapQuoteRequestContainer.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stake_quote_requests | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:498-511 (handler)The MCP tool handler for the 'stake_quote' tool. It validates input, calls the armor_client.stake_quote method, and handles errors.@mcp.tool() async def stake_quote(stake_quote_requests: StakeQuoteRequestContainer) -> SwapQuoteRequestContainer: """ Retrieve a stake quote. Expects a StakeQuoteRequestContainer, returns a SwapQuoteRequestContainer. """ if not armor_client: return [{"error": "Not logged in"}] try: result: StakeQuoteRequestContainer = await armor_client.stake_quote(stake_quote_requests) return result except Exception as e: return [{"error": str(e)}]
- Pydantic model defining the input schema for a single stake quote request.class StakeQuoteRequest(BaseModel): from_wallet: str = Field(description="The name of the wallet that input_token is in.") input_token: str = "So11111111111111111111111111111111111111112" # Hardcoded SOL token address output_token: str = Field(description="the public mint address of the output liquid staking derivative token to stake.") # "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v" input_amount: float = Field(description="input amount to swap")
- Pydantic container model for the list of StakeQuoteRequest used as input to the stake_quote tool.class StakeQuoteRequestContainer(BaseModel): stake_quote_requests: List[StakeQuoteRequest]
- Helper method in ArmorWalletAPIClient that makes the API call to get stake quote from the backend service.async def stake_quote(self, data: StakeQuoteRequestContainer) -> StakeQuoteRequestContainer: """Obtain a stake quote.""" payload = data.model_dump(exclude_none=True)['stake_quote_requests'] return await self._api_call("POST", "transactions/quote/", payload)