Build or quote unsigned DeFi transaction
build_defi_txREAD-ONLY / UNSIGNED: build an unsigned DeFi transaction payload (supply, redeem, borrow, repay, claim) or quote LP amounts (quote_lp) via the official Binance Web3 DeFi API. Never signs, never broadcasts, never touches private keys — returns unsigned contract calldata (and optional simulation result) for wallet signing or CLI inspection.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"investmentId": "<investmentId>"
},
"name": "build_defi_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | DeFi transaction builder action: supply|redeem|borrow|repay|claim|quote_lp. | |
| amount | No | Token amount in human units or base units (required for supply|redeem|borrow|repay|quote_lp). | |
| chainId | No | Optional chain slug or chainId (e.g. ethereum, bnb, arbitrum, base, polygon, optimism, avalanche, linea, sonic, solana). | |
| simulate | No | When true (default), also runs Binance Web3 DeFi transaction simulation on the unsigned payload. | |
| slippageBps | No | Optional slippage tolerance in basis points (default 50 = 0.5%). | |
| investmentId | Yes | Binance Web3 DeFi investmentId (from read_defi scope=investments). | |
| tokenAddress | No | Optional input/output token contract address (defaults to investment primary token). | |
| walletAddress | No | User wallet address (0x... for EVM or base58 for Solana). Required for supply|redeem|borrow|repay|claim. |