Approve Token
API-v2approve_token
The approve_token method grants permission for a given smart contract to spend a defined amount of your tokens.
Refer to the 1inch Classic Swap documentation for more information.
| Parameter | Type | Required | Description |
|---|---|---|---|
| coin | string | ✓ | Token ticker |
| spender | string | ✓ | Address of smart contract to approve for spending |
| amount | float | ✓ | Approved amount to spend (in coins units) |
| Parameter | Type | Description |
|---|---|---|
| result | string | Approval transaction id |
POST
approve_token{
"mmrpc": "2.0",
"userpass": "RPC_UserP@SSW0RD",
"method": "approve_token",
"params": {
"coin": "USDT-ERC20",
"spender": "0x1234567890123456789",
"amount": 1.23
}
}