Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cmd = &cobra.Command{ Use: "reorg", Short: "Functions for handling ICE's reorg files", SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }, }
Cmd is the parent for other Reorg related commands
var ImportCmd = &cobra.Command{ Use: "import <datadir> <icefilesdir>", Short: "Import corporate actions announcements ", Long: `This command is used for importing corporate action entries from ICE's rerog files <datadir> must point to Marketstore's data directory <icefilesdir> must contain ICE's reorg.* and sirs.*/sirs.refresh.* files Each successfully imported rerog file will be renamed to reorg.*.processed to avoid reimporting it later By default, without --reimport option it only imports unprocessed data files (those without .processed suffix) With --reimport specified, it reprocess every file reorg.* file found in <icefilesdir>. Be aware that due to the nature of how marketstore stores records, it will duplicate corporate action announcements if run on already existing import --fallback-to-cusip allows Marketstore to store corporate action records by their TargetCusipID if a matching symbol is not found. Default is false, so only records with matching symbols are stored `, SilenceUsage: false, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 2 { cmd.Help() return nil } dataDir := args[0] reorgDir := args[1] executor.NewInstanceSetup(dataDir, nil, true, true, true, true) reorg.Import(reorgDir, reimport, storeWithoutSymbols) return nil }, }
ImportCmd provides a command line interface for importing corporate action entries from ICE's data files without --reimport option it only imports unprocessed data files (those without .processed suffix) with --reimport specified, it reprocess every file found in <icefilesdir>. Be aware that due to the nature of how marketstore stores records, it will duplicate corporate action announcements if run on an already populated data directory.
var ShowRecordsCmd = &cobra.Command{ Use: "show <datadir> <cusip/symbol>", Short: "Shows corporate action announcement", Long: `This command shows accouncements stored for a given symbol or cusip <datadir> must point to Marketstore's data directory <cusip/symbol> is euther a CUSIP id or a symbol name Mainly for debugging / verification purposes. `, SilenceUsage: false, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 2 { cmd.Help() return nil } cusip := args[1] dataDir := args[0] executor.NewInstanceSetup(dataDir, nil, true, true, true, true) showRecords(cusip) return nil }, }
ShowRecordsCmd shows stored corporate action announcements in marketstore. Its main purpose is to provide a way of verification of the imported data.
Functions ¶
This section is empty.
Types ¶
This section is empty.