filecoin 历史收益数据 每天每T平均收益
- 导出历史每日收益为文档
filutils 区块浏览器
导出历史每日收益为文档
#!/bin/bash
for i in {1..10}
do
echo $i
result=$(curl --location --request POST 'https://api.filutils.com/api/v2/powerreward' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: api.filutils.com' \
--header 'Connection: keep-alive' \
--header 'Cookie: __cf_bm=yu677yL.CJGBJZ2zWxCtKeykaZe_Hn3Y5FnlurzfSmA-1704454769-1-AYaGa/B0Pz5PO9V3NznKFbjNnbzwGlbdlOW18kikOd4dotfi8Hn+tx+u7PzPU6JWrWBY1aE3veKJBy7EMci4br8=' \
--data-raw '{
"startDate": "2022-01-01", "endDate": "2024-01-04", "pageIndex": '$i', "pageSize": 100
}')
echo $result >> /root/shell/FIL_T/2022-01-01.txt
cd /root/shell/FIL_T
cat 2022-01-01.txt | jq -r '.data[] | "\(.dateFormat), \(.rewardT.reward)"' > 2022-01-01.csv
done