Documentation ¶
Index ¶
- Variables
- func Float32Pointer(value float32) *float32
- func Float64Pointer(value float64) *float64
- func Int32Pointer(value int32) *int32
- func Int64Pointer(value int64) *int64
- func IntPointer(value int) *int
- func StringPointer(value string) *string
- type Authentication
- type Event
- type ObjectStream
- type Order
- type Price
- type PrivateParams
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyParams = json.RawMessage("{}")
Functions ¶
func Float32Pointer ¶
func Float64Pointer ¶
func Int32Pointer ¶
func Int64Pointer ¶
func IntPointer ¶
func StringPointer ¶
Types ¶
type Authentication ¶
type Event ¶
type Event struct { Channel string `json:"channel"` Data json.RawMessage `json:"data"` }
Event is wrapper of received event
type ObjectStream ¶
type ObjectStream struct {
// contains filtered or unexported fields
}
ObjectStream is a jsonrpc2.ObjectStream that uses a WebSocket to send and receive JSON-RPC 2.0 objects.
func NewObjectStream ¶
func NewObjectStream(conn *websocket.Conn) ObjectStream
NewObjectStream creates a new jsonrpc2.ObjectStream for sending and receiving JSON-RPC 2.0 objects over a WebSocket.
func (ObjectStream) Close ¶
func (t ObjectStream) Close() error
Close implements jsonrpc2.ObjectStream.
func (ObjectStream) ReadObject ¶
func (t ObjectStream) ReadObject(v interface{}) error
ReadObject implements jsonrpc2.ObjectStream.
func (ObjectStream) WriteObject ¶
func (t ObjectStream) WriteObject(obj interface{}) error
WriteObject implements jsonrpc2.ObjectStream.
type Order ¶
type Order struct { Advanced string `json:"advanced,omitempty"` Amount decimal.Decimal `json:"amount"` API bool `json:"api"` TimeInForce string `json:"time_in_force"` ReduceOnly bool `json:"reduce_only"` ProfitLoss float64 `json:"profit_loss"` Price Price `json:"price"` PostOnly bool `json:"post_only"` StopPrice float64 `json:"stop_price,omitempty"` Triggered bool `json:"triggered,omitempty"` OrderType string `json:"order_type"` OrderState string `json:"order_state"` OrderID string `json:"order_id"` MaxShow float64 `json:"max_show"` LastUpdateTimestamp int64 `json:"last_update_timestamp"` Label string `json:"label"` IsLiquidation bool `json:"is_liquidation"` InstrumentName string `json:"instrument_name"` FilledAmount decimal.Decimal `json:"filled_amount"` Direction string `json:"direction"` CreationTimestamp int64 `json:"creation_timestamp"` Commission float64 `json:"commission"` AveragePrice decimal.Decimal `json:"average_price"` Implv float64 `json:"implv,omitempty"` Usd float64 `json:"usd,omitempty"` }
type PrivateParams ¶
type PrivateParams interface {
SetToken(token string)
}
privateParams is interface for methods require access_token
Click to show internal directories.
Click to hide internal directories.