portfolio icon indicating copy to clipboard operation
portfolio copied to clipboard

Im- and export of all security meta data as JSON

Open tquellenberg opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. The existing CSV im- and export of securities do not include all internal meta data. Especially attributes and taxonomy assignments are not included.

Describe the solution you'd like New JSON format like this. Most of the data is optional. Existing securities are updated (referenced by ISIN) when JSOn is imported.

{
  "version": "1.0",
  "type": "SecurityMetaData",
  "securities": [
    {
      "isin": "US0378331005",
      "name": "Apple Inc",
      "currencyCode": "EUR",
      "note": "Meine Anmerkungen...",
      "tickerSymbol": "APC.DE",
      "wkn": "",
      "properties": {},
      "attributes": {},
      "taxonomies": [
        {
          "name": "Regionen (MSCI)",
          "assignments": [
            {
              "key": "RW1",
              "path": [
                "Regionen (MSCI)",
                "Welt",
                "Amerikas"
              ],
              "weight": 9000
            },
            {
              "key": "RW2",
              "path": [
                "Regionen (MSCI)",
                "Welt",
                "Europa"
              ],
              "weight": 1000
            }
          ]
        }
      ]
    }
  ]
}
  1. Maybe the structure for the taxonomies is too complex and a more simples approach is better (flat list of assignments)
  2. Is the header with version and type needed?

Some of the related discussions can be found here: https://forum.portfolio-performance.info/t/automatische-erstellung-von-klassifizierungen/2969/51

tquellenberg avatar Apr 02 '22 19:04 tquellenberg

See also #2700

flywire avatar Apr 19 '22 08:04 flywire

https://github.com/portfolio-performance/portfolio/issues/2216#issuecomment-1703819271 offers much better solution - import/export to an SQLite database. Such database can be directly operated on to do many useful things, or well, a script can be written to export/import its contents to some custom JSON.

pfalcon avatar Oct 29 '23 10:10 pfalcon