Documentation
¶
Index ¶
- Constants
- type ConversionResult
- type ForgeClient
- func (c *ForgeClient) Connect()
- func (c *ForgeClient) Convert(from string, to string, quantity int) (ConversionResult, error)
- func (c *ForgeClient) Disconnect()
- func (c *ForgeClient) GetMarketStatus() (MarketStatus, error)
- func (c *ForgeClient) GetQuota() (Quota, error)
- func (c *ForgeClient) GetQuotes(symbols []string) ([]Quote, error)
- func (c *ForgeClient) GetSymbols() ([]string, error)
- func (c *ForgeClient) OnConnection(callback func())
- func (c *ForgeClient) OnDisconnection(callback func())
- func (c *ForgeClient) OnLoginSuccess(callback func())
- func (c *ForgeClient) OnMessage(callback func(string))
- func (c *ForgeClient) OnUpdate(callback func(Quote))
- func (c *ForgeClient) SubscribeTo(symbols []string)
- func (c *ForgeClient) SubscribeToAll()
- func (c *ForgeClient) UnsubscribeFrom(symbols []string)
- func (c *ForgeClient) UnsubscribeFromAll()
- type MarketStatus
- type Quota
- type Quote
- type RestClient
- func (c RestClient) Convert(from string, to string, quantity int) (ConversionResult, error)
- func (c RestClient) GetMarketStatus() (MarketStatus, error)
- func (c RestClient) GetQuota() (Quota, error)
- func (c RestClient) GetQuotes(symbols []string) ([]Quote, error)
- func (c RestClient) GetSymbols() ([]string, error)
- type RestError
- type SocketClient
- func (c *SocketClient) Connect()
- func (c *SocketClient) Disconnect()
- func (c *SocketClient) OnConnection(callback func())
- func (c *SocketClient) OnDisconnection(callback func())
- func (c *SocketClient) OnLoginSuccess(callback func())
- func (c *SocketClient) OnMessage(callback func(string))
- func (c *SocketClient) OnUpdate(callback func(Quote))
- func (c *SocketClient) SubscribeTo(symbols []string)
- func (c *SocketClient) SubscribeToAll()
- func (c *SocketClient) UnsubscribeFrom(symbols []string)
- func (c *SocketClient) UnsubscribeFromAll()
- type UnlimitedQuota
Constants ¶
View Source
const ( LOGIN = "login" SUBSCRIBE_TO = "subscribe_to" UNSUBSCRIBE_FROM = "unsubscribe_from" SUBSCRIBE_TO_ALL = "subscribe_to_all" UNSUBSCRIBE_FROM_ALL = "unsubscribe_from_all" MESSAGE = "message" FORCE_CLOSE = "force_close" POST_LOGIN_SUCCESS = "post_login_success" UPDATE = "update" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversionResult ¶
type ForgeClient ¶
type ForgeClient struct {
// contains filtered or unexported fields
}
func CreateForgeClient ¶
func CreateForgeClient(apiKey string) *ForgeClient
func (*ForgeClient) Convert ¶
func (c *ForgeClient) Convert(from string, to string, quantity int) (ConversionResult, error)
func (*ForgeClient) Disconnect ¶
func (c *ForgeClient) Disconnect()
func (*ForgeClient) GetMarketStatus ¶
func (c *ForgeClient) GetMarketStatus() (MarketStatus, error)
func (*ForgeClient) GetQuota ¶
func (c *ForgeClient) GetQuota() (Quota, error)
func (*ForgeClient) GetQuotes ¶
func (c *ForgeClient) GetQuotes(symbols []string) ([]Quote, error)
REST
func (*ForgeClient) GetSymbols ¶
func (c *ForgeClient) GetSymbols() ([]string, error)
func (*ForgeClient) OnConnection ¶
func (c *ForgeClient) OnConnection(callback func())
func (*ForgeClient) OnDisconnection ¶
func (c *ForgeClient) OnDisconnection(callback func())
func (*ForgeClient) OnLoginSuccess ¶
func (c *ForgeClient) OnLoginSuccess(callback func())
func (*ForgeClient) OnMessage ¶
func (c *ForgeClient) OnMessage(callback func(string))
func (*ForgeClient) OnUpdate ¶
func (c *ForgeClient) OnUpdate(callback func(Quote))
func (*ForgeClient) SubscribeTo ¶
func (c *ForgeClient) SubscribeTo(symbols []string)
func (*ForgeClient) SubscribeToAll ¶
func (c *ForgeClient) SubscribeToAll()
func (*ForgeClient) UnsubscribeFrom ¶
func (c *ForgeClient) UnsubscribeFrom(symbols []string)
func (*ForgeClient) UnsubscribeFromAll ¶
func (c *ForgeClient) UnsubscribeFromAll()
type MarketStatus ¶
type MarketStatus struct {
MarketIsOpen bool `json:"market_is_open"`
}
type RestClient ¶
type RestClient struct {
ApiKey string
}
func CreateRestClient ¶
func CreateRestClient(apiKey string) RestClient
func (RestClient) Convert ¶
func (c RestClient) Convert(from string, to string, quantity int) (ConversionResult, error)
func (RestClient) GetMarketStatus ¶
func (c RestClient) GetMarketStatus() (MarketStatus, error)
func (RestClient) GetQuota ¶
func (c RestClient) GetQuota() (Quota, error)
func (RestClient) GetSymbols ¶
func (c RestClient) GetSymbols() ([]string, error)
type SocketClient ¶
type SocketClient struct { ApiKey string // contains filtered or unexported fields }
func CreateSocketClient ¶
func CreateSocketClient(apiKey string) *SocketClient
func (*SocketClient) Connect ¶
func (c *SocketClient) Connect()
func (*SocketClient) Disconnect ¶
func (c *SocketClient) Disconnect()
func (*SocketClient) OnConnection ¶
func (c *SocketClient) OnConnection(callback func())
func (*SocketClient) OnDisconnection ¶
func (c *SocketClient) OnDisconnection(callback func())
func (*SocketClient) OnLoginSuccess ¶
func (c *SocketClient) OnLoginSuccess(callback func())
func (*SocketClient) OnMessage ¶
func (c *SocketClient) OnMessage(callback func(string))
func (*SocketClient) OnUpdate ¶
func (c *SocketClient) OnUpdate(callback func(Quote))
func (*SocketClient) SubscribeTo ¶
func (c *SocketClient) SubscribeTo(symbols []string)
func (*SocketClient) SubscribeToAll ¶
func (c *SocketClient) SubscribeToAll()
func (*SocketClient) UnsubscribeFrom ¶
func (c *SocketClient) UnsubscribeFrom(symbols []string)
func (*SocketClient) UnsubscribeFromAll ¶
func (c *SocketClient) UnsubscribeFromAll()
Click to show internal directories.
Click to hide internal directories.