On this page

latest contributor to this doc

Last Edit:

@smk762↗

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.

ParameterTypeRequiredDescription
coinstring✓Token ticker
spenderstring✓Address of smart contract to approve for spending
amountfloat✓Approved amount to spend (in coins units)

ParameterTypeDescription
resultstringApproval transaction id

POST
approve_token
{
  "mmrpc": "2.0",
  "userpass": "RPC_UserP@SSW0RD",
  "method": "approve_token",
  "params": {
    "coin": "USDT-ERC20",
    "spender": "0x1234567890123456789",
    "amount": 1.23
  }
}