solana-staking-csvs: Generate CSV Exports of your Solana Staking Rewards.

[ bsd3, console, finance, library, program, web ] [ Propose Tags ]

solana-staking-csvs is a CLI program that queries the Solana blockchain for an account's staking accounts and exports all their staking rewards to a CSV file.

The Solana Beach API is used to fetch data from the blockchain and you will need a free API key to use this program.

You can install solana-staking-csvs with Stack: stack install --resolver nightly solana-staking-csvs. Then run the following to print out an account's rewards in CSV format:

solana-staking-csvs <API_KEY> <ACCOUNT_PUBKEY>

See solana-staking-csvs --help for additional options.


[Skip to Readme]
Versions [RSS] [faq] 0.1.0.0, 0.1.1.0
Change log CHANGELOG.md
Dependencies aeson (>=1 && <3), base (>=4.7 && <5), bytestring (==0.*), cassava (==0.*), cmdargs (>=0.10 && <1), cointracking-imports (==0.*), mtl (==2.*), req (>=3.4 && <4), scientific (==0.*), solana-staking-csvs, text (<2), time (<2) [details]
License BSD-3-Clause
Copyright 2021 Pavan Rikhi
Author Pavan Rikhi
Maintainer pavan.rikhi@gmail.com
Revised Revision 2 made by lysergia at 2021-10-15T03:04:15Z
Category Web, Finance, Console
Home page https://github.com/prikhi/solana-staking-csvs#readme
Bug tracker https://github.com/prikhi/solana-staking-csvs/issues
Source repo head: git clone https://github.com/prikhi/solana-staking-csvs
Uploaded by lysergia at 2021-08-10T05:09:23Z
Distributions NixOS:0.1.1.0, Stackage:0.1.1.0
Executables solana-staking-csvs
Downloads 150 total (8 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-08-10 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for solana-staking-csvs-0.1.1.0

[back to package description]

Solana Staking CSVs

solana-staking-csvs Build Status

Generate CSVs of your Solana staking rewards.

Requires stack & a SolanaBeach API key, which you can request here.

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

TODO:

  • Add -Y <year> flag to limit years exported(or start/end flags?).
  • Allow sourcing pubkey & apikey from env variables?
  • Move SolanaBeach API to separate, published package.

Install

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

$ stack install
$ export PATH="${HOME}/.local/bin/:${PATH}"
$ solana-staking-csvs <YOUR_API_KEY> 6MTkiDNY5N5PoJHN862D91jM5ztF3KQWDyBeobo2rSgK
time,amount,stakeAccount,epoch
2021-07-03 19:49:49UTC,27.115357569,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,197
2021-07-06 21:44:25UTC,27.197834728,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,198
2021-07-10 00:02:06UTC,27.231624940,8yfoauy7WhfBGA441GsHnjQedeAga8MsZXu8Pn16xMmY,199
2021-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