Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steppsr/getxchtx
XCH Transaction Exporter : getxchtx [Bash Edition]
https://github.com/steppsr/getxchtx
bash blockchain chia chia-blockchain cryptocurrency csv export transactions xch
Last synced: 2 months ago
JSON representation
XCH Transaction Exporter : getxchtx [Bash Edition]
- Host: GitHub
- URL: https://github.com/steppsr/getxchtx
- Owner: steppsr
- License: apache-2.0
- Created: 2022-04-08T20:31:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-01T20:14:45.000Z (over 2 years ago)
- Last Synced: 2023-06-26T09:58:35.677Z (over 1 year ago)
- Topics: bash, blockchain, chia, chia-blockchain, cryptocurrency, csv, export, transactions, xch
- Language: Shell
- Homepage:
- Size: 59.6 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XCH Transaction Exporter : getxchtx [Bash Edition]
Generate a list of transactions for Chia (XCH) into a CSV file.
---
**getxchtx.sh** - You must run this script from the command line. The script pulls all your transactions into a json file by querying the wallet db, then loops through each transaction building a CSV file. Note: You must use the '**bash**' command and _not_ '**sh**'.
COMMAND OPTIONS
```
USAGE: bash getxchtx.sh [OPTIONS]OPTIONS
-y YEAR transactions only for given 4-digit year Default: all transactions
-i INTERGER Id of the wallet to use Default: 1
-s INTERGER Index of starting transaction Default: 0
-e INTERGER Index of ending transaction Default: 999999
-o INTERGER 0 for ascending, 1 for descending Default: 0
-min AMOUNT Only transactions greater than AMOUNT Default: 0
-max AMOUNT Only transactions less than AMOUNT Default: 999999
-t INTERGER -1 for all transaction types Default: -1
0 for INCOMING_TX
1 for OUTGOING_TX
2 for COINBASE_REWARD
3 for FEE_REWARD
4 for INCOMING_TRADE
5 for OUTGOING_TRADE
-b basic output (fewer fields)
-v verbose output
-h helpExample:
bash getxchtx.sh -y 2021 -vExample for saving to file:
bash getxchtx.sh -y 2021 > tx_list.csv```
---
**Notes:**
**1.** Since this is pulling historical transactions, the current price column is set to 0. You will need to populate that column manually. *Let me know if there is a free API that can pull historical pricing for XCH.*
---
**Prerequisites:**
***curl*** must be installed. Run the following command to see if you have it installed.
```
curl --version
```
***jq*** must be installed. Run the following command to see if you have it installed.```
jq --version
```Disclaimer: For educational purposes only.