Get LP token amounts in farms by account id
curl --request GET \
--url https://api.saucerswap.finance/farms/totals/{accountId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.saucerswap.finance/farms/totals/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.saucerswap.finance/farms/totals/{accountId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"farmId": 14,
"poolId": 35,
"accountId": "0.0.12345",
"timestamp": "1682469351.387795003",
"staked": "95533844"
}
]Farms
REST API: Farm LP totals by account
Retrieve the LP token amounts a Hedera account has staked in each SaucerSwap farm, with farm id, pool id, and the timestamp of the latest update.
GET
/
farms
/
totals
/
{accountId}
Get LP token amounts in farms by account id
curl --request GET \
--url https://api.saucerswap.finance/farms/totals/{accountId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.saucerswap.finance/farms/totals/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.saucerswap.finance/farms/totals/{accountId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"farmId": 14,
"poolId": 35,
"accountId": "0.0.12345",
"timestamp": "1682469351.387795003",
"staked": "95533844"
}
]Authorizations
API key provisioned by the SaucerSwap team. Request one from [email protected] and send it in the x-api-key header with every request.
Headers
API key for authentication. Request a key from [email protected].
Example:
"YOUR_API_KEY"
Path Parameters
Hedera account id (shard.realm.num)
Example:
"0.0.12345"
Response
200 - application/json
Successful response
SaucerSwap farm id
Example:
14
SaucerSwap pool id
Example:
35
Hedera account id (shard.realm.num)
Example:
"0.0.12345"
Timestamp in unix seconds.nano
Example:
"1682469351.387795003"
Staked LP amount in its smallest unit
Example:
"95533844"
Was this page helpful?