Skip to main content
POST
/
defi
/
lending
/
supply
curl --request POST \
  --url http://localhost:4000/v1/defi/lending/supply \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userAddress": "0xb322E239E5A32724633A595b8f8657F9cbb307B2",
  "tokenAddress": "avax",
  "amount": "0.1",
  "chainId": 43114
}
'
{
  "success": true,
  "transactionHash": "0x1234567890abcdef...",
  "message": "Transaction serialized and ready to be signed",
  "serializedTransaction": "<string>",
  "gasEstimation": {}
}

Authorizations

Authorization
string
header
required

Use this format: ApiKey <your_api_key>

Body

application/json
userAddress
string
required

User wallet address

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

tokenAddress
string
required

Token address to supply

Example:

"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"

amount
string
required

Amount to supply in token units (wei for ETH-like tokens)

Example:

"1000000000000000000"

chainId
enum<number>
required

Chain ID for the network

Available options:
43114,
43113,
1,
5,
11155111,
137,
80001,
42161,
421613,
8453,
84531,
10,
420
Example:

43114

Response

Supply transaction prepared successfully

success
boolean
required
Example:

true

transactionHash
string
required

Transaction hash

Example:

"0x1234567890abcdef..."

message
string
required

Status message

Example:

"Transaction serialized and ready to be signed"

serializedTransaction
string
required

Serialized transaction data

gasEstimation
object
required

Gas estimation data