Debian Codegraph @

/

debian beanprice 2.0.0-3debian python3-beanprice debian beanprice debianinimakefilemarkdownpythonshelltomlyaml 49 files · 51 symbols
View dependency graph

Depends on

README (full)

beanprice: Price quotes fetcher for Beancount

Description

A script to fetch market data prices from various sources on the internet and render them for plain text accounting price syntax (and Beancount).

This used to be located within Beancount itself (at v2) under beancount.prices. This repo will contain all future updates to that script and to those price sources.

Documentation

Some documentation is still part of Beancount. More about how to use this can be found on that mailing-list. Otherwise read the source.

Quick start

To install beanprice, run:

pip install git+https://github.com/beancount/beanprice.git

You can fetch the latest price of a stock by running:

bean-price -e 'USD:yahoo/AAPL'

To fetch the latest prices from your beancount file, first ensure that commodities have price metadata, e.g.

2000-01-01 commodity AAPL
  price: "USD:yahoo/AAPL"

Then run:

bean-price ledger.beancount

To update prices up to the present day, run:

bean-price --update ledger.beancount

For more detailed guide for price fetching, read https://beancount.github.io/docs/fetching_prices_in_beancount.html.

Price source info

The following price sources are available:

NameModuleProvides prices forBase currencyLatest price?Historical price?
Alphavantagebeanprice.alphavantageStocks, FX, CryptoMany currencies✓✕
Coinbasebeanprice.coinbaseMost common (crypto)currenciesMany currencies✓✓
Coincapbeanprice.coincapMost common (crypto)currenciesUSD✓✓
Coinmarketcapbeanprice.coinmarketcapMost common (crypto)currenciesMany Currencies✓✕
European Central Bank APIbeanprice.ecbratesMany currenciesMany currencies (Derived from EUR rates)✓✓
IEXbeanprice.iexTrading symbolsUSD✓🚧 (Not yet!)
OANDAbeanprice.oandaMany currenciesMany currencies✓✓
Quandlbeanprice.quandlVarious datasetsVarious datasets✓✓
Rates APIbeanprice.ratesapiMany currenciesMany currencies✓✓
Thrift Savings Planbeanprice.tspTSP FundsUSD✓✓
Yahoobeanprice.yahooMany currenciesMany currencies✓✓
EastMoneyFund(天天基金)beanprice.eastmoneyfundChinese FundsCNY✓✓

More price sources can be found at awesome-beancount.com website.

Testing

Run tests:

pytest beanprice

Lint:

pylint beanprice

Type checker:

mypy beanprice

Copyright and License

Copyright (C) 2007-2020 Martin Blais. All Rights Reserved.

This code is distributed under the terms of the "GNU GPLv2 only". See COPYING file for details.

dir .github/
dir beanprice/
dir bin/
dir debian/
dir etc/
dir experiments/
file .editorconfig
file .gitignore
file .pylintrc
file COPYING
file README.md
file pyproject.toml
file requirements.txt
file requirements_dev.txt
file setup.py