TimelordUK / jspurefix

native typescript FIX engine
MIT License
60 stars 28 forks source link

URGENT: Message View toObject Data Mapping Missing Values #75

Closed helloissac closed 11 months ago

helloissac commented 11 months ago

Hi @TimelordUK, Great work on this library, thank you very much!

I have an issue that I wondered if you could help me with?

We're requesting multiple MDFullGrp > NoMDEntries[] (for market data snapshot full refresh) and MDIncGrp > NoMDEntries[] (for market data snapshot incremental refresh) values in a Market Data Request (Bid - "MDEntryType": "0", Offer - "MDEntryType": "1", and Mid - "MDEntryType": "H") and the response is not getting mapped in the toObject method correctly. We have double checked that the raw FIX messages in ascii format include all the entries in the NoMDEntries[] array.

We are using FIX50SP2.xml, which I have attached the text file to this issue for your review. FIX50SP2.txt

Market Data Snapshot Full Refresh (MsgType=W) - Mapped Object (Issue: Empty NoMDEntries[] Array)

{
  "StandardHeader": {
    "BeginString": "FIXT.1.1",
    "BodyLength": 380,
    "MsgType": "W",
    "SenderCompID": "TEST",
    "TargetCompID": "TEST",
    "OnBehalfOfCompID": "DTS",
    "MsgSeqNum": 2800,
    "DeliverToLocationID": "NCFX1_FIX50",
    "SendingTime": "2023-10-27T16:14:51.085Z"
  },
  "MDReqID": "JPYSEK12M=TDS",
  "Instrument": {
    "SecurityID": "JPYSEK12M=TDS",
    "SecurityIDSource": "8"
  },
  "MDFullGrp": {
    "NoMDEntries": []
  },
  "StandardTrailer": {
    "CheckSum": "103"
  }
}

Market Data Snapshot Incremental Refresh (MsgType=X) - Mapped Object (Issue: Only the First Object is Mapped in the NoMDEntries[] Array)

{
  "StandardHeader": {
    "BeginString": "FIXT.1.1",
    "BodyLength": 395,
    "MsgType": "X",
    "SenderCompID": "TEST",
    "TargetCompID": "TEST",
    "OnBehalfOfCompID": "DTS",
    "MsgSeqNum": 26559,
    "DeliverToLocationID": "NCFX1_FIX50",
    "SendingTime": "2023-10-27T16:12:59.351Z"
  },
  "MDReqID": "USD23MOIS=TUK",
  "MDIncGrp": {
    "NoMDEntries": [
      {
        "MDUpdateAction": "1",
        "MDEntryType": "0",
        "Instrument": {
          "SecurityID": "USD23MOIS=TUK",
          "SecurityIDSource": "8"
        },
        "MDEntryPx": 4.908823
      }
    ]
  },
  "StandardTrailer": {
    "CheckSum": "023"
  }
}

In both situations, I would expect the NoMDEntries[] array in MDFullGrp or MDIncGrp to contain the 3 values, i.e. Bid, Offer, and Mid.

Is there anything I'm missing or will I need to fix it in the code and create a pull request?

Thank you so much in advance!

TimelordUK commented 11 months ago

if you look at https://github.com/TimelordUK/jspf-md-demo

and npm run md5-app, this uses FIX5sp2

is it similar to this client sends

 {
    "StandardHeader": {
        "BeginString": "FIX.5.0SP2",
        "BodyLength": 145,
        "MsgType": "V",
        "SenderCompID": "init-comp",
        "TargetCompID": "accept-comp",
        "MsgSeqNum": 2,
        "TargetSubID": "fix",
        "SendingTime": "2023-10-27T23:51:50.558Z"
    },
    "MDReqID": "#GBPUSD#0#",
    "SubscriptionRequestType": "1",
    "MarketDepth": 0,
    "MDReqGrp": {
        "NoMDEntryTypes": [
            {
                "MDEntryType": "0"
            },
            {
                "MDEntryType": "1"
            },
            {
                "MDEntryType": "H"
            }
        ]
    },
    "InstrmtMDReqGrp": {
        "NoRelatedSym": [
            {
                "Instrument": {
                    "Symbol": "GBPUSD",
                    "StrikeCurrency": "USD"
                }
            }
        ]
    },
    "StandardTrailer": {
        "CheckSum": "116"
    }
}

server sends

 {
    "StandardHeader": {
        "BeginString": "FIX.5.0SP2",
        "BodyLength": 227,
        "MsgType": "W",
        "SenderCompID": "accept-comp",
        "TargetCompID": "init-comp",
        "MsgSeqNum": 2,
        "TargetSubID": "fix",
        "SendingTime": "2023-10-27T23:51:50.567Z"
    },
    "MDReqID": "#GBPUSD#0#",
    "Instrument": {
        "SecurityID": "GBPUSD"
    },
    "MDFullGrp": {
        "NoMDEntries": [
            {
                "MDEntryType": "0",
                "MDEntryPx": 1.22759,
                "MDEntrySize": 1,
                "MDEntryDate": "2023-10-27T00:00:00.000Z",
                "SettlType": "0"
            },
            {
                "MDEntryType": "1",
                "MDEntryPx": 1.22759,
                "MDEntrySize": 1,
                "MDEntryDate": "2023-10-27T00:00:00.000Z",
                "SettlType": "0"
            },
            {
                "MDEntryType": "H",
                "MDEntryPx": 1.22759,
                "MDEntrySize": 1,
                "MDEntryDate": "2023-10-27T00:00:00.000Z",
                "SettlType": "0"
            }
        ]
    },
    "StandardTrailer": {
        "CheckSum": "040"
    }
}

you will have to send actual fix messages i cant see from your example what is being sent by client and the raw fix resoonse frim the server. Ideally fork the above repo and reproduce the problem there

TimelordUK commented 11 months ago
 public BidOfferRequest (symbol: string): ILooseObject {
    // @ts-expect-error ts2307
    const bor: IMarketDataRequest = {
      MDReqID: `#${symbol}#0#`,
      SubscriptionRequestType: SubscriptionRequestType.SnapshotAndUpdates,
      MarketDepth: 0,
      MDReqGrp: {
        NoMDEntryTypes: [
          {
            MDEntryType: MDEntryType.Bid
          },
          {
            MDEntryType: MDEntryType.Offer
          },
          {
            MDEntryType: MDEntryType.MidPrice
          }
        ]
      },
      InstrmtMDReqGrp: {
        NoRelatedSym: [
          {
            Instrument: {
              StrikeCurrency: 'USD',
              Symbol: symbol
            }
          }
        ]
      }
    }
    return bor
  }
helloissac commented 11 months ago

Hi @TimelordUK, thanks for the quick response. Please let me know if there are issues in our market data request, or the incremental and full refresh response received, as I believe the response is not getting mapped in the jspurefix msg-view toObject method correctly.

This is the client market data request:

Client Market Data Request

    protected static staticMarketDataRequest(securityID: string) {   // 48 (temporary static security ID)
        return {
            MDReqID: securityID,                                                    // 262
            SubscriptionRequestType: SubscriptionRequestType.SnapshotPlusUpdates,   // 263
            MDUpdateType: 0,                                // 265
            MDReqGrp: {
                NoMDEntryTypes: [                           // 267
                    {
                        MDEntryType: MDEntryType.Bid,       // 269 (0)
                    },
                    {
                        MDEntryType: MDEntryType.Offer,     // 269 (1)
                    },
                    {
                        MDEntryType: MDEntryType.MidPrice,  // 269 (2)
                    },
                ],
            },
            InstrmtMDReqGrp: {
                NoRelatedSym: [                             // 146
                    {
                        Instrument: {
                            SecurityID: securityID,         // 48
                            SecurityIDSource: '8',          // 22
                            Symbol: securityID,             // 55 (=48)
                            SecurityType: 'FXVAN',          // 167
                            SecuritySubType: 'OTCOPT',      // 762
                        }
                    }
                ]
            }
        } as IMarketDataRequest;
    }

Here are examples of the raw FIX message response for market data snapshot incremental and full refresh:

Market Data Snapshot Incremental Refresh (Raw Message)

8=FIXT.1.1|9=536|35=X|49=TRADMDHUB|56=NCFX1_TRE|34=23773|52=20231030-10:18:47.167|115=DTS|145=NCFX1_FIX50|262=EGPINR=TDS|268=3|279=1|269=0|48=EGPINR=TDS|22=8|270=2.686142|167=FXSPOT|762=NONE|20460=AFEG1FX0FAZYU7ZZZZ|336=1|272=20231030|273=10:18:47.166|278=17828|15=EGP|279=1|269=1|48=EGPINR=TDS|22=8|270=2.706302|167=FXSPOT|762=NONE|20460=AFEG1FX0FAZYU7ZZZZ|336=1|272=20231030|273=10:18:47.166|278=17829|15=EGP|279=1|269=H|48=EGPINR=TDS|22=8|270=2.696222|167=FXSPOT|762=NONE|20460=AFEG1FX0FAZYU7ZZZZ|336=1|272=20231030|273=10:18:47.166|278=17830|15=EGP|10=107|

This is the parsed market data snapshot incremental refresh message: image

Market Data Snapshot Full Refresh (Raw Message)

8=FIXT.1.1|9=388|35=W|49=TRADMDHUB|56=NCFX1_TRE|34=3187|52=20231030-10:18:33.507|115=DTS|145=NCFX1_FIX50|262=EURJPY10Y=TDS|48=EURJPY10Y=TDS|22=8|15=EUR|167=FXFWD|762=NONE|20460=EUZZ02X3F8ZYPHZZZZ|268=3|269=0|270=-3657.05|271=0|272=20231030|273=10:18:33.507|336=1|278=2971|269=1|270=-3590.35|271=0|272=20231030|273=10:18:33.507|336=1|278=2972|269=H|270=-3623.7|272=20231030|273=10:18:33.507|336=1|278=2973|10=052|

This is the parsed market data snapshot full refresh message:

image

helloissac commented 11 months ago

@TimelordUK, I'm facing this issue in jspurefix - v3.0.0 and I'm having trouble with market data repetitive groups, as the group NoMDEntries[] only maps its first object in the array.

helloissac commented 11 months ago

In this other example, NoMDEntries: [] is an empty array without any objects

{
  StandardHeader: {
    BeginString: 'FIXT.1.1',
    BodyLength: 371,
    MsgType: 'W',
    SenderCompID: 'TRADMDHUB',
    TargetCompID: 'NCFX1_TRE',
    OnBehalfOfCompID: 'DTS',
    MsgSeqNum: 6807,
    DeliverToLocationID: 'NCFX1_FIX50',
    SendingTime: 2023-10-30T11:39:39.718Z
  },
  MDReqID: 'NZD10Y=TUK',
  Instrument: { SecurityID: 'NZD10Y=TUK', SecurityIDSource: '8' },
  MDFullGrp: { NoMDEntries: [] },
  StandardTrailer: { CheckSum: '062' }
}
8=FIXT.1.1|9=371|35=W|49=TRADMDHUB|56=NCFX1_TRE|34=6807|52=20231030-11:39:39.718|115=DTS|145=NCFX1_FIX50|262=NZD10Y=TUK|48=NZD10Y=TUK|22=8|15=NZD|167=FXFWD|762=NONE|20460=OCNZ15X3F2ZY37ZZZZ|268=3|269=0|270=-653|271=0|272=20231030|273=11:39:39.598|336=1|278=8459|269=1|270=-643|271=0|272=20231030|273=11:39:39.598|336=1|278=8460|269=H|270=-387|272=20231030|273=11:39:39.598|336=1|278=8461|10=062|8
TimelordUK commented 11 months ago

FIX50SP2.zip

note i had to add additional fields

then in instrument looks like currency and this field are expected, you should have been given a definition by the exchange your connecting too?

this is working on branch fix52, it should also work on master/npm, there are some genuine bugs on certain types in fix52 where the dictionary is not parsed correctly. I will be releasing this branch but its some way off being ready for release.

I add these to instrument

   <field name='Currency' required='N' />
   <field name='InstrumentCustom' required='N' />

  <component name='Instrument'>
   <field name='Symbol' required='N' />
   <field name='SymbolSfx' required='N' />
   <field name='SecurityID' required='N' />
   <field name='SecurityIDSource' required='N' />
   <component name='SecAltIDGrp' required='N' />
   <field name='Product' required='N' />
   <field name='ProductComplex' required='N' />
   <field name='SecurityGroup' required='N' />
   <field name='CFICode' required='N' />
   <field name='UPICode' required='N' />
   <field name='SecurityType' required='N' />
   <field name='SecuritySubType' required='N' />
   <field name='Currency' required='N' />
   <field name='InstrumentCustom' required='N' />
   <field name='MaturityMonthYear' required='N' />
   <field name='MaturityDate' required='N' />
   <field name='MaturityTime' required='N' />
   <field name='SettleOnOpenFlag' required='N' />
   <field name='InstrmtAssignmentMethod' required='N' />
   <field name='SecurityStatus' required='N' />
   <field name='CouponPaymentDate' required='N' />
   <field name='RestructuringType' required='N' />
   <field name='Seniority' required='N' />
   <field name='NotionalPercentageOutstanding' required='N' />
   <field name='OriginalNotionalPercentageOutstanding' required='N' />
   <field name='AttachmentPoint' required='N' />
   <field name='DetachmentPoint' required='N' />
   <field name='ObligationType' required='N' />
   <field name='AssetGroup' required='N' />
   <field name='AssetClass' required='N' />
   <field name='AssetSubClass' required='N' />
   <field name='AssetType' required='N' />
   <field name='AssetSubType' required='N' />
   <component name='SecondaryAssetGrp' required='N' />
   <component name='AssetAttributeGrp' required='N' />
   <field name='SwapClass' required='N' />
   <field name='SwapSubClass' required='N' />
   <field name='NthToDefault' required='N' />
   <field name='MthToDefault' required='N' />
   <field name='SettledEntityMatrixSource' required='N' />
   <field name='SettledEntityMatrixPublicationDate' required='N' />
   <field name='CouponType' required='N' />
   <field name='TotalIssuedAmount' required='N' />
   <field name='CouponFrequencyPeriod' required='N' />
   <field name='CouponFrequencyUnit' required='N' />
   <field name='CouponDayCount' required='N' />
   <field name='CouponOtherDayCount' required='N' />
   <field name='ConvertibleBondEquityID' required='N' />
   <field name='ConvertibleBondEquityIDSource' required='N' />
   <field name='ContractPriceRefMonth' required='N' />
   <field name='LienSeniority' required='N' />
   <field name='LoanFacility' required='N' />
   <field name='ReferenceEntityType' required='N' />
   <field name='IndexSeries' required='N' />
   <field name='IndexAnnexVersion' required='N' />
   <field name='IndexAnnexDate' required='N' />
   <field name='IndexAnnexSource' required='N' />
   <field name='SettlRateIndex' required='N' />
   <field name='SettlRateIndexLocation' required='N' />
   <field name='OptionExpirationDesc' required='N' />
   <field name='EncodedOptionExpirationDescLen' required='N' />
   <field name='EncodedOptionExpirationDesc' required='N' />
   <field name='IssueDate' required='N' />
   <field name='RepoCollateralSecurityType' required='N' />
   <field name='RepurchaseTerm' required='N' />
   <field name='RepurchaseRate' required='N' />
   <field name='Factor' required='N' />
   <field name='CreditRating' required='N' />
   <field name='InstrRegistry' required='N' />
   <field name='CountryOfIssue' required='N' />
   <field name='StateOrProvinceOfIssue' required='N' />
   <field name='LocaleOfIssue' required='N' />
   <field name='RedemptionDate' required='N' />
   <field name='StrikePrice' required='N' />
   <field name='OrigStrikePrice' required='N' />
   <field name='StrikePricePrecision' required='N' />
   <field name='StrikeCurrency' required='N' />
   <field name='StrikeCurrencyCodeSource' required='N' />
   <field name='StrikeMultiplier' required='N' />
   <field name='StrikeValue' required='N' />
   <field name='StrikeUnitOfMeasure' required='N' />
   <field name='StrikeIndex' required='N' />
   <field name='StrikeIndexCurvePoint' required='N' />
   <field name='StrikeIndexSpread' required='N' />
   <field name='StrikeIndexQuote' required='N' />
   <field name='StrikePriceDeterminationMethod' required='N' />
   <field name='StrikePriceBoundaryMethod' required='N' />
   <field name='StrikePriceBoundaryPrecision' required='N' />
   <field name='UnderlyingPriceDeterminationMethod' required='N' />
   <field name='OptAttribute' required='N' />
   <field name='ContractMultiplier' required='N' />
   <field name='ContractMultiplierUnit' required='N' />
   <field name='TradingUnitPeriodMultiplier' required='N' />
   <field name='FlowScheduleType' required='N' />
   <field name='MinPriceIncrement' required='N' />
   <field name='MinPriceIncrementAmount' required='N' />
   <field name='UnitOfMeasure' required='N' />
   <field name='UnitOfMeasureQty' required='N' />
   <field name='UnitOfMeasureCurrency' required='N' />
   <field name='UnitOfMeasureCurrencyCodeSource' required='N' />
   <field name='PriceUnitOfMeasure' required='N' />
   <field name='PriceUnitOfMeasureQty' required='N' />
   <field name='PriceUnitOfMeasureCurrency' required='N' />
   <field name='PriceUnitOfMeasureCurrencyCodeSource' required='N' />
   <field name='SettlMethod' required='N' />
   <field name='SettlSubMethod' required='N' />
   <field name='ExerciseStyle' required='N' />
   <field name='OptPayoutType' required='N' />
   <field name='OptPayoutAmount' required='N' />
   <field name='ReturnTrigger' required='N' />
   <field name='PriceQuoteMethod' required='N' />
   <field name='ValuationMethod' required='N' />
   <field name='ValuationSource' required='N' />
   <field name='ValuationReferenceModel' required='N' />
   <field name='PriceQuoteCurrency' required='N' />
   <field name='PriceQuoteCurrencyCodeSource' required='N' />
   <field name='ListMethod' required='N' />
   <field name='CapPrice' required='N' />
   <field name='FloorPrice' required='N' />
   <field name='PutOrCall' required='N' />
   <field name='InTheMoneyCondition' required='N' />
   <field name='ContraryInstructionEligibilityIndicator' required='N' />
   <field name='FlexibleIndicator' required='N' />
   <field name='FlexProductEligibilityIndicator' required='N' />
   <field name='BlockTradeEligibilityIndicator' required='N' />
   <field name='LowExercisePriceOptionIndicator' required='N' />
   <field name='TimeUnit' required='N' />
   <field name='CouponRate' required='N' />
   <field name='SecurityExchange' required='N' />
   <field name='PositionLimit' required='N' />
   <field name='NTPositionLimit' required='N' />
   <field name='Issuer' required='N' />
   <field name='EncodedIssuerLen' required='N' />
   <field name='EncodedIssuer' required='N' />
   <field name='FinancialInstrumentShortName' required='N' />
   <field name='FinancialInstrumentFullName' required='N' />
   <field name='EncodedFinancialInstrumentFullNameLen' required='N' />
   <field name='EncodedFinancialInstrumentFullName' required='N' />
   <field name='SecurityDesc' required='N' />
   <field name='EncodedSecurityDescLen' required='N' />
   <field name='EncodedSecurityDesc' required='N' />
   <component name='SecurityXML' required='N' />
   <field name='Pool' required='N' />
   <field name='ContractSettlMonth' required='N' />
   <field name='CPProgram' required='N' />
   <field name='CPRegType' required='N' />
   <component name='EvntGrp' required='N' />
   <field name='DatedDate' required='N' />
   <field name='InterestAccrualDate' required='N' />
   <component name='InstrumentParties' required='N' />
   <field name='ShortSaleRestriction' required='N' />
   <component name='ComplexEvents' required='N' />
   <field name='RefTickTableID' required='N' />
   <field name='StrategyType' required='N' />
   <field name='CommonPricingIndicator' required='N' />
   <field name='SettlDisruptionProvision' required='N' />
   <field name='DeliveryRouteOrCharter' required='N' />
   <field name='InstrumentRoundingDirection' required='N' />
   <field name='InstrumentRoundingPrecision' required='N' />
   <field name='InstrumentPricePrecision' required='N' />
   <field name='SecurityReferenceDataSupplement' required='N' />
   <component name='DateAdjustment' required='N' />
   <component name='PricingDateTime' required='N' />
   <component name='MarketDisruption' required='N' />
   <component name='OptionExercise' required='N' />
   <component name='StreamGrp' required='N' />
   <component name='ProvisionGrp' required='N' />
   <component name='AdditionalTermGrp' required='N' />
   <component name='ProtectionTermGrp' required='N' />
   <component name='CashSettlTermGrp' required='N' />
   <component name='PhysicalSettlTermGrp' required='N' />
   <component name='ExtraordinaryEventGrp' required='N' />
   <field name='ExtraordinaryEventAdjustmentMethod' required='N' />
   <field name='ExchangeLookAlike' required='N' />
  </component>
❯ node dist/jsfix-cmd --fix=tmp/example1.txt --delimiter="|"  --session=data/session/test-qf50sp2-initiator.json --objects
W [MarketDataSnapshotFullRefresh] = {
    "StandardHeader": {
        "BeginString": "FIXT.1.1",
        "BodyLength": 388,
        "MsgType": "W",
        "SenderCompID": "TRADMDHUB",
        "TargetCompID": "NCFX1_TRE",
        "OnBehalfOfCompID": "DTS",
        "MsgSeqNum": 3187,
        "DeliverToLocationID": "NCFX1_FIX50",
        "SendingTime": "2023-10-30T10:18:33.507Z"
    },
    "MDReqID": "EURJPY10Y=TDS",
    "Instrument": {
        "SecurityID": "EURJPY10Y=TDS",
        "SecurityIDSource": "8",
        "SecurityType": "FXFWD",
        "SecuritySubType": "NONE",
        "Currency": "EUR",
        "InstrumentCustom": "EUZZ02X3F8ZYPHZZZZ"
    },
    "MDFullGrp": {
        "NoMDEntries": [
            {
                "MDEntryType": "0",
                "MDEntryID": "2971",
                "MDEntryPx": -3657.05,
                "MDEntrySize": 0,
                "MDEntryDate": "2023-10-30T00:00:00.000Z",
                "MDEntryTime": "1899-12-31T10:18:33.507Z",
                "TradingSessionID": "1"
            },
            {
                "MDEntryType": "1",
                "MDEntryID": "2972",
                "MDEntryPx": -3590.35,
                "MDEntrySize": 0,
                "MDEntryDate": "2023-10-30T00:00:00.000Z",
                "MDEntryTime": "1899-12-31T10:18:33.507Z",
                "TradingSessionID": "1"
            },
            {
                "MDEntryType": "H",
                "MDEntryID": "2973",
                "MDEntryPx": -3623.7,
                "MDEntryDate": "2023-10-30T00:00:00.000Z",
                "MDEntryTime": "1899-12-31T10:18:33.507Z",
                "TradingSessionID": "1"
            }
        ]
    },
    "StandardTrailer": {
        "CheckSum": "052"
    }
}
TimelordUK commented 11 months ago
  <field number='20460' name='InstrumentCustom' type='STRING' />

this was needed looks like a custom field in your instrument

TimelordUK commented 11 months ago
❯ node dist/jsfix-cmd --fix=tmp/example1.txt --delimiter="|"  --session=data/session/test-qf50sp2-initiator.json --tokens
[0] 8 (BeginString) = FIXT.1.1[Fixt11], [1] 9 (BodyLength) = 388
[2] 35 (MsgType) = W[MarketDataSnapshotFullRefresh], [3] 49 (SenderCompID) = TRADMDHUB
[4] 56 (TargetCompID) = NCFX1_TRE, [5] 34 (MsgSeqNum) = 3187
[6] 52 (SendingTime) = 20231030-10:18:33.507, [7] 115 (OnBehalfOfCompID) = DTS
[8] 145 (DeliverToLocationID) = NCFX1_FIX50, [9] 262 (MDReqID) = EURJPY10Y=TDS
[10] 48 (SecurityID) = EURJPY10Y=TDS, [11] 22 (SecurityIDSource) = 8[ExchangeSymbol]
[12] 15 (Currency) = EUR, [13] 167 (SecurityType) = FXFWD[FxForward]
[14] 762 (SecuritySubType) = NONE, [15] 20460 (InstrumentCustom) = EUZZ02X3F8ZYPHZZZZ
[16] 268 (NoMDEntries) = 3, [17] 269 (MDEntryType) = 0[Bid]
[18] 270 (MDEntryPx) = -3657.05, [19] 271 (MDEntrySize) = 0
[20] 272 (MDEntryDate) = 20231030, [21] 273 (MDEntryTime) = 10:18:33.507
[22] 336 (TradingSessionID) = 1[Day], [23] 278 (MDEntryID) = 2971
[24] 269 (MDEntryType) = 1[Offer], [25] 270 (MDEntryPx) = -3590.35
[26] 271 (MDEntrySize) = 0, [27] 272 (MDEntryDate) = 20231030
[28] 273 (MDEntryTime) = 10:18:33.507, [29] 336 (TradingSessionID) = 1[Day]
[30] 278 (MDEntryID) = 2972, [31] 269 (MDEntryType) = H[MidPrice]
[32] 270 (MDEntryPx) = -3623.7, [33] 272 (MDEntryDate) = 20231030
[34] 273 (MDEntryTime) = 10:18:33.507, [35] 336 (TradingSessionID) = 1[Day]
[36] 278 (MDEntryID) = 2973, [37] 10 (CheckSum) = 052
helloissac commented 11 months ago

Hi @TimelordUK, thank you very much for the updated FIX50SP2.xml with the added fields, that is very helpful.

I'm successfully getting all the NoMDEntries objects in the array now.

However, I'm getting these new errors from the ascii-msg-transmitter and ascii-session while I'm logging the continuous market data stream, which leads to the FIX session exiting. I'm using jspurefix 3.0.0.

I have attached the error logs below, and I wondered if you could help me understand the issue?

{"timestamp":"2023-10-31T15:57:49.707Z","level":"WARNING","app_name":"TRADS-SPT","service":"TRADS-SPT:FIXSESSION","message":"tx error event: ascii transmitter cannot find definition for 0 c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\ascii\\ascii-msg-transmitter.js:79\n            this.emit('error', new Error(`ascii transmitter cannot find definition for ${msgType}`));\n                               ^\n\nError: ascii transmitter cannot find definition for 0\n    at AsciiMsgTransmitter2.encodeMessage (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\ascii\\ascii-msg-transmitter.js:79:32)\n    at Transform.transform (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\msg-transmitter.js:32:47)\n    at Transform._write (node:internal/streams/transform:205:23)\n    at writeOrBuffer (node:internal/streams/writable:391:12)\n    at _write (node:internal/streams/writable:332:10)\n    at Transform.Writable.write (node:internal/streams/writable:336:10)\n    at AsciiMsgTransmitter2.send (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\msg-transmitter.js:22:27)\n    at FixClient.send (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\session\\fix-session.js:288:91)\n    at FixClient.sendHeartbeat (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\ascii\\ascii-session.js:301:18)\n    at FixClient.tick (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\ascii\\ascii-session.js:323:22)"}
{"timestamp":"2023-10-31T15:57:49.708Z","level":"ERROR","app_name":"TRADS-SPT","service":"TRADS-SPT:FIXSESSION","message":"ascii transmitter cannot find definition for 0","data":{"error":"at FixClient.tick (c:\\Users\\IssacLi\\Documents\\trads-rawdata-fixengine\\fiat-rawdata-fixengine\\container\\node_modules\\jspurefix\\dist\\transport\\ascii\\ascii-session.js:323:22)"}}
TimelordUK commented 11 months ago

Im away from pc can you check the .xml file do we have these entries look at fix4.4 file in Same folder.

 <message name='Heartbeat' msgcat='admin' msgtype='0'>
   <field name='TestReqID' required='N' />
  </message>
  <message name='TestRequest' msgcat='admin' msgtype='1'>
   <field name='TestReqID' required='Y' />
  </message>
  <message name='ResendRequest' msgcat='admin' msgtype='2'>
   <field name='BeginSeqNo' required='Y' />
   <field name='EndSeqNo' required='Y' />
  </message>
  <message name='Reject' msgcat='admin' msgtype='3'>
   <field name='RefSeqNum' required='Y' />
   <field name='RefTagID' required='N' />
   <field name='RefMsgType' required='N' />
   <field name='SessionRejectReason' required='N' />
   <field name='Text' required='N' />
   <field name='EncodedTextLen' required='N' />
   <field name='EncodedText' required='N' />
  </message>
  <message name='SequenceReset' msgcat='admin' msgtype='4'>
   <field name='GapFillFlag' required='N' />
   <field name='NewSeqNo' required='Y' />
  </message>
helloissac commented 11 months ago

Hi @TimelordUK, thank you very much again for the clarification. I can confirm that I'm getting messages without any issues.

I've added Heartbeat, TestRequest, ResendRequest, Reject, and SequenceReset message types in my FIX50SP2.xml.

I look forward to the fix52 release! That was really helpful to resolve the issue. Awesome work! :)