Documentation ¶
Index ¶
- Variables
- func CheckResponse(r *http.Response) error
- type Aggregate
- type AggregateReqOptionsBuilder
- type AggregateRequestOptions
- type AggregateService
- type AggregatesResponse
- type Board
- type BoardGroup
- type Client
- type Duration
- type Engine
- type EngineName
- type GeneralFields
- type HistoryListingRequestOptions
- type HistoryListingRequestOptionsBuilder
- func (b *HistoryListingRequestOptionsBuilder) Build() *HistoryListingRequestOptions
- func (b *HistoryListingRequestOptionsBuilder) Lang(lang Language) *HistoryListingRequestOptionsBuilder
- func (b *HistoryListingRequestOptionsBuilder) Start(start uint64) *HistoryListingRequestOptionsBuilder
- func (b *HistoryListingRequestOptionsBuilder) Status(status HistoryListingTradingStatus) *HistoryListingRequestOptionsBuilder
- type HistoryListingService
- func (hl *HistoryListingService) GetListing(ctx context.Context, engine EngineName, market string, ...) (*ListingResponse, error)
- func (hl *HistoryListingService) GetListingByBoard(ctx context.Context, engine EngineName, market string, boardId string, ...) (*ListingResponse, error)
- func (hl *HistoryListingService) GetListingByBoardGroup(ctx context.Context, engine EngineName, market string, boardGroupId string, ...) (*ListingResponse, error)
- type HistoryListingTradingStatus
- type Index
- type IndexReqOptionsBoardBuilder
- type IndexReqOptionsBoardGroupBuilder
- func (e *IndexReqOptionsBoardGroupBuilder) IsTraded(isTrading bool) *IndexReqOptionsBoardGroupBuilder
- func (e *IndexReqOptionsBoardGroupBuilder) Lang(lang Language) *IndexReqOptionsBoardGroupBuilder
- func (e *IndexReqOptionsBoardGroupBuilder) WithEngine(engine EngineName) *IndexReqOptionsBoardGroupBuilder
- type IndexReqOptionsBuilder
- func (b *IndexReqOptionsBuilder) Board() *IndexReqOptionsBoardBuilder
- func (b *IndexReqOptionsBuilder) BoardGroup() *IndexReqOptionsBoardGroupBuilder
- func (b *IndexReqOptionsBuilder) Build() *IndexRequestOptions
- func (b *IndexReqOptionsBuilder) Duration() *IndexReqOptionsDurationBuilder
- func (b *IndexReqOptionsBuilder) Engine() *IndexReqOptionsEngineBuilder
- func (b *IndexReqOptionsBuilder) Market() *IndexReqOptionsMarketBuilder
- func (b *IndexReqOptionsBuilder) SecurityCollection() *IndexReqOptionsSecurityCollectionBuilder
- func (b *IndexReqOptionsBuilder) SecurityGroup() *IndexReqOptionsSecurityGroupBuilder
- func (b *IndexReqOptionsBuilder) SecurityType() *IndexReqOptionsSecurityTypeBuilder
- type IndexReqOptionsDurationBuilder
- type IndexReqOptionsEngineBuilder
- type IndexReqOptionsMarketBuilder
- type IndexReqOptionsSecurityCollectionBuilder
- type IndexReqOptionsSecurityGroupBuilder
- func (e *IndexReqOptionsSecurityGroupBuilder) HideInactive(isHiding bool) *IndexReqOptionsSecurityGroupBuilder
- func (e *IndexReqOptionsSecurityGroupBuilder) Lang(lang Language) *IndexReqOptionsSecurityGroupBuilder
- func (e *IndexReqOptionsSecurityGroupBuilder) WithEngine(engine EngineName) *IndexReqOptionsSecurityGroupBuilder
- type IndexReqOptionsSecurityTypeBuilder
- type IndexRequestOptions
- type IndexService
- type Indices
- type IndicesRequestOptions
- type IndicesRequestOptionsBuilder
- type IndicesResponse
- type IndicesService
- type Language
- type Listing
- type ListingResponse
- type Market
- type Response
- type SecStat
- type SecStatResponse
- type SecuritiesService
- type Security
- type SecurityCollection
- type SecurityGroup
- type SecurityType
- type StatReqOptionsBuilder
- func (b *StatReqOptionsBuilder) AddBoard(boardId string) *StatReqOptionsBuilder
- func (b *StatReqOptionsBuilder) AddTicker(ticker string) *StatReqOptionsBuilder
- func (b *StatReqOptionsBuilder) Build() *StatRequestOptions
- func (b *StatReqOptionsBuilder) TypeTradingSession(ts TradingSession) *StatReqOptionsBuilder
- type StatRequestOptions
- type StatsService
- type TradingSession
- type Turnover
- type TurnoverReqOptionsBuilder
- func (b *TurnoverReqOptionsBuilder) Build() *TurnoverRequestOptions
- func (b *TurnoverReqOptionsBuilder) Date(date time.Time) *TurnoverReqOptionsBuilder
- func (b *TurnoverReqOptionsBuilder) IsTonightSession(isTonightSession bool) *TurnoverReqOptionsBuilder
- func (b *TurnoverReqOptionsBuilder) Lang(lang Language) *TurnoverReqOptionsBuilder
- type TurnoverRequestOptions
- type TurnoverService
Constants ¶
This section is empty.
Variables ¶
var ( ErrNonNilContext = errors.New("context must be non-nil") ErrUnexpectedDataType = errors.New("unexpected data type") ErrNilPointer = errors.New("nil pointer error") ErrBadSecurityParameter = errors.New("bad 'security' parameter") ErrBadEngineParameter = errors.New("bad 'engine' parameter") ErrBadMarketParameter = errors.New("bad 'market' parameter") ErrBadBoardParameter = errors.New("bad 'board' parameter") ErrBadBoardGroupParameter = errors.New("bad 'boardgroup' parameter") ErrEmptyServerResult = errors.New("the empty answer") )
A section of general errors
Functions ¶
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range
Types ¶
type Aggregate ¶
type Aggregate struct { MarketName string // "market_name" MarketTitle string // "market_title" Engine string // "engine" TradeDate string // "tradedate" SecurityId string // "secid" Value float64 // "value" Volume int64 // "volume" NumberTrades int64 // "numtrades" UpdatedAt string // "updated_at" }
Aggregate struct represents aggregated trading results for the date by the security by markets
type AggregateReqOptionsBuilder ¶
type AggregateReqOptionsBuilder struct {
// contains filtered or unexported fields
}
AggregateReqOptionsBuilder represents a builder of AggregateRequestOptions struct
func NewAggregateReqOptionsBuilder ¶
func NewAggregateReqOptionsBuilder() *AggregateReqOptionsBuilder
NewAggregateReqOptionsBuilder is a constructor of AggregateReqOptionsBuilder
func (*AggregateReqOptionsBuilder) Build ¶
func (b *AggregateReqOptionsBuilder) Build() *AggregateRequestOptions
Build builds AggregateRequestOptions from AggregateReqOptionsBuilder
func (*AggregateReqOptionsBuilder) Date ¶
func (b *AggregateReqOptionsBuilder) Date(date time.Time) *AggregateReqOptionsBuilder
Date sets 'date' parameter to a request 'date' is the date for which you want to display the data. By default(if none), for the last date in the trading results.
func (*AggregateReqOptionsBuilder) Lang ¶
func (b *AggregateReqOptionsBuilder) Lang(lang Language) *AggregateReqOptionsBuilder
Lang sets 'lang' parameter to a request
type AggregateRequestOptions ¶
type AggregateRequestOptions struct {
// contains filtered or unexported fields
}
AggregateRequestOptions contains options which can be used as arguments for building requests to get aggregated trading results for the date by market. MoEx ISS API docs: https://iss.moex.com/iss/reference/214
type AggregateService ¶
type AggregateService service
AggregateService gets aggregated trading results in the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/214
func (*AggregateService) GetAggregates ¶
func (a *AggregateService) GetAggregates(ctx context.Context, security string, opt *AggregateRequestOptions) (*AggregatesResponse, error)
GetAggregates provides GetAggregates of MoEx ISS
type AggregatesResponse ¶
type AggregatesResponse struct { SecurityId string Aggregates []Aggregate DatesFrom string // DatesTill string }
AggregatesResponse struct represents a response with aggregated trading results
type Board ¶
type Board struct { Id int64 BoardGroupId int64 EngineId int64 MarketId int64 BoardId string BoardTitle string IsTraded bool HasCandles bool IsPrimary bool }
Board represent a description of the board and its attributes
type BoardGroup ¶
type BoardGroup struct { Engine Engine MarketId int64 MarketName string GeneralFields IsDefault bool IsTraded bool }
BoardGroup represent a description of the board group and its attributes
type Client ¶
type Client struct { // Base URL for API requests. BaseURL *url.URL // User agent used when communicating with the MoEx Iss API. UserAgent string Securities *SecuritiesService Index *IndexService Turnovers *TurnoverService Aggregates *AggregateService Indices *IndicesService HistoryListing *HistoryListingService Stats *StatsService // contains filtered or unexported fields }
Client structure represents a client of MoEx ISS API
func (*Client) BareDo ¶
BareDo sends an API request and lets you handle the api response. If an error or API Error occurs, the error will contain more information. Otherwise you are supposed to read and close the response's Body.
The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it. If v is nil, and no error happens, the response is returned as is.
The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type Engine ¶
type Engine struct {
GeneralFields
}
Engine represents a description of the trading system in directories named in MoEx ISS API as 'engine'
type EngineName ¶
type EngineName string
EngineName represents the known Engine names of MoEx ISS API
const ( EngineUndefined EngineName = "" EngineStock EngineName = "stock" EngineState EngineName = "state" EngineCurrency EngineName = "currency" EngineFutures EngineName = "futures" EngineCommodity EngineName = "commodity" EngineInterventions EngineName = "interventions" EngineOffBoard EngineName = "offboard" EngineAgro EngineName = "agro" )
A section of EngineName values
func (EngineName) String ¶
func (s EngineName) String() string
string representations of EngineName values
type GeneralFields ¶
GeneralFields it contains general fields of some other structures
type HistoryListingRequestOptions ¶
type HistoryListingRequestOptions struct {
// contains filtered or unexported fields
}
HistoryListingRequestOptions contains options which can be used as arguments for building requests to get listing information. MoEx ISS API docs:
https://iss.moex.com/iss/reference/118 https://iss.moex.com/iss/reference/119 https://iss.moex.com/iss/reference/120
type HistoryListingRequestOptionsBuilder ¶
type HistoryListingRequestOptionsBuilder struct {
// contains filtered or unexported fields
}
HistoryListingRequestOptionsBuilder represents a builder of HistoryListingRequestOptions struct
func NewHistoryListingReqOptionsBuilder ¶
func NewHistoryListingReqOptionsBuilder() *HistoryListingRequestOptionsBuilder
NewHistoryListingReqOptionsBuilder is a constructor of HistoryListingRequestOptionsBuilder
func (*HistoryListingRequestOptionsBuilder) Build ¶
func (b *HistoryListingRequestOptionsBuilder) Build() *HistoryListingRequestOptions
Build builds HistoryListingRequestOptions from HistoryListingRequestOptionsBuilder
func (*HistoryListingRequestOptionsBuilder) Lang ¶
func (b *HistoryListingRequestOptionsBuilder) Lang(lang Language) *HistoryListingRequestOptionsBuilder
Lang sets 'lang' parameter to a request Language of the result set: 'ru' or 'en' 'ru' by default
func (*HistoryListingRequestOptionsBuilder) Start ¶
func (b *HistoryListingRequestOptionsBuilder) Start(start uint64) *HistoryListingRequestOptionsBuilder
Start sets 'start' parameter to a request Row number (the number of the first row is 0) to begin the result set with. If the result set contains no data then the specified number is greater than the total number of rows available. 0 by default
func (*HistoryListingRequestOptionsBuilder) Status ¶
func (b *HistoryListingRequestOptionsBuilder) Status(status HistoryListingTradingStatus) *HistoryListingRequestOptionsBuilder
Status sets 'status' parameter to a request Trading status filter: ListingTradingStatusAll, ListingTradingStatusNotTraded or ListingTradingStatusTraded ListingTradingStatusAll status by default
type HistoryListingService ¶
type HistoryListingService service
HistoryListingService gets a list of tradable/non-tradable securities with indication of tradability intervals by modes from the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/118 https://iss.moex.com/iss/reference/119 https://iss.moex.com/iss/reference/120
func (*HistoryListingService) GetListing ¶
func (hl *HistoryListingService) GetListing(ctx context.Context, engine EngineName, market string, opt *HistoryListingRequestOptions) (*ListingResponse, error)
GetListing provides a list of tradable/non-tradable securities
func (*HistoryListingService) GetListingByBoard ¶
func (hl *HistoryListingService) GetListingByBoard(ctx context.Context, engine EngineName, market string, boardId string, opt *HistoryListingRequestOptions) (*ListingResponse, error)
GetListingByBoard provides security listing information for a given board
func (*HistoryListingService) GetListingByBoardGroup ¶
func (hl *HistoryListingService) GetListingByBoardGroup(ctx context.Context, engine EngineName, market string, boardGroupId string, opt *HistoryListingRequestOptions) (*ListingResponse, error)
GetListingByBoardGroup provides security listing information for a given boardgroup
type HistoryListingTradingStatus ¶
type HistoryListingTradingStatus string
HistoryListingTradingStatus represents a type of trading status for listing of MoEx ISS API
const ( ListingTradingStatusUndefined HistoryListingTradingStatus = "" ListingTradingStatusAll HistoryListingTradingStatus = "all" ListingTradingStatusNotTraded HistoryListingTradingStatus = "nottraded" ListingTradingStatusTraded HistoryListingTradingStatus = "traded" )
A section of HistoryListingTradingStatus values
func (HistoryListingTradingStatus) String ¶
func (hlt HistoryListingTradingStatus) String() string
String representations of HistoryListingTradingStatus values
type Index ¶
type Index struct { Engines []Engine Markets []Market Boards []Board BoardGroups []BoardGroup Durations []Duration SecurityTypes []SecurityType SecurityGroups []SecurityGroup SecurityCollections []SecurityCollection }
Index represents a result of the request of the index
type IndexReqOptionsBoardBuilder ¶
type IndexReqOptionsBoardBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsBoardBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsBoardBuilder) Lang ¶
func (e *IndexReqOptionsBoardBuilder) Lang(lang Language) *IndexReqOptionsBoardBuilder
Lang sets 'boardsLang' parameter to a request of directories of Board
type IndexReqOptionsBoardGroupBuilder ¶
type IndexReqOptionsBoardGroupBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsBoardGroupBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsBoardGroupBuilder) IsTraded ¶
func (e *IndexReqOptionsBoardGroupBuilder) IsTraded(isTrading bool) *IndexReqOptionsBoardGroupBuilder
IsTraded sets 'boardGroupsIsTraded' parameter to a request of directories of BoardGroup
func (*IndexReqOptionsBoardGroupBuilder) Lang ¶
func (e *IndexReqOptionsBoardGroupBuilder) Lang(lang Language) *IndexReqOptionsBoardGroupBuilder
Lang sets 'boardGroupsLang' parameter to a request of directories of BoardGroup
func (*IndexReqOptionsBoardGroupBuilder) WithEngine ¶
func (e *IndexReqOptionsBoardGroupBuilder) WithEngine(engine EngineName) *IndexReqOptionsBoardGroupBuilder
WithEngine sets 'boardGroupsEngine' parameter to a request of directories of BoardGroup
type IndexReqOptionsBuilder ¶
type IndexReqOptionsBuilder struct {
// contains filtered or unexported fields
}
IndexReqOptionsBuilder represents a builder of IndexRequestOptions struct
func NewIndexReqOptionsBuilder ¶
func NewIndexReqOptionsBuilder() *IndexReqOptionsBuilder
NewIndexReqOptionsBuilder is a constructor for IndexReqOptionsBuilder
func (*IndexReqOptionsBuilder) Board ¶
func (b *IndexReqOptionsBuilder) Board() *IndexReqOptionsBoardBuilder
Board chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsBoardBuilder
func (*IndexReqOptionsBuilder) BoardGroup ¶
func (b *IndexReqOptionsBuilder) BoardGroup() *IndexReqOptionsBoardGroupBuilder
BoardGroup chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsBoardGroupBuilder
func (*IndexReqOptionsBuilder) Build ¶
func (b *IndexReqOptionsBuilder) Build() *IndexRequestOptions
Build builds IndexRequestOptions from IndexReqOptionsBuilder
func (*IndexReqOptionsBuilder) Duration ¶
func (b *IndexReqOptionsBuilder) Duration() *IndexReqOptionsDurationBuilder
Duration chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsDurationBuilder
func (*IndexReqOptionsBuilder) Engine ¶
func (b *IndexReqOptionsBuilder) Engine() *IndexReqOptionsEngineBuilder
Engine chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsEngineBuilder
func (*IndexReqOptionsBuilder) Market ¶
func (b *IndexReqOptionsBuilder) Market() *IndexReqOptionsMarketBuilder
Market chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsMarketBuilder
func (*IndexReqOptionsBuilder) SecurityCollection ¶
func (b *IndexReqOptionsBuilder) SecurityCollection() *IndexReqOptionsSecurityCollectionBuilder
SecurityCollection chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsSecurityCollectionBuilder
func (*IndexReqOptionsBuilder) SecurityGroup ¶
func (b *IndexReqOptionsBuilder) SecurityGroup() *IndexReqOptionsSecurityGroupBuilder
SecurityGroup chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsSecurityGroupBuilder
func (*IndexReqOptionsBuilder) SecurityType ¶
func (b *IndexReqOptionsBuilder) SecurityType() *IndexReqOptionsSecurityTypeBuilder
SecurityType chains to type *IndexReqOptionsBuilder and returns *IndexReqOptionsSecurityTypeBuilder
type IndexReqOptionsDurationBuilder ¶
type IndexReqOptionsDurationBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsDurationBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsDurationBuilder) Lang ¶
func (e *IndexReqOptionsDurationBuilder) Lang(lang Language) *IndexReqOptionsDurationBuilder
Lang sets 'durationsLang' parameter to a request of directories of Duration and returns *IndexReqOptionsDurationBuilder
type IndexReqOptionsEngineBuilder ¶
type IndexReqOptionsEngineBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsEngineBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsEngineBuilder) Lang ¶
func (e *IndexReqOptionsEngineBuilder) Lang(lang Language) *IndexReqOptionsEngineBuilder
Lang sets 'enginesLang' parameter to a request of directories of Engine
type IndexReqOptionsMarketBuilder ¶
type IndexReqOptionsMarketBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsMarketBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsMarketBuilder) Lang ¶
func (e *IndexReqOptionsMarketBuilder) Lang(lang Language) *IndexReqOptionsMarketBuilder
Lang sets 'marketsLang' parameter to a request of directories of Market
type IndexReqOptionsSecurityCollectionBuilder ¶
type IndexReqOptionsSecurityCollectionBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsSecurityCollectionBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsSecurityCollectionBuilder) Lang ¶
func (e *IndexReqOptionsSecurityCollectionBuilder) Lang(lang Language) *IndexReqOptionsSecurityCollectionBuilder
Lang sets 'securityCollectionsLang' parameter to a request of directories of SecurityCollection
type IndexReqOptionsSecurityGroupBuilder ¶
type IndexReqOptionsSecurityGroupBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsSecurityGroupBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsSecurityGroupBuilder) HideInactive ¶
func (e *IndexReqOptionsSecurityGroupBuilder) HideInactive(isHiding bool) *IndexReqOptionsSecurityGroupBuilder
HideInactive sets 'securityGroupsHideInactive' parameter to a request of directories of SecurityGroup
func (*IndexReqOptionsSecurityGroupBuilder) Lang ¶
func (e *IndexReqOptionsSecurityGroupBuilder) Lang(lang Language) *IndexReqOptionsSecurityGroupBuilder
Lang sets 'securityGroupsLang' parameter to a request of directories of SecurityGroup
func (*IndexReqOptionsSecurityGroupBuilder) WithEngine ¶
func (e *IndexReqOptionsSecurityGroupBuilder) WithEngine(engine EngineName) *IndexReqOptionsSecurityGroupBuilder
WithEngine sets 'securityGroupsEngine' parameter to a request of directories of SecurityGroup
type IndexReqOptionsSecurityTypeBuilder ¶
type IndexReqOptionsSecurityTypeBuilder struct {
IndexReqOptionsBuilder
}
IndexReqOptionsSecurityTypeBuilder facet of IndexReqOptionsBuilder
func (*IndexReqOptionsSecurityTypeBuilder) Lang ¶
func (e *IndexReqOptionsSecurityTypeBuilder) Lang(lang Language) *IndexReqOptionsSecurityTypeBuilder
Lang sets 'securityTypesLang' parameter to a request of directories of SecurityType
func (*IndexReqOptionsSecurityTypeBuilder) WithEngine ¶
func (e *IndexReqOptionsSecurityTypeBuilder) WithEngine(engine EngineName) *IndexReqOptionsSecurityTypeBuilder
WithEngine sets 'securityTypesEngine' parameter to a request of directories of SecurityType
type IndexRequestOptions ¶
type IndexRequestOptions struct {
// contains filtered or unexported fields
}
IndexRequestOptions contains options which can be used as arguments for building requests of 'Index' MoEx ISS API docs: https://iss.moex.com/iss/reference/28
type IndexService ¶
type IndexService service
IndexService provides access to the index related functions in the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/28
func (*IndexService) List ¶
func (s *IndexService) List(ctx context.Context, opt *IndexRequestOptions) (*Index, error)
List provides a list of references of MoEx ISS
type Indices ¶
type Indices struct { IndexId string // "SECID" IndexName string // "SHORTNAME" From string // "FROM" Till string // "TILL" }
Indices struct represents a list of the indices that include the security
type IndicesRequestOptions ¶
type IndicesRequestOptions struct {
// contains filtered or unexported fields
}
IndicesRequestOptions contains options which can be used as arguments for building requests to get a list of indices that include the security. MoEx ISS API docs: https://iss.moex.com/iss/reference/160
type IndicesRequestOptionsBuilder ¶
type IndicesRequestOptionsBuilder struct {
// contains filtered or unexported fields
}
IndicesRequestOptionsBuilder represents a builder of IndicesRequestOptions struct
func NewIndicesReqOptionsBuilder ¶
func NewIndicesReqOptionsBuilder() *IndicesRequestOptionsBuilder
NewIndicesReqOptionsBuilder is a constructor of IndicesRequestOptionsBuilder
func (*IndicesRequestOptionsBuilder) Build ¶
func (b *IndicesRequestOptionsBuilder) Build() *IndicesRequestOptions
Build builds IndicesRequestOptions from IndicesRequestOptionsBuilder
func (*IndicesRequestOptionsBuilder) Lang ¶
func (b *IndicesRequestOptionsBuilder) Lang(lang Language) *IndicesRequestOptionsBuilder
Lang sets 'lang' parameter to a request
type IndicesResponse ¶
IndicesResponse struct represents a response with the list of the indices
type IndicesService ¶
type IndicesService service
IndicesService gets a list of the indices that include the security from the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/160
func (*IndicesService) GetIndices ¶
func (i *IndicesService) GetIndices(ctx context.Context, security string, opt *IndicesRequestOptions) (*IndicesResponse, error)
GetIndices provides a list of the indices that include the security of MoEx ISS
type Language ¶
type Language string
Language represents a language of answers of MoEx ISS API
Possible values of Language type
type Listing ¶
type Listing struct { Ticker string // "SECID" ShortName string // "SHORTNAME" FullName string // "NAME" BoardId string // "BOARDID" Decimals int64 // "decimals" From string // "history_from" Till string // "history_till" }
Listing struct represents listing of the security
type ListingResponse ¶
type ListingResponse struct { Engine EngineName Market string BoardGroupId string Listing []Listing }
ListingResponse struct represents a response with listing of the security
type Market ¶
type Market struct { Engine Engine GeneralFields MarketPlace string }
Market represents a description of the market and its attributes
type SecStat ¶
type SecStat struct { Ticker string // "SECID" BoardId string // "BOARDID" TrSession TradingSession // "TRADINGSESSION" Time string // "TIME" PriceMinusPrevPr float64 // "PRICEMINUSPREVWAPRICE" VolToday int64 // "VOLTODAY" ValToday int64 // "VALTODAY" HighBid float64 // "HIGHBID" LowOffer float64 // "LOWOFFER" LastOffer float64 // "LASTOFFER" LastBid float64 // "LASTBID" Open float64 // "OPEN" Low float64 // "LOW" High float64 // "HIGH" Last float64 // "LAST" LClosePrice float64 // "LCLOSEPRICE" NumTrades int64 // "NUMTRADES" WaPrice float64 // "WAPRICE" AdmittedQuote float64 // "ADMITTEDQUOTE" MarketPrice float64 // "MARKETPRICE2" LCurrentPrice float64 // "LCURRENTPRICE" ClosingAucPrice float64 // "CLOSINGAUCTIONPRICE" }
SecStat struct represents intermediate day summary by the security by markets
type SecStatResponse ¶
type SecStatResponse struct { Engine EngineName Market string SecStats []SecStat }
SecStatResponse struct represents a response with intermediate day summary
type SecuritiesService ¶
type SecuritiesService service
SecuritiesService provides access to the security related functions in the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/5
type Security ¶
type Security struct { Id int64 //"0" SecId string //"1" ShortName string //"2" RegNumber string //"3" Name string //"4" Isin string //"5" IsTraded bool //"6" EmitentId string //"7" EmitentTitle string //"8" EmitentInn string //"9" EmitentOkpo string //"10" GosReg string //"11" Type string //"12" Group string //"13" PrimaryBoardId string //"14" MarketPriceBoardId string //"15" }
Security represent a security
type SecurityCollection ¶
type SecurityCollection struct { GeneralFields SecurityGroupId int64 }
SecurityCollection represent a description of the security collection and its attributes
type SecurityGroup ¶
type SecurityGroup struct { GeneralFields IsHidden bool }
SecurityGroup represent a description of the security group and its attributes
type SecurityType ¶
type SecurityType struct { Engine Engine GeneralFields SecurityGroupName string }
SecurityType represent a description of the security type and its attributes
type StatReqOptionsBuilder ¶
type StatReqOptionsBuilder struct {
// contains filtered or unexported fields
}
StatReqOptionsBuilder represents a builder of StatRequestOptions struct
func NewStatReqOptionsBuilder ¶
func NewStatReqOptionsBuilder() *StatReqOptionsBuilder
NewStatReqOptionsBuilder is a constructor of StatReqOptionsBuilder
func (*StatReqOptionsBuilder) AddBoard ¶
func (b *StatReqOptionsBuilder) AddBoard(boardId string) *StatReqOptionsBuilder
AddBoard adds a board to a request Filter the output by trading mode. No more than 10 boards.
func (*StatReqOptionsBuilder) AddTicker ¶
func (b *StatReqOptionsBuilder) AddTicker(ticker string) *StatReqOptionsBuilder
AddTicker adds a ticker to a request It allows to show data only for the required tickers. No more than 10 tickers.
func (*StatReqOptionsBuilder) Build ¶
func (b *StatReqOptionsBuilder) Build() *StatRequestOptions
Build builds StatRequestOptions from StatReqOptionsBuilder
func (*StatReqOptionsBuilder) TypeTradingSession ¶
func (b *StatReqOptionsBuilder) TypeTradingSession(ts TradingSession) *StatReqOptionsBuilder
TypeTradingSession sets a type of trading session parameter to a request It allows to show data only for the required session.
type StatRequestOptions ¶
type StatRequestOptions struct { TradingSessionType TradingSession // `tradingsession` query parameter in url.URL TickerIds []string // `securities` query parameter in url.URL BoardId []string // `boardid` query parameter in url.URL }
StatRequestOptions contains options which can be used as arguments for building requests to get intermediate day summary. MoEx ISS API docs: https://iss.moex.com/iss/reference/823
type StatsService ¶
type StatsService service
StatsService gets intermediate day summary from the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/823
func (*StatsService) GetSecStats ¶
func (s *StatsService) GetSecStats(ctx context.Context, engine EngineName, market string, opt *StatRequestOptions) (*SecStatResponse, error)
GetSecStats provides an intermediate day summary
type TradingSession ¶
type TradingSession uint8
TradingSession represents a type of trading sessions for intermediate day summary of MoEx ISS API
const ( TradingSessionUndefined TradingSession = 0 TradingSessionMain TradingSession = 1 TradingSessionAdditional TradingSession = 2 TradingSessionTotal TradingSession = 3 )
These constants represent possible values of TradingSession
func (TradingSession) String ¶
func (ts TradingSession) String() string
String representations of TradingSession values
type Turnover ¶
type Turnover struct { Name string // "NAME" Market text identifier Id int64 // "ID" Market ID ValToday float64 // "VALTODAY" Value of Concluded Transactions, million RUB ValTodayUsd float64 // "VALTODAY_USD" Value of Concluded Transactions, million USD NumTrades int64 // "NUMTRADES" Quantity of Trades per Day, units UpdateTime string // "UPDATETIME" Time of Last Updating Title string // "TITLE" Market title }
Turnover struct represents market turnovers
type TurnoverReqOptionsBuilder ¶
type TurnoverReqOptionsBuilder struct {
// contains filtered or unexported fields
}
TurnoverReqOptionsBuilder represents a builder of TurnoverRequestOptions struct
func NewTurnoverReqOptionsBuilder ¶
func NewTurnoverReqOptionsBuilder() *TurnoverReqOptionsBuilder
NewTurnoverReqOptionsBuilder is a constructor for TurnoverReqOptionsBuilder
func (*TurnoverReqOptionsBuilder) Build ¶
func (b *TurnoverReqOptionsBuilder) Build() *TurnoverRequestOptions
Build builds TurnoverRequestOptions from TurnoverReqOptionsBuilder
func (*TurnoverReqOptionsBuilder) Date ¶
func (b *TurnoverReqOptionsBuilder) Date(date time.Time) *TurnoverReqOptionsBuilder
Date sets 'date' parameter to a request of the current turnover
func (*TurnoverReqOptionsBuilder) IsTonightSession ¶
func (b *TurnoverReqOptionsBuilder) IsTonightSession(isTonightSession bool) *TurnoverReqOptionsBuilder
IsTonightSession sets 'is_tonight_session' parameter to a request of the current turnover
func (*TurnoverReqOptionsBuilder) Lang ¶
func (b *TurnoverReqOptionsBuilder) Lang(lang Language) *TurnoverReqOptionsBuilder
Lang sets 'lang' parameter to a request of the current turnover
type TurnoverRequestOptions ¶
type TurnoverRequestOptions struct {
// contains filtered or unexported fields
}
TurnoverRequestOptions contains options which can be used as arguments for building requests to get current turnover on all the markets. MoEx ISS API docs: https://iss.moex.com/iss/reference/24
type TurnoverService ¶
type TurnoverService service
TurnoverService gets turnovers on all the markets in the MoEx ISS API.
MoEx ISS API docs: https://iss.moex.com/iss/reference/24
func (*TurnoverService) GetTurnovers ¶
func (s *TurnoverService) GetTurnovers(ctx context.Context, opt *TurnoverRequestOptions) (*[]Turnover, error)
GetTurnovers provides a list of turnovers of markets of MoEx ISS