Documentation
¶
Index ¶
Constants ¶
View Source
const PracticeEnvironment = "fxpractice"
View Source
const TradeEnvironment = "fxtrade"
Variables ¶
View Source
var ValidCandlestickGranularities []string = []string{
"S5",
"S10",
"S15",
"S30",
"M1",
"M2",
"M4",
"M5",
"M10",
"M15",
"M30",
"H1",
"H2",
"H3",
"H4",
"H6",
"H8",
"H12",
"D",
"W",
"M",
}
From http://developer.oanda.com/rest-live-v20/instrument-df/#CandlestickGranularity
Functions ¶
This section is empty.
Types ¶
type CandleRequest ¶
type CandleRequest struct { Price string Granularity string Count int From time.Time To time.Time Smooth bool IncludeFirst bool DailyAlignment int AlignmentTimezone string WeeklyAlignment string }
func DefaultCandleRequest ¶
func DefaultCandleRequest() *CandleRequest
type Client ¶
type Client struct { Token string StreamChunkSize int StreamTimeoutSeconds int Agent string // "RFC3339" or "UNIX" DatetimeFormat string // contains filtered or unexported fields }
func (*Client) GetInstrumentCandles ¶
func (s *Client) GetInstrumentCandles(instrument string, cr *CandleRequest) (*InstrumentCandles, error)
func (*Client) GetInstrumentCandlesBytes ¶
func (s *Client) GetInstrumentCandlesBytes(instrument string, cr *CandleRequest) ([]byte, error)
type InstrumentCandles ¶
Click to show internal directories.
Click to hide internal directories.