本文整理汇总了Golang中github.com/quickfixgo/quickfix/fix/field.NewBeginString函数的典型用法代码示例。如果您正苦于以下问题:Golang NewBeginString函数的具体用法?Golang NewBeginString怎么用?Golang NewBeginString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewBeginString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Builder
//Builder returns an initialized MessageBuilder with specified required fields for Allocation.
func Builder(
allocid *field.AllocIDField,
alloctranstype *field.AllocTransTypeField,
noorders *field.NoOrdersField,
side *field.SideField,
symbol *field.SymbolField,
shares *field.SharesField,
avgpx *field.AvgPxField,
tradedate *field.TradeDateField,
noallocs *field.NoAllocsField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX40))
builder.Header().Set(field.NewMsgType("J"))
builder.Body().Set(allocid)
builder.Body().Set(alloctranstype)
builder.Body().Set(noorders)
builder.Body().Set(side)
builder.Body().Set(symbol)
builder.Body().Set(shares)
builder.Body().Set(avgpx)
builder.Body().Set(tradedate)
builder.Body().Set(noallocs)
return builder
}
示例2: Builder
//Builder returns an initialized MessageBuilder with specified required fields for PositionMaintenanceReport.
func Builder(
posmaintrptid *field.PosMaintRptIDField,
postranstype *field.PosTransTypeField,
posmaintaction *field.PosMaintActionField,
origposreqrefid *field.OrigPosReqRefIDField,
posmaintstatus *field.PosMaintStatusField,
clearingbusinessdate *field.ClearingBusinessDateField,
account *field.AccountField,
accounttype *field.AccountTypeField,
transacttime *field.TransactTimeField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX44))
builder.Header().Set(field.NewMsgType("AM"))
builder.Body().Set(posmaintrptid)
builder.Body().Set(postranstype)
builder.Body().Set(posmaintaction)
builder.Body().Set(origposreqrefid)
builder.Body().Set(posmaintstatus)
builder.Body().Set(clearingbusinessdate)
builder.Body().Set(account)
builder.Body().Set(accounttype)
builder.Body().Set(transacttime)
return builder
}
示例3: fillDefaultHeader
func (s *Session) fillDefaultHeader(builder MessageBuilder) {
builder.Header().Set(field.NewBeginString(s.sessionID.BeginString))
builder.Header().Set(field.NewSenderCompID(s.sessionID.SenderCompID))
builder.Header().Set(field.NewTargetCompID(s.sessionID.TargetCompID))
s.insertSendingTime(builder.Header())
}
示例4: Builder
//Builder returns an initialized MessageBuilder with specified required fields for NewOrderList.
func Builder(
listid *field.ListIDField,
listseqno *field.ListSeqNoField,
listnoords *field.ListNoOrdsField,
clordid *field.ClOrdIDField,
handlinst *field.HandlInstField,
symbol *field.SymbolField,
side *field.SideField,
orderqty *field.OrderQtyField,
ordtype *field.OrdTypeField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX40))
builder.Header().Set(field.NewMsgType("E"))
builder.Body().Set(listid)
builder.Body().Set(listseqno)
builder.Body().Set(listnoords)
builder.Body().Set(clordid)
builder.Body().Set(handlinst)
builder.Body().Set(symbol)
builder.Body().Set(side)
builder.Body().Set(orderqty)
builder.Body().Set(ordtype)
return builder
}
示例5: Builder
//Builder returns an initialized MessageBuilder with specified required fields for AssignmentReport.
func Builder(
asgnrptid *field.AsgnRptIDField,
accounttype *field.AccountTypeField,
settlprice *field.SettlPriceField,
settlpricetype *field.SettlPriceTypeField,
underlyingsettlprice *field.UnderlyingSettlPriceField,
assignmentmethod *field.AssignmentMethodField,
openinterest *field.OpenInterestField,
exercisemethod *field.ExerciseMethodField,
settlsessid *field.SettlSessIDField,
settlsesssubid *field.SettlSessSubIDField,
clearingbusinessdate *field.ClearingBusinessDateField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX44))
builder.Header().Set(field.NewMsgType("AW"))
builder.Body().Set(asgnrptid)
builder.Body().Set(accounttype)
builder.Body().Set(settlprice)
builder.Body().Set(settlpricetype)
builder.Body().Set(underlyingsettlprice)
builder.Body().Set(assignmentmethod)
builder.Body().Set(openinterest)
builder.Body().Set(exercisemethod)
builder.Body().Set(settlsessid)
builder.Body().Set(settlsesssubid)
builder.Body().Set(clearingbusinessdate)
return builder
}
示例6: Builder
//Builder returns an initialized MessageBuilder with specified required fields for Heartbeat.
func Builder() MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX40))
builder.Header().Set(field.NewMsgType("0"))
return builder
}
示例7: Builder
//Builder returns an initialized MessageBuilder with specified required fields for ExecutionReport.
func Builder(
orderid *field.OrderIDField,
execid *field.ExecIDField,
exectranstype *field.ExecTransTypeField,
ordstatus *field.OrdStatusField,
symbol *field.SymbolField,
side *field.SideField,
orderqty *field.OrderQtyField,
lastshares *field.LastSharesField,
lastpx *field.LastPxField,
cumqty *field.CumQtyField,
avgpx *field.AvgPxField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX40))
builder.Header().Set(field.NewMsgType("8"))
builder.Body().Set(orderid)
builder.Body().Set(execid)
builder.Body().Set(exectranstype)
builder.Body().Set(ordstatus)
builder.Body().Set(symbol)
builder.Body().Set(side)
builder.Body().Set(orderqty)
builder.Body().Set(lastshares)
builder.Body().Set(lastpx)
builder.Body().Set(cumqty)
builder.Body().Set(avgpx)
return builder
}
示例8: Builder
//Builder returns an initialized MessageBuilder with specified required fields for SecurityList.
func Builder() MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIXT11))
builder.Header().Set(field.NewDefaultApplVerID(enum.ApplVerID_FIX50SP2))
builder.Header().Set(field.NewMsgType("y"))
return builder
}
示例9: queryVersion
func queryVersion() (*field.BeginStringField, error) {
fmt.Println()
fmt.Println("1) FIX.4.0")
fmt.Println("2) FIX.4.1")
fmt.Println("3) FIX.4.2")
fmt.Println("4) FIX.4.3")
fmt.Println("5) FIX.4.4")
fmt.Println("6) FIXT.1.1 (FIX.5.0)")
fmt.Print("BeginString: ")
scanner := bufio.NewScanner(os.Stdin)
if !scanner.Scan() {
return nil, scanner.Err()
}
switch scanner.Text() {
case "1":
return field.NewBeginString(fix.BeginString_FIX40), nil
case "2":
return field.NewBeginString(fix.BeginString_FIX41), nil
case "3":
return field.NewBeginString(fix.BeginString_FIX42), nil
case "4":
return field.NewBeginString(fix.BeginString_FIX43), nil
case "5":
return field.NewBeginString(fix.BeginString_FIX44), nil
case "6":
return field.NewBeginString(fix.BeginString_FIXT11), nil
case "7":
return field.NewBeginString("A"), nil
}
return nil, fmt.Errorf("unknown BeginString choice: %v", scanner.Text())
}
示例10: Builder
//Builder returns an initialized MessageBuilder with specified required fields for QuoteAcknowledgement.
func Builder(
quoteackstatus *field.QuoteAckStatusField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX42))
builder.Header().Set(field.NewMsgType("b"))
builder.Body().Set(quoteackstatus)
return builder
}
示例11: Builder
//Builder returns an initialized MessageBuilder with specified required fields for SecurityStatus.
func Builder(
symbol *field.SymbolField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX42))
builder.Header().Set(field.NewMsgType("f"))
builder.Body().Set(symbol)
return builder
}
示例12: Builder
//Builder returns an initialized MessageBuilder with specified required fields for BidResponse.
func Builder(
nobidcomponents *field.NoBidComponentsField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX44))
builder.Header().Set(field.NewMsgType("l"))
builder.Body().Set(nobidcomponents)
return builder
}
示例13: Builder
//Builder returns an initialized MessageBuilder with specified required fields for Quote.
func Builder(
quoteid *field.QuoteIDField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX43))
builder.Header().Set(field.NewMsgType("S"))
builder.Body().Set(quoteid)
return builder
}
示例14: Builder
//Builder returns an initialized MessageBuilder with specified required fields for SecurityTypeRequest.
func Builder(
securityreqid *field.SecurityReqIDField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX43))
builder.Header().Set(field.NewMsgType("v"))
builder.Body().Set(securityreqid)
return builder
}
示例15: Builder
//Builder returns an initialized MessageBuilder with specified required fields for ListStatusRequest.
func Builder(
listid *field.ListIDField) MessageBuilder {
var builder MessageBuilder
builder.MessageBuilder = quickfix.NewMessageBuilder()
builder.Header().Set(field.NewBeginString(fix.BeginString_FIX41))
builder.Header().Set(field.NewMsgType("M"))
builder.Body().Set(listid)
return builder
}