Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ type Trade struct {
Amount float64
Price float64
Side OrderSide
Period float64 // Period (Funding only)
}

func NewTradeFromRaw(pair string, raw []interface{}) (o *Trade, err error) {
Expand All @@ -610,6 +611,10 @@ func NewTradeFromRaw(pair string, raw []interface{}) (o *Trade, err error) {
Side: side,
}

if len(raw) == 5 {
o.Period = f64ValOrZero(raw[4])
}

return
}

Expand Down