dev 5
This commit is contained in:
@@ -30,18 +30,14 @@ func (c *Client) Passorder(ctx context.Context, req PassorderRequest) (*OrderRef
|
||||
}
|
||||
|
||||
// PassorderLatest 按最新价下单,不附加策略订单号。
|
||||
func (c *Client) PassorderLatest(ctx context.Context, buy bool, stock string, volume int) (*OrderRefResult, error) {
|
||||
return c.PassorderLatestTagged(ctx, buy, stock, volume, "")
|
||||
func (c *Client) PassorderLatest(ctx context.Context, side int, stock string, volume int) (*OrderRefResult, error) {
|
||||
return c.PassorderLatestTagged(ctx, side, stock, volume, "")
|
||||
}
|
||||
|
||||
// PassorderLatestTagged 使用 strategyName 将本地唯一订单号传给 QMT。
|
||||
func (c *Client) PassorderLatestTagged(ctx context.Context, buy bool, stock string, volume int, orderID string) (*OrderRefResult, error) {
|
||||
op := OpSell
|
||||
if buy {
|
||||
op = OpBuy
|
||||
}
|
||||
func (c *Client) PassorderLatestTagged(ctx context.Context, side int, stock string, volume int, orderID string) (*OrderRefResult, error) {
|
||||
return c.Passorder(ctx, PassorderRequest{
|
||||
OpType: op,
|
||||
OpType: side,
|
||||
OrderType: OrderTypeVolume,
|
||||
Stock: stock,
|
||||
PrType: PrTypeLatest,
|
||||
|
||||
Reference in New Issue
Block a user