api_haystack_needs_optin
Check if an Algorand address needs to opt into an asset before swapping. Returns true if opt-in is required, false otherwise. Use before executing swaps to determine if wallet_optin_asset should be called first.
Instructions
Check if an Algorand address needs to opt into an asset before swapping. Returns true if opt-in is needed, false otherwise. Always returns false for ALGO (ASA 0). Use before executing a swap to determine if wallet_optin_asset should be called first.
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": {
"address": "<address>",
"assetId": "<assetId>"
},
"name": "api_haystack_needs_optin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Algorand address to check | |
| assetId | Yes | Asset ID to check opt-in status for | |
| network | No | Algorand network to use (default: mainnet) | |
| itemsPerPage | No | Number of items per page for paginated responses (default: 10) |