Hi,
is it possible to get the total payout of a node from the Storagenode API?
Like this value that is displayed on the dashboard:
I couldn’t find this in the api results of the following endpoints:
- /api/sno
- /api/sno/satellites
- /api/sno/estimated-payout
And is there any other endpoint that I don’t know about?
There is the payment stub endpoint: http://storagenode:14002/api/heldamount/paystubs/<START_DATE: YYYY-MM>/<END_DATE: YYYY-MM>
For example, on a storage node created on 2019-07, you can get historical payment data with
curl 'http://storagenode:14002/api/heldamount/paystubs/2019-07/2022-01'
And sum all payments amount:
curl 'http://storagenode:14002/api/heldamount/paystubs/2019-07/2022-01' 2>/dev/null \
| jq -r '.[].paid' \
| awk '{s+=$1} END {print s}' -
You’ll then have to divide the result by 10^6 to have value in dollars.
3 Likes
thanks a lot, this is exactly what I was looking for
1 Like