solana-staking-csvs

Generate CSV Exports of your Solana Staking Rewards.

https://github.com/prikhi/solana-staking-csvs#readme

LTS Haskell 23.26:0.1.3.0
Stackage Nightly 2025-07-04:0.1.3.0
Latest on Hackage:0.1.3.0

See all snapshotssolana-staking-csvs appears in

BSD-3-Clause licensedbyPavan Rikhi
Maintained by[email protected]
This version can be pinned in stack with:solana-staking-csvs-0.1.3.0@sha256:9885e8092aaf8e019f057758434a8b28534dc29419a0d3ea8d62912bfe9410ed,3800
Used by 1 package inlts-23.17(full list with versions):

Solana Staking CSVs

solana-staking-csvs Build Status

Generate CSVs of your Solana staking rewards.

Requiresstack & a SolanaBeach API key, which you can requesthere.

stack run -- <YOUR_API_KEY> <ACCOUNT_PUBKEY>stack run -- --help

TODO:

  • Allow sourcing pubkey & apikey from env variables?
  • Move SolanaBeach API to separate, published package.

Install

You can install the CLI exe by runningstack install. This lets you call theexecutable directly instead of through stack:

$ stack install$ export PATH="${HOME}/.local/bin/:${PATH}"$ solana-staking-csvs <YOUR_API_KEY> 6MTkiDNY5N5PoJHN862D91jM5ztF3KQWDyBeobo2rSgKtime,amount,stakeAccount,epoch2021-07-03 19:49:49UTC,27.115357569,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,1972021-07-06 21:44:25UTC,27.197834728,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,1982021-07-10 00:02:06UTC,27.231624940,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,1992021-07-10 00:02:06UTC,27.233380734,7XitpDt2tUwwmmmxfbPC4jJ6cCseuBBQHw5p6kWqmqvn,199

Build

You can build the project with stack:

stack build

For development, you can enable fast builds with file-watching,documentation-building, & test-running:

stack test --haddock --fast --file-watch --pedantic

To build & open the documentation, run

stack haddock --open solana-staking-csv

LICENSE

BSD-3

Changes

CHANGELOG

master

v0.1.3.0

  • Bump dependency versions(text).
  • Add--aggregate flag to group rewards by day.
  • Fetch rewards until no more rewards are returned instead of stopping whenless than the 5-item page limit is returned.
  • Handle breaking API changes when rate limited.

v0.1.2.0

  • Add--year flag to allow filtering the output by date.
  • Bump dependency versions(aeson).

v0.1.1.0

  • Add--cointracking flag to format data for use with CoinTracking’s BulkImports feature.
  • Fix lower-bounds forreq.

v0.1.0.0

  • Initial release