TimelordUK / jspurefix

native typescript FIX engine
MIT License
58 stars 27 forks source link

Issue requesting Market Data #59

Closed klugjo closed 1 year ago

klugjo commented 1 year ago

I am using the https://github.com/TimelordUK/jspf-demo/ and I am able to open a session, logon and fetch a list of securities.

I am facing issues sending the Market Data Request though.

Here is how I send the market data request:

this.send(MsgType.MarketDataRequest, {
  MDReqID: "1",
  SubscriptionRequestType:
    SubscriptionRequestType.SnapshotPlusUpdates,
  MarketDepth: 0,
  MDReqGrp: {
    NoMDEntryTypes: [
      {
        MDEntryType: MDEntryType.Bid,
      },
      {
        MDEntryType: MDEntryType.Offer,
      },
    ],
  },
  InstrmtMDReqGrp: {
    NoRelatedSym: [
      {
        Instrument: {
          StrikeCurrency: "USD",
          Symbol: "EUR/USD",
        },
      },
    ],
  },
});

and I am seeing the following error:

[powerfintech:FixSession] warn: tx error event: expected array instance for group NoMDEntryTypes Error: expected array instance for group NoMDEntryTypes

It looks like in the definitions, NoMDEntryTypes is considered to be a group instead of a component.

I am using FX.4.4 and everything seems to be configured properly in the xml files. I have also tried updating jspurefix to the latest. But still facing the same error.

Thanks in advance

klugjo commented 1 year ago

Ok when I try with that repo and the npm run tcp-qf-md script modified for my needs, it works as expected ... not quite sure what the issue is

TimelordUK commented 1 year ago

Are you using quickfix notation or the standard. Third will be from your config. Basically the format on wire will be same but one format is not quite same from compiled interfaces point of view. In case of quick fix there is usually an extra component wrapping array Sent from my iPhoneOn 30 Dec 2022, at 15:22, Klughertz Jonathan @.***> wrote: I am using the https://github.com/TimelordUK/jspf-demo/ and I am able to open a session, logon and fetch a list of securities. I am facing issues sending the Market Data Request though. Here is how I send the market data request: this.send(MsgType.MarketDataRequest, { MDReqID: "1", SubscriptionRequestType: SubscriptionRequestType.SnapshotPlusUpdates, MarketDepth: 0, MDReqGrp: { NoMDEntryTypes: [ { MDEntryType: MDEntryType.Bid, }, { MDEntryType: MDEntryType.Offer, }, ], }, InstrmtMDReqGrp: { NoRelatedSym: [ { Instrument: { StrikeCurrency: "USD", Symbol: "EUR/USD", }, }, ], }, }); and I am seeing the following error: [powerfintech:FixSession] warn: tx error event: expected array instance for group NoMDEntryTypes Error: expected array instance for group NoMDEntryTypes

It looks like in the definitions, NoMDEntryTypes is considered to be a group instead of a component. I am using FX.4.4 and everything seems to be configured properly in the xml files. I have also tried updating jspurefix to the latest. But still facing the same error. Thanks in advance

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

TimelordUK commented 1 year ago

Ah well done for getting it going. Sent from my iPhoneOn 30 Dec 2022, at 16:07, Klughertz Jonathan @.***> wrote: Ok when I try with that repo and the npm run tcp-qf-md script modified for my needs, it works as expected ... not quite sure what the issue is

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>