withdraw_funds
Transfer cryptocurrency from your Infini Payment account to an external wallet address on supported blockchain networks.
Instructions
Withdraw funds to external wallet.
Args:
chain: Blockchain network name
token_type: Token identifier
amount: Amount to withdraw
wallet_address: Destination wallet address
note: Optional note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| token_type | Yes | ||
| amount | Yes | ||
| wallet_address | Yes | ||
| note | No |
Implementation Reference
- server.py:236-265 (handler)The main handler function for the 'withdraw_funds' tool. It constructs a withdrawal request payload and sends it to the Infini API's /fund/withdraw endpoint using the InfiniClient. The function signature and docstring define the input schema for the MCP tool.@mcp.tool() def withdraw_funds( chain: str, token_type: str, amount: str, wallet_address: str, note: Optional[str] = None ) -> str: """ Withdraw funds to external wallet. Args: chain: Blockchain network name token_type: Token identifier amount: Amount to withdraw wallet_address: Destination wallet address note: Optional note """ data = { "chain": chain, "token_type": token_type, "amount": amount, "wallet_address": wallet_address } if note: data["note"] = note result = client.request("POST", "/fund/withdraw", json_data=data) return str(result)