Documentation
¶
Index ¶
- type ActivityStatusType
- type AgentSelectionType
- type DateType
- func (tt DateType) AddDate(years int, months int, days int) DateType
- func (tt DateType) Before(date DateType) bool
- func (tt DateType) Day() time.Weekday
- func (tt DateType) IsWeekDay() bool
- func (tt *DateType) Scan(value interface{}) error
- func (tt DateType) String() string
- func (tt DateType) Time() time.Time
- func (tt DateType) Unix() int64
- func (tt DateType) Value() (driver.Value, error)
- type DivFrequencyType
- type EquityType
- type HistoryTick
- type NullDivFrequency
- type NullEquityType
- type OptionSymbolType
- type SibylAgent
- type SibylCreds
- func (sc *SibylCreds) AccessToken() string
- func (sc *SibylCreds) AgentSelection() AgentSelectionType
- func (sc *SibylCreds) ConsumerKey() string
- func (sc *SibylCreds) ConsumerSecret() string
- func (sc *SibylCreds) ExpireTimestamp() int64
- func (sc *SibylCreds) RefreshExpireTimestamp() int64
- func (sc *SibylCreds) RefreshToken() string
- func (sc *SibylCreds) String() string
- func (sc *SibylCreds) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
- func (sc *SibylCreds) Token() string
- func (sc *SibylCreds) TokenSecret() string
- func (sc *SibylCreds) UrlRedirect() string
- type SibylHistoryRecord
- type SibylIntradayRecord
- type SibylOptionQuoteRecord
- type SibylOptionRecord
- type SibylStableOptionQuoteRecord
- type SibylStableStockQuoteRecord
- type SibylStockQuoteRecord
- type SibylStockRecord
- type StockSymbolType
- type TimestampType
- func (tt TimestampType) AddDate(years int, months int, days int) TimestampType
- func (tt TimestampType) Before(date TimestampType) bool
- func (tt TimestampType) IsWeekDay() bool
- func (tt *TimestampType) Scan(value interface{}) error
- func (tt TimestampType) String() string
- func (tt TimestampType) Time() time.Time
- func (tt TimestampType) Unix() int64
- func (tt TimestampType) Value() (driver.Value, error)
- type ValidationStatusType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityStatusType ¶
type ActivityStatusType string
const ( ActivityEnabled ActivityStatusType = "enabled" ActivityDisabled ActivityStatusType = "disabled" )
func (*ActivityStatusType) Scan ¶
func (vst *ActivityStatusType) Scan(value interface{}) error
type AgentSelectionType ¶
type AgentSelectionType string
const ( AgentSelectionNone AgentSelectionType = "none" AgentSelectionAlly AgentSelectionType = "ally_invest" AgentSelectionTDAmeritrade AgentSelectionType = "td_ameritrade" )
func (*AgentSelectionType) Scan ¶
func (ast *AgentSelectionType) Scan(value interface{}) error
type DateType ¶
type DateType struct {
// contains filtered or unexported fields
}
func NewDateType ¶
func NewDateTypeFromTime ¶
func NewDateTypeFromUnix ¶
type DivFrequencyType ¶
type DivFrequencyType string
const ( AnnualDiv DivFrequencyType = "A" SemiAnnualDiv DivFrequencyType = "S" QuarterlyDiv DivFrequencyType = "Q" MonthlyDiv DivFrequencyType = "M" NoDiv DivFrequencyType = "N" )
type EquityType ¶
type EquityType string
const ( UnknownEquity EquityType = "UNKNOWN" CallEquity EquityType = "CALL" PutEquity EquityType = "PUT" )
func (*EquityType) Scan ¶
func (vst *EquityType) Scan(value interface{}) error
type HistoryTick ¶
type HistoryTick string
const ( MinuteTicks HistoryTick = "1min" FiveMinuteTicks HistoryTick = "5min" DailyTicks HistoryTick = "day" )
type NullDivFrequency ¶
type NullDivFrequency struct {
DivFreq DivFrequencyType
Valid bool
}
func (*NullDivFrequency) Scan ¶
func (nsqt *NullDivFrequency) Scan(value interface{}) error
type NullEquityType ¶
type NullEquityType struct {
Type EquityType
Valid bool
}
func (*NullEquityType) Scan ¶
func (net *NullEquityType) Scan(value interface{}) error
type OptionSymbolType ¶
type OptionSymbolType struct {
Expiration DateType
OptionType EquityType
StrikePrice float64
Symbol StockSymbolType
}
type SibylAgent ¶
type SibylAgent interface {
GetHistory(ctx context.Context, symbol StockSymbolType, tickSize HistoryTick, startDate, endDate DateType) ([]*SibylHistoryRecord, error)
GetIntraday(ctx context.Context, symbol StockSymbolType, tickSize HistoryTick, startDate, endDate TimestampType) ([]*SibylIntradayRecord, error)
GetQuotes(ctx context.Context, stockSymbols map[StockSymbolType]bool, optionSymbols map[OptionSymbolType]bool) ([]*SibylStockQuoteRecord, []*SibylOptionQuoteRecord, error)
GetStableQuotes(ctx context.Context, stockSymbols map[StockSymbolType]bool, optionSymbols map[OptionSymbolType]bool) ([]*SibylStableStockQuoteRecord, []*SibylStableOptionQuoteRecord, error)
GetStockOptionSymbols(ctx context.Context, symbol StockSymbolType) ([]*OptionSymbolType, error)
VerifyStockSymbol(ctx context.Context, symbol StockSymbolType) (good, hasOptions bool, exchange, exchangeName, name string, err error)
}
type SibylCreds ¶
type SibylCreds struct {
// contains filtered or unexported fields
}
func DefaultSibylCreds ¶
func DefaultSibylCreds() *SibylCreds
func NewSibylCreds ¶
func (*SibylCreds) AccessToken ¶
func (sc *SibylCreds) AccessToken() string
func (*SibylCreds) AgentSelection ¶
func (sc *SibylCreds) AgentSelection() AgentSelectionType
func (*SibylCreds) ConsumerKey ¶
func (sc *SibylCreds) ConsumerKey() string
func (*SibylCreds) ConsumerSecret ¶
func (sc *SibylCreds) ConsumerSecret() string
func (*SibylCreds) ExpireTimestamp ¶
func (sc *SibylCreds) ExpireTimestamp() int64
func (*SibylCreds) RefreshExpireTimestamp ¶
func (sc *SibylCreds) RefreshExpireTimestamp() int64
func (*SibylCreds) RefreshToken ¶
func (sc *SibylCreds) RefreshToken() string
func (*SibylCreds) String ¶
func (sc *SibylCreds) String() string
func (*SibylCreds) StringBlindWithDelimiter ¶
func (sc *SibylCreds) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
func (*SibylCreds) Token ¶
func (sc *SibylCreds) Token() string
func (*SibylCreds) TokenSecret ¶
func (sc *SibylCreds) TokenSecret() string
func (*SibylCreds) UrlRedirect ¶
func (sc *SibylCreds) UrlRedirect() string
type SibylHistoryRecord ¶
type SibylHistoryRecord struct {
ClosePrice sql.NullFloat64
HighPrice sql.NullFloat64
LowPrice sql.NullFloat64
OpenPrice sql.NullFloat64
Symbol StockSymbolType // this is (and must be) guaranteed to be a NON - Null value
Timestamp DateType // millis // this is (and must be) guaranteed to be a NON - Null value
Volume sql.NullInt64
}
func (*SibylHistoryRecord) String ¶
func (shr *SibylHistoryRecord) String() string
func (*SibylHistoryRecord) StringBlindWithDelimiter ¶
func (shr *SibylHistoryRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylIntradayRecord ¶
type SibylIntradayRecord struct {
HighPrice sql.NullFloat64
LastPrice sql.NullFloat64
LowPrice sql.NullFloat64
OpenPrice sql.NullFloat64
Symbol StockSymbolType // this is (and must be) guaranteed to be a NON - Null value
Timestamp TimestampType // this is (and must be) guaranteed to be a NON - Null value
Volume sql.NullInt64
}
func (*SibylIntradayRecord) String ¶
func (si *SibylIntradayRecord) String() string
func (*SibylIntradayRecord) StringBlindWithDelimiter ¶
func (si *SibylIntradayRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylOptionQuoteRecord ¶
type SibylOptionQuoteRecord struct {
Ask sql.NullFloat64 // both //
AskTime sql.NullInt64 // both //
AskSize sql.NullInt64 // both //
Bid sql.NullFloat64 // both //
BidTime sql.NullInt64 // both // millis
BidSize sql.NullInt64 // both //
Change sql.NullFloat64 // both // (+/-) number
Delta sql.NullFloat64 // option // "idelta"
EquityType EquityType // both // "put_call" //CALL or PUT // this is (and must be) guaranteed to be a NON - Null value
Expiration DateType // option // millis // this is (and must be) guaranteed to be a NON - Null value
Gamma sql.NullFloat64 // option // "igamma"
HighPrice sql.NullFloat64 // both // "hi"`
ImpliedVolatility sql.NullFloat64 // option //
LastTradePrice sql.NullFloat64 // both // ally LastTrade ... TD mark or regularMarketLastPrice
LastTradeTimestamp sql.NullInt64 // both // ally DateTime TD :tradeTimeInLong
LastTradeVolume sql.NullInt64 // both // ally incr_vl TD : lastSize
LowPrice sql.NullFloat64 // both // "lo"
OpenInterest sql.NullInt64 // option // "openinterest"
Rho sql.NullFloat64 // option // "irho"
StrikePrice float64 // option // // this is (and must be) guaranteed to be a NON - Null value
Symbol StockSymbolType // both // either the stock symbol or root symbol ex. CAT // this is (and must be) guaranteed to be a NON - Null value
Theta sql.NullFloat64 // option // "itheta"
Timestamp TimestampType // both // millis // this is the GMT timestamp (ms from epoch) of the this quote // this is (and must be) guaranteed to be a NON - Null value
Vega sql.NullFloat64 // option // "ivega"
}
func (*SibylOptionQuoteRecord) String ¶
func (sbq *SibylOptionQuoteRecord) String() string
func (*SibylOptionQuoteRecord) StringBlindWithDelimiter ¶
func (sbq *SibylOptionQuoteRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylOptionRecord ¶
type SibylOptionRecord struct {
Expiration DateType
OptionType EquityType
StrikePrice float64
Symbol StockSymbolType
}
func (*SibylOptionRecord) String ¶
func (so *SibylOptionRecord) String() string
func (*SibylOptionRecord) StringBlindWithDelimiter ¶
func (so *SibylOptionRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylStableOptionQuoteRecord ¶
type SibylStableOptionQuoteRecord struct {
ClosePrice sql.NullFloat64 // both // previous day close
ContractSize sql.NullInt64 // option // contract size for option
EquityType EquityType // both // "put_call" //CALL or PUT
Expiration DateType // option // millis // this is (and must be) guaranteed to be a NON - Null value
HighPrice52Wk sql.NullFloat64 // both //
HighPrice52WkTimestamp sql.NullInt64 // both // ally only //
LowPrice52Wk sql.NullFloat64 // both //
LowPrice52WkTimestamp sql.NullInt64 // both // ally only //millis -- ally only
Multiplier sql.NullInt64 // option // "prem_mult"
OpenPrice sql.NullFloat64 // both // "opn"
StrikePrice float64 // option // // this is (and must be) guaranteed to be a NON - Null value
Symbol StockSymbolType // both // either the stock symbol or root symbol ex. CAT // this is (and must be) guaranteed to be a NON - Null value
Timestamp DateType // both // millis // Since these values should be stable the date is just the month/day/year // this is (and must be) guaranteed to be a NON - Null value
}
func (*SibylStableOptionQuoteRecord) String ¶
func (ssq *SibylStableOptionQuoteRecord) String() string
func (*SibylStableOptionQuoteRecord) StringBlindWithDelimiter ¶
func (ssq *SibylStableOptionQuoteRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylStableStockQuoteRecord ¶
type SibylStableStockQuoteRecord struct {
AnnualDividend sql.NullFloat64 // stock // ally : iad TD divAmount
BookValue sql.NullFloat64 // stock // "prbook"
ClosePrice sql.NullFloat64 // both // previous day close
Div sql.NullFloat64 // stock // ally only //(= AnnualDiv/ divFreq) Latest announced cash dividend
DivExTimestamp sql.NullInt64 // stock // millis // date of last dividend
DivFreq NullDivFrequency // stock // Ally
DivPayTimestamp sql.NullInt64 // stock // millis // Ally
Eps sql.NullFloat64 // stock // "eps"
HighPrice52Wk sql.NullFloat64 // both //
HighPrice52WkTimestamp sql.NullInt64 // both // ally only //
LowPrice52Wk sql.NullFloat64 // both //
LowPrice52WkTimestamp sql.NullInt64 // both // ally only //millis -- ally only
OpenPrice sql.NullFloat64 // both // "opn"
PriceEarnings sql.NullFloat64 // stock // "pe"
Symbol StockSymbolType // both // either the stock symbol or root symbol ex. CAT // this is (and must be) guaranteed to be a NON - Null value
Timestamp DateType // both // millis // Since these values should be stable the date is just the month/day/year // this is (and must be) guaranteed to be a NON - Null value
Volatility sql.NullFloat64 // stock // one year volatility measure
Yield sql.NullFloat64 // stock //
}
func (*SibylStableStockQuoteRecord) String ¶
func (ssq *SibylStableStockQuoteRecord) String() string
func (*SibylStableStockQuoteRecord) StringBlindWithDelimiter ¶
func (ssq *SibylStableStockQuoteRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylStockQuoteRecord ¶
type SibylStockQuoteRecord struct {
Ask sql.NullFloat64 // both //
AskTime sql.NullInt64 // both //
AskSize sql.NullInt64 // both //
Beta sql.NullFloat64 // stock //
Bid sql.NullFloat64 // both //
BidTime sql.NullInt64 // both // millis
BidSize sql.NullInt64 // both //
Change sql.NullFloat64 // both // (+/-) number
HighPrice sql.NullFloat64 // both // "hi"`
LastTradePrice sql.NullFloat64 // both // ally LastTrade ... TD mark or regularMarketLastPrice
LastTradeTimestamp sql.NullInt64 // both // ally DateTime TD :tradeTimeInLong
LastTradeVolume sql.NullInt64 // both // ally incr_vl TD : lastSize
LowPrice sql.NullFloat64 // both // "lo"
Symbol StockSymbolType // both // either the stock symbol or root symbol ex. CAT // this is (and must be) guaranteed to be a NON - Null value
Timestamp TimestampType // both // millis // this is the GMT timestamp (ms from epoch) of the this quote // this is (and must be) guaranteed to be a NON - Null value
Volume sql.NullInt64 // stock //
VolWeightedAvgPrice sql.NullFloat64 // stock //
}
func (*SibylStockQuoteRecord) String ¶
func (sbq *SibylStockQuoteRecord) String() string
func (*SibylStockQuoteRecord) StringBlindWithDelimiter ¶
func (sbq *SibylStockQuoteRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type SibylStockRecord ¶
type SibylStockRecord struct {
DownloadStatus ActivityStatusType
Exchange string
ExchangeDescription string
HasOptions bool
HistoryStatus ActivityStatusType
IntradayHistoryStatus ActivityStatusType
Name string
QuotesStatus ActivityStatusType
StableQuotesStatus ActivityStatusType
Symbol StockSymbolType
ValidationStatus ValidationStatusType
}
func (*SibylStockRecord) String ¶
func (ss *SibylStockRecord) String() string
func (*SibylStockRecord) StringBlindWithDelimiter ¶
func (ss *SibylStockRecord) StringBlindWithDelimiter(delimiter string, nullString string, stringEscapes bool) string
type StockSymbolType ¶
type StockSymbolType string
func (*StockSymbolType) Scan ¶
func (vst *StockSymbolType) Scan(value interface{}) error
type TimestampType ¶
type TimestampType struct {
// contains filtered or unexported fields
}
func NewTimestampTypeFromTime ¶
func NewTimestampTypeFromTime(time time.Time) TimestampType
func NewTimestampTypeFromUnix ¶
func NewTimestampTypeFromUnix(timestamp int64) TimestampType
func (TimestampType) AddDate ¶
func (tt TimestampType) AddDate(years int, months int, days int) TimestampType
func (TimestampType) Before ¶
func (tt TimestampType) Before(date TimestampType) bool
func (TimestampType) IsWeekDay ¶
func (tt TimestampType) IsWeekDay() bool
func (*TimestampType) Scan ¶
func (tt *TimestampType) Scan(value interface{}) error
func (TimestampType) String ¶
func (tt TimestampType) String() string
func (TimestampType) Time ¶
func (tt TimestampType) Time() time.Time
func (TimestampType) Unix ¶
func (tt TimestampType) Unix() int64
type ValidationStatusType ¶
type ValidationStatusType string
const ( ValidationPending ValidationStatusType = "pending" ValidationValid ValidationStatusType = "valid" ValidationInvalid ValidationStatusType = "invalid" )
func (*ValidationStatusType) Scan ¶
func (vst *ValidationStatusType) Scan(value interface{}) error
Source Files
¶
- activityStatusType.go
- agent.go
- agentSelectionType.go
- common.go
- dateType.go
- divFrequencyType.go
- equityType.go
- optionSymbolType.go
- sibylCreds.go
- sibylHistoryRecord.go
- sibylIntradayRecord.go
- sibylOptionQuoteRecord.go
- sibylOptionRecord.go
- sibylQuote.go
- sibylStableOptionQuoteRecord.go
- sibylStableQuotes.go
- sibylStableStockQuoteRecord.go
- sibylStockQuoteRecord.go
- sibylStockRecord.go
- stockSymbolType.go
- symbol.go
- timestampType.go
- validationStatusType.go
Click to show internal directories.
Click to hide internal directories.