Skip to main content

GNUCASH-ASX-FETCH

PyPi AUR

This is a command line utility to fetch and update ASX share prices to one or more GnuCash XML files. It takes multiple path arguments: one of more GnuCash files, or directories. If a directory is given then it updates all the GnuCash files in that directory. It can not update any GnuCash files that are currently open so will generate an error message for those files. A new price entry is added for each ASX share existing in the file each time you run it. Open the GnuCash price database editor for a file to view, edit, or remove the new entries added.

For example, to update the share prices of all the ASX shares in all the GnuCash files in the current directory type:

$ gnucash-asx-fetch .

:warning: This utility overwrites your GnuCash file[s] so be sure to save copies at least the first time you try using it.

Note it only updates GnuCash XML files, not GnuCash sqlite files. It silently skips GnuCash backup and log files. This utility should work on any modern Linux platform and has been developed against GnuCash v4.4.

See the latest documentation and code at https://github.com/bulletmark/gnucash-asx-fetch.

MOTIVATION

GnuCash uses the Finance::Quote module to update share prices but I have found it fragile over the short time I have been using GnuCash. E.g. At the time I created this utility, ASX price fetches via Finance::Quote have not worked for more than 3 months as per this bug.

Fetching prices from ASX is actually quite easy and this utility uses a simple approach. By merely requiring the user to not have the file open at the time the prices are updated, it can avoid the awkward interface with Finance::Quote and GnuCash completely, and merely write directly to the XML file.

If you like this utility then you may be interested in another utility I created to facilitate working with multiple GnuCash files.

USAGE

Type gnucash-asx-fetch -h to view the usage summary:

usage: gnucash-asx-fetch [-h] [-i] [-q] [-d] path [path ...]

Utility to fetch and add current ASX share prices to one or more gnucash XML
files.

positional arguments:
  path               directories or files to update

options:
  -h, --help         show this help message and exit
  -i, --ignore-open  silently ignore any files currently open
  -q, --quiet        suppress message output
  -d, --dry-run      do not update any file[s]

INSTALLATION

Arch Linux users can install gnucash-asx-fetch from the AUR.

Python 3.7 or later is required. Note gnucash-asx-fetch is on PyPI so just ensure that pipx is installed then type the following:

$ pipx install gnucash-asx-fetch

To upgrade:

$ pipx upgrade gnucash-asx-fetch

LICENSE

Copyright (C) 2020 Mark Blakeney. This program is distributed under the terms of the GNU General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at http://www.gnu.org/licenses/ for more details.

Metadata

Release files for gnucash-asx-fetch 1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gnucash-asx-fetch 1.8
File Size Uploaded
gnucash_asx_fetch-1.8.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gnucash-asx-fetch 1.8
File Interpreter ABI Platform
gnucash_asx_fetch-1.8-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / gnucash_asx_fetch-1.8.tar.gz

Download URL gnucash_asx_fetch-1.8.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a4821eb5d62746238393dbc6c0c32cefd6bff107bde8dd6fb137df8434b5e2c0
BLAKE2b-256 checksum
How to use checksums
954b4dd8b84faecff351f76f89805ec866e5a683f10c560b5525da9f8614e23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Release files / gnucash_asx_fetch-1.8-py3-none-any.whl

Download URL gnucash_asx_fetch-1.8-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce94af4ee6079edb735188e75a22c895932af4cf01597715e63380e127cfbf1b
BLAKE2b-256 checksum
How to use checksums
078f84e973f299d6b8ced4789ae6fd3113e139e19b96aa1b366543236d9ef452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Release history Release notifications | RSS feed

This release

1.8 This release

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page