func (t *tOrder) UpdateQuantity(v Value) {
	t.quantity = v.(tFloat64)
}
UpdateQuantity calls by matching engine to set new order quantity
package fastme
import (
	"context"
	"strconv"
	"testing"
	"time"
)
type tFloat64 float64
func (t tFloat64) Add(n Value) Value {
	return t + t.checkNil(n)
}
func (t tFloat64) Sub(n Value) Value {
	return t - t.checkNil(n)
}
func (t tFloat64) Mul(n Value) Value {
	return t * t.checkNil(n)
}
func (t tFloat64) Cmp(n Value) int {
	num := t.checkNil(n)
	switch {
	case t > num:
		return 1
	case t < num:
		return -1
	}
	return 0
}
func (t tFloat64) Sign() int {
	switch {
	case t < 0:
		return -1
	case t > 0:
		return 1
	}
	return 0
}
func (t tFloat64) Hash() string {
	return strconv.FormatFloat(float64(t), 'f', -1, 64)
}
func (t tFloat64) checkNil(v Value) tFloat64 {
	if v != nil {
		return v.(tFloat64)
	}
	return 0
}
type tWallet struct {
	balance map[Asset]tFloat64
	inOrder map[Asset]tFloat64
}
func newWallet() *tWallet {
	return &tWallet{
		balance: make(map[Asset]tFloat64),
		inOrder: make(map[Asset]tFloat64),
	}
}
func (t *tWallet) Balance(ctx context.Context, a Asset) Value {
	if balance, ok := t.balance[a]; ok {
		return balance
	}
	return tFloat64(0)
}
func (t *tWallet) UpdateBalance(ctx context.Context, a Asset, v Value) {
	if v.(tFloat64) == 0 {
		delete(t.balance, a)
		return
	}
	t.balance[a] = v.(tFloat64)
}
func (t *tWallet) InOrder(ctx context.Context, a Asset) Value {
	if inOrder, ok := t.inOrder[a]; ok {
		return inOrder
	}
	return tFloat64(0)
}
func (t *tWallet) UpdateInOrder(ctx context.Context, a Asset, v Value) {
	if v.(tFloat64) == 0 {
		delete(t.inOrder, a)
		return
	}
	t.inOrder[a] = v.(tFloat64)
}
type tOrder struct {
	id       string
	owner    *tWallet
	quantity tFloat64
	price    tFloat64
	sell     bool
}
func newOrder(id string, owner *tWallet, sell bool, qty float64, price float64) *tOrder {
	return &tOrder{
		id:       id,
		owner:    owner,
		sell:     sell,
		quantity: tFloat64(qty),
		price:    tFloat64(price),
	}
}
func (t *tOrder) ID() string {
	return t.id
}
func (t *tOrder) Owner() Wallet {
	return t.owner
}
func (t *tOrder) Sell() bool {
	return t.sell
}
func (t *tOrder) Price() Value {
	return t.price
}
func (t *tOrder) Quantity() Value {
	return t.quantity
}