Documentation ¶
Overview ¶
Package indicators provides functionality for interacting with API indicators.
Index ¶
- type AverageDirectionalIndex
- type DoubleEMA
- type ExponentialMovingAverage
- type Indicator
- type PathParameter
- type Query
- type RelativeStrengthIndex
- type Repository
- func (repository *Repository) GetADX(pathParameter PathParameter, query Query) (*AverageDirectionalIndex, error)
- func (repository *Repository) GetDEMA(pathParameter PathParameter, query Query) (*DoubleEMA, error)
- func (repository *Repository) GetEMA(pathParameter PathParameter, query Query) (*ExponentialMovingAverage, error)
- func (repository *Repository) GetRSI(pathParameter PathParameter, query Query) (*RelativeStrengthIndex, error)
- func (repository *Repository) GetSMA(pathParameter PathParameter, query Query) (*SimpleMovingAverage, error)
- func (repository *Repository) GetStandardDeviation(pathParameter PathParameter, query Query) (*StandardDeviation, error)
- func (repository *Repository) GetTEMA(pathParameter PathParameter, query Query) (*TripleEMA, error)
- func (repository *Repository) GetWMA(pathParameter PathParameter, query Query) (*WeightedMovingAverage, error)
- func (repository *Repository) GetWilliams(pathParameter PathParameter, query Query) (*Williams, error)
- type SimpleMovingAverage
- type StandardDeviation
- type TechnicalIndicator
- type TripleEMA
- type WeightedMovingAverage
- type Williams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AverageDirectionalIndex ¶
type AverageDirectionalIndex []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` ADX float64 `json:"adx"` }
AverageDirectionalIndex represents the response structure for Average Directional Index (ADX) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-adx
type DoubleEMA ¶
type DoubleEMA []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` DEMA float64 `json:"dema"` }
DoubleEMA represents the response structure for double exponential moving average (DEMA) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-dema
type ExponentialMovingAverage ¶
type ExponentialMovingAverage []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` EMA float64 `json:"ema"` }
ExponentialMovingAverage represents the response structure for exponential moving average (EMA) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-ema
type Indicator ¶
type Indicator string
Indicator represents a type for specifying technical indicators.
const ( // SMA indicates the Simple Moving Average (SMA) indicator. SMA Indicator = "sma" // RSI indicates the Relative Strength Index (RSI) indicator. RSI Indicator = "rsi" // EMA indicates the Exponential Moving Average (EMA) indicator. EMA Indicator = "ema" // WMA indicates the Weighted Moving Average (WMA) indicator. WMA Indicator = "wma" // DEMA indicates the Double Exponential Moving Average (DEMA) indicator. DEMA Indicator = "dema" // TEMA indicates the Triple Exponential Moving Average (TEMA) indicator. TEMA Indicator = "tema" // WILLIAMS indicates the Williams %R indicator. WILLIAMS Indicator = "williams" // ADX indicates the Average Directional Index (ADX) indicator. ADX Indicator = "adx" // STANDARDDEVIATION indicates the Standard Deviation indicator. STANDARDDEVIATION Indicator = "standardDeviation" )
type PathParameter ¶
PathParameter represents a path object used for TechnicalIndicator interface.
func (*PathParameter) GetURLWithPath ¶
func (parameters *PathParameter) GetURLWithPath() string
GetURLWithPath constructs the URL for a technical indicator based on the provided timeframe and symbol.
type Query ¶
Query represents a query object used for TechnicalIndicator interface.
func (*Query) GetURL ¶
func (query *Query) GetURL(pathParameters PathParameter) string
GetURL constructs the URL for the company search based on the provided URI and query parameters.
type RelativeStrengthIndex ¶
type RelativeStrengthIndex []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` RSI float64 `json:"rsi"` }
RelativeStrengthIndex represents the response structure for Relative Strength Index (RSI) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-rsi
type Repository ¶
type Repository struct {
HTTPClient api.ClientInterface
}
Repository represents a repository for interacting with API Technical indicators endpoints
func (*Repository) GetADX ¶
func (repository *Repository) GetADX(pathParameter PathParameter, query Query) (*AverageDirectionalIndex, error)
GetADX retrieves Average Directional Index (ADX) data based on the provided path parameter and query.
func (*Repository) GetDEMA ¶
func (repository *Repository) GetDEMA(pathParameter PathParameter, query Query) (*DoubleEMA, error)
GetDEMA retrieves Double Exponential Moving Average (DEMA) data based on the provided path parameter and query.
func (*Repository) GetEMA ¶
func (repository *Repository) GetEMA(pathParameter PathParameter, query Query) (*ExponentialMovingAverage, error)
GetEMA retrieves Exponential Moving Average (EMA) data based on the provided path parameter and query.
func (*Repository) GetRSI ¶
func (repository *Repository) GetRSI(pathParameter PathParameter, query Query) (*RelativeStrengthIndex, error)
GetRSI retrieves Relative Strength Index (RSI) data based on the provided path parameter and query.
func (*Repository) GetSMA ¶
func (repository *Repository) GetSMA(pathParameter PathParameter, query Query) (*SimpleMovingAverage, error)
GetSMA retrieves Simple Moving Average (SMA) data based on the provided path parameter and query.
func (*Repository) GetStandardDeviation ¶
func (repository *Repository) GetStandardDeviation(pathParameter PathParameter, query Query) (*StandardDeviation, error)
GetStandardDeviation retrieves Standard Deviation data based on the provided path parameter and query.
func (*Repository) GetTEMA ¶
func (repository *Repository) GetTEMA(pathParameter PathParameter, query Query) (*TripleEMA, error)
GetTEMA retrieves Triple Exponential Moving Average (TEMA) data based on the provided path parameter and query.
func (*Repository) GetWMA ¶
func (repository *Repository) GetWMA(pathParameter PathParameter, query Query) (*WeightedMovingAverage, error)
GetWMA retrieves Weighted Moving Average (WMA) data based on the provided path parameter and query.
func (*Repository) GetWilliams ¶
func (repository *Repository) GetWilliams(pathParameter PathParameter, query Query) (*Williams, error)
GetWilliams retrieves Williams %R data based on the provided path parameter and query.
type SimpleMovingAverage ¶
type SimpleMovingAverage []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` SMA float64 `json:"sma"` }
SimpleMovingAverage represents the response structure for simple moving average (SMA) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-sma
type StandardDeviation ¶
type StandardDeviation []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint32 `json:"volume"` StandardDeviation float64 `json:"standardDeviation"` }
StandardDeviation represents the response structure for Standard Deviation (SD) data. @see https://site.financialmodelingprep.com/developer/docs/technicals-intraday-api
type TechnicalIndicator ¶
type TechnicalIndicator interface { SimpleMovingAverage | ExponentialMovingAverage | WeightedMovingAverage | Williams | DoubleEMA | TripleEMA | RelativeStrengthIndex | AverageDirectionalIndex | StandardDeviation }
TechnicalIndicator interface for a common structures
type TripleEMA ¶
type TripleEMA []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` TEMA float64 `json:"tema"` }
TripleEMA represents the response structure for triple exponential moving average (TEMA) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-tema
type WeightedMovingAverage ¶
type WeightedMovingAverage []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint64 `json:"volume"` WMA float64 `json:"wma"` }
WeightedMovingAverage represents the response structure for weighted moving average (WMA) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-wma
type Williams ¶
type Williams []struct { Date string `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` Volume uint32 `json:"volume"` Williams float64 `json:"williams"` }
Williams represents the response structure for Williams %R (Williams) data. @see https://site.financialmodelingprep.com/developer/docs/technical-intraday-williams