func TEUFromRaw(pair string, raw []interface{}) (TradeExecutionUpdate, error) {
	t, err := TFromRaw(pair, raw)
	if err != nil {
		return TradeExecutionUpdate{}, err
	}
	return TradeExecutionUpdate(t), nil
}
TEUFromRaw maps raw data slice to instance of TradeExecutionUpdate
package trades
import (
	"fmt"
	"github.com/bitfinexcom/bitfinex-api-go/pkg/convert"
)
type Trade struct {
	Pair   string
	ID     int64
	MTS    int64
	Amount float64
	Price  float64
}
type TradeExecutionUpdate Trade
type TradeExecuted Trade
type TradeSnapshot struct {
	Snapshot []Trade
}
func TFromRaw(pair string, raw []interface{}) (t Trade, err error) {
	if len(raw) >= 4 {
		t = Trade{
			Pair:   pair,
			ID:     convert.I64ValOrZero(raw[0]),
			MTS:    convert.I64ValOrZero(raw[1]),
			Amount: convert.F64ValOrZero(raw[2]),
			Price:  convert.F64ValOrZero(raw[3]),
		}
		return
	}
	err = fmt.Errorf("data slice too short: %#v", raw)
	return
}