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


Golang field.NewClOrdID函数代码示例

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


在下文中一共展示了NewClOrdID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: SetClOrdID

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

示例2: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m NewOrderSingle) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:quickfixgo,项目名称:examples,代码行数:4,代码来源:NewOrderSingle.generated.go

示例3: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m NoOrders) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:quickfixgo,项目名称:quickfix,代码行数:4,代码来源:ListStatus.generated.go

示例4: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m RegistrationInstructionsResponse) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:RegistrationInstructionsResponse.generated.go

示例5: SetClOrdID

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

示例6: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m OrderMassCancelRequest) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:4,代码来源:OrderMassCancelRequest.generated.go

示例7: SetClOrdID

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

示例8: SetClOrdID

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

示例9: SetClOrdID

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

示例10: SetClOrdID

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

示例11: SetClOrdID

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

示例12: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m SettlementInstructions) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:quickfixgo,项目名称:quickfix,代码行数:4,代码来源:SettlementInstructions.generated.go

示例13: queryClOrdID

func queryClOrdID() field.ClOrdIDField {
	return field.NewClOrdID(queryString("ClOrdID"))
}
开发者ID:quickfixgo,项目名称:examples,代码行数:3,代码来源:console.go

示例14: SetClOrdID

//SetClOrdID sets ClOrdID, Tag 11
func (m NewOrderList) SetClOrdID(v string) {
	m.Set(field.NewClOrdID(v))
}
开发者ID:quickfixgo,项目名称:quickfix,代码行数:4,代码来源:NewOrderList.generated.go

示例15: main

func main() {
	fmt.Println("hello world")

	msg := quickfix.NewMessage()

	group := NewNoOrdersRepeatingGroup()
	order1 := group.Add()
	order1.SetClOrdID(field.ClOrdIDField{FIXString: "1"})

	order2 := group.Add()
	order2.SetClOrdID(field.ClOrdIDField{FIXString: "2"})

	msg.Header.Set(field.NewBeginString(enum.BeginStringFIX42))
	msg.Header.Set(field.NewMsgType(enum.MsgType_NEW_ORDER_CROSS))
	msg.Body.SetGroup(group)

	b, _ := msg.Build()
	fmt.Println(string(b))

	m, err := quickfix.ParseMessage(b)
	if err != nil {
		panic(err)
	}

	g := NewNoOrdersRepeatingGroup()
	m.Body.GetGroup(g)

	fmt.Println(g.Len())

	clordid1, _ := g.Get(0).GetClOrdID()
	clordid2, _ := g.Get(1).GetClOrdID()

	fmt.Println(clordid1)
	fmt.Println(clordid2)

	m, err = quickfix.ParseMessage([]byte("8=FIX.4.29=10835=D34=249=TW52=20160421-14:43:5056=ISLD11=ID21=440=154=138=002000.0055=INTC60=20160421-14:43:5010=004"))
	//	m, err = quickfix.ParseMessage([]byte("8=FIX.4.29=10835=D34=249=TW52=20160421-14:43:5056=ISLD11=ID21=438=002000.0040=154=255=INTC60=20160421-14:43:5010=005"))
	//	m, err = quickfix.ParseMessage([]byte("8=FIX.4.29=11835=D34=249=TW52=20160421-14:43:5056=ISLD11=ID21=438=002000.0040=154=255=INTC58=oh hai60=20160421-14:43:5010=218"))

	if err != nil {
		panic(err)
	}

	nos := newordersingle.FromMessage(m)
	if side, err := nos.GetSide(); err != nil {
		panic(err)
	} else {
		fmt.Printf("Side is %v\n", side)
	}
	nos.SetSide(enum.Side_SELL)
	nos.Set(field.NewText("oh hai"))

	m = nos.ToMessage()
	b, err = m.Build()
	if err != nil {
		panic(err)
	}
	fmt.Println(string(b))

	newNos := newordersingle.New(
		field.NewClOrdID("1234"),
		field.NewHandlInst("1"),
		field.NewSymbol("TSLA"),
		field.NewSide(enum.Side_BUY),
		field.NewOrderQty(100.0),
		field.NewOrdType(enum.OrdType_MARKET),
	)

	//newNos.Set(field.NewTransactTime(time.Now()))
	newNos.Set(field.NewTransactTimeNoMillis(time.Now()))

	m = newNos.ToMessage()
	b, err = m.Build()
	if err != nil {
		panic(err)
	}
	fmt.Println(string(b))
}
开发者ID:cbusbey,项目名称:quickfix,代码行数:78,代码来源:main.go


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