Alien::InteractiveBrokers - Provides installation and config information for the InteractiveBrokers API
use Alien::InteractiveBrokers; my $IBAPI = Alien::InteractiveBrokers->new(); my $path = $IBAPI->path(); my $includes = $IBAPI->includes(); my $classpath = $IBAPI->classpath(); my $version = $IBAPI->version();
This module automates the installation of the InteractiveBrokers API files and source code, and provides accessor functions to describe its location, include paths, etc.
It was developed in conjunction with Finance::InteractiveBrokers::SWIG and POE::Component::Client::InteractiveBrokers, as a way of simplifying distribution and installation of these needed files.
Please see Alien for an explanation of the Alien namespace.
This module can install (downloading if necessary) and provide an interface for the following InteractiveBrokers API versions:
It currently comes bundled with IB API v9.66 (the latest production release).
my $IBAPI = Alien::InteractiveBrokers->new();
Create a new Alien::InteractiveBrokers object for querying the installed configuration.
ARGUMENTS: None.
RETURNS: blessed $object, or undef on failure.
$object
undef
my $path = $IBAPI->path();
Get the base install path of the uncompressed IBJts directory.
RETURNS: Directory $name, with no trailing path separator.
$name
# As string my $includes = $IBAPI->includes(); # As list my @includes = $IBAPI->includes();
Get the required -I include directives for compiling against this library.
-I
RETURNS: Depending on context, returns a $scalar containing all the paths joined with spaces, as -I/path, or an @array containing all the paths, as -I/path, one-per-element.
$scalar
-I/path
@array
my $classpath = $IBAPI->classpath();
Get the Java CLASSPATH value for the jtsclient.jar file containing the compiled com.ib.client classes.
CLASSPATH
RETURNS: Full path to jtsclient.jar, ready for the environment.
my $api_version = $IBAPI->version();
Get the version of the installed IB API.
(Not to be confused with Alien::InteractiveBrokers $VERSION, which is this Perl wrapper's version number.)
$VERSION
RETURNS: IB API version number, as read from $path/API_VersionNum.txt
$path/API_VersionNum.txt
use Alien::InteractiveBrokers qw( path includes classpath version );
This module OPTIONALLY exports the following subs:
"path()"
"includes()"
"classpath()"
"version()"
POE::Component::Client::InteractiveBrokers
Finance::InteractiveBrokers::API
Finance::InteractiveBrokers::SWIG
Finance::InteractiveBrokers::Java
The POE documentation, POE::Kernel, POE::Session
http://poe.perl.org/ - All about the Perl Object Environment (POE)
http://www.interactivebrokers.com/ - The InteractiveBrokers website
http://www.interactivebrokers.com/php/apiUsersGuide/apiguide.htm - The IB API documentation
The examples/ directory of this module's distribution
Jason McManus, <infidel at cpan.org>
<infidel at cpan.org>
Many of the build scripts in this module were modelled on Alien::IE7.
Please report any bugs or feature requests to bug-alien-interactivebrokers at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Alien-InteractiveBrokers. The authors will be notified, and then you'll automatically be notified of progress on your bug as changes are made.
bug-alien-interactivebrokers at rt.cpan.org
If you are sending a bug report, please include:
Your OS type, version, Perl version, and other similar information.
The version of Alien::InteractiveBrokers you are using.
The version of the InteractiveBrokers API you are using.
If possible, a minimal test script which demonstrates your problem.
This will be of great assistance in troubleshooting your issue.
You can find documentation for this module with the perldoc command.
perldoc Alien::InteractiveBrokers
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-InteractiveBrokers
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Alien-InteractiveBrokers
CPAN Ratings
http://cpanratings.perl.org/d/Alien-InteractiveBrokers
Search CPAN
http://search.cpan.org/dist/Alien-InteractiveBrokers/
Copyright (c) 2010-2012 Jason McManus
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
The authors are not associated with InteractiveBrokers, and as such, take no responsibility or provide no warranty for your use of this module or the InteractiveBrokers service. You do so at your own responsibility. No warranty for any purpose is either expressed or implied by your use of this module suite.
The data from InteractiveBrokers are under an entirely separate license that varies according to exchange rules, etc. It is your responsibility to follow the InteractiveBrokers and exchange license agreements with the data.
To install Alien::InteractiveBrokers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alien::InteractiveBrokers
CPAN shell
perl -MCPAN -e shell install Alien::InteractiveBrokers
For more information on module installation, please visit the detailed CPAN module installation guide.