Created
May 10, 2017 21:20
-
-
Save falconair/63605dd9f92703d836bbfb53705c26e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(FIXSession.isMsgType(fixmap, msgs["NewOrderSingle"])){ | |
const orderid = fix_session.orderid_counter.next(); | |
const ack = fix_session.create_msg(msgs['ExecutionReport']); | |
ack.set(fields['ExecID'],fix_session.execid_counter.next()); | |
ack.set(fields['OrderID'],orderid); | |
ack.set(fields['ClOrdID'],fixmap.get(fields['ClOrdID'])); | |
ack.set(fields['ExecType'], enums[fields['ExecType']]['NEW']); | |
ack.set(fields['ExecTransType'], enums[fields['ExecTransType']]['NEW']); | |
ack.set(fields['OrdStatus'], enums[fields['OrdStatus']]['NEW']); | |
ack.set(fields['Side'], fixmap.get(fields['Side'])); | |
ack.set(fields['Symbol'], fixmap.get(fields['Symbol'])); | |
ack.set(fields['LeavesQty'], fixmap.get(fields['OrderQty'])); | |
ack.set(fields['CumQty'], '0'); | |
ack.set(fields['AvgPx'], '10');//execute everything at $10 | |
heartbeater.write(fix_session.toFIXString(ack)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment