Generic version of Pi Bridge

I have enabled pi bridge option for my account. And post activation I have downloaded the pi application along with pi bridge installation files. Installation of Pi has gone through and when I install the pi bridge, it says Amobroker is not installed. As per the documentation of pi brdige, there are 2 versions of it a) Amiboroker version b) Generic version for other programming laguages. I am interested in geenric version, where can i get this generic version of pi bridge installer? I tried reaching out to zerodha customer support and they said a call will be scheduled to address this issue. But, I haven’t heard back from them yet. Hopefully this forum will help me get answer.

Any help on this much appreciated.

Pi bridge for the programming languages is the socket documentation which pushes signals through TCP/IP connection, and it does not requires any setup or installation. you can check the complete programming documentation from this Link and you can find some sample python programs also from above link, and this is exclusively only for the coders/programmers.

1 Like

Thanks. When I open the pi application, I see that ‘pi bridge’ status is always shown as Off (red in color) as shown in the snapshot

Can you please help me how to switch on this pi bridge. Also, when I execute my program to place order using socker programming, I do not see any messages arriving to pi though the program succeeded in sending the order. Where can i check the logs?

I checked the piBridge.log under c:/Zerodha/pi and found below error message:

New Client connection accepted ip = 127.0.0.1:63578
You have provided invalid/remaining quantity, Quantity should be at-least one lot.
Error::Not a valid packet format request,please verify and try again!
9/20/2017 3:38:58 PM: Error in request packet start:
LONG_7_Buy1_5D6KE5Y7422GL9L
nse_cm
DHFL
** LongSide**
** 1**
** 0**
** 601.1**
** 0**
CNC
** 0**
MKT
DV4177
IOC
** Error in request packet end: **
Exception 1: Connection was forcibly closed from client side, need to relogin.
Exception 2: An existing connection was forcibly closed by the remote host

But, In my program I am passing the initial qty correctly as 1. Not sure why is it throwing error. below is the sample snippet of my code which is doing this.

public static void main(String[] args) throws IOException, InterruptedException {

	Socket socket = new Socket(InetAddress.getLoopbackAddress(), 18579);
	NativeDataOutputStream ndos = new NativeDataOutputStream(new BufferedOutputStream(socket.getOutputStream()));

	MsgHeader header = new MsgHeader();

	Order order = new Order();
	**order.setInitialQty(1);**
	order.setSymbol("DHFL");
	order.setClientOrderID("Buy1");
	order.setOrderSide(Order.ORDERSIDE_BUY);
	order.setLimitPrice(601.1); 

	header.toStream(ndos);
	order.toStream(ndos);
	Thread.sleep(5000);
	System.out.println("Closing Program");
}

I am using the same sample program shipped with “OtherProgramHelp.zip” downloaded from pi bridge help page. I am using java based sample program.

Also, I have enabled 2-way semi auto mode under pi bridge settings in view -> user settings

Please help on this.

Any update on this?

I checked the piBridge.log under c:/Zerodha/pi and found below error message:

New Client connection accepted ip = 127.0.0.1:63578
You have provided invalid/remaining quantity, Quantity should be at-least one lot.
Error::Not a valid packet format request,please verify and try again!
9/20/2017 3:38:58 PM: Error in request packet start:
LONG_7_Buy1_5D6KE5Y7422GL9L
nse_cm
DHFL
** LongSide**
** 1**
** 0**
** 601.1**
** 0**
CNC
** 0**
MKT
DV4177
IOC
** Error in request packet end: **
Exception 1: Connection was forcibly closed from client side, need to relogin.
Exception 2: An existing connection was forcibly closed by the remote host

But, In my program I am passing the initial qty correctly as 1. Not sure why is it throwing error. below is the sample snippet of my code which is doing this.

public static void main(String[] args) throws IOException, InterruptedException {

Socket socket = new Socket(InetAddress.getLoopbackAddress(), 18579);
NativeDataOutputStream ndos = new NativeDataOutputStream(new BufferedOutputStream(socket.getOutputStream()));

MsgHeader header = new MsgHeader();

Order order = new Order();
**order.setInitialQty(1);**
order.setSymbol("DHFL");
order.setClientOrderID("Buy1");
order.setOrderSide(Order.ORDERSIDE_BUY);
order.setLimitPrice(601.1); 

header.toStream(ndos);
order.toStream(ndos);
Thread.sleep(5000);
System.out.println("Closing Program");

}
I am using the same sample program shipped with “OtherProgramHelp.zip” downloaded from pi bridge help page. I am using java based sample program.

Also, I have enabled 2-way semi auto mode under pi bridge settings in view -> user settings

Please help on this.