當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。