Expand description
Message building and encoding.
FIX messages can be easily built using the MessageBuilder. The MessageBuilder can be
given any number of tag/value pairs. It is recommended to use Tags for tags, and the
following for values:
MsgTypeforMsgType(35)- generated enums for FIX enumerations
SerializedIntfor integer valuesb"..."for ASCII fields like text and floats (see FIX dictionary)
§Example
use forgefix::fix::encode::{MessageBuilder, SerializedInt};
use forgefix::fix::generated::{self, MsgType, Tags};
let builder = MessageBuilder::new("FIX.4.2", MsgType::ORDER_SINGLE.into())
.push(Tags::Account, b"my-account-num")
.push(Tags::OrderQty, SerializedInt::from(1u32).as_bytes())
.push(Tags::OrdType, generated::OrdType::LIMIT.into())
.push(Tags::Price, b"10.42")
.push(Tags::Symbol, b"TICKER SYMBOL");
Structs§
- A struct for building FIX messages.
Constants§
- The time format string represented in chrono format syntax
Functions§
- Returns the current time in
TIME_FORMAT