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

Ledger (syncing) CLI and offline toolset #512

Open
16 tasks
goodboy opened this issue May 24, 2023 · 0 comments
Open
16 tasks

Ledger (syncing) CLI and offline toolset #512

goodboy opened this issue May 24, 2023 · 0 comments
Labels
accounting prolly positioning: the accounting of "what/when (is) owned" ledger trade, accounts and other user focal event history tracking, management and storage

Comments

@goodboy
Copy link
Contributor

goodboy commented May 24, 2023

As per the prototype started in #489 we need a CLI for the new
.accounting subsystem which allows for syncing trades and transfers
ledgers from brokers/cexes to get up to date (and audited) position
accounting.


Design/UX refinement

  • Prototype ledger cli using typer landed in Rekt pps? problem? => piker.accounting #489 needs
    refinement!

    • need to get some discussion going on what the cmd hierarchy should
      be: piker ledger sync for eg. or just a top level ledger?
  • use rich.Table output for console position summary as well as
    the existing little colored text output.

    • existing dumper is in .accounting.cli
  • add more subcmds then sync?

    • sync would pull recent trades data from brokers.toml defined backends and write local ledger files
    • edit and or audit commands for checking contents
    • some kinda git save related cmd
    • list to only show local non-synced state?
    • support and document syncing from a backend as the first thing
      a user typically does wen beginning to use the project?
    • consider remote actor support in harmony with a ledgerd service actor
    • consideration for a (apache arrow) related binary format
      probably unified with our (eventual) shm / fsp offline storage
      choice.
      • maybe a transformer to TOML when the user wants to read
        manually?
  • non-daemonized audit system?

    • ledger -> positions offline calcs audit tool
      • will take in a backend generated ledger file(s) and check it
        against the current pps.toml state, complaining if there's
        a mismatch (depending on user settings and whether it's a paper
        account)

Testing

  • tests for some example paper and certain backend ledgers ensuring
    accounting calcs are correctly generated as output.
    • enter-exit-enter-exit style sequences
    • ^ same but with net short single-transactions in sequence
    • catch some edge cases with crypto mkts that have super low but high
      precision pricing?
@goodboy goodboy added ledger trade, accounts and other user focal event history tracking, management and storage accounting prolly positioning: the accounting of "what/when (is) owned" labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accounting prolly positioning: the accounting of "what/when (is) owned" ledger trade, accounts and other user focal event history tracking, management and storage
Projects
None yet
Development

No branches or pull requests

1 participant