Documentation ¶
Index ¶
- func Check(e error)
- func Close(handler *FileHandler)
- func ConvertDone(message *Done) []byte
- func ConvertMatch(message *Match) []byte
- func ConvertOpen(message *Open) []byte
- func ConvertReceived(message *Received) []byte
- func CreateL2Snapshot(symbol string, json map[string]interface{}) []byte
- func GenerateNewFileName(handler *FileHandler) string
- func ParseTimestamp(ts string) (int64, error)
- func Update(handler *FileHandler) error
- type Activate
- type Change
- type Done
- type FileHandler
- type Heartbeat
- type L2Update
- type Match
- type Open
- type Received
- type Snapshot
- type SubscriptionMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close(handler *FileHandler)
func ConvertReceived ¶
ConvertReceived received to flatbuffer type
func CreateL2Snapshot ¶
func GenerateNewFileName ¶
func GenerateNewFileName(handler *FileHandler) string
func ParseTimestamp ¶
ParseTimestamp parse utc formatted Timestamp to unix nanos
func Update ¶
func Update(handler *FileHandler) error
Types ¶
type Activate ¶
type Activate struct { Type string `json:"type"` ProductID string `json:"product_id"` Timestamp string `json:"Timestamp"` UserID string `json:"user_id"` ProfileID string `json:"profile_id"` OrderID string `json:"order_id"` StopType string `json:"stop_type"` Side string `json:"side"` StopPrice string `json:"stop_price"` Size string `json:"size"` Funds string `json:"funds"` Private bool `json:"private"` }
Activate Exchange activate ordre message
type Change ¶
type Change struct { Type string `json:"type"` Time string `json:"time"` ProductID string `json:"product_id"` Sequence int64 `json:"sequence"` OrderID string `json:"order_id"` NewSize string `json:"new_size"` OldSize string `json:"old_size"` Price string `json:"price"` Side string `json:"side"` }
Change Exchange order change message
type Done ¶
type Done struct { Type string `json:"type"` Time string `json:"time"` ProductID string `json:"product_id"` Sequence int64 `json:"sequence"` OrderID string `json:"order_id"` Price string `json:"price"` Side string `json:"side"` Reason string `json:"reason"` RemainingSize string `json:"remaining_size"` }
Done Exchange order done message
type FileHandler ¶
type Heartbeat ¶
type Heartbeat struct { Type string `json:"type"` Sequence int64 `json:"sequence"` LastTradeID int64 `json:"last_trade_id"` ProductID string `json:"product_id"` Time string `json:"time"` }
Heartbeat Exchange heartbeat message
type L2Update ¶
type L2Update struct { Type string `json:"type"` ProductID string `json:"product_id"` Time string `json:"time"` Changes [][]string `json:"changes"` }
L2Update received from the exchange
type Match ¶
type Match struct { Type string `json:"type"` TradeID int64 `json:"trade_id"` Time string `json:"time"` ProductID string `json:"product_id"` Sequence int64 `json:"sequence"` MakerOrderID string `json:"maker_order_id"` TakerOrderID string `json:"taker_order_id"` Size string `json:"size"` Price string `json:"price"` Side string `json:"side"` }
Match Exchange order match message
type Open ¶
type Open struct { Type string `json:"type"` Time string `json:"time"` ProductID string `json:"product_id"` Sequence int64 `json:"sequence"` OrderID string `json:"order_id"` Price string `json:"price"` RemainingSize string `json:"remaining_size"` Side string `json:"side"` }
Open Exchange open order message
type Received ¶
type Received struct { Type string `json:"type"` Time string `json:"time"` ProductID string `json:"product_id"` Sequence int64 `json:"sequence"` OrderID string `json:"order_id"` Size string `json:"size"` Price string `json:"price"` Side string `json:"side"` OrderType string `json:"order_type"` Funds string `json:"funds"` }
Received Exchange received message:
type Snapshot ¶
type Snapshot struct { Type string `json:"type"` ProductID string `json:"product_id"` Bids [][]string `json:"bids"` Asks [][]string `json:"asks"` }
Snapshot received from the exchange
type SubscriptionMessage ¶
type SubscriptionMessage struct { Type string `json:"type"` ProductIds []string `json:"product_ids"` Channels []string `json:"channels"` }
SubscriptionMessage sent to the exchange
Click to show internal directories.
Click to hide internal directories.