csv

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

package csv contains a CSV importer for securities and portfolios.

It supports CSV files containing transactions with the following header structure:

Date;Type;Value;Transaction Currency;Gross Amount;Currency Gross Amount;Exchange Rate;Fees;Taxes;Shares;ISIN;WKN;Ticker Symbol;Security Name;Note

Values must be separated using a semi-colon and numbers are formatted using a German locale.

This structure is intentionally compatible with the export functionality of [Portfolio Performance](https://github.com/buchen/portfolio).

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReadingCSV    = errors.New("could not read CSV line")
	ErrParsingType   = errors.New("could not parse type")
	ErrParsingTime   = errors.New("could not parse time")
	ErrParsingTaxes  = errors.New("could not parse taxes")
	ErrParsingFees   = errors.New("could not parse fees")
	ErrParsingAmount = errors.New("could not parse amount")
	ErrParsingValue  = errors.New("could not parse value")
)

Functions

func Import

func Import(r io.Reader, pname string) (txs []*portfoliov1.PortfolioEvent, secs []*portfoliov1.Security)

Import imports CSV records from a io.Reader containing portfolio transactions.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL