Notus API
Lending

Create Aave lending quote

Creates a lending quote using a unified payload. Supported now: LENDING_SUPPLY, LENDING_SUPPLY_BORROW, LENDING_BORROW, LENDING_REPAY, LENDING_WITHDRAW and LENDING_REPAY_WITHDRAW.

POST
/api/v1/lending/quote
x-api-key<token>

In: header

walletAddressstring

The wallet address that will execute the lending operation.

providerstring
Value in"AAVE" | "MORPHO"
supply?object
borrow?object
repay?object
withdraw?object
gasobject

Token and mode used to pay the user-operation gas; must be whitelisted on the quote chain.

Response Body

curl -X POST "https://api.notus.team/api/v1/lending/quote" \  -H "Content-Type: application/json" \  -d '{    "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464",    "provider": "AAVE",    "gas": {      "paymentMethod": "DEDUCT_FROM_AMOUNT",      "tokenAddress": "0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"    }  }'
{
  "revertReason": {},
  "walletAddress": "string",
  "supply": {
    "tokenIn": {
      "tokenAddress": "string",
      "chainId": 0,
      "price": {},
      "amount": {
        "value": "string",
        "usd": {}
      }
    },
    "tokenOut": {
      "tokenAddress": "string",
      "chainId": 0,
      "amount": {
        "value": "string",
        "usd": {}
      }
    }
  },
  "borrow": {
    "token": {
      "tokenAddress": "string",
      "chainId": 0,
      "amount": {
        "value": "string",
        "usd": {}
      }
    }
  },
  "repay": {
    "token": {
      "tokenAddress": "string",
      "chainId": 0,
      "amount": {
        "value": "string",
        "usd": {}
      }
    }
  },
  "withdraw": {
    "tokenIn": {
      "tokenAddress": "string",
      "chainId": 0,
      "amount": {
        "value": "string",
        "usd": {}
      }
    },
    "tokenOut": {
      "tokenAddress": "string",
      "chainId": 0,
      "amount": {
        "value": "string",
        "usd": {}
      }
    }
  },
  "provider": {
    "name": "string",
    "logo": "string"
  },
  "fees": [
    {
      "type": "GAS",
      "amount": {
        "value": "string",
        "usd": "string"
      },
      "tokenAddress": "string",
      "nativeAmount": "string",
      "recipient": "string",
      "percent": 0
    }
  ],
  "signData": [
    {
      "type": "USER_OPERATION",
      "hash": "string",
      "authorization": {
        "chainId": 0,
        "address": "string",
        "nonce": 0,
        "hash": "string"
      }
    }
  ],
  "estimatedSettlementTime": {},
  "expiresAt": {},
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "type": "LENDING_SUPPLY"
}
{
  "statusCode": 400,
  "id": "NOT_AUTHORIZED_TOKENS",
  "message": "The tokens '[0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48]' are not supported by Notus API. "
}
{
  "statusCode": 404,
  "id": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT",
  "message": "The requested wallet \"0x6e397ddf51d9f15dbe0414538e7529f51f2e5464\" is not registered with the project"
}