Documentation ¶
Index ¶
- func AddErrorHelp(err error) error
- func ClearAuth(customerId string, cfgFolder ConfigurationFolder, ...) (jsonmap.JsonMap, error)
- func DeleteAlerts(eTradeClient client.ETradeClient, alertIds []string) (jsonmap.JsonMap, error)
- func GetAccountBalances(eTradeClient client.ETradeClient, accountId string, realTimeBalance bool) (jsonmap.JsonMap, error)
- func GetAccountById(client client.ETradeClient, accountId string) (etradelib.ETradeAccount, error)
- func GetCustomerList(cfgStore *CustomerConfigurationStore) jsonmap.JsonMap
- func GetOptionChains(eTradeClient client.ETradeClient, symbol string, expiryYear int, ...) (jsonmap.JsonMap, error)
- func GetOptionExpireDates(eTradeClient client.ETradeClient, symbol string, ...) (jsonmap.JsonMap, error)
- func GetQuotes(eTradeClient client.ETradeClient, symbols []string, ...) (jsonmap.JsonMap, error)
- func ListAccounts(eTradeClient client.ETradeClient) (jsonmap.JsonMap, error)
- func ListAlertDetails(eTradeClient client.ETradeClient, alertId string) (jsonmap.JsonMap, error)
- func ListAlerts(eTradeClient client.ETradeClient, count int, category constants.AlertCategory, ...) (jsonmap.JsonMap, error)
- func ListOrders(eTradeClient client.ETradeClient, accountId string, ...) (jsonmap.JsonMap, error)
- func ListTransactionDetails(eTradeClient client.ETradeClient, accountId string, transactionId string) (jsonmap.JsonMap, error)
- func ListTransactions(eTradeClient client.ETradeClient, accountId string, startDate *time.Time, ...) (jsonmap.JsonMap, error)
- func Lookup(eTradeClient client.ETradeClient, search string) (jsonmap.JsonMap, error)
- func NewETradeClientForCustomer(customerId string, cfgFolder ConfigurationFolder, ...) (client.ETradeClient, error)
- func NewETradeServer(addr string, logger *slog.Logger, cfgFolder ConfigurationFolder, ...) *http.Server
- func SaveCachedCredentials(writer io.Writer, credentials *CachedCredentials) error
- func SaveCachedCredentialsToFile(filename string, credentials *CachedCredentials, logger *slog.Logger) error
- func SaveCustomerConfigurationStore(writer io.Writer, cc *CustomerConfigurationStore) error
- func SaveCustomerConfigurationStoreToFile(filename string, overwriteExisting bool, cc *CustomerConfigurationStore, ...) error
- func ViewPortfolio(eTradeClient client.ETradeClient, accountId string, ...) (jsonmap.JsonMap, error)
- type CachedCredentials
- type CommandAccounts
- type CommandAccountsBalances
- type CommandAccountsList
- type CommandAccountsPortfolio
- type CommandAccountsTransactions
- type CommandAccountsTransactionsDetails
- type CommandAccountsTransactionsList
- type CommandAlerts
- type CommandAlertsDelete
- type CommandAlertsDetails
- type CommandAlertsList
- type CommandAuth
- type CommandAuthClear
- type CommandAuthLogin
- type CommandCfg
- type CommandCfgCreate
- type CommandCfgList
- type CommandContext
- type CommandContextWithClient
- type CommandContextWithStore
- type CommandMarket
- type CommandMarketLookup
- type CommandMarketOptionChains
- type CommandMarketOptionExpire
- type CommandMarketQuote
- type CommandOrders
- type CommandOrdersList
- type CommandServer
- type ConfigurationFolder
- func (f ConfigurationFolder) GetConfigurationFilePath() string
- func (f ConfigurationFolder) GetFileCachePathForCustomer(customerConsumerKey string) string
- func (f ConfigurationFolder) LoadCachedCredentialsFromFile(customerConsumerKey string, logger *slog.Logger) (*CachedCredentials, error)
- func (f ConfigurationFolder) LoadCustomerConfiguration(logger *slog.Logger) (*CustomerConfigurationStore, error)
- func (f ConfigurationFolder) RemoveCachedCredentialsFile(customerConsumerKey string) error
- func (f ConfigurationFolder) SaveCachedCredentialsToFile(customerConsumerKey string, credentials *CachedCredentials, ...) error
- func (f ConfigurationFolder) SaveCustomerConfiguration(cfgStore *CustomerConfigurationStore, overwriteExisting bool, ...) error
- type CustomerConfiguration
- type CustomerConfigurationStore
- func (c *CustomerConfigurationStore) GetAllConfigurations() map[string]CustomerConfiguration
- func (c *CustomerConfigurationStore) GetCustomerConfigurationById(customerId string) (*CustomerConfiguration, error)
- func (c *CustomerConfigurationStore) SetCustomerConfigurationForId(customerId string, configuration *CustomerConfiguration)
- type RenderDescriptor
- func GetCompleteViewRenderDescriptor(withLots bool) []RenderDescriptor
- func GetFundamentalViewRenderDescriptor(withLots bool) []RenderDescriptor
- func GetOptionsWatchViewRenderDescriptor(withLots bool) []RenderDescriptor
- func GetPerformanceViewRenderDescriptor(withLots bool) []RenderDescriptor
- func GetQuickViewRenderDescriptor(withLots bool) []RenderDescriptor
- type RenderValue
- type Renderer
- type RootCommand
- type TransformerFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddErrorHelp ¶
func ClearAuth ¶
func ClearAuth(customerId string, cfgFolder ConfigurationFolder, cfgStore *CustomerConfigurationStore) ( jsonmap.JsonMap, error, )
func DeleteAlerts ¶
func GetAccountBalances ¶
func GetAccountById ¶
func GetAccountById(client client.ETradeClient, accountId string) (etradelib.ETradeAccount, error)
func GetCustomerList ¶
func GetCustomerList(cfgStore *CustomerConfigurationStore) jsonmap.JsonMap
func GetOptionChains ¶
func GetOptionChains( eTradeClient client.ETradeClient, symbol string, expiryYear int, expiryMonth int, expiryDay int, strikePriceNear int, noOfStrikes int, includeWeekly bool, skipAdjusted bool, optionCategory constants.OptionCategory, chainType constants.OptionChainType, priceType constants.OptionPriceType, ) (jsonmap.JsonMap, error)
func GetOptionExpireDates ¶
func GetOptionExpireDates( eTradeClient client.ETradeClient, symbol string, expiryType constants.OptionExpiryType, ) (jsonmap.JsonMap, error)
func GetQuotes ¶
func GetQuotes( eTradeClient client.ETradeClient, symbols []string, detail constants.QuoteDetailFlag, requireEarningsDate bool, skipMiniOptionsCheck bool, ) ( jsonmap.JsonMap, error, )
func ListAccounts ¶
func ListAccounts(eTradeClient client.ETradeClient) (jsonmap.JsonMap, error)
func ListAlertDetails ¶
func ListAlerts ¶
func ListAlerts( eTradeClient client.ETradeClient, count int, category constants.AlertCategory, status constants.AlertStatus, sortOrder constants.SortOrder, search string, ) (jsonmap.JsonMap, error)
func ListOrders ¶
func ListOrders( eTradeClient client.ETradeClient, accountId string, status constants.OrderStatus, fromDate *time.Time, toDate *time.Time, symbols []string, securityType constants.OrderSecurityType, transactionType constants.OrderTransactionType, marketSession constants.MarketSession, ) (jsonmap.JsonMap, error)
func ListTransactionDetails ¶
func ListTransactions ¶
func NewETradeClientForCustomer ¶
func NewETradeClientForCustomer( customerId string, cfgFolder ConfigurationFolder, cfgStore *CustomerConfigurationStore, logger *slog.Logger, ) (client.ETradeClient, error)
func NewETradeServer ¶
func NewETradeServer( addr string, logger *slog.Logger, cfgFolder ConfigurationFolder, cfgStore *CustomerConfigurationStore, ) *http.Server
func SaveCachedCredentials ¶
func SaveCachedCredentials(writer io.Writer, credentials *CachedCredentials) error
func SaveCachedCredentialsToFile ¶
func SaveCachedCredentialsToFile(filename string, credentials *CachedCredentials, logger *slog.Logger) error
func SaveCustomerConfigurationStore ¶
func SaveCustomerConfigurationStore(writer io.Writer, cc *CustomerConfigurationStore) error
func ViewPortfolio ¶
func ViewPortfolio( eTradeClient client.ETradeClient, accountId string, sortBy constants.PortfolioSortBy, sortOrder constants.SortOrder, marketSession constants.MarketSession, totalsRequired bool, portfolioView constants.PortfolioView, withLots bool, ) (jsonmap.JsonMap, error)
Types ¶
type CachedCredentials ¶
type CachedCredentials struct { AccessToken string `json:"accessToken"` AccessSecret string `json:"accessSecret"` LastUpdated time.Time `json:"lastUpdated"` }
func LoadCachedCredentials ¶
func LoadCachedCredentials(reader io.Reader) (*CachedCredentials, error)
func LoadCachedCredentialsFromFile ¶
func LoadCachedCredentialsFromFile(filename string, logger *slog.Logger) (*CachedCredentials, error)
type CommandAccounts ¶
type CommandAccounts struct {
// contains filtered or unexported fields
}
func (*CommandAccounts) Command ¶
func (c *CommandAccounts) Command(globalFlags *globalFlags) *cobra.Command
type CommandAccountsBalances ¶
type CommandAccountsBalances struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandAccountsBalances) Command ¶
func (c *CommandAccountsBalances) Command() *cobra.Command
type CommandAccountsList ¶
type CommandAccountsList struct {
Context *CommandContextWithClient
}
func (*CommandAccountsList) Command ¶
func (c *CommandAccountsList) Command() *cobra.Command
type CommandAccountsPortfolio ¶
type CommandAccountsPortfolio struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandAccountsPortfolio) Command ¶
func (c *CommandAccountsPortfolio) Command() *cobra.Command
type CommandAccountsTransactions ¶
type CommandAccountsTransactions struct {
Context *CommandContextWithClient
}
func (*CommandAccountsTransactions) Command ¶
func (c *CommandAccountsTransactions) Command() *cobra.Command
type CommandAccountsTransactionsDetails ¶
type CommandAccountsTransactionsDetails struct {
Context *CommandContextWithClient
}
func (*CommandAccountsTransactionsDetails) Command ¶
func (c *CommandAccountsTransactionsDetails) Command() *cobra.Command
type CommandAccountsTransactionsList ¶
type CommandAccountsTransactionsList struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandAccountsTransactionsList) Command ¶
func (c *CommandAccountsTransactionsList) Command() *cobra.Command
type CommandAlerts ¶
type CommandAlerts struct {
// contains filtered or unexported fields
}
func (*CommandAlerts) Command ¶
func (c *CommandAlerts) Command(globalFlags *globalFlags) *cobra.Command
type CommandAlertsDelete ¶
type CommandAlertsDelete struct {
Context *CommandContextWithClient
}
func (*CommandAlertsDelete) Command ¶
func (c *CommandAlertsDelete) Command() *cobra.Command
type CommandAlertsDetails ¶
type CommandAlertsDetails struct {
Context *CommandContextWithClient
}
func (*CommandAlertsDetails) Command ¶
func (c *CommandAlertsDetails) Command() *cobra.Command
type CommandAlertsList ¶
type CommandAlertsList struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandAlertsList) Command ¶
func (c *CommandAlertsList) Command() *cobra.Command
type CommandAuth ¶
type CommandAuth struct {
// contains filtered or unexported fields
}
func (*CommandAuth) Command ¶
func (c *CommandAuth) Command(globalFlags *globalFlags) *cobra.Command
type CommandAuthClear ¶
type CommandAuthClear struct {
Context *CommandContextWithStore
}
func (*CommandAuthClear) Command ¶
func (c *CommandAuthClear) Command(globalFlags *globalFlags) *cobra.Command
type CommandAuthLogin ¶
type CommandAuthLogin struct {
Context *CommandContextWithStore
}
func (*CommandAuthLogin) Command ¶
func (c *CommandAuthLogin) Command(globalFlags *globalFlags) *cobra.Command
func (*CommandAuthLogin) Login ¶
func (c *CommandAuthLogin) Login(customerId string) error
type CommandCfg ¶
type CommandCfg struct { }
func (*CommandCfg) Command ¶
func (c *CommandCfg) Command(globalFlags *globalFlags) *cobra.Command
type CommandCfgCreate ¶
type CommandCfgCreate struct {
// contains filtered or unexported fields
}
func (*CommandCfgCreate) Command ¶
func (c *CommandCfgCreate) Command(globalFlags *globalFlags) *cobra.Command
func (*CommandCfgCreate) CreateConfig ¶
func (c *CommandCfgCreate) CreateConfig() error
type CommandCfgList ¶
type CommandCfgList struct {
// contains filtered or unexported fields
}
func (*CommandCfgList) Command ¶
func (c *CommandCfgList) Command(globalFlags *globalFlags) *cobra.Command
type CommandContext ¶
type CommandContext struct { Logger *slog.Logger Renderer Renderer ConfigurationFolder ConfigurationFolder }
func NewCommandContextFromFlags ¶
func NewCommandContextFromFlags(flags *globalFlags) (*CommandContext, error)
func (*CommandContext) Close ¶
func (c *CommandContext) Close() error
type CommandContextWithClient ¶
type CommandContextWithClient struct { Logger *slog.Logger Renderer Renderer Client client.ETradeClient }
func NewCommandContextWithClientFromFlags ¶
func NewCommandContextWithClientFromFlags(flags *globalFlags) (*CommandContextWithClient, error)
func (*CommandContextWithClient) Close ¶
func (c *CommandContextWithClient) Close() error
type CommandContextWithStore ¶
type CommandContextWithStore struct { Logger *slog.Logger Renderer Renderer ConfigurationFolder ConfigurationFolder CustomerConfigurationStore *CustomerConfigurationStore }
func NewCommandContextWithStoreFromFlags ¶
func NewCommandContextWithStoreFromFlags(flags *globalFlags) (*CommandContextWithStore, error)
func (*CommandContextWithStore) Close ¶
func (c *CommandContextWithStore) Close() error
type CommandMarket ¶
type CommandMarket struct {
// contains filtered or unexported fields
}
func (*CommandMarket) Command ¶
func (c *CommandMarket) Command(globalFlags *globalFlags) *cobra.Command
type CommandMarketLookup ¶
type CommandMarketLookup struct {
Context *CommandContextWithClient
}
func (*CommandMarketLookup) Command ¶
func (c *CommandMarketLookup) Command() *cobra.Command
type CommandMarketOptionChains ¶
type CommandMarketOptionChains struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandMarketOptionChains) Command ¶
func (c *CommandMarketOptionChains) Command() *cobra.Command
type CommandMarketOptionExpire ¶
type CommandMarketOptionExpire struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandMarketOptionExpire) Command ¶
func (c *CommandMarketOptionExpire) Command() *cobra.Command
type CommandMarketQuote ¶
type CommandMarketQuote struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandMarketQuote) Command ¶
func (c *CommandMarketQuote) Command() *cobra.Command
type CommandOrders ¶
type CommandOrders struct {
// contains filtered or unexported fields
}
func (*CommandOrders) Command ¶
func (c *CommandOrders) Command(globalFlags *globalFlags) *cobra.Command
type CommandOrdersList ¶
type CommandOrdersList struct { Context *CommandContextWithClient // contains filtered or unexported fields }
func (*CommandOrdersList) Command ¶
func (c *CommandOrdersList) Command() *cobra.Command
type CommandServer ¶
type CommandServer struct {
// contains filtered or unexported fields
}
func (*CommandServer) Command ¶
func (c *CommandServer) Command(globalFlags *globalFlags) *cobra.Command
type ConfigurationFolder ¶
type ConfigurationFolder string
func NewConfigurationFolder ¶
func NewConfigurationFolder(cfgFolder string) ConfigurationFolder
func (ConfigurationFolder) GetConfigurationFilePath ¶
func (f ConfigurationFolder) GetConfigurationFilePath() string
func (ConfigurationFolder) GetFileCachePathForCustomer ¶
func (f ConfigurationFolder) GetFileCachePathForCustomer(customerConsumerKey string) string
func (ConfigurationFolder) LoadCachedCredentialsFromFile ¶
func (f ConfigurationFolder) LoadCachedCredentialsFromFile( customerConsumerKey string, logger *slog.Logger, ) (*CachedCredentials, error)
func (ConfigurationFolder) LoadCustomerConfiguration ¶
func (f ConfigurationFolder) LoadCustomerConfiguration(logger *slog.Logger) (*CustomerConfigurationStore, error)
func (ConfigurationFolder) RemoveCachedCredentialsFile ¶
func (f ConfigurationFolder) RemoveCachedCredentialsFile(customerConsumerKey string) error
func (ConfigurationFolder) SaveCachedCredentialsToFile ¶
func (f ConfigurationFolder) SaveCachedCredentialsToFile( customerConsumerKey string, credentials *CachedCredentials, logger *slog.Logger, ) error
func (ConfigurationFolder) SaveCustomerConfiguration ¶
func (f ConfigurationFolder) SaveCustomerConfiguration( cfgStore *CustomerConfigurationStore, overwriteExisting bool, logger *slog.Logger, ) error
type CustomerConfiguration ¶
type CustomerConfigurationStore ¶
type CustomerConfigurationStore struct {
// contains filtered or unexported fields
}
func LoadCustomerConfigurationStore ¶
func LoadCustomerConfigurationStore(reader io.Reader) (*CustomerConfigurationStore, error)
func LoadCustomerConfigurationStoreFromFile ¶
func LoadCustomerConfigurationStoreFromFile(filename string, logger *slog.Logger) ( *CustomerConfigurationStore, error, )
func (*CustomerConfigurationStore) GetAllConfigurations ¶
func (c *CustomerConfigurationStore) GetAllConfigurations() map[string]CustomerConfiguration
func (*CustomerConfigurationStore) GetCustomerConfigurationById ¶
func (c *CustomerConfigurationStore) GetCustomerConfigurationById(customerId string) (*CustomerConfiguration, error)
func (*CustomerConfigurationStore) SetCustomerConfigurationForId ¶
func (c *CustomerConfigurationStore) SetCustomerConfigurationForId( customerId string, configuration *CustomerConfiguration, )
type RenderDescriptor ¶
type RenderDescriptor struct { ObjectPath string Values []RenderValue SubObjects []RenderDescriptor DefaultValue string SpaceAfter bool }
func GetCompleteViewRenderDescriptor ¶
func GetCompleteViewRenderDescriptor(withLots bool) []RenderDescriptor
func GetFundamentalViewRenderDescriptor ¶
func GetFundamentalViewRenderDescriptor(withLots bool) []RenderDescriptor
func GetOptionsWatchViewRenderDescriptor ¶
func GetOptionsWatchViewRenderDescriptor(withLots bool) []RenderDescriptor
func GetPerformanceViewRenderDescriptor ¶
func GetPerformanceViewRenderDescriptor(withLots bool) []RenderDescriptor
func GetQuickViewRenderDescriptor ¶
func GetQuickViewRenderDescriptor(withLots bool) []RenderDescriptor
type RenderValue ¶
type RenderValue struct { Header string Path string Transformer TransformerFn }
type Renderer ¶
type Renderer interface { Render(jsonMap jsonmap.JsonMap, descriptors []RenderDescriptor) error Close() error }
type RootCommand ¶
type RootCommand struct {
// contains filtered or unexported fields
}
func (*RootCommand) Command ¶
func (c *RootCommand) Command() *cobra.Command
type TransformerFn ¶
type TransformerFn func(value interface{}) interface{}
Source Files ¶
- add_error_help.go
- cached_credentials.go
- cmd_accounts.go
- cmd_accounts_balances.go
- cmd_accounts_list.go
- cmd_accounts_portfolio.go
- cmd_accounts_transactions.go
- cmd_accounts_transactions_details.go
- cmd_accounts_transactions_list.go
- cmd_alerts.go
- cmd_alerts_delete.go
- cmd_alerts_details.go
- cmd_alerts_list.go
- cmd_auth.go
- cmd_auth_clear.go
- cmd_auth_login.go
- cmd_cfg.go
- cmd_cfg_create.go
- cmd_cfg_list.go
- cmd_market.go
- cmd_market_lookup.go
- cmd_market_optionchains.go
- cmd_market_optionexpire.go
- cmd_market_quote.go
- cmd_orders.go
- cmd_orders_list.go
- cmd_root.go
- cmd_server.go
- command_context.go
- configuration_folder.go
- csv_renderer.go
- customer_configuration_store.go
- date_transformer.go
- enum_flag_value.go
- enum_maps.go
- etrade_server.go
- fn_clear_auth.go
- fn_delete_alerts.go
- fn_get_account_balances.go
- fn_get_account_by_id.go
- fn_get_customer_list.go
- fn_get_option_chains.go
- fn_get_option_expire_dates.go
- fn_get_quotes.go
- fn_list_accounts.go
- fn_list_alert_details.go
- fn_list_alerts.go
- fn_list_orders.go
- fn_list_transaction_details.go
- fn_list_transactions.go
- fn_lookup.go
- fn_view_portfolio.go
- global_flags.go
- json_renderer.go
- renderer.go
Click to show internal directories.
Click to hide internal directories.