macxred / cashctrl_ledger

Implementation of the abstract pyledger.LegderEngine interface with CashCtrl accounting service.
MIT License
0 stars 0 forks source link

Implement `price()` and `price_history()` #68

Closed AlexTheWizardL closed 2 months ago

AlexTheWizardL commented 3 months ago

This issue covers creating price() and price_history() methods that are described in the abstract class

General understanding:

In previous meetings, we've decided that add_price() and delete_price methods are not available in the cashctrl system (this is now mentioned in the milestone description).

In the Standalone_Ledger, these prices are stored as a class field called _prices. Price entity can contain ticker, currency, price, and date fields.

Ticker is a concept that can be represented by any name and has some price. For example ticker - cow can cost 100 USD, ticker cat can cost 10 UAH. Also, that price can vary in time, for example in 2024 cow costs 100 USD but in 2025 it costs 200 USD

Following questions:

  1. Where price along with ticker should be stored in the scope of Cashctrl_ledger?
  2. If the add_price() method is not available in the cashctrl system then what sense of get methods if we can not create a price?
  3. Is there any corresponding entity that exists in the cashctrl system?
AlexTheWizardL commented 3 months ago

Proposed solution and understanding:

AlexTheWizardL commented 2 months ago

After trying to implement this issue I've discovered new pitfalls of the Cashctrl API: