This commit is contained in:
2026-08-26 16:37:06 +08:00
parent 566a07fea8
commit c30c1541d2
9 changed files with 331 additions and 638 deletions

View File

@@ -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,