{"id":20621682,"url":"https://github.com/steppsr/getxchtxps","last_synced_at":"2025-09-14T16:18:38.880Z","repository":{"id":141822726,"uuid":"481878828","full_name":"steppsr/getxchtxPS","owner":"steppsr","description":"XCH Transaction Exporter : getxchtxPS [Powershell Edition]","archived":false,"fork":false,"pushed_at":"2022-04-21T22:18:14.000Z","size":82,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T20:02:16.939Z","etag":null,"topics":["chia","chia-blockchain","powershell","windows","xch"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steppsr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-15T07:41:04.000Z","updated_at":"2025-07-04T11:03:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"772db222-5d09-48ba-aeb1-36f1d459c1eb","html_url":"https://github.com/steppsr/getxchtxPS","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/steppsr/getxchtxPS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steppsr%2FgetxchtxPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steppsr%2FgetxchtxPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steppsr%2FgetxchtxPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steppsr%2FgetxchtxPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steppsr","download_url":"https://codeload.github.com/steppsr/getxchtxPS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steppsr%2FgetxchtxPS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275130363,"owners_count":25410695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chia","chia-blockchain","powershell","windows","xch"],"created_at":"2024-11-16T12:18:55.024Z","updated_at":"2025-09-14T16:18:38.870Z","avatar_url":"https://github.com/steppsr.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## XCH Transaction Exporter : getxchtx [Powershell Edition]\r\n\r\nGenerate a list of transactions for Chia (XCH) into a CSV file.\r\n\r\n---\r\n\r\n**getxchtxPS.ps1** - The script pulls all your transactions into a json file by Chia CLI commands, then loops through each transaction building a CSV file. \r\n\r\n---\r\n\r\n**How to Get the Script.**\r\nYou can just right-click on the **getxchtxPS.ps1** file and choose _Save link as..._ Save this file into a directory on your machine that you want to keep the script and the CSV file. I would suggest creating a new directory under Documents. \r\n\r\n**\\*** If you download the full Zip file, you will need to extract the files first and store them in a directory.\r\n\r\n\r\n**How to Open Powershell.**\r\nType _powershell_ into the search box by the Windows Start button.\r\nRight-click the Windows Powershell app and choose _Run as Administrator_\r\nYou need to change the directory to the location you have the script. \r\nYou should be able to copy/paste each line as is:\r\n\r\n```\r\n$appfolder=Get-ChildItem $ENV:LOCALAPPDATA\\chia-blockchain -Directory -Filter \"app*\" | Sort-Object -Property Name -Descending | Select-Object -First 1\r\n$path=\"$ENV:LOCALAPPDATA\\chia-blockchain\\\" + $appfolder.Name + \"\\resources\\app.asar.unpacked\\daemon\"\r\ncd $path\r\n```\r\n\r\n**Change your Execution Policy for Powershell.** You may need to change the ExecutionPolicy for Powershell so it will allow you to run a script.\r\n\r\n```\r\nC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass\r\n```\r\n\r\n**Do you know your fingerprint?**\r\nYou will need the fingerprint of your wallet. If you don't know the fingerprint you can run the following command:\r\n\r\n```\r\n.\\chia keys show\r\n```\r\n**Now change to the script directory.**\r\nNow to run the script, you will need change to the directory where you saved the file.\r\n\r\n```\r\ncd C:\\Users\\Steve\\Documents\\Chia\\getxchtxPS\r\n```\r\n\r\n**And finally, run the script.**\r\nIn this example my fingerprint is **3812331296**, you will need to replace that with the fingerprint of your wallet. I also passed in the command option for just transactions from 2021 and used the **\u003e** symbol and my filename to write the data into a file instead of to the screen. You can run it without the **\u003e filename.csv** first to see what the output will look like.\r\n\r\n```\r\n.\\getxchtxPS -f 3812331296 -y 2021 \u003e chia_transactions_2021.csv\r\n```\r\n\r\n**Advanced Features.**\r\nYou could use multiple command options to get a variety of different results. By default the script will use **wallet_id** of **1** which is the _STANDARD\\_WALLET_. Passing in the **wallet_id** for a CAT wallet, will list the transactions for only that CAT wallet.\r\n\r\nIf you want to run the script for more than one **wallet_id** and have all the transactions in one file, you should replace the **\u003e** with **\u003e\u003e** on each run **after** the first one. The first should always be **\u003e** because that start a new empty file. **\u003e\u003e* is how you _append_ to an existing file instead of creating a new one.\r\n\r\nFor example, if I wanted to get all the transactions in both my STANDARD_WALLET and the wallet for the Chia Holiday 2021 Token which is in **wallet_id** number **2** for me, then I would run these commands.\r\n\r\nA recent Advanced Feature added is the -j command option that will allow you to specify the filename to save the output to in ASCII format.\r\n```\r\n.\\getxchtxPS -f 3812331296 -i 1 \u003e chia_transactions.csv\r\n.\\getxchtxPS -f 3812331296 -i 2 \u003e\u003e chia_transactions.csv\r\n```\r\n\r\n---\r\n\r\n```\r\nUsage: .\\getxchtxPS [OPTIONS]\r\n\r\nOptions:\r\n  -f INTEGER       Set the fingerprint to specify which wallet to use  [required]\r\n  -i INTEGER       Id of the wallet to use                             [default: 1; required]\r\n  -j FILENAME      Output to ASCII file instead of screen              [default: none]\r\n  -o INTEGER       Skip transactions from the beginning of the list    [default: 0; required]\r\n  -l INTEGER       Max number of transactions to return                [default: 4294967295]\r\n  -y YEAR          Filter transactions to given 4-digit year (or all)  [default: all]\r\n  -min XCH         Filter to transactions greater than XCH given       [default: 0]\r\n  -max XCH         Filter to transactions less than XCH given          [default: 999999]\r\n  -t INTEGER       Filter by transaction type                          [default: -1]\r\n                          -1 All transaction types\r\n                           0 INCOMING_TX\r\n                           1 OUTGOING_TX\r\n                           2 COINBASE_REWARD\r\n                           3 FEE_REWARD\r\n                           4 INCOMING_TRADE\r\n                           5 OUTGOING_TRADE\r\n  -v               Verbose output\r\n  -h, --help       Show this message and exit\r\n\r\nDo not use -o or -l with any of the filter options (year, min, max, type).\r\n\r\nExample:\r\n     .\\getxchtxPS -y 2021 -f 3812331296 -v\r\n\r\nExample for saving to file:\r\n     .\\getxchtxPS -y 2021 -f 3812331296 \u003etx_list.csv\r\n\r\n```\r\n\r\n---\r\n\r\nBelow is a sample of the output in normal mode (without the Verbose option):\r\n\r\n```\r\nfingerprint,tx_name,tx_datetime,tx_type,tx_amount,current_price,tx_fee_amount\r\n3812331296,0x016672871817ce424d059d5f9814036a7928941c386eca2efdac22faed39f40f,04/16/2022 19:08:41,FEE_REWARD,0.25,0,0\r\n3812331296,0xd5218c73522bc85c45bd7584b4fc012c1c354612ef4481358319dcfe871f89c8,04/16/2022 18:45:12,FEE_REWARD,0.25,0,0\r\n3812331296,0x4c67fcd39f40e925927f767e0034b49fa1cd101b87ddedaa4c7a692abf636211,04/16/2022 18:43:00,FEE_REWARD,0.25,0,0\r\n3812331296,0xc330f0492efb655f45f5dd877bda9c9e2cf71b55065082d0cd39056476dd45c0,04/16/2022 18:39:53,FEE_REWARD,0.25,0,0\r\n3812331296,0x2c55094551c4692d70f1a1736c0f1ec4b796b4139196738e390acc83d644f501,04/16/2022 18:39:53,FEE_REWARD,0.25,0,0\r\n3812331296,0xf24e07f506e8c9f4b57c7b334ec4c22be9d73934913a43e4a0dcdf409525988c,04/16/2022 18:13:37,FEE_REWARD,0.25,0,0\r\n3812331296,0x5478659950f732b2b3b3198474a3715785456c887a862fccb44a9fa15f4b593b,04/16/2022 18:11:16,FEE_REWARD,0.25,0,0\r\n3812331296,0xf1db488d334823f73983da1f0777a8990bb5a5f51b152559db8a03c2e6ec4f65,04/16/2022 18:04:58,FEE_REWARD,0.25,0,0\r\n```\r\n\r\nBelow is an example of the output in Verbose mode:\r\n\r\n```\r\nfingerprint,tx_name,tx_datetime,tx_type,tx_amount,current_price,tx_fee_amount,tx_created_at_time,tx_addition\r\ns,tx_confirmed,tx_confirmed_at_height,tx_memos,tx_removals,tx_sent,tx_sent_to,tx_spend_bundle,tx_to_address,tx_to_puzzle_hash,tx_trade_id,tx_wallet_id\r\n3812331296,0xb264aa0df6d6591ec9b4499c06ff6f63f01e2f1054fd662185552fe952627a95,04/16/2022 20:33:35,FEE_REWARD,0.25,0,0,1650159215,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce59a; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,845215,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0x061e1f070cd0c3e0e5dac198f67a2482e2d687fccdbf5692884aef1e658d759e,04/16/2022 20:00:09,FEE_REWARD,0.25,0,0,1650157209,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce536; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,845115,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0x016672871817ce424d059d5f9814036a7928941c386eca2efdac22faed39f40f,04/16/2022 19:08:41,FEE_REWARD,0.25,0,0,1650154121,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce497; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844952,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0xd5218c73522bc85c45bd7584b4fc012c1c354612ef4481358319dcfe871f89c8,04/16/2022 18:45:12,FEE_REWARD,0.25,0,0,1650152712,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce459; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844892,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0x4c67fcd39f40e925927f767e0034b49fa1cd101b87ddedaa4c7a692abf636211,04/16/2022 18:43:00,FEE_REWARD,0.25,0,0,1650152580,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce458; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844890,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0xc330f0492efb655f45f5dd877bda9c9e2cf71b55065082d0cd39056476dd45c0,04/16/2022 18:39:53,FEE_REWARD,0.25,0,0,1650152393,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce44e; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844882,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0x2c55094551c4692d70f1a1736c0f1ec4b796b4139196738e390acc83d644f501,04/16/2022 18:39:53,FEE_REWARD,0.25,0,0,1650152393,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce44d; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844882,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n3812331296,0xf24e07f506e8c9f4b57c7b334ec4c22be9d73934913a43e4a0dcdf409525988c,04/16/2022 18:13:37,FEE_REWARD,0.25,0,0,1650150817,@{amount=250000000000; parent_coin_info=0xfc0af20d20c4b3e92ef2a48bd291ccb2000000000000000000000000000ce403; puzzle_hash=0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2},True,844807,,,0,,none,,0xec9d7c3abef4cb992e272c3faaf1514138218eeefd947fec37208c5e810d85b2,none,1\r\n```\r\n\r\n---\r\n\r\n**Notes:**\r\n1. You must run this script on the computer running the Farmer.\r\n2. The **fingerprint** is required to run the script.\r\n3. You must use **Windows PowerShell** or **Windows PowerShell ISE** to execute the script.\r\n4. You should not use -o (_offset_) or -l (_limit_) with any of the Filter options (_year_, _min_, _max_, _type_).\r\n5. Since this is pulling historical transactions, the current price column is set to 0. You will need to populate that column manually.\r\n\r\n---\r\nDisclaimer: For educational purposes only.\r\n\r\n---\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteppsr%2Fgetxchtxps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteppsr%2Fgetxchtxps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteppsr%2Fgetxchtxps/lists"}