Update Yield
curl --request PATCH \
--url https://dev.api.withconvexity.com/v1/tokens/yield \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokenId": "019ee492-6357-72ec-bd3b-19c5f8242d96",
"chain": "BASE",
"annualRate": 50
}
'import requests
url = "https://dev.api.withconvexity.com/v1/tokens/yield"
payload = {
"tokenId": "019ee492-6357-72ec-bd3b-19c5f8242d96",
"chain": "BASE",
"annualRate": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tokenId: '019ee492-6357-72ec-bd3b-19c5f8242d96', chain: 'BASE', annualRate: 50})
};
fetch('https://dev.api.withconvexity.com/v1/tokens/yield', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": true,
"message": "Yield updated successfully",
"data": {
"txHash": "0x49421ecd74477e30c6a4afa42d5358aabf9d4472c77bd2f955426a3660c904a3"
}
}Tokenization
Update Yield
Updates the annual yield rate for a yield-bearing token.
PATCH
/
v1
/
tokens
/
yield
Update Yield
curl --request PATCH \
--url https://dev.api.withconvexity.com/v1/tokens/yield \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tokenId": "019ee492-6357-72ec-bd3b-19c5f8242d96",
"chain": "BASE",
"annualRate": 50
}
'import requests
url = "https://dev.api.withconvexity.com/v1/tokens/yield"
payload = {
"tokenId": "019ee492-6357-72ec-bd3b-19c5f8242d96",
"chain": "BASE",
"annualRate": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tokenId: '019ee492-6357-72ec-bd3b-19c5f8242d96', chain: 'BASE', annualRate: 50})
};
fetch('https://dev.api.withconvexity.com/v1/tokens/yield', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": true,
"message": "Yield updated successfully",
"data": {
"txHash": "0x49421ecd74477e30c6a4afa42d5358aabf9d4472c77bd2f955426a3660c904a3"
}
}Authorizations
OAuth 2.0 access token from Auth-Edge.
Body
application/json
Response
200 - application/json
OK
The response is of type object.
