当前位置: 首页>>代码示例>>Golang>>正文


Golang field.NewOrderID函数代码示例

本文整理汇总了Golang中github.com/quickfixgo/quickfix/field.NewOrderID函数的典型用法代码示例。如果您正苦于以下问题:Golang NewOrderID函数的具体用法?Golang NewOrderID怎么用?Golang NewOrderID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NewOrderID函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
}
开发者ID:quickfixgo,项目名称:examples,代码行数:27,代码来源:ordermatch.go

示例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)
}
开发者ID:cbusbey,项目名称:examples,代码行数:21,代码来源:ordermatch.go

示例3: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m OrderCancelReject) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:OrderCancelReject.generated.go

示例4: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m NoOrders) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:quickfixgo,项目名称:quickfix,代码行数:4,代码来源:ConfirmationRequest.generated.go

示例5: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m Email) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:Email.generated.go

示例6: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m DontKnowTrade) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:quickfixgo,项目名称:quickfix,代码行数:4,代码来源:DontKnowTrade.generated.go

示例7: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m OrderCancelReplaceRequest) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:OrderCancelReplaceRequest.generated.go

示例8: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m OrderStatusRequest) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:OrderStatusRequest.generated.go

示例9: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m TradeCaptureReportRequest) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:TradeCaptureReportRequest.generated.go

示例10: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m CrossOrderCancelRequest) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:CrossOrderCancelRequest.generated.go

示例11: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m ExecutionReport) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:quickfixgo,项目名称:examples,代码行数:4,代码来源:ExecutionReport.generated.go

示例12: genOrderID

func (e *executor) genOrderID() field.OrderIDField {
	e.orderID++
	return field.NewOrderID(strconv.Itoa(e.orderID))
}
开发者ID:quickfixgo,项目名称:examples,代码行数:4,代码来源:executor.go

示例13: SetOrderID

//SetOrderID sets OrderID, Tag 37
func (m NoMDEntries) SetOrderID(v string) {
	m.Set(field.NewOrderID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:MarketDataSnapshotFullRefresh.generated.go


注:本文中的github.com/quickfixgo/quickfix/field.NewOrderID函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。