googlethingiemajig
Broker Client Package Documentation

Back to Index

The BCP, or 'Broker Client Package' is a piece of opensource software. Ofcourse you can download it at any time you want, but you will need a username and password for PolitiCap and you will need to be approved as a PolitiCap stock broker before you can actually use the software.

Back to Index

The prefab BCP is written in PHP CLI (command line interface). This means that when you have the PHP command line interface running on your Linux/Windows PC, you should be able to download the BCP, configure it and run it in it's very basic form. So the goal here is simplicity and to allow anybody with a very basic technical knowledge to act as a broker.
The rest of this document will be very technical for those that want to 'tweak' their own BCP. Those people that are not interested in the technical aspects can simply stop reading here and continue to 'Using the BCP'.

Back to Index

As a stockbroker, obviously you will want to be able to see all the orders your clients enter. This functionality is built into the PolitiCap website as well as in the BCP. You will want to see who your clients are, you will want to approve client signups and you will want to be able to promote yourself. Furthermore it will be very convenient for you if your BCP could actively handle all the trade matching for you (if perhaps there's a match between two or more of your own clients) or have orders that cannot (yet) be matched be relayed onto the ECN (Electronic Commerce Network) you use.
All of the above obviously requires a lot of data access, and this is basically what the BCP gives you. Since the data is located on the PolitiCap server, the BCP needs some way to get access to your data. The BCP does so through a mechanism called 'REST', which means 'Representational State Transfer', a big word for a programmatic way to access data from a remote server.
Imagine accessing a webserver (which is what your browser does all the time) and you would want to retrieve a listing of all the orders that have the state 'Open'. You could make an URI for this which looks like http://www.politicap.eu/bcp_orderlist.php?state=open. Here you specify the URL, http://www.politicap.eu/bcp_orderlist.php and the URN ?state=open
We have always found this terminology to be confusing! Therefore we will simply talk about:
  • Servername: http://www.politicap.eu
  • Location: /bcp_orderlist.php
  • Arguments: ?status=open
Ofcourse this is very simplified. 'http' is after all the protocol, not the servername, etc. etc. But let's just leave it at this.
It is easy to see that when http://www.politicap.eu/bcp_orderlist.php?status=open really exists (and it does!), when we go there using our browser, we could actually get some data from it! When you're already approved as a broker, indeed you could just click on the above link and you would see this data! However, the data comes out in a funny looking format which is called XML. XML is very structured data which can easily be interpreted by a computer program, so while you could click on the link above you wouldn't get anything pretty looking out of that page, just nasty looking text!
So while the /bcp_orderlist.php location is just one location that the BCP could visit and the argument ?status=open is just one of the arguments you can pass to this location, are there any more usefull locations? Well why ofcourse there are! The BCP will use many of them and in order to let programmers tweak around a bit, we will supply you here with all possible BCP locations, the arguments you can pass to them and the results you might expect back when you do!

Back to Index

Ok, so in this document we will document all the RESTfull BCP pages. There will be many more RESTfull pages ofcourse, but these will be for Market makers, ECN's, Underwriters etc. and they will be documented in their own documentation section. That's right, just like there's a BCP, there will be a Market Maker Client Package MMCP, an ECN Client Package ECP, etc.
More to come