Closed AlexTheWizardL closed 2 months ago
currencies
price(currency: str, date: date.datetime) -> float
; would return just one value via API call for exchange
rateprice_history(currency: str) -> pd.DataFrame
, would return df with a price
and date
columns that will correspond to price change along the historyAfter trying to implement this issue I've discovered new pitfalls of the Cashctrl API:
history
of price changes. The "currency/exchangerate"
endpoint is the only one to calculate the exchange rate
and it returns only one
float value at a timecurrency/create.json
endpoint and trying to receive its rate from the "currency/exchangerate"
endpoint it returns an empty string and doesn't see a new currency
This issue covers creating
price()
andprice_history()
methods that are described in the abstract classGeneral understanding:
In previous meetings, we've decided that
add_price()
anddelete_price
methods are not available in thecashctrl
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 containticker
,currency
,price
, anddate
fields.Ticker
is a concept that can be represented by any name and has some price. For example ticker -cow
can cost 100 USD, tickercat
can cost 10 UAH. Also, that price can vary in time, for example in 2024cow
costs 100 USD but in 2025 it costs 200 USDFollowing questions:
price
along withticker
should be stored in the scope ofCashctrl_ledger
?add_price()
method is not available in thecashctrl
system then what sense ofget
methods if we can not create a price?cashctrl
system?