Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: accounting export for all transactions #36

Closed
AngusP opened this issue Apr 11, 2024 · 2 comments · Fixed by #115
Closed

Feature Request: accounting export for all transactions #36

AngusP opened this issue Apr 11, 2024 · 2 comments · Fixed by #115
Assignees
Labels
enhancement New feature or request

Comments

@AngusP
Copy link

AngusP commented Apr 11, 2024

Request to add an export transactions feature similar/identical to Phoenix mobile's CSV, with a date range for both incoming and outgoing transactions. Maybe also useful to include unpaid invoices, both expired and still open.

Currently as I understand it you can only get incoming transactions if you set and remembered elsewhere an externalId, or you would have to have stored all the payment hashes to be able to create an export using each paymentId

I think this is necessary for any merchant or individual to use phoenixd if their local tax and accounting rules require them to keep a record of transactions including donations.

@pm47 pm47 added the enhancement New feature or request label Apr 11, 2024
@dpad85 dpad85 self-assigned this Apr 17, 2024
@dongcarl
Copy link

Just to add to this: for phoenixd's particular setup for automated liquidity, it would also be important for the "accounting export" to include information about whether funds:

  • go to your balance (normal scenario)
  • are used to purchase inbound liquidity immediately (once in a while)
  • are set aside to purchase inbound liquidity later (for small payments at bootstrapping).

Another good design goal could be that: from the "account export" ledger output (whatever you want to call it), one could easily arrive at the numbers given by getbalance

@t-bast
Copy link
Member

t-bast commented Sep 18, 2024

We have that information detailed in the database: we're currently slightly changing the format to use the official liquidity ads specification: once that is shipped, it should be easy to add this accounting export to CSV.

@pm47 pm47 mentioned this issue Oct 4, 2024
@pm47 pm47 closed this as completed in #115 Oct 16, 2024
@pm47 pm47 closed this as completed in a3fe8f6 Oct 16, 2024
vincenzopalazzo pushed a commit to vincenzopalazzo/phoenixd that referenced this issue Nov 7, 2024
Usage:
```
$ ./phoenix-cli exportcsv
payment history has been exported to /home/<user>/.phoenix/exports/export-1728035509.csv
```

The resulting CSV allows precise tracking of the balance and fee credit, and shows the split between mining and service fees:
- balance: sum of all `amount_msat`
- fee credit: sum of all `fee_credit_msat`

Columns:
date|type|amount_msat|fee_credit_msat|mining_fee_sat|service_fee_msat|payment_hash|tx_id
---|---|---|---|---|---|---|---

Fixes ACINQ#36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants