OrderBookStatus.go 403 B

1234567891011121314151617181920
  1. package response
  2. import (
  3. "encoding/xml"
  4. )
  5. type OrderBookStatusEvent struct {
  6. XMLName xml.Name `xml:"orderBookStatus"`
  7. InstrumentId int64 `xml:"id"`
  8. OrderBookStatus string `xml:"status"`
  9. }
  10. func NewOrderBookStatusEvent(eventData string) *OrderBookStatusEvent {
  11. r := OrderBookStatusEvent{}
  12. err := xml.Unmarshal([]byte(eventData), &r)
  13. if err != nil {
  14. return nil
  15. }
  16. return &r
  17. }