This release is a pre-release and may not be stable for production use.
FinanceJSON
FinanceJSON is a JSON based finance file format. JSON is able to describe complex data structures, has a human readable syntax and is available in all common programming languages. It is therefore an appropriate choice to store financial data in this format. Another advantage is that this format allows easy storage, data extraction and conversion to different file formats.
The package currently provides converters to the following file formats:
- CSV (multiple files)
- EXCEL (XLSX)
- H5
which are available from the command line. It also provides a kind of tree CLI command to quickly review the internal structure of the JSON file.
Specification
This repository contains the Specification of FinanceJSON in form of a JSON Schema.
Example
A FinanceJSON file for a stock:
{
"yh_symbol": [
{
"symbol": "XYZ"
}
],
"ms_symbol": [
{
"symbol": "US_XYZ"
}
],
"yh_currency": [
{
"index_symbol" : "XYZ",
"currency": "USD"
}
],
"ms_currency": [
{
"index_symbol": "XYZ",
"currency": "USD"
}
],
"yh_esgScores": [
{
"index_symbol": "XYZ",
"ratingYear": 2019,
"ratingMonth": 9,
"totalEsg": 12.4
}
],
"yh_earnings_earningsChart_quarterly": [
{
"index_symbol": "XYZ",
"date": "4Q2018"
}
],
"yh_earnings_financialsChart_yearly": [
{
"index_symbol": "XYZ",
"date": 2019
}
],
"yh_indexTrend_estimates": [
{
"index_symbol": "XYZ",
"date" : "2019-01-01",
"growth": 1,
"period": "+1q"
},
{
"index_symbol": "XYZ",
"date" : "2019-01-01",
"growth": 1,
"period": "-1q"
},
{
"index_symbol": "XYZ",
"date" : "2019-01-01",
"growth": 1,
"period": "1q"
},
{
"index_symbol": "XYZ",
"date" : "2019-01-01",
"growth": 1,
"period": "+1y"
}
],
"yh_assetProfile": [
{
"index_symbol": "XYZ",
"date": "2019-01-01",
"address1": "foo",
"auditRisk": 1,
"boardRisk": 2,
"city": "bar",
"country": "a"
}
],
"yh_assetProfile_companyOfficers": [
{
"index_symbol": "XYZ",
"name": "boe",
"title": "CEO"
}
],
"yh_ohlcv_1d": [
{
"index_symbol": "XYZ",
"date": "2019-01-01",
"open": 1,
"high": 2,
"low": 3,
"close": 4,
"volume": 5
}
]
}
FinanceJSON CLI
This repository also contains a Python based commandline tool which is able
validate and extract data from financeJSON files. It also emulate the linux tree
command, printing out a tree structure of the JSON data.
Validate a financeJSON file:
financejson validate /path/to/financejsonfile
Print tree structure of financeJSON file:
financejson treejson /path/to/financejsonfile
Convert a financeJSON file into an HDF5 file:
financejson convert json h5 /path/to/financejsonfile
financejson convert json hdf /path/to/financejsonfile
financejson convert json hdf5 /path/to/financejsonfile
Convert a financeJSON file into an Excel readable file (each key is written to a separate sheet):
financejson convert json xlsx /path/to/financejsonfile
License
Metadata
Release files for financeJSON 1.0.1b8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| financeJSON-1.0.1b8.tar.gz | 4.9 kB | Without provenance | Details for financeJSON-1.0.1b8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| financeJSON-1.0.1b8-py3-none-any.whl | Python 3 | none | any | Details for financeJSON-1.0.1b8-py3-none-any.whl |
Total release size: 29.6 kB
Release files / financeJSON-1.0.1b8.tar.gz
| Download URL | financeJSON-1.0.1b8.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5168166f9289d3849b49496e20c4ce07ff52bc428b366f97ac4b180d9a710fd4
|
|
BLAKE2b-256 checksum How to use checksums |
81310154e7964cc3dd815699ddc85118fa28d346bf192c986169f8fba51a6353
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Release files / financeJSON-1.0.1b8-py3-none-any.whl
| Download URL | financeJSON-1.0.1b8-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd64369d28c8e38059e1b5d6220d6b8f5c7c944a5841943c29388d55e40989f9
|
|
BLAKE2b-256 checksum How to use checksums |
ad3401e64f0e0ba1fbd37634fdeffc8d7bb31d4a8cebd78124ffced07bbf441f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
|
Security for financeJSON 1.0.1b8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.