Documentation ¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) GetAllSymbols() (*commands.GetAllSymbolsResult, error)
- func (c *Client) GetChartLastRange(period commands.Period, start time.Time, symbol string) (*commands.GetChartResult, error)
- func (c *Client) GetChartRangeRequest(period commands.Period, start time.Time, symbol string, end time.Time, ...) (*commands.GetChartResult, error)
- func (c *Client) GetProfitCalculationRequest(closePrice float32, cmd uint8, openPrice float32, symbol string, ...) (*commands.GetProfitCalculationResult, error)
- func (c *Client) GetServerTimeRequest() (*commands.GetServerTimeResult, error)
- func (c *Client) GetTradesRequest(openedOnly bool) (*commands.GetTradesResult, error)
- func (c *Client) GetVersionRequest() (*commands.GetVersionResult, error)
- func (c *Client) Login(user, password string) (*commands.LoginResult, error)
- func (c *Client) Logout() (*commands.Result, error)
- func (c *Client) TradeTransactionRequest(cmd uint8, customComment string, expiration int64, offset int, order uint, ...) (*commands.TradeTransactionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is managing connection with XTB server.
func (*Client) GetAllSymbols ¶
func (c *Client) GetAllSymbols() (*commands.GetAllSymbolsResult, error)
GetAllSymbols performs getAllSymbols command described here: http://developers.xstore.pro/documentation/#getAllSymbols
func (*Client) GetChartLastRange ¶
func (c *Client) GetChartLastRange(period commands.Period, start time.Time, symbol string) (*commands.GetChartResult, error)
GetChartLastRange performs getChartLastRange command described here: http://developers.xstore.pro/documentation/#getChartLastRequest
func (*Client) GetChartRangeRequest ¶
func (c *Client) GetChartRangeRequest(period commands.Period, start time.Time, symbol string, end time.Time, ticks int) (*commands.GetChartResult, error)
GetChartRangeRequest performs getChartRangeRequest command described here: http://developers.xstore.pro/documentation/#getChartRangeRequest
func (*Client) GetProfitCalculationRequest ¶
func (c *Client) GetProfitCalculationRequest(closePrice float32, cmd uint8, openPrice float32, symbol string, volume float32) (*commands.GetProfitCalculationResult, error)
GetProfitCalculationRequest performs getProfitCalculation command described here: http://developers.xstore.pro/documentation/#getProfitCalculation
func (*Client) GetServerTimeRequest ¶
func (c *Client) GetServerTimeRequest() (*commands.GetServerTimeResult, error)
GetServerTimeRequest performs getServerTime command described here: http://developers.xstore.pro/documentation/#getServerTime
func (*Client) GetTradesRequest ¶
func (c *Client) GetTradesRequest(openedOnly bool) (*commands.GetTradesResult, error)
GetTradesRequest performs getTrades command described here: http://developers.xstore.pro/documentation/#getTrades
func (*Client) GetVersionRequest ¶
func (c *Client) GetVersionRequest() (*commands.GetVersionResult, error)
GetVersionRequest performs getVersion command described here: http://developers.xstore.pro/documentation/#getVersion
func (*Client) Login ¶
func (c *Client) Login(user, password string) (*commands.LoginResult, error)
Login performs login command described here: http://developers.xstore.pro/documentation/#login
func (*Client) Logout ¶
Login performs loout command described here: http://developers.xstore.pro/documentation/#logout
func (*Client) TradeTransactionRequest ¶
func (c *Client) TradeTransactionRequest(cmd uint8, customComment string, expiration int64, offset int, order uint, price float32, sl float32, symbol string, tp float32, transactionType uint8, volume float32) (*commands.TradeTransactionResult, error)
TradeTransactionRequest performs tradeTransaction command described here: http://developers.xstore.pro/documentation/#tradeTransaction