本文整理汇总了Golang中github.com/quickfixgo/quickfix/field.NewExecID函数的典型用法代码示例。如果您正苦于以下问题:Golang NewExecID函数的具体用法?Golang NewExecID怎么用?Golang NewExecID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewExecID函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: updateOrder
func (a *Application) updateOrder(order internal.Order, status enum.OrdStatus) {
execReport := executionreport.New(
field.NewOrderID(order.ClOrdID),
field.NewExecID(a.genExecID()),
field.NewExecTransType(enum.ExecTransType_NEW),
field.NewExecType(enum.ExecType(status)),
field.NewOrdStatus(status),
field.NewSymbol(order.Symbol),
field.NewSide(order.Side),
field.NewLeavesQty(order.OpenQuantity(), 2),
field.NewCumQty(order.ExecutedQuantity, 2),
field.NewAvgPx(order.AvgPx, 2),
)
execReport.SetOrderQty(order.Quantity, 2)
execReport.SetClOrdID(order.ClOrdID)
switch status {
case enum.OrdStatus_FILLED, enum.OrdStatus_PARTIALLY_FILLED:
execReport.SetLastShares(order.LastExecutedQuantity, 2)
execReport.SetLastPx(order.LastExecutedPrice, 2)
}
execReport.Header.SetTargetCompID(order.SenderCompID)
execReport.Header.SetSenderCompID(order.TargetCompID)
quickfix.Send(execReport)
}
示例2: updateOrder
func (a *Application) updateOrder(order Order, status string) {
execReport := executionreport.New(
field.NewOrderID(order.ClOrdID),
field.NewExecID(a.genExecID()),
field.NewExecTransType(enum.ExecTransType_NEW),
field.NewExecType(status),
field.NewOrdStatus(status),
field.NewSymbol(order.Symbol),
field.NewSide(order.Side),
field.NewLeavesQty(order.OpenQuantity()),
field.NewCumQty(order.ExecutedQuantity),
field.NewAvgPx(order.AvgPx),
)
execReport.SetOrderQty(order.Quantity)
execReport.SetClOrdID(order.ClOrdID)
execReport.Header.SetTargetCompID(order.SenderCompID)
execReport.Header.SetSenderCompID(order.TargetCompID)
quickfix.Send(execReport)
}
示例3: SetExecID
//SetExecID sets ExecID, Tag 17
func (m NoExecs) SetExecID(v string) {
m.Set(field.NewExecID(v))
}
示例4: SetExecID
//SetExecID sets ExecID, Tag 17
func (m DontKnowTrade) SetExecID(v string) {
m.Set(field.NewExecID(v))
}
示例5: SetExecID
//SetExecID sets ExecID, Tag 17
func (m TradeCaptureReportRequest) SetExecID(v string) {
m.Set(field.NewExecID(v))
}
示例6: SetExecID
//SetExecID sets ExecID, Tag 17
func (m ExecutionReport) SetExecID(v string) {
m.Set(field.NewExecID(v))
}
示例7: genExecID
func (e *executor) genExecID() field.ExecIDField {
e.execID++
return field.NewExecID(strconv.Itoa(e.execID))
}