Skip to main content
POST
/
defi
/
lending
/
supply
curl --request POST \
--url https://api.relayer.fi/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
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