Closed SoleSS closed 3 years ago
Hi, I will check; I guess the problem with SecurityDesc, because of the unicode encoding, unicode is still not supported. Can you maybe execute a test without unicode? If it works, we will know that it is related to the encoding. Meanwhile I will check, how to support unicode encoding...
Yes, i have checked on message without UTF8 strings and looks like everything is fine...
As a temporary workaround i can suggest add an option to ignore specified fields, and just dont't decode them ...
And as a solution i suggest:
@SoleSS unicode decode support added
Output message: { ApplVerID: '9',
MessageType: 'd',
SenderCompID: 'MOEX',
MsgSeqNum: 72,
SendingTime: '20200923053355494',
TotNumReports: 79,
Symbol: 'NBZ0',
SecurityDesc: 'Фьючерсный контракт NBR-12.20',
SecurityID: '779492',
SecurityIDSource: 8,
SecurityAltID: 'NBR-12.20',
SecurityAltIDSource: '8',
SecurityType: undefined,
CFICode: 'FXXXXX',
StrikePrice: undefined,
ContractMultiplier: '1e1',
SecurityTradingStatus: 17,
Currency: 'USD',
MarketID: 'MOEX',
MarketSegmentID: 'F',
TradingSessionID: 1,
ExchangeTradingSessionID: 10207,
Volatility: undefined,
MDFeedTypes:
[ { MDFeedType: 'FUT-BOOK-1', MarketDepth: 1, MDBookType: 1 },
{ MDFeedType: 'FUT-BOOK-5', MarketDepth: 5, MDBookType: 2 },
{ MDFeedType: 'FUT-BOOK-20', MarketDepth: 20, MDBookType: 2 },
{ MDFeedType: 'FUT-BOOK-50', MarketDepth: 50, MDBookType: 2 },
{ MDFeedType: 'FUT-TRADES',
MarketDepth: undefined,
MDBookType: undefined } ],
Underlyings:
[ { UnderlyingSymbol: 'NBR',
UnderlyingSecurityID: undefined,
UnderlyingFutureID: undefined } ],
HighLimitPx: '-591000e-5',
LowLimitPx: '-3271000e-5',
MinPriceIncrement: '1000e-5',
MinPriceIncrementAmount: '759203e-5',
InitialMarginOnBuy: '1720588e-2',
InitialMarginOnSell: '1671132e-2',
InitialMarginSyntetic: undefined,
QuotationList: undefined,
TheorPrice: undefined,
TheorPriceLimit: undefined,
InstrumentLegs: undefined,
InstrumentAttributes: undefined,
UnderlyingQty: undefined,
UnderlyingCurrency: undefined,
EvntGrp:
[ { EventType: 7,
EventDate: 20201201,
EventTime: '20201130210000000' },
{ EventType: 5,
EventDate: 20200915,
EventTime: '20200914210000000' } ],
MaturityDate: 20201130,
MaturityTime: 210000000,
Flags: '115' }
Thx, looks like everything is working now...
Hi, and thanks for your module!
And here's a problem: I'm trying to decode MOEX fast stream (i have a buffer):
(templateId = 17)
[192, 145, 200, 35, 113, 20, 30, 85, 107, 99, 230, 207, 78, 66, 90, 176, 176, 208, 164, 209, 140, 209, 142, 209, 135, 208, 181, 209, 128, 209, 129, 208, 189, 209, 139, 208, 185, 32, 208, 186, 208, 190, 208, 189, 209, 130, 209, 128, 208, 176, 208, 186, 209, 130, 32, 78, 66, 82, 45, 49, 50, 46, 50, 48, 47, 73, 228, 78, 66, 82, 45, 49, 50, 46, 50, 176, 184, 128, 70, 88, 88, 88, 88, 216, 128, 130, 129, 146, 85, 83, 196, 198, 130, 79, 224, 128, 133, 70, 85, 84, 45, 66, 79, 79, 75, 45, 177, 130, 130, 70, 85, 84, 45, 66, 79, 79, 75, 45, 181, 134, 131, 70, 85, 84, 45, 66, 79, 79, 75, 45, 50, 176, 149, 131, 70, 85, 84, 45, 66, 79, 79, 75, 45, 53, 176, 179, 131, 70, 85, 84, 45, 84, 82, 65, 68, 69, 211, 128, 128, 130, 78, 66, 210, 128, 128, 251, 91, 118, 232, 251, 126, 56, 45, 168, 251, 7, 232, 251, 46, 43, 163, 254, 0, 105, 2, 140, 254, 0, 101, 127, 220, 128, 128, 128, 128, 128, 128, 128, 128, 131, 135, 9, 80, 125, 241, 35, 113, 26, 34, 49, 105, 121, 128, 133, 9, 80, 123, 211, 35, 113, 19, 125, 93, 0, 25, 128, 9, 80, 125, 171, 100, 17, 49, 129, 0, 244];
RIGHT decoded example:
But your module returns me partial data (look at SecurityID - always 80 (but have to be long) and SecurityDesc):
code usage example:
here's a decoding template: