approve_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.
Structure | Type | Description |
---|---|---|
coin | string | Token ticker |
spender | string | Address of smart contract to approve for spending |
amount | float | Approved amount to spend (in coins units) |
Structure | 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
}
}