You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using reqPositionMulti, the resulting positionMulti event always incur an error like such
Unknown incoming first token: NaN
Upon closer debugging, it seems like Incoming.prototype._POSITION_MULTI should have one extra this.dequeue() to avoid having a field unconsumed. This causes the Incoming.prototype.process to always throw Unknown incoming first token
To repro: fire a reqPositionsMulti with modelCode null.
The text was updated successfully, but these errors were encountered:
Comparing this with the C# equivalent, it seems like the last field should have belonged to the modelCode
private void PositionMultiEvent()
{
int msgVersion = ReadInt();
int requestId = ReadInt();
string account = ReadString();
Contract contract = new Contract();
contract.ConId = ReadInt();
contract.Symbol = ReadString();
contract.SecType = ReadString();
contract.LastTradeDateOrContractMonth = ReadString();
contract.Strike = ReadDouble();
contract.Right = ReadString();
contract.Multiplier = ReadString();
contract.Exchange = ReadString();
contract.Currency = ReadString();
contract.LocalSymbol = ReadString();
contract.TradingClass = ReadString();
var pos = ReadDouble();
double avgCost = ReadDouble();
string modelCode = ReadString(); // <--- there is no equivalent to this in the javascript version
eWrapper.positionMulti(requestId, account, modelCode, contract, pos, avgCost);
}
AdityaSantoso
changed the title
_POSITION_MULTI model always has one extra field not dequeued
Incoming.prototype._POSITION_MULTI missing one field to be dequeued
Aug 1, 2019
When using reqPositionMulti, the resulting positionMulti event always incur an error like such
Unknown incoming first token: NaN
Upon closer debugging, it seems like
Incoming.prototype._POSITION_MULTI
should have one extra this.dequeue() to avoid having a field unconsumed. This causes theIncoming.prototype.process
to always throwUnknown incoming first token
To repro: fire a reqPositionsMulti with modelCode null.
The text was updated successfully, but these errors were encountered: