mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: split exchange interface
This commit is contained in:
parent
ee0dcc788b
commit
b544d51772
|
@ -76,9 +76,8 @@ type ExchangeMinimal interface {
|
|||
//go:generate mockgen -destination=mocks/mock_exchange.go -package=mocks . Exchange
|
||||
type Exchange interface {
|
||||
ExchangeMinimal
|
||||
|
||||
ExchangeMarketDataService
|
||||
|
||||
ExchangeAccountService
|
||||
ExchangeTradeService
|
||||
}
|
||||
|
||||
|
@ -90,11 +89,13 @@ type ExchangeOrderQueryService interface {
|
|||
QueryOrderTrades(ctx context.Context, q OrderQuery) ([]Trade, error)
|
||||
}
|
||||
|
||||
type ExchangeTradeService interface {
|
||||
type ExchangeAccountService interface {
|
||||
QueryAccount(ctx context.Context) (*Account, error)
|
||||
|
||||
QueryAccountBalances(ctx context.Context) (BalanceMap, error)
|
||||
}
|
||||
|
||||
type ExchangeTradeService interface {
|
||||
SubmitOrder(ctx context.Context, order SubmitOrder) (createdOrder *Order, err error)
|
||||
|
||||
QueryOpenOrders(ctx context.Context, symbol string) (orders []Order, err error)
|
||||
|
|
Loading…
Reference in New Issue
Block a user