Commit Graph

51 Commits

Author SHA1 Message Date
6a4c2da99b hledger-flow: ethereum-based: add to Ethereum spam rules 2024-12-27 18:19:34 -08:00
a7834160ec hledger-flow: algorand: add to spam rules 2024-12-27 02:34:45 -08:00
4bec30f600 container: hledger-flow: vultr: add sales tax rule
Vultr has now added Sales Tax to their CSV invoice.
2024-10-01 19:34:15 -07:00
a16922f87a container: hledger-flow: add Vultr support
This addition is treading a fine line between finance and other
accounting, as Vultr cloud service is related to DevOps and is also not
a financial entity. However, financial information is provided; so this
addition is useful.

With this commit, a precedent is set for other cloud services to be
added to the repository (services that provide CSV financial accounting
data) and I believe that they could (should) be added as needed.

NOTE: there are several upstream CSV issues:

  - Only expenses are given
    * Transfers must be added manually (manual import or custom rules)

  - Sales tax is not included
    * Sales tax expenses must be added manually
2024-09-11 21:25:51 -07:00
c65c31659c hledger-flow: electrum: fix calculating 'No Data'
If electrum-provided prices aren't available, 'No Data' will be given.
Attempts to calculate this string will result in 0.00 for fiat values.

Do not attempt to calculate this string. Instead, leave the column empty
(for bitcoin.tax calculations).
2024-09-09 20:20:53 -07:00
91bfc21f62 hledger-flow: algorand: add to Governance Rewards 2024-09-06 17:46:41 -07:00
7f413d5351 hledger-flow: capital-one: bank: fix direction 2024-08-28 23:11:29 -07:00
181ca4433f hledger-flow: capital-one: bank: add interest income 2024-08-19 16:12:13 -07:00
731a8c9563 hledger-flow: changelly: cost-basis comments for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-29 16:15:50 -07:00
f228da98d8 hledger-flow: bittrex: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-29 16:15:50 -07:00
1975e1dbbb hledger-flow: coinbase: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-27 00:20:40 -07:00
2c1b896951 hledger-flow: gemini: exchange: cost-basis work-around for bitcoin.tax
Issue #51 describes at least a few undocumented bitcoin.tax issues:

  - Bicoin.tax gives unexpected cost-basis results when `Fee` is given
    with `Total` (when `Total` is given in place of `Price`). The
    expectation is that bitcoin.tax will perform the cost-basis
    calculation on `Total` when `Fee` is also given.

    However, bitcoin.tax *will* give expected cost-basis results if
    `Price` is given in place of `Total` (with `Fee` also given) *or* if
    `Total` is given *after* local cost-basis adjustments are made (but
    *without* `Fee` given).

    The rationale for why docker-finance doesn't use `Price`:

      * docker-finance has all of the `Total`s; so `Price` isn't
        necessary.

      * Local price information isn't available for most trades (and
        shouldn't be necessary since all `Total`s are available).

  - Additionally, when `Fee` is non-fiat (crypto), it now must be marked
    as a SPEND in order to be disposed (and to produce an accurate
    closing report).

  - Finally, if `FeeCurrency` *does* not match either `Symbol` or
    `Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
    must be calculated locally as well (if `Total` is given). Local
    calculations cannot be done because `Fee` price information is
    (almost certainly) not available for this type of trade.

Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).

Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.
2024-07-27 00:20:31 -07:00
c332e71fda hledger-flow: capital-one: bank: mockup: reorder columns
New column order was introduced in #80.
2024-07-20 00:31:30 -07:00
ba0e6f7f2d hledger-flow: ledger: mockup: add Status column
New column was introduced in #73.
2024-07-20 00:31:30 -07:00
64ada34fd4 hledger-flow: ethereum-based: add to Ethereum spam rules 2024-07-19 22:27:20 -07:00
c69c841a18 hledger-flow: capital-one: bank: reorder columns
Upstream has reordered their columns (same data, different order).
2024-07-10 17:33:08 -07:00
5b17bd38aa hledger-flow: coinbase: update mockups to latest impl 2024-07-03 19:05:39 -07:00
07023ea952 hledger-flow: coinbase: refactor for ccxt raw ledger
ccxt's raw ledger object resides in [info]
2024-07-03 19:05:39 -07:00
42e97cb3e4 hledger-flow: ledger: skip aEthWETH
Currently handled by `fetch` and 'blockchain-explorers/ethereum-based'.
2024-07-02 17:46:30 -07:00
e5706103e6 hledger-flow: ledger: add 'Status' column
Refactored for upstream addition.
2024-07-02 17:46:25 -07:00
d5220d151e hledger-flow: coinbase: rules: catch Advanced Trade 0-value txs
- Removes 0-values from first double entry while retaining metadata
- Catches less-than-a-penny commissions in those same transactions
2024-06-24 14:32:12 -07:00
e3d1fc4925 hledger-flow: coinbase: preprocess: fix Advanced Trade divide by zero 2024-06-24 14:32:12 -07:00
71960c106a hledger-flow: coinbase: allow 1INCH parsing 2024-06-10 18:09:13 -07:00
ce61e854ae hledger-flow: gemini: allow 1INCH transfers 2024-06-10 18:05:07 -07:00
a85ce38ef3 Merge pull request #55 into master
a3d4726 hledger-flow: ethereum-based: add to Ethereum spam rules (Aaron Fiore)
2024-06-07 13:58:13 -07:00
3f2328d3df Merge pull request #54 into master
168ff32 hledger-flow: algorand: add to spam rules (Aaron Fiore)
2024-06-07 13:56:25 -07:00
a08ae2098e hledger-flow: ally: add eCheck deposit rule 2024-06-07 13:33:01 -07:00
a3d4726c18 hledger-flow: ethereum-based: add to Ethereum spam rules 2024-06-06 19:12:57 -07:00
168ff3219b hledger-flow: algorand: add to spam rules 2024-06-06 18:52:59 -07:00
290aa7c933 hledger-flow: ally: comment cleanup
Case-sensitive representation of header columns
2024-06-06 18:42:30 -07:00
36d99e1da3 hledger-flow: ally: regex anchor for Direction 2024-06-06 18:42:28 -07:00
f12754c98a hledger-flow: ally: remove quotes in Description 2024-06-06 18:34:08 -07:00
3040fb9e60 hledger-flow: ally: fix Description
Descriptions with leading space were falsely included as `Type` tag
2024-06-06 18:32:22 -07:00
e6ab8b5ddf hledger-flow: gemini: allow optional on-chain transfers
Fixes "does not exist as a named header in the given CSV data." when
on-chain transfer does not (yet) exist for given year.
2024-05-29 19:36:28 -07:00
71a57e3869 hledger-flow: coinbase: Coinbase Trade: remove comment2 overwrite
- Use Buy total for cost-basis instead of subtotal overwrite
  - Remove redundant Sell overwrite

Fixup to pull request #49
2024-05-06 18:56:10 -07:00
71fc44bb63 hledger-flow: coinbase: update mockups (SIWC V2 compliant) 2024-05-06 14:55:53 -07:00
f65a15af2c hledger-flow: coinbase: new implementation (SIWC V2 compliant)
- Support for Coinbase SIWC Spring 2024's breaking API changes
  - Coinbase Advanced Trade lot calculation fixes
  - bitcoin.tax undocumented cost-basis "feature" fixes
      * Coinbase Trade / Advanced Trade
  - bitcoin.tax cost-basis related improvements
      * Coinbase Card / Earn
  - Support non-fiat pairings
      * Coinbase Trade / Advanced Trade
  - Add more fiat support
      * 99% supported (see backreference TODOs)
  - Subaccount improvements
  - New tags / improved tags
  - Refactoring / optimizations
2024-05-06 14:55:53 -07:00
10a08af7c8 hledger-flow: paypal-business: account for Account Hold 2024-04-22 16:25:44 -07:00
b0794b3650 hledger-flow: algorand: add to Governance Rewards 2024-04-15 15:56:28 -07:00
7437f87f20 hledger-flow: algorand: add to spam rules 2024-04-15 15:56:28 -07:00
784f576eab hledger-flow: ethereum-based: add Aave V2 -> V3 Migration Helper support 2024-04-03 00:08:18 -07:00
d31ed3a18b hledger-flow: ethereum-based: add to Ethereum spam rules 2024-04-03 00:08:09 -07:00
0eb6813511 Merge pull request #44 into master
937a217 hledger-flow: btcpayserver: preprocess: fix YYY comment typo (Aaron Fiore)
2024-03-27 23:28:55 -07:00
616a808b50 Merge pull request #43 into master
bab3021 hledger-flow: electrum: add GIFTIN fiat_value cost-basis note (Aaron Fiore)
5951faf hledger-flow: electrum: add fiat_value to all outgoing expenses (Aaron Fiore)
5d0942e hledger-flow: electrum: add subaccount to applicable memos (Aaron Fiore)
8786090 hledger-flow: electrum: clarify SPEND comment (Aaron Fiore)
2024-03-27 23:26:38 -07:00
937a217245 hledger-flow: btcpayserver: preprocess: fix YYY comment typo 2024-03-27 00:48:43 -07:00
bab3021ec7 hledger-flow: electrum: add GIFTIN fiat_value cost-basis note 2024-03-27 00:24:08 -07:00
5951faf1da hledger-flow: electrum: add fiat_value to all outgoing expenses 2024-03-27 00:23:46 -07:00
5d0942e9e0 hledger-flow: electrum: add subaccount to applicable memos 2024-03-27 00:18:39 -07:00
87860903f7 hledger-flow: electrum: clarify SPEND comment 2024-03-26 23:43:34 -07:00
e66b06ede3 hledger-flow: add support for AdaLite 2024-03-19 21:57:00 -07:00