mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
add orderType parameter
This commit is contained in:
parent
729d32af70
commit
904491e750
|
@ -36,6 +36,6 @@ exchangeStrategies:
|
|||
MAX: 15%
|
||||
USDT: 10%
|
||||
threshold: 1%
|
||||
# max amount to buy or sell per order
|
||||
maxAmount: 1_000
|
||||
maxAmount: 1_000 # max amount to buy or sell per order
|
||||
orderType: LIMIT_MAKER # LIMIT, LIMIT_MAKER or MARKET
|
||||
dryRun: false
|
||||
|
|
|
@ -24,9 +24,9 @@ type Strategy struct {
|
|||
QuoteCurrency string `json:"quoteCurrency"`
|
||||
TargetWeights types.ValueMap `json:"targetWeights"`
|
||||
Threshold fixedpoint.Value `json:"threshold"`
|
||||
MaxAmount fixedpoint.Value `json:"maxAmount"` // max amount to buy or sell per order
|
||||
OrderType types.OrderType `json:"orderType"`
|
||||
DryRun bool `json:"dryRun"`
|
||||
// max amount to buy or sell per order
|
||||
MaxAmount fixedpoint.Value `json:"maxAmount"`
|
||||
|
||||
activeOrderBook *bbgo.ActiveOrderBook
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ func (s *Strategy) generateSubmitOrders(ctx context.Context, session *bbgo.Excha
|
|||
order := types.SubmitOrder{
|
||||
Symbol: symbol,
|
||||
Side: side,
|
||||
Type: types.OrderTypeLimit,
|
||||
Type: s.OrderType,
|
||||
Quantity: quantity,
|
||||
Price: currentPrice,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user