Skip to main content
POST
/
protocols
/
lending
/
aave
/
execute
/
supply
curl --request POST \
  --url http://localhost:4000/v1/protocols/lending/aave/execute/supply \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "signWith": "account-123",
  "tokenAddress": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
  "amount": "100.5",
  "chainId": 43114,
  "autoApprove": true,
  "autoBroadcast": true
}
'
{
  "success": true,
  "message": "<string>",
  "statusCode": 123,
  "timestamp": "<string>",
  "data": {
    "success": true,
    "message": "Deposit transaction signed and broadcasted successfully",
    "gasEstimation": {
      "gasLimit": "300000",
      "estimatedCost": "0.001"
    },
    "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "signedTransaction": "0x02f8...",
    "approvalTransactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
    "transactionId": "tx-123e4567-e89b-12d3-a456-426614174000"
  },
  "path": "<string>"
}

Authorizations

Authorization
string
header
required

Use this format: ApiKey <your_api_key>

Query Parameters

integratorId
string

Integrator ID (required for ADMIN/INTERNAL scope)

Example:

"uuid-integrator-id"

Body

application/json

Deposit parameters

signWith
string
required
Account identifier to sign the transaction with.
Can be either:
- Turnkey Account ID (e.g., "account-123")
- Ethereum address (e.g., "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb")

**Important:** The account must belong to the integrator making the request.
Example:

"account-123"

tokenAddress
string
required
Token address to deposit.
- For native tokens (AVAX, ETH): Use "0x0000000000000000000000000000000000000000" or "avax"
- For ERC20 tokens: Use the contract address (e.g., USDC on Avalanche: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E")
Example:

"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"

amount
string
required
Amount to deposit in token units (not wei).
Use decimal format (e.g., "100.5" for 100.5 USDC).
The amount will be automatically converted to the correct decimals for the token.
Example:

"100.5"

chainId
enum<number>
required
Chain ID where the deposit will be executed.

**Supported Mainnets (always enabled):**
- 43114: Avalanche Mainnet
- 1: Ethereum Mainnet
- 137: Polygon Mainnet
- 42161: Arbitrum One
- 8453: Base Mainnet
- 10: Optimism Mainnet

**Supported Testnets (enabled if ENABLE_TESTNETS=true):**
- 43113: Avalanche Fuji Testnet
- 5: Ethereum Goerli Testnet
- 11155111: Ethereum Sepolia Testnet
- 80001: Polygon Mumbai Testnet
- 421613: Arbitrum Goerli Testnet
- 84531: Base Goerli Testnet
- 420: Optimism Goerli Testnet

**Note:** Testnets are controlled by the `ENABLE_TESTNETS` environment variable.
By default, testnets are enabled in development/staging and disabled in production.

**Validation:** This chain must be supported by AAVE SDK. The validation happens before any external API calls.
Available options:
43114,
43113,
1,
5,
11155111,
137,
80001,
42161,
421613,
8453,
84531,
10,
420
Example:

43114

autoApprove
boolean
default:true
Automatically approve token spending if required (for ERC20 tokens).
If true and approval is needed, the approval transaction will be signed and broadcasted automatically.
Default: true

**Note:** For native tokens (AVAX, ETH), this parameter is ignored.
Example:

true

autoBroadcast
boolean
default:false
Automatically broadcast the signed transaction to the blockchain.
- If true: Transaction is signed and immediately broadcasted. Returns transactionHash.
- If false: Transaction is signed but not broadcasted. Returns signedTransaction for manual broadcast.

Default: false

**Use cases:**
- autoBroadcast=true: For automated deposits where you want immediate execution
- autoBroadcast=false: For manual review before broadcasting or batch operations
Example:

false

Response

success
boolean
required
message
string
required
statusCode
number
required
timestamp
string
required
data
object
path
string