I am trying to Place an order using Vb.net with kiteconnect.dll . but it not working . my code mentioned below , Kindly help me to solve this problem ,
like ( kite.GetInstruments(), kite.GetHoldings() ) working fine
Private Sub txtOrder_Click(sender As Object, e As EventArgs) Handles txtOrder.Click Dim user As User = kite.RequestAccessToken(RequestToken, MySecret) Dim MyAccessToken As String = user.AccessToken Dim MyPublicToken As String = user.PublicToken kite.SetAccessToken(MyAccessToken) MsgBox(MyAccessToken)
Can you post the error message you are getting back to PlaceOrder function? You can also provide Debug param as True while you create a new object of Kite. This will print more debug information to console.
i got these type of information in my console window
A first chance exception of type 'System.EntryPointNotFoundException' occurred in mscorlib.dll A first chance exception of type 'System.Net.WebException' occurred in System.dll A first chance exception of type 'System.Net.WebException' occurred in System.dll
Dim kite As New Kite(MyAPIKey, Debug:=True) Dim user As User = kite.RequestAccessToken(RequestToken, MySecret) Dim MyAccessToken As String = user.AccessToken Dim MyPublicToken As String = user.PublicToken kite.SetAccessToken(MyAccessToken) txtAcess.Text = MyAccessToken Dim res As Dictionary(Of String, Object) res = kite.PlaceOrder("NSE", "INFY", "BUY", "100", Product:="MIS", OrderType:="MARKET") res.ToList() dgv1.DataSource = res.ToList
Debug already in True condition
i got these type of information in my console window
A first chance exception of type 'System.EntryPointNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.WebException' occurred in System.dll
Thanks for your Help.
My problem solved .
Here is my New code :
Dim kite As New Kite(MyAPIKey, Debug:=True)
Dim user As User = kite.RequestAccessToken(RequestToken, MySecret)
Dim MyAccessToken As String = user.AccessToken
Dim MyPublicToken As String = user.PublicToken
kite.SetAccessToken(MyAccessToken)
txtAcess.Text = MyAccessToken
Dim res As Dictionary(Of String, Object)
res = kite.PlaceOrder("NSE", "INFY", "BUY", "100", Product:="MIS", OrderType:="MARKET")
res.ToList()
dgv1.DataSource = res.ToList