defcon-fixparser
Version:
FIX 5.0SP2 Parser
1 lines • 7.92 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FIXParser=t():e.FIXParser=t()}(global,(function(){return function(e){var t={};function d(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,d),i.l=!0,i.exports}return d.m=e,d.c=t,d.d=function(e,t,n){d.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.t=function(e,t){if(1&t&&(e=d(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(d.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)d.d(n,i,function(t){return e[t]}.bind(null,i));return n},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,"a",t),t},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.p="",d(d.s=23)}([function(e,t){e.exports=require("events")},function(e,t,d){"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}},function(e,t,d){"use strict";const n=d(8);n.createWebSocketStream=d(21),n.Server=d(22),n.Receiver=d(10),n.Sender=d(12),e.exports=n},function(e,t){e.exports=require("net")},function(e,t,d){"use strict";const n=d(18),i=d(5),a=d(19),{kStatusCode:o,NOOP:s}=d(1),r=Buffer.from([0,0,255,255]),p=Symbol("permessage-deflate"),c=Symbol("total-length"),l=Symbol("callback"),m=Symbol("buffers"),I=Symbol("error");let f;function u(e){this[m].push(e),this[c]+=e.length}function g(e){this[c]+=e.length,this[p]._maxPayload<1||this[c]<=this[p]._maxPayload?this[m].push(e):(this[I]=new RangeError("Max payload size exceeded"),this[I][o]=1009,this.removeListener("data",g),this.reset())}function T(e){this[p]._inflate=null,e[o]=1007,this[l](e)}e.exports=class{constructor(e,t,d){if(this._maxPayload=0|d,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!f){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;f=new a(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate&&(this._deflate[l]&&this._deflate[l](),this._deflate.close(),this._deflate=null)}acceptAsServer(e){const t=this._options,d=e.find(e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits));if(!d)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(d.server_no_context_takeover=!0),t.clientNoContextTakeover&&(d.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(d.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?d.client_max_window_bits=t.clientMaxWindowBits:!0!==d.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete d.client_max_window_bits,d}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let d=e[t];if(d.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(d=d[0],"client_max_window_bits"===t){if(!0!==d){const e=+d;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${d}`);d=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${d}`)}else if("server_max_window_bits"===t){const e=+d;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${d}`);d=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==d)throw new TypeError(`Invalid value for parameter "${t}": ${d}`)}e[t]=d})}),e}decompress(e,t,d){f.add(n=>{this._decompress(e,t,(e,t)=>{n(),d(e,t)})})}compress(e,t,d){f.add(n=>{this._compress(e,t,(e,t)=>{n(),(e||t)&&d(e,t)})})}_decompress(e,t,d){const a=this._isServer?"client":"server";if(!this._inflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[p]=this,this._inflate[c]=0,this._inflate[m]=[],this._inflate.on("error",T),this._inflate.on("data",g)}this._inflate[l]=d,this._inflate.write(e),t&&this._inflate.write(r),this._inflate.flush(()=>{const e=this._inflate[I];if(e)return this._inflate.close(),this._inflate=null,void d(e);const n=i.concat(this._inflate[m],this._inflate[c]);t&&this.params[`${a}_no_context_takeover`]?(this._inflate.close(),this._inflate=null):(this._inflate[c]=0,this._inflate[m]=[]),d(null,n)})}_compress(e,t,d){const a=this._isServer?"server":"client";if(!this._deflate){const e=`${a}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[c]=0,this._deflate[m]=[],this._deflate.on("error",s),this._deflate.on("data",u)}this._deflate[l]=d,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[m],this._deflate[c]);t&&(e=e.slice(0,e.length-4)),this._deflate[l]=null,t&&this.params[`${a}_no_context_takeover`]?(this._deflate.close(),this._deflate=null):(this._deflate[c]=0,this._deflate[m]=[]),d(null,e)})}}},function(e,t,d){"use strict";const{EMPTY_BUFFER:n}=d(1);function i(e,t){if(0===e.length)return n;if(1===e.length)return e[0];const d=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const n=e[t];d.set(n,i),i+=n.length}return i<t?d.slice(0,i):d}function a(e,t,d,n,i){for(let a=0;a<i;a++)d[n+a]=e[a]^t[3&a]}function o(e,t){const d=e.length;for(let n=0;n<d;n++)e[n]^=t[3&n]}function s(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function r(e){if(r.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=function(e){const t=Buffer.from(e.buffer);if(e.byteLength!==e.buffer.byteLength)return t.slice(e.byteOffset,e.byteOffset+e.byteLength);return t}(e):(t=Buffer.from(e),r.readOnly=!1),t}try{const t=d(!function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()),n=t.BufferUtil||t;e.exports={concat:i,mask(e,t,d,i,o){o<48?a(e,t,d,i,o):n.mask(e,t,d,i,o)},toArrayBuffer:s,toBuffer:r,unmask(e,t){e.length<32?o(e,t):n.unmask(e,t)}}}catch(t){e.exports={concat:i,mask:a,toArrayBuffer:s,toBuffer:r,unmask:o}}},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("crypto")},function(e,t,d){"use strict";const n=d(0),i=d(15),a=d(9),o=d(3),s=d(16),{randomBytes:r,createHash:p}=d(7),{URL:c}=d(17),l=d(4),m=d(10),I=d(12),{BINARY_TYPES:f,EMPTY_BUFFER:u,GUID:g,kStatusCode:T,kWebSocket:D,NOOP:h}=d(1),{addEventListener:y,removeEventListener:v}=d(20),{format:F,parse:q}=d(13),{toBuffer:X}=d(5),x=["CONNECTING","OPEN","CLOSING","CLOSED"],b=[8,13];class S extends n{constructor(e,t,d){super(),this.readyState=S.CONNECTING,this.protocol="",this._binaryType=f[0],this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._closeCode=1006,this._extensions={},this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(t)?t=t.join(", "):"object"==typeof t&&null!==t&&(d=t,t=void 0),function e(t,d,n,o){const s={protocolVersion:b[1],maxPayload:104857600,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...o,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,auth:void 0,host:void 0,path:void 0,port:void 0};if(!b.includes(s.protocolVersion))throw new RangeError(`Unsupported protocol version: ${s.protocolVersion} `+`(supported versions: ${b.join(", ")})`);let m;d instanceof c?(m=d,t.url=d.href):(m=new c(d),t.url=d);const I="ws+unix:"===m.protocol;if(!(m.host||I&&m.pathname))throw new Error(`Invalid URL: ${t.url}`);const f="wss:"===m.protocol||"https:"===m.protocol,u=f?443:80,T=r(16).toString("base64"),D=f?i.get:a.get;let h;s.createConnection=f?A:P,s.defaultPort=s.defaultPort||u,s.port=m.port||u,s.host=m.hostname.startsWith("[")?m.hostname.slice(1,-1):m.hostname,s.headers={"Sec-WebSocket-Version":s.protocolVersion,"Sec-WebSocket-Key":T,Connection:"Upgrade",Upgrade:"websocket",...s.headers},s.path=m.pathname+m.search,s.timeout=s.handshakeTimeout,s.perMessageDeflate&&(h=new l(!0!==s.perMessageDeflate?s.perMessageDeflate:{},!1,s.maxPayload),s.headers["Sec-WebSocket-Extensions"]=F({[l.extensionName]:h.offer()}));n&&(s.headers["Sec-WebSocket-Protocol"]=n);s.origin&&(s.protocolVersion<13?s.headers["Sec-WebSocket-Origin"]=s.origin:s.headers.Origin=s.origin);(m.username||m.password)&&(s.auth=`${m.username}:${m.password}`);if(I){const e=s.path.split(":");s.socketPath=e[0],s.path=e[1]}let y=t._req=D(s);s.timeout&&y.on("timeout",()=>{N(t,y,"Opening handshake has timed out")});y.on("error",e=>{t._req.aborted||(y=t._req=null,t.readyState=S.CLOSING,t.emit("error",e),t.emitClose())}),y.on("response",i=>{const a=i.headers.location,r=i.statusCode;if(a&&s.followRedirects&&r>=300&&r<400){if(++t._redirects>s.maxRedirects)return void N(t,y,"Maximum redirects exceeded");y.abort();const i=new c(a,d);e(t,i,n,o)}else t.emit("unexpected-response",y,i)||N(t,y,`Unexpected server response: ${i.statusCode}`)}),y.on("upgrade",(e,d,i)=>{if(t.emit("upgrade",e),t.readyState!==S.CONNECTING)return;y=t._req=null;const a=p("sha1").update(T+g).digest("base64");if(e.headers["sec-websocket-accept"]!==a)return void N(t,d,"Invalid Sec-WebSocket-Accept header");const o=e.headers["sec-websocket-protocol"],r=(n||"").split(/, */);let c;if(!n&&o?c="Server sent a subprotocol but none was requested":n&&!o?c="Server sent no subprotocol":o&&!r.includes(o)&&(c="Server sent an invalid subprotocol"),c)N(t,d,c);else{if(o&&(t.protocol=o),h)try{const d=q(e.headers["sec-websocket-extensions"]);d[l.extensionName]&&(h.accept(d[l.extensionName]),t._extensions[l.extensionName]=h)}catch(e){return void N(t,d,"Invalid Sec-WebSocket-Extensions header")}t.setSocket(d,i,s.maxPayload)}})}(this,e,t,d)):this._isServer=!0}get CONNECTING(){return S.CONNECTING}get CLOSING(){return S.CLOSING}get CLOSED(){return S.CLOSED}get OPEN(){return S.OPEN}get binaryType(){return this._binaryType}set binaryType(e){f.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?(this._socket.bufferSize||0)+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}setSocket(e,t,d){const n=new m(this._binaryType,this._extensions,d);this._sender=new I(e,this._extensions),this._receiver=n,this._socket=e,n[D]=this,e[D]=this,n.on("conclude",w),n.on("drain",C),n.on("error",R),n.on("message",L),n.on("ping",k),n.on("pong",U),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",O),e.on("data",V),e.on("end",G),e.on("error",B),this.readyState=S.OPEN,this.emit("open")}emitClose(){this.readyState=S.CLOSED,this._socket?(this._extensions[l.extensionName]&&this._extensions[l.extensionName].cleanup(),this._receiver.removeAllListeners(),this.emit("close",this._closeCode,this._closeMessage)):this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==S.CLOSED){if(this.readyState===S.CONNECTING){const e="WebSocket was closed before the connection was established";return N(this,this._req,e)}this.readyState!==S.CLOSING?(this.readyState=S.CLOSING,this._sender.close(e,t,!this._isServer,e=>{e||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&this._closeFrameReceived&&this._socket.end()}}ping(e,t,d){if(this.readyState===S.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(d=e,e=t=void 0):"function"==typeof t&&(d=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===S.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||u,t,d)):E(this,e,d)}pong(e,t,d){if(this.readyState===S.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(d=e,e=t=void 0):"function"==typeof t&&(d=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===S.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||u,t,d)):E(this,e,d)}send(e,t,d){if(this.readyState===S.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(d=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==S.OPEN)return void E(this,e,d);const n={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[l.extensionName]||(n.compress=!1),this._sender.send(e||u,n,d)}terminate(){if(this.readyState!==S.CLOSED){if(this.readyState===S.CONNECTING){const e="WebSocket was closed before the connection was established";return N(this,this._req,e)}this._socket&&(this.readyState=S.CLOSING,this._socket.destroy())}}}function P(e){return e.path=e.socketPath,o.connect(e)}function A(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=e.host),s.connect(e)}function N(e,t,d){e.readyState=S.CLOSING;const n=new Error(d);Error.captureStackTrace(n,N),t.setHeader?(t.abort(),t.once("abort",e.emitClose.bind(e)),e.emit("error",n)):(t.destroy(n),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function E(e,t,d){if(t){const d=X(t).length;e._socket?e._sender._bufferedBytes+=d:e._bufferedAmount+=d}if(d){d(new Error(`WebSocket is not open: readyState ${e.readyState} `+`(${x[e.readyState]})`))}}function w(e,t){const d=this[D];d._socket.removeListener("data",V),d._socket.resume(),d._closeFrameReceived=!0,d._closeMessage=t,d._closeCode=e,1005===e?d.close():d.close(e,t)}function C(){this[D]._socket.resume()}function R(e){const t=this[D];t._socket.removeListener("data",V),t.readyState=S.CLOSING,t._closeCode=e[T],t.emit("error",e),t._socket.destroy()}function M(){this[D].emitClose()}function L(e){this[D].emit("message",e)}function k(e){const t=this[D];t.pong(e,!t._isServer,h),t.emit("ping",e)}function U(e){this[D].emit("pong",e)}function O(){const e=this[D];this.removeListener("close",O),this.removeListener("end",G),e.readyState=S.CLOSING,e._socket.read(),e._receiver.end(),this.removeListener("data",V),this[D]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",M),e._receiver.on("finish",M))}function V(e){this[D]._receiver.write(e)||this.pause()}function G(){const e=this[D];e.readyState=S.CLOSING,e._receiver.end(),this.end()}function B(){const e=this[D];this.removeListener("error",B),this.on("error",h),e&&(e.readyState=S.CLOSING,this.destroy())}x.forEach((e,t)=>{S[e]=t}),["open","error","close","message"].forEach(e=>{Object.defineProperty(S.prototype,`on${e}`,{get(){const t=this.listeners(e);for(let e=0;e<t.length;e++)if(t[e]._listener)return t[e]._listener},set(t){const d=this.listeners(e);for(let t=0;t<d.length;t++)d[t]._listener&&this.removeListener(e,d[t]);this.addEventListener(e,t)}})}),S.prototype.addEventListener=y,S.prototype.removeEventListener=v,e.exports=S},function(e,t){e.exports=require("http")},function(e,t,d){"use strict";const{Writable:n}=d(6),i=d(4),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:r}=d(1),{concat:p,toArrayBuffer:c,unmask:l}=d(5),{isValidStatusCode:m,isValidUTF8:I}=d(11);function f(e,t,d,n){const i=new e(d?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,f),i[s]=n,i}e.exports=class extends n{constructor(e,t,d){super(),this._binaryType=e||a[0],this[r]=void 0,this._extensions=t||{},this._maxPayload=0|d,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,d){if(8===this._opcode&&0==this._state)return d();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(d)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=t.slice(e),t.slice(0,e)}const t=Buffer.allocUnsafe(e);do{const d=this._buffers[0],n=t.length-e;e>=d.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(d.buffer,d.byteOffset,e),n),this._buffers[0]=d.slice(e)),e-=d.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,f(RangeError,"RSV2 and RSV3 must be clear",!0,1002);const t=64==(64&e[0]);if(t&&!this._extensions[i.extensionName])return this._loop=!1,f(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,f(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,f(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,f(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,f(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin)return this._loop=!1,f(RangeError,"FIN must be set",!0,1002);if(t)return this._loop=!1,f(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,f(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,f(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,f(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&l(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,d)=>{if(e)return t(e);if(d.length){if(this._messageLength+=d.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(f(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(d)}const n=this.dataMessage();if(n)return t(n);this.startLoop(t)})}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let d;d="nodebuffer"===this._binaryType?p(t,e):"arraybuffer"===this._binaryType?c(p(t,e)):t,this.emit("message",d)}else{const d=p(t,e);if(!I(d))return this._loop=!1,f(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",d.toString())}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,""),this.end();else{if(1===e.length)return f(RangeError,"invalid payload length 1",!0,1002);{const t=e.readUInt16BE(0);if(!m(t))return f(RangeError,`invalid status code ${t}`,!0,1002);const d=e.slice(2);if(!I(d))return f(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",t,d.toString()),this.end()}}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}}},function(e,t,d){"use strict";try{const e=d(!function(){var e=new Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e}());t.isValidUTF8="object"==typeof e?e.Validation.isValidUTF8:e}catch(e){t.isValidUTF8=()=>!0}t.isValidStatusCode=e=>e>=1e3&&e<=1013&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},function(e,t,d){"use strict";const{randomFillSync:n}=d(7),i=d(4),{EMPTY_BUFFER:a}=d(1),{isValidStatusCode:o}=d(11),{mask:s,toBuffer:r}=d(5),p=Buffer.alloc(4);class c{constructor(e,t){this._extensions=t||{},this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){const d=t.mask&&t.readOnly;let i=t.mask?6:2,a=e.length;e.length>=65536?(i+=8,a=127):e.length>125&&(i+=2,a=126);const o=Buffer.allocUnsafe(d?e.length+i:i);return o[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(o[0]|=64),o[1]=a,126===a?o.writeUInt16BE(e.length,2):127===a&&(o.writeUInt32BE(0,2),o.writeUInt32BE(e.length,6)),t.mask?(n(p,0,4),o[1]|=128,o[i-4]=p[0],o[i-3]=p[1],o[i-2]=p[2],o[i-1]=p[3],d?(s(e,p,o,i,e.length),[o]):(s(e,p,e,0,e.length),[o,e])):[o,e]}close(e,t,d,n){let i;if(void 0===e)i=a;else{if("number"!=typeof e||!o(e))throw new TypeError("First argument must be a valid error code number");void 0===t||""===t?(i=Buffer.allocUnsafe(2),i.writeUInt16BE(e,0)):(i=Buffer.allocUnsafe(2+Buffer.byteLength(t)),i.writeUInt16BE(e,0),i.write(t,2))}this._deflating?this.enqueue([this.doClose,i,d,n]):this.doClose(i,d,n)}doClose(e,t,d){this.sendFrame(c.frame(e,{fin:!0,rsv1:!1,opcode:8,mask:t,readOnly:!1}),d)}ping(e,t,d){const n=r(e);this._deflating?this.enqueue([this.doPing,n,t,r.readOnly,d]):this.doPing(n,t,r.readOnly,d)}doPing(e,t,d,n){this.sendFrame(c.frame(e,{fin:!0,rsv1:!1,opcode:9,mask:t,readOnly:d}),n)}pong(e,t,d){const n=r(e);this._deflating?this.enqueue([this.doPong,n,t,r.readOnly,d]):this.doPong(n,t,r.readOnly,d)}doPong(e,t,d,n){this.sendFrame(c.frame(e,{fin:!0,rsv1:!1,opcode:10,mask:t,readOnly:d}),n)}send(e,t,d){const n=r(e),a=this._extensions[i.extensionName];let o=t.binary?2:1,s=t.compress;if(this._firstFragment?(this._firstFragment=!1,s&&a&&(s=n.length>=a._threshold),this._compress=s):(s=!1,o=0),t.fin&&(this._firstFragment=!0),a){const e={fin:t.fin,rsv1:s,opcode:o,mask:t.mask,readOnly:r.readOnly};this._deflating?this.enqueue([this.dispatch,n,this._compress,e,d]):this.dispatch(n,this._compress,e,d)}else this.sendFrame(c.frame(n,{fin:t.fin,rsv1:!1,opcode:o,mask:t.mask,readOnly:r.readOnly}),d)}dispatch(e,t,d,n){if(!t)return void this.sendFrame(c.frame(e,d),n);const a=this._extensions[i.extensionName];this._deflating=!0,a.compress(e,d.fin,(e,t)=>{this._deflating=!1,d.readOnly=!1,this.sendFrame(c.frame(t,d),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[1].length,Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[1].length,this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}e.exports=c},function(e,t,d){"use strict";const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function i(e,t,d){void 0===e[t]?e[t]=[d]:e[t].push(d)}e.exports={format:function(e){return Object.keys(e).map(t=>{let d=e[t];return Array.isArray(d)||(d=[d]),d.map(e=>[t].concat(Object.keys(e).map(t=>{let d=e[t];return Array.isArray(d)||(d=[d]),d.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){const t=Object.create(null);if(void 0===e||""===e)return t;let d,a,o=Object.create(null),s=!1,r=!1,p=!1,c=-1,l=-1,m=0;for(;m<e.length;m++){const I=e.charCodeAt(m);if(void 0===d)if(-1===l&&1===n[I])-1===c&&(c=m);else if(32===I||9===I)-1===l&&-1!==c&&(l=m);else{if(59!==I&&44!==I)throw new SyntaxError(`Unexpected character at index ${m}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${m}`);-1===l&&(l=m);const n=e.slice(c,l);44===I?(i(t,n,o),o=Object.create(null)):d=n,c=l=-1}}else if(void 0===a)if(-1===l&&1===n[I])-1===c&&(c=m);else if(32===I||9===I)-1===l&&-1!==c&&(l=m);else if(59===I||44===I){if(-1===c)throw new SyntaxError(`Unexpected character at index ${m}`);-1===l&&(l=m),i(o,e.slice(c,l),!0),44===I&&(i(t,d,o),o=Object.create(null),d=void 0),c=l=-1}else{if(61!==I||-1===c||-1!==l)throw new SyntaxError(`Unexpected character at index ${m}`);a=e.slice(c,m),c=l=-1}else if(r){if(1!==n[I])throw new SyntaxError(`Unexpected character at index ${m}`);-1===c?c=m:s||(s=!0),r=!1}else if(p)if(1===n[I])-1===c&&(c=m);else if(34===I&&-1!==c)p=!1,l=m;else{if(92!==I)throw new SyntaxError(`Unexpected character at index ${m}`);r=!0}else if(34===I&&61===e.charCodeAt(m-1))p=!0;else if(-1===l&&1===n[I])-1===c&&(c=m);else if(-1===c||32!==I&&9!==I){if(59!==I&&44!==I)throw new SyntaxError(`Unexpected character at index ${m}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${m}`);-1===l&&(l=m);let n=e.slice(c,l);s&&(n=n.replace(/\\/g,""),s=!1),i(o,a,n),44===I&&(i(t,d,o),o=Object.create(null),d=void 0),a=void 0,c=l=-1}}else-1===l&&(l=m)}if(-1===c||p)throw new SyntaxError("Unexpected end of input");-1===l&&(l=m);const I=e.slice(c,l);return void 0===d?i(t,I,o):(void 0===a?i(o,I,!0):i(o,a,s?I.replace(/\\/g,""):I),i(t,d,o)),t}}},function(e){e.exports=JSON.parse('{"1":[{"componentID":"1","tagText":"StandardHeader","indent":"0","position":"1","reqd":"1","description":"MsgType = 0","added":"FIX.2.7","validated":false,"components":[{"componentID":"1024","tagText":"8","indent":"0","position":"1","reqd":"1","description":"FIXT.1.1 (Always unencrypted, must be first field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"9","indent":"0","position":"2","reqd":"1","description":"(Always unencrypted, must be second field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"35","indent":"0","position":"3","reqd":"1","description":"(Always unencrypted, must be third field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"1128","indent":"0","position":"3.1","reqd":"0","description":"Indicates application version using a service pack identifier. The ApplVerID applies to a specific message occurrence.","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1156","indent":"0","position":"3.11","reqd":"0","added":"FIX.5.0","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1129","indent":"0","position":"3.2","reqd":"0","description":"Used to support bilaterally agreed custom functionality","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"49","indent":"0","position":"4","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"56","indent":"0","position":"5","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"115","indent":"0","position":"6","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"128","indent":"0","position":"7","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"90","indent":"0","position":"8","reqd":"0","description":"Required to identify length of encrypted section of message. (Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"91","indent":"0","position":"9","reqd":"0","description":"Required when message body is encrypted. Always immediately follows SecureDataLen field.","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"34","indent":"0","position":"10","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"50","indent":"0","position":"11","reqd":"0","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"142","indent":"0","position":"12","reqd":"0","description":"Sender\'s LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"57","indent":"0","position":"13","reqd":"0","description":"\'ADMIN\' reserved for administrative messages not intended for a specific user. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"143","indent":"0","position":"14","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"116","indent":"0","position":"15","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"144","indent":"0","position":"16","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"129","indent":"0","position":"17","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"145","indent":"0","position":"18","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"43","indent":"0","position":"19","reqd":"0","description":"Always required for retransmitted messages, whether prompted by the sending system or as the result of a resend request. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"97","indent":"0","position":"20","reqd":"0","description":"Required when message may be duplicate of another message sent under a different sequence number. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"52","indent":"0","position":"21","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"122","indent":"0","position":"22","reqd":"0","description":"Required for message resent as a result of a ResendRequest. If data is not available set to same value as SendingTime (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"212","indent":"0","position":"23","reqd":"0","description":"Required when specifying XmlData to identify the length of a XmlData message block. (Can be embedded within encrypted data section.)","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"213","indent":"0","position":"24","reqd":"0","description":"Can contain a XML formatted message block (e.g. FIXML). Always immediately follows XmlDataLen field. (Can be embedded within encrypted data section.)\\nSee Volume 1: FIXML Support","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"347","indent":"0","position":"25","reqd":"0","description":"Type of message encoding (non-ASCII characters) used in a message\'s \'Encoded\' fields. Required if any \'Encoding\' fields are used.","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"369","indent":"0","position":"26","reqd":"0","description":"The last MsgSeqNum value received by the FIX engine and processed by downstream application, such as trading system or order routing system. Can be specified on every message sent. Useful for detecting a backlog with a counterparty.","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"HopGrp","indent":"0","position":"27","reqd":"0","description":"Number of repeating groups of historical \'hop\' information. Only applicable if OnBehalfOfCompID is used, however, its use is optional. Note that some market regulations or counterparties may require tracking of message hops.","added":"FIX.4.4","addedEP":"-1","validated":false}]},{"componentID":"1","tagText":"112","indent":"0","position":"2","reqd":"0","description":"Required when the heartbeat is the result of a Test Request message.","added":"FIX.4.0","validated":false,"components":[]},{"componentID":"1","tagText":"StandardTrailer","indent":"0","position":"3","reqd":"1","added":"FIX.2.7","validated":false,"components":[{"componentID":"1025","tagText":"93","indent":"0","position":"1","reqd":"0","description":"Required when trailer contains signature. Note: Not to be included within SecureData field","added":"FIX.4.0","validated":false},{"componentID":"1025","tagText":"89","indent":"0","position":"2","reqd":"0","description":"Note: Not to be included within SecureData field","added":"FIX.4.0","validated":false},{"componentID":"1025","tagText":"10","indent":"0","position":"3","reqd":"1","description":"(Always unencrypted, always last field in message)","added":"FIX.4.0","validated":false}]}],"2":[{"componentID":"2","tagText":"StandardHeader","indent":"0","position":"1","reqd":"1","description":"MsgType = 1","added":"FIX.2.7","validated":false,"components":[{"componentID":"1024","tagText":"8","indent":"0","position":"1","reqd":"1","description":"FIXT.1.1 (Always unencrypted, must be first field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"9","indent":"0","position":"2","reqd":"1","description":"(Always unencrypted, must be second field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"35","indent":"0","position":"3","reqd":"1","description":"(Always unencrypted, must be third field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"1128","indent":"0","position":"3.1","reqd":"0","description":"Indicates application version using a service pack identifier. The ApplVerID applies to a specific message occurrence.","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1156","indent":"0","position":"3.11","reqd":"0","added":"FIX.5.0","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1129","indent":"0","position":"3.2","reqd":"0","description":"Used to support bilaterally agreed custom functionality","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"49","indent":"0","position":"4","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"56","indent":"0","position":"5","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"115","indent":"0","position":"6","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"128","indent":"0","position":"7","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"90","indent":"0","position":"8","reqd":"0","description":"Required to identify length of encrypted section of message. (Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"91","indent":"0","position":"9","reqd":"0","description":"Required when message body is encrypted. Always immediately follows SecureDataLen field.","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"34","indent":"0","position":"10","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"50","indent":"0","position":"11","reqd":"0","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"142","indent":"0","position":"12","reqd":"0","description":"Sender\'s LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"57","indent":"0","position":"13","reqd":"0","description":"\'ADMIN\' reserved for administrative messages not intended for a specific user. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"143","indent":"0","position":"14","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"116","indent":"0","position":"15","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"144","indent":"0","position":"16","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"129","indent":"0","position":"17","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"145","indent":"0","position":"18","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"43","indent":"0","position":"19","reqd":"0","description":"Always required for retransmitted messages, whether prompted by the sending system or as the result of a resend request. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"97","indent":"0","position":"20","reqd":"0","description":"Required when message may be duplicate of another message sent under a different sequence number. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"52","indent":"0","position":"21","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"122","indent":"0","position":"22","reqd":"0","description":"Required for message resent as a result of a ResendRequest. If data is not available set to same value as SendingTime (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"212","indent":"0","position":"23","reqd":"0","description":"Required when specifying XmlData to identify the length of a XmlData message block. (Can be embedded within encrypted data section.)","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"213","indent":"0","position":"24","reqd":"0","description":"Can contain a XML formatted message block (e.g. FIXML). Always immediately follows XmlDataLen field. (Can be embedded within encrypted data section.)\\nSee Volume 1: FIXML Support","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"347","indent":"0","position":"25","reqd":"0","description":"Type of message encoding (non-ASCII characters) used in a message\'s \'Encoded\' fields. Required if any \'Encoding\' fields are used.","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"369","indent":"0","position":"26","reqd":"0","description":"The last MsgSeqNum value received by the FIX engine and processed by downstream application, such as trading system or order routing system. Can be specified on every message sent. Useful for detecting a backlog with a counterparty.","added":"FIX.4.2","validated":false},{"componentID":"1024","tagText":"HopGrp","indent":"0","position":"27","reqd":"0","description":"Number of repeating groups of historical \'hop\' information. Only applicable if OnBehalfOfCompID is used, however, its use is optional. Note that some market regulations or counterparties may require tracking of message hops.","added":"FIX.4.4","addedEP":"-1","validated":false}]},{"componentID":"2","tagText":"112","indent":"0","position":"2","reqd":"1","added":"FIX.4.0","validated":false,"components":[]},{"componentID":"2","tagText":"StandardTrailer","indent":"0","position":"3","reqd":"1","added":"FIX.2.7","validated":false,"components":[{"componentID":"1025","tagText":"93","indent":"0","position":"1","reqd":"0","description":"Required when trailer contains signature. Note: Not to be included within SecureData field","added":"FIX.4.0","validated":false},{"componentID":"1025","tagText":"89","indent":"0","position":"2","reqd":"0","description":"Note: Not to be included within SecureData field","added":"FIX.4.0","validated":false},{"componentID":"1025","tagText":"10","indent":"0","position":"3","reqd":"1","description":"(Always unencrypted, always last field in message)","added":"FIX.4.0","validated":false}]}],"3":[{"componentID":"3","tagText":"StandardHeader","indent":"0","position":"1","reqd":"1","description":"MsgType = 2","added":"FIX.2.7","validated":false,"components":[{"componentID":"1024","tagText":"8","indent":"0","position":"1","reqd":"1","description":"FIXT.1.1 (Always unencrypted, must be first field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"9","indent":"0","position":"2","reqd":"1","description":"(Always unencrypted, must be second field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"35","indent":"0","position":"3","reqd":"1","description":"(Always unencrypted, must be third field in message)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"1128","indent":"0","position":"3.1","reqd":"0","description":"Indicates application version using a service pack identifier. The ApplVerID applies to a specific message occurrence.","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1156","indent":"0","position":"3.11","reqd":"0","added":"FIX.5.0","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"1129","indent":"0","position":"3.2","reqd":"0","description":"Used to support bilaterally agreed custom functionality","added":"FIX.4.4","addedEP":"-1","validated":false},{"componentID":"1024","tagText":"49","indent":"0","position":"4","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"56","indent":"0","position":"5","reqd":"1","description":"(Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"115","indent":"0","position":"6","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"128","indent":"0","position":"7","reqd":"0","description":"Trading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"90","indent":"0","position":"8","reqd":"0","description":"Required to identify length of encrypted section of message. (Always unencrypted)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"91","indent":"0","position":"9","reqd":"0","description":"Required when message body is encrypted. Always immediately follows SecureDataLen field.","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"34","indent":"0","position":"10","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"50","indent":"0","position":"11","reqd":"0","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"142","indent":"0","position":"12","reqd":"0","description":"Sender\'s LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"57","indent":"0","position":"13","reqd":"0","description":"\'ADMIN\' reserved for administrative messages not intended for a specific user. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"143","indent":"0","position":"14","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"116","indent":"0","position":"15","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"144","indent":"0","position":"16","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"129","indent":"0","position":"17","reqd":"0","description":"Trading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"145","indent":"0","position":"18","reqd":"0","description":"Trading partner LocationID (i.e. geographic location and/or desk) used when delivering messages via a third party. (Can be embedded within encrypted data section.)","added":"FIX.4.1","validated":false},{"componentID":"1024","tagText":"43","indent":"0","position":"19","reqd":"0","description":"Always required for retransmitted messages, whether prompted by the sending system or as the result of a resend request. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"97","indent":"0","position":"20","reqd":"0","description":"Required when message may be duplicate of another message sent under a different sequence number. (Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","tagText":"52","indent":"0","position":"21","reqd":"1","description":"(Can be embedded within encrypted data section.)","added":"FIX.4.0","validated":false},{"componentID":"1024","ta