types: add exchange name to trade key

This commit is contained in:
c9s 2022-01-07 01:25:07 +08:00
parent e312ec953c
commit d013713c00

View File

@ -185,10 +185,15 @@ func (trade Trade) Liquidity() (o string) {
}
func (trade Trade) Key() TradeKey {
return TradeKey{ID: trade.ID, Side: trade.Side}
return TradeKey{
Exchange: trade.Exchange,
ID: trade.ID,
Side: trade.Side,
}
}
type TradeKey struct {
ID uint64
Side SideType
Exchange ExchangeName
ID uint64
Side SideType
}