Dissecting the Nest Plus Auto Trading API

radha55

Well-Known Member
Can you please post the screenshot of your NestPlus Dashoard.

Yes, I guess I overlooked. My trading plugin was disabled, after getting this unlocked, calls are going fine. I am now using PHP to call the API - works like charm.

Only thing missing with API is getting the order status, and admin positions.
 

radha55

Well-Known Member
Hi All Experts,

I have applied for activating Plus Trading Plugin to Zerodha.

The support guys told be it is chargeable @250/- + taxes every month.

Currently when i m trying to run macro code from excel, i am getting below error in excel



I understand there is some dll or activeX component missing.
Can anyone please help to how should i avoid this error or where can i set the path for correct dll or activeX component.
 

yusi

Well-Known Member
Can anyone please help to how should i avoid this error or where can i set the path for correct dll or activeX component.
Why don't you try the equivalent code from AmiBroker? ( as given at http://www.traderji.com/algo-automa...-nest-plus-auto-trading-api-2.html#post811717 ).

This will at least eliminate any Excel issues (it worked fine for me). And identify if it is a Nest Trader issue. Should not take more than a couple of minutes.

If it does not work, note the AmiBroker error / Nest error as given in the log.
 

radha55

Well-Known Member
Hi yusi,

i dont know how to work with amibroker nor with afl.

i am writing my program in excel and based on few triggers, i want to place buy/sell order. Later i want to do same thing in VB.NET if all worked fine in excel.

so i am putting effort for excel work.

i just talked with one of my friend and he mentioned i need to register some activeX, but i dont know how to do this.....
 

yusi

Well-Known Member
i just talked with one of my friend and he mentioned i need to register some activeX, but i dont know how to do this.....
The required registry entries are ready when you install Nest. So I will make one attempt to help you with AmiBroker...

1. Start AmiBroker.
2. Open the AFL editor from the menu with Analysis -> Formula Editor
3. Paste the line plusObject = CreateObject("nest.plusapi");
4. Click the Verify Syntax icon in the toolbar (the graphic icon is AFL with a tick mark).

You will see an error / warning in the lower part of the screen. If you get a warning : Ln 1, Col 27 : Warning 503, then everything is okay and you Nest API interface is okay and the registry entries are available; you can proceed as below. If any other error / warning, let me know.

5. Ensure that Nest is running, and that you are logged into Plus.
6. In the AFL editor, add a second line plusObject.SetObjectName("DryRun");
7. Click the Verify Syntax icon in the Ami toolbar.

Is there any error for line 2? Do you get a 'COM / obj handle is null' or other error ? Also check in the Nest Trader Message Bar if any error is reported.

If you do not want to check with AmiBroker, that is okay.
 

radha55

Well-Known Member
Kudos.......


Finally I am able to place an order into Nest Plus using Excel sheet.

Truly said, you can achieve anything if u ask for help and put in your efforts..

Here are few troubeshooting steps that i did to achieve this.

First of all thanks to Yusi for always posting reply for my silliest queries. I sent many PM to multiple users here, no one replied but yusi tried his best to reply.

so here it goes.

1. When i first attempted to place order in Nest using Excel sheet, i got error "Object Name not set".
Resolution : I actvated "Plus Trading Plugin" in my Nest Plus Dashboard". See screenshot below


2. Since i was misguided by Zerodha executive of heavy hectic price to activate Plus Trading Plugin, and i was busy with my other stuff, i kept silent for few days.

3. Few days back when i again tried to place order by installing latest version of Zerodha, i got error saying "cannot create object.... Error code : 429".
Resolution: After searching on internet i found it is mostly because of bad registry entries. So i did below steps, i really dont know which trick worked, but it worked.
a. Uninstall zerodha trader.
b. Run AVG PC Analyser which identifies all bad registry entries on your machine and deletes them
c. installed .Net Framework 4.0 (some where over internet this was also a solution)
4. I reinstalled Zerodha.
5. Restarted my machine and tried same code from excel. It worked.

Now i need to work and debug more in this api.

Thanks to all those who took effort to reply me.
 
Hi Radha55,

Would be able to share the code which you got working in Excel? I am new to coding macros in Excel.

Just a sample would do so I get a idea of how the calls are made.

TIA.

Kudos.......


Finally I am able to place an order into Nest Plus using Excel sheet.

............
 

radha55

Well-Known Member
hi jsans,

create a macro names Test and copy below code there. and then run this macro.

Sub TestIE()
Set plusObject = CreateObject("nest.plusapi")
Call plusObject.SetObjectName("DryRun")
Call plusObject.PlaceOrder("BUY", "OrderNo_1", "NSE", "HINDALCO-EQ", "DAY", "LIMIT", 1, 140.05, 0, 1, "CNC", "DYxxx-13906")
End Sub
 

Similar threads