func (f *OrderFactory) NewOrder(tokenBuy Token, amountBuy int64, tokenSell Token, amountSell int64) (*Order, error) {
	o := &Order{}

	o.Id = f.CurrentOrderID
	o.ExchangeAddress = f.Exchange
	o.TokenBuy = tokenBuy.Address
	o.SymbolBuy = tokenBuy.Symbol
	o.TokenSell = tokenSell.Address
	o.SymbolSell = tokenSell.Symbol
	o.AmountBuy = big.NewInt(amountBuy)
	o.AmountSell = big.NewInt(amountSell)
	o.Expires = f.Params.Expires
	o.FeeMake = f.Params.FeeMake
	o.FeeTake = f.Params.FeeTake
	o.Nonce = big.NewInt(int64(f.NonceGenerator.Intn(1000)))
	o.Maker = f.Wallet.Address
	o.Price = 0
	o.Amount = 0
	o.PairID = f.Pair.ID
	o.Sign(f.Wallet)

	log.Printf("Order is equal to %v", o)

	f.OrderNonce++
	f.CurrentOrderID++
	return o, nil
}
// NewOrder creates a new Order object
NewOrder creates a new Order object
// NewOrder creates a new Order object
func (f *OrderFactory) NewOrder(tokenBuy Token, amountBuy int64, tokenSell Token, amountSell int64) (*Order, error) {
	o := &Order{}
	o.Id = f.CurrentOrderID
	o.ExchangeAddress = f.Exchange
	o.TokenBuy = tokenBuy.Address
	o.SymbolBuy = tokenBuy.Symbol
	o.TokenSell = tokenSell.Address
	o.SymbolSell = tokenSell.Symbol
	o.AmountBuy = big.NewInt(amountBuy)
	o.AmountSell = big.NewInt(amountSell)
	o.Expires = f.Params.Expires
	o.FeeMake = f.Params.FeeMake
	o.FeeTake = f.Params.FeeTake
	o.Nonce = big.NewInt(int64(f.NonceGenerator.Intn(1000)))
	o.Maker = f.Wallet.Address
	o.Price = 0
	o.Amount = 0
	o.PairID = f.Pair.ID
	o.Sign(f.Wallet)
	log.Printf("Order is equal to %v", o)
	f.OrderNonce++
	f.CurrentOrderID++
	return o, nil
}
func ( f * OrderFactory ) NewOrder ( tokenBuy Token , amountBuy int64 , tokenSell Token , amountSell int64 ) ( * Order , error ) { o := & Order { } o . Id = f . CurrentOrderID o . ExchangeAddress = f . Exchange o . TokenBuy = tokenBuy . Address o . SymbolBuy = tokenBuy . Symbol o . TokenSell = tokenSell . Address o . SymbolSell = tokenSell . Symbol o . AmountBuy = big . NewInt ( amountBuy ) o . AmountSell = big . NewInt ( amountSell ) o . Expires = f . Params . Expires o . FeeMake = f . Params . FeeMake o . FeeTake = f . Params . FeeTake o . Nonce = big . NewInt ( int64 ( f . NonceGenerator . Intn ( 1000 ) ) ) o . Maker = f . Wallet . Address o . Price = 0 o . Amount = 0 o . PairID = f . Pair . ID o . Sign ( f . Wallet ) log . Printf ( " " , o ) f . OrderNonce ++ f . CurrentOrderID ++ return o , nil }
NewOrder creates a new Order object
NewOrder creates a new Order object