forgefix::fix

Module encode

Source
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:

§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§

Constants§

Functions§