Documentation ¶
Index ¶
Constants ¶
View Source
const BaseURL = "wss://ws.lightstream.bitflyer.com/json-rpc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMessage ¶
type AuthMessage struct { JsonRPC string `json:"jsonrpc"` Method string `json:"method"` Params auth.Params `json:"params"` ID int `json:"id"` }
func NewAuthMessage ¶
func NewAuthMessage(param *auth.Auth) *AuthMessage
type BoardResponse ¶
type Channel ¶
type Channel struct { ProductCode types.ProductCode Event Event }
type ChildOrderEvent ¶
type ChildOrderEvent struct { ProductCode types.ProductCode `json:"product_code"` ChildOrderID string `json:"child_order_id"` ChildOrderAcceptanceID string `json:"child_order_acceptance_id"` EventDate time.BitFlyerTime `json:"event_date"` EventType EventType `json:"event_type"` ChildOrderType types.ChildOrderType `json:"child_order_type"` ExpireDate time.BitFlyerTime `json:"expire_date"` Reason string `json:"reason"` ExecID int `json:"exec_id"` Side types.Side `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` Commission float64 `json:"commission"` SFD float64 `json:"sfd"` }
type ChildOrderEventsResponse ¶
type ChildOrderEventsResponse struct { JsonRpc string `json:"jsonrpc"` Method string `json:"method"` Params struct { Channel string `json:"channel"` Message []ChildOrderEvent `json:"message"` } `json:"params"` }
type ExecutionsResponse ¶
type ExecutionsResponse struct { JsonRpc string `json:"jsonrpc"` Method string `json:"method"` Params struct { Channel string `json:"channel"` Message executions.Response `json:"message"` } `json:"params"` }
type JsonRpcClient ¶
type JsonRpcClient struct { Channels []Channel // contains filtered or unexported fields }
func New ¶
func New() *JsonRpcClient
func (*JsonRpcClient) AddChannel ¶
func (c *JsonRpcClient) AddChannel(channel Channel) *JsonRpcClient
func (*JsonRpcClient) Auth ¶
func (c *JsonRpcClient) Auth(auth *auth.Auth) *JsonRpcClient
func (*JsonRpcClient) ReceiveMessage ¶
func (c *JsonRpcClient) ReceiveMessage(ch chan Response)
type ParentOrderEvent ¶
type ParentOrderEvent struct { ProductCode types.ProductCode `json:"product_code"` ParentOrderID string `json:"parent_order_id"` ParentOrderAcceptanceID string `json:"parent_order_acceptance_id"` EventDate time.BitFlyerTime `json:"event_date"` EventType EventType `json:"event_type"` ParentOrderType string `json:"parent_order_type"` Reason string `json:"reason"` ChildOrderType types.ChildOrderType `json:"child_order_type"` ParameterIndex int `json:"parameter_index"` ChildOrderAcceptanceID string `json:"child_order_acceptance_id"` Side types.Side `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` ExpireDate time.BitFlyerTime `json:"expire_date"` }
type ParentOrderEventsResponse ¶
type ParentOrderEventsResponse struct { JsonRpc string `json:"jsonrpc"` Method string `json:"method"` Params struct { Channel string `json:"channel"` Message []ParentOrderEvent `json:"message"` } `json:"params"` }
type Response ¶
type Response struct { Event Event Error error Board board.Response BoardSnapshot board.Response Ticker ticker.Response Executions executions.Response ChildOrderEvents []ChildOrderEvent ParentOrderEvents []ParentOrderEvent }
type SubscribeMessage ¶
type SubscribeMessage struct { JsonRPC string `json:"jsonrpc"` Method string `json:"method"` Params struct { Channel string `json:"channel"` } `json:"params"` }
func NewSubscribeMessage ¶
func NewSubscribeMessage(channel Channel) *SubscribeMessage
Click to show internal directories.
Click to hide internal directories.