On this page

latest contributor to this doc

Last Edit:

@smk762

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.

StructureTypeDescription
coinstringToken ticker
spenderstringAddress of smart contract to approve for spending
amountfloatApproved amount to spend (in coins units)

StructureTypeDescription
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
  }
}