mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
maxapi: volume, side, market is always required for creating orders
This commit is contained in:
parent
2da633c221
commit
48c84824cf
|
@ -499,14 +499,10 @@ func (r *CreateOrderRequest) ClientOrderID(clientOrderID string) *CreateOrderReq
|
|||
}
|
||||
|
||||
func (r *CreateOrderRequest) Do(ctx context.Context) (order *Order, err error) {
|
||||
var payload = map[string]interface{}{}
|
||||
|
||||
if r.market != nil {
|
||||
payload["market"] = r.market
|
||||
}
|
||||
|
||||
if r.volume != nil {
|
||||
payload["volume"] = r.volume
|
||||
var payload = map[string]interface{}{
|
||||
"market": r.market,
|
||||
"volume": r.volume,
|
||||
"side": r.side,
|
||||
}
|
||||
|
||||
if r.price != nil {
|
||||
|
@ -517,10 +513,6 @@ func (r *CreateOrderRequest) Do(ctx context.Context) (order *Order, err error) {
|
|||
payload["stop_price"] = r.stopPrice
|
||||
}
|
||||
|
||||
if r.side != nil {
|
||||
payload["side"] = r.side
|
||||
}
|
||||
|
||||
if r.orderType != nil {
|
||||
payload["ord_type"] = r.orderType
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user