-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsg_massquote.h
28 lines (26 loc) · 1.2 KB
/
msg_massquote.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "fix_builder.h"
#include "fixed.h"
struct MassQuote {
constexpr const static char * msgType = "i";
template <int nPlaces=7> static void build(FixBuilder& fix,const std::string_view& quoteId, const std::string_view& quoteEntryId, const std::string_view& symbol,Fixed<nPlaces> bidPrice,Fixed<nPlaces> bidQty,Fixed<nPlaces> offerPrice,Fixed<nPlaces> offerQty) {
fix.addField(117,quoteId);
fix.addField(301,2); // request ack on each quote
fix.addField(296,1);// 1 QuoteSet
fix.addField(302,quoteId);// QuoteSet ID
fix.addField(304,1);// total number of quote entries in the set across all messages
fix.addField(295,1);// number of quote entries in this set
fix.addField(299,quoteEntryId);// number of quote entries in this set
fix.addField(55,symbol);
fix.addField(132,bidPrice);
fix.addField(133,offerPrice);
fix.addField(134,bidQty);
fix.addField(135,offerQty);
}
};
struct MassQuoteAck {
constexpr const static char * msgType = "b";
static void build(FixBuilder& fix,const std::string_view& quoteId, int quoteStatus) {
fix.addField(117,quoteId);
fix.addField(297,quoteStatus);
}
};