func (op *Operator) ExecuteTrade(o *Order, t *Trade) (*types.Transaction, error) {
	op.OrderTradePairs[t.Hash] = &OrderTradePair{order: o, trade: t}
	err := t.Validate()
	if err != nil {
		return nil, err
	}

	tx, err := op.Exchange.Trade(o, t)
	if err != nil {
		return nil, err
	}

	if o.events != nil {
		o.events <- o.NewOrderExecutedEvent()
	}

	if o.events != nil {
		t.events <- t.NewTradeExecutedEvent()
	}

	fmt.Printf("Successfully execute transaction")
	return tx, nil
}
// Trade executes a settlements transaction. The order and trade payloads need to be signed respectively
// by the Maker and the Taker of the trade. Only the operator account can send a Trade function to the
// Exchange smart contract.
Trade executes a settlements transaction. The order and trade payloads need to be signed respectively
by the Maker and the Taker of the trade. Only the operator account can send a Trade function to the
Exchange smart contract.
// Trade executes a settlements transaction . The order and trade payloads need to be signed respectively // by the Maker and the Taker of the trade . Only the operator account can send a Trade function to the // Exchange smart contract .
func (op *Operator) ExecuteTrade(o *Order, t *Trade) (*types.Transaction, error) {
	op.OrderTradePairs[t.Hash] = &OrderTradePair{order: o, trade: t}
	err := t.Validate()
	if err != nil {
		return nil, err
	}
	tx, err := op.Exchange.Trade(o, t)
	if err != nil {
		return nil, err
	}
	if o.events != nil {
		o.events <- o.NewOrderExecutedEvent()
	}
	if o.events != nil {
		t.events <- t.NewTradeExecutedEvent()
	}
	fmt.Printf("Successfully execute transaction")
	return tx, nil
}
func ( op * Operator ) ExecuteTrade ( o * Order , t * Trade ) ( * types . Transaction , error ) { op . OrderTradePairs [ t . Hash ] = & OrderTradePair { order : o , trade : t } err := t . Validate ( ) if err != nil { return nil , err } tx , err := op . Exchange . Trade ( o , t ) if err != nil { return nil , err } if o . events != nil { o . events <- o . NewOrderExecutedEvent ( ) } if o . events != nil { t . events <- t . NewTradeExecutedEvent ( ) } fmt . Printf ( " " ) return tx , nil }
Trade executes a settlements transaction.
Trade executes a settlements transaction .