unstake_quote
Calculate the expected return when unstaking cryptocurrency assets to help users make informed decisions about their staked positions.
Instructions
Retrieve an unstake quote.
Expects a UnstakeQuoteRequestContainer, returns a SwapQuoteRequestContainer.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unstake_quote_requests | Yes |
Implementation Reference
- armor_crypto_mcp/armor_mcp.py:514-528 (handler)MCP tool handler for unstake_quote. Validates input, checks authentication, calls the armor_client.unstake_quote API wrapper, and returns the result or error.@mcp.tool() async def unstake_quote(unstake_quote_requests: UnstakeQuoteRequestContainer) -> SwapQuoteRequestContainer: """ Retrieve an unstake quote. Expects a UnstakeQuoteRequestContainer, returns a SwapQuoteRequestContainer. """ if not armor_client: return [{"error": "Not logged in"}] try: result: UnstakeQuoteRequestContainer = await armor_client.unstake_quote(unstake_quote_requests) return result except Exception as e: return [{"error": str(e)}]
- Pydantic BaseModel defining the schema for a single unstake quote request, including wallet, input token (staked), output token (SOL), and amount.class UnstakeQuoteRequest(BaseModel): from_wallet: str = Field(description="The name of the wallet that input_token is in.") input_token: str = Field(description="the public mint address of the input liquid staking derivative token to unstake.") # "jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v" output_token: str = "So11111111111111111111111111111111111111112" input_amount: float = Field(description="input amount to swap")
- Pydantic container model wrapping a list of UnstakeQuoteRequest instances, used as the input parameter type for the unstake_quote tool.class UnstakeQuoteRequestContainer(BaseModel): unstake_quote_requests: List[UnstakeQuoteRequest]
- ArmorWalletAPIClient method that constructs the API payload from the input container and performs the HTTP POST to the backend /transactions/quote/ endpoint.async def unstake_quote(self, data: UnstakeQuoteRequestContainer) -> UnstakeQuoteRequestContainer: """Obtain an unstake quote.""" payload = data.model_dump(exclude_none=True)['unstake_quote_requests'] return await self._api_call("POST", "transactions/quote/", payload)