Why Number.MAX_VALUE vs. "null" for missing commission, margins, prices etc.
In the output of the placeOrder example I see the same value for initial margin, maintenance margin commissions and many other properties: 1.7976931348623157E308. This is the default Number.MAX_VALUE.
Is the data really not available, or does the package not have the algorithm to decode it? In many places, a better value would be "null".
Search for "1.7976931348623157" below:
[openOrder] orderId=144 contract={"conId":107113386,"symbol":"FB","secType":"STK","expiry":"","strike":0,"right":"?","multiplier":"","exchange":"SMART","currency":"USD","localSymbol":"FB","tradingClass":"NMS","comboLegsDescrip":""} order={"orderId":144,"action":"BUY","totalQuantity":1,"orderType":"LMT","lmtPrice":0.01,"auxPrice":1.7976931348623157e+308,"tif":"GTC","ocaGroup":"","account":"U327195","openClose":"C","origin":0,"orderRef":"","clientId":0,"permId":1534811360,"outsideRth":false,"hidden":false,"discretionaryAmt":0,"goodAfterTime":"","faGroup":"","faMethod":"","faPercentage":"","faProfile":"","goodTillDate":"","rule80A":"","percentOffset":1.7976931348623157e+308,"settlingFirm":"","shortSaleSlot":0,"designatedLocation":"","exemptCode":-1,"auctionStrategy":0,"startingPrice":1.7976931348623157e+308,"stockRefPrice":1.7976931348623157e+308,"delta":1.7976931348623157e+308,"stockRangeLower":1.7976931348623157e+308,"stockRangeUpper":1.7976931348623157e+308,"displaySize":null,"blockOrder":false,"sweepToFill":false,"allOrNone":false,"minQty":1.7976931348623157e+308,"ocaType":3,"eTradeOnly":false,"firmQuoteOnly":false,"nbboPriceCap":1.7976931348623157e+308,"parentId":0,"triggerMethod":0,"volatility":1.7976931348623157e+308,"volatilityType":0,"deltaNeutralOrderType":"None","deltaNeutralAuxPrice":1.7976931348623157e+308,"deltaNeutralConId":0,"deltaNeutralSettlingFirm":"","deltaNeutralClearingAccount":"","deltaNeutralClearingIntent":"","deltaNeutralOpenClose":"?","deltaNeutralShortSale":false,"deltaNeutralShortSaleSlot":0,"deltaNeutralDesignatedLocation":"","continuousUpdate":0,"referencePriceType":0,"trailStopPrice":1.7976931348623157e+308,"trailingPercent":1.7976931348623157e+308,"basisPoints":1.7976931348623157e+308,"basisPointsType":1.7976931348623157e+308,"scaleInitLevelSize":1.7976931348623157e+308,"scaleSubsLevelSize":1.7976931348623157e+308,"scalePriceIncrement":1.7976931348623157e+308,"hedgeType":"","optOutSmartRouting":false,"clearingAccount":"","clearingIntent":"IB","notHeld":false,"algoStrategy":"","whatIf":false} orderState={"status":"PendingCancel","initMargin":"1.7976931348623157E308","maintMargin":"1.7976931348623157E308","equityWithLoan":"1.7976931348623157E308","commission":1.7976931348623157e+308,"minCommission":1.7976931348623157e+308,"maxCommission":1.7976931348623157e+308,"commissionCurrency":"","warningText":""}
This I bothering me for a while and has to be fixed!
I just checked the gateway log and this crap is coming from IB itself. So this not a node-ib issue.