add user data stream sync config

This commit is contained in:
c9s 2022-01-27 09:34:04 +08:00
parent 44efbce8eb
commit 30a9a5849f
2 changed files with 7 additions and 1 deletions

View File

@ -20,7 +20,7 @@ sync:
# userDataStream is used to sync the trading data in real-time
# it uses the websocket connection to insert the trades
userDataStream:
trade: true
trades: true
filledOrders: true
# since is the start date of your trading data

View File

@ -167,6 +167,12 @@ type SyncConfig struct {
// Since is the date where you want to start syncing data
Since *types.LooseFormatTime `json:"since,omitempty"`
// UserDataStream is for real-time sync with websocket user data stream
UserDataStream struct {
Trades bool `json:"trades,omitempty" yaml:"trades,omitempty"`
FilledOrders bool `json:"filledOrders,omitempty" yaml:"filledOrders,omitempty"`
} `json:"userDataStream,omitempty" yaml:"userDataStream,omitempty"`
}
type Config struct {