Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ForexService ¶
type ForexService struct {
// contains filtered or unexported fields
}
func NewForexService ¶
func NewForexService(token string) *ForexService
func (*ForexService) History ¶
func (t *ForexService) History(request *HistoryRequest) (*HistoryResponse, error)
Returns the data for the previous close
func (*ForexService) Price ¶
func (t *ForexService) Price(request *PriceRequest) (*PriceResponse, error)
Get the latest price for a given forex ticker
func (*ForexService) Quote ¶
func (t *ForexService) Quote(request *QuoteRequest) (*QuoteResponse, error)
Get the latest quote for the forex
type HistoryRequest ¶
type HistoryRequest struct {
// the forex symbol e.g GBPUSD
Symbol string `json:"symbol"`
}
type HistoryResponse ¶
type HistoryResponse struct {
// the close price
Close float64 `json:"close"`
// the date
Date string `json:"date"`
// the peak price
High float64 `json:"high"`
// the low price
Low float64 `json:"low"`
// the open price
Open float64 `json:"open"`
// the forex symbol
Symbol string `json:"symbol"`
// the volume
Volume float64 `json:"volume"`
}
type PriceRequest ¶
type PriceRequest struct {
// forex symbol e.g GBPUSD
Symbol string `json:"symbol"`
}
type PriceResponse ¶
type QuoteRequest ¶
type QuoteRequest struct {
// the forex symbol e.g GBPUSD
Symbol string `json:"symbol"`
}
Click to show internal directories.
Click to hide internal directories.