Aave V2 APIs
  • Introduction
  • aave v2
    • aToken Address
    • Aave Reserve Rates
    • Aave Reserve Configuration
    • User Health
    • Allowance
    • Deposit
    • Withdraw
    • Borrow
    • Repay
    • Switch Interest Type
    • Collateral Setting
Powered by GitBook
On this page

Was this helpful?

  1. aave v2

Allowance

To check if desired wallet address has provided allowance to AAVE for tokens.

/aave/allowance

POST https://cryptotalk-public-gateway-byeii62k.de.gateway.dev/aave/allowance

1) Request body must be JSON 2) Request structure sample { "params" : { "addr" : "0xabcd...efe", "from_tkn" : "DAI", "gas" : "80", "amt_float" : 1.234 } } 3) from_tkn is case sensitive 4) Sample response contain rawTx object that needs to be signed and broadcast to main net. 5) Our API automatically check which token should be allowed for which Aave smart contract. For example: aWETH should be allowed for ETH Wrapper where as other tokens must give allowance to Lending pool 6) If allowance is already provided, isAllowed flag will be true

Query Parameters

Name
Type
Description

key

string

API Key

Request Body

Name
Type
Description

params

object

{ "addr" : "0xabcd...efe", "from_tkn" : "DAI", "gas" : "80", "amt_float" : 1.234 }

{
  "operation": "ENABLE",
  "token": "DAI",
  "to_addr": "0x0eb4add4ba497357546da7f5d12d39587ca24606",
  "rawTx": {
    "from": "0x0eb4add4ba497357546da7f5d12d39587ca24606",
    "value": "0x0",
    "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
    "data": "0x095ea7b30000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "nonce": "0xe64",
    "gasLimit": "0xbe9a",
    "gasPrice": "0x12a05f2000"
  },
  "isError": false,
  "text": "Sign rawTx and broadcast to main-net",
  "isAllowed": false,
  "aave_addr": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9"
}

Tool used: Insomnia or Postman

PreviousUser HealthNextDeposit

Last updated 4 years ago

Was this helpful?

Sample Request Screenshot