func FTEFromRaw(pair string, raw []interface{}) (FundingTradeExecuted, error) {
	ft, err := FTFromRaw(pair, raw)
	if err != nil {
		return FundingTradeExecuted{}, err
	}
	return FundingTradeExecuted(ft), nil
}
FTEFromRaw maps raw data slice to instance of FundingTradeExecuted
package trades
import (
	"fmt"
	"github.com/bitfinexcom/bitfinex-api-go/pkg/convert"
)
type FundingTrade struct {
	Symbol string
	ID     int64
	MTS    int64
	Amount float64
	Rate   float64
	Period int
}
type FundingTradeExecutionUpdate FundingTrade
type FundingTradeExecuted FundingTrade
type FundingTradeSnapshot struct {
	Snapshot []FundingTrade
}
func FTFromRaw(pair string, raw []interface{}) (t FundingTrade, err error) {
	if len(raw) >= 5 {
		t = FundingTrade{
			Symbol: pair,
			ID:     convert.I64ValOrZero(raw[0]),
			MTS:    convert.I64ValOrZero(raw[1]),
			Amount: convert.F64ValOrZero(raw[2]),
			Rate:   convert.F64ValOrZero(raw[3]),
			Period: convert.ToInt(raw[4]),
		}
		return
	}
	err = fmt.Errorf("data slice too short: %#v", raw)
	return
}