Get Token Allowance
POST
Retrieves the amount of ERC20 tokens that the owner has approved for the spender.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.Request Body
contractAddressstringrequired
Parameter specifying the contract address to query. Can be entered as a 40-character hexadecimal string starting with 0x.ownerAddressstringrequired
Parameter specifying the account address to query. Can be entered as a 40-character hexadecimal string starting with 0x.spenderAddressstringrequired
Parameter specifying the account address to query. Can be entered as a 40-character hexadecimal string starting with 0x.Responses
allowancestring
Returns the remaining number of tokens that the spender can use on behalf of the owner through transferFrom. This value changes when approve or transferFrom is called.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "MISSING_REQUIRED_PARAMETER","message": "Missing required parameter: { PARAMETER_NAME }"}
cURL
curl -X POST 'https://web3.nodit.io/v1/avalanche/mainnet/token/getTokenAllowance' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"contractAddress": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D","ownerAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","spenderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}'