mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
types: add exchange name to trade key
This commit is contained in:
parent
e312ec953c
commit
d013713c00
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user