Error in getpostions

SnehaTVR
I use Vb.net and trying to getpositions however i am getting error saying Unbable to parse data. KiteConnect.DataException
HResult=0x80131500
Message=Unable to parse data. {"tradingsymbol":"BANKNIFTY23MARFUT","exchange":"NFO","instrument_token":9685250,"product":"NRML","quantity":50,"overnight_quantity":50,"multiplier":1,"average_price":41035.675,"close_price":40487.55,"last_price":40860,"value":-2051783.7500000002,"pnl":-8783.750000000233,"m2m":18622.499999999767,"unrealised":-8783.750000000233,"realised":0,"buy_quantity":50,"buy_price":41035.675,"buy_value":2051783.7500000002,"buy_m2m":2024377.5000000002,"sell_quantity":0,"sell_price":0,"sell_value":0,"sell_m2m":0,"day_buy_quantity":0,"day_buy_price":0,"day_buy_value":0,"day_sell_quantity":0,"day_sell_price":0,"day_sell_value":0}
Source=KiteConnect
StackTrace:
at KiteConnect.Position..ctor(Dictionary`2 data)
at KiteConnect.PositionResponse..ctor(Dictionary`2 data)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at KiteConnect.Kite.GetPositions()
at AARobot.frm_Main.TakeStraddleTrade() in H:\VS2019\AARobot\AARobot\frm_Main.vb:line 2143
at AARobot.frm_Main.b_IndexRange_Click(Object sender, EventArgs e) in H:\VS2019\AARobot\AARobot\frm_Main.vb:line 1152
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at AARobot.My.MyApplication.Main(String[] Args) in :line 81

Inner Exception 1:
RuntimeBinderException: Cannot implicitly convert type 'double' to 'decimal'. An explicit conversion exists (are you missing a cast?)
Tagged:
Sign In or Register to comment.