QTusers Forum
February 11, 2012, 05:07:22 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the QuoteTracker Users Discussion Forum
Latest QuoteTracker Version is 3.9.7
Released on April 13th 2010

 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Perl QTracker Code?  (Read 918 times)
adam12
New Member
*
Posts: 4


« on: July 07, 2008, 10:00:37 PM »

Does anyone have some working Perl code or samples?  If not I'm going to do it from scratch and make a CPAN module for it but I'd rather start out on the shoulders on someone else.

Thanks,
Adam
Logged
ColinRiche
support
Hero Member
****
Posts: 149



« Reply #1 on: July 07, 2008, 10:49:45 PM »

Does anyone have some working Perl code or samples?  If not I'm going to do it from scratch and make a CPAN module for it but I'd rather start out on the shoulders on someone else.

Thanks,
Adam

http://www.boogster.net/blog/?p=4614

if you could give us some feedback here then that would be great

cheers


 007
Logged
adam12
New Member
*
Posts: 4


« Reply #2 on: July 08, 2008, 09:37:26 PM »

Thanks for the link but that's not exactly what I was looking for.  I want to use a socket made in Perl to suck tick data from MB Trading.

I found this code which the author said should work for the RECDESC record but I don't seem to get any response back.  I called MB Trading and they verified the IP and port are correct.  First I'd just like to make sure I can connect properly.

Any ideas?

Code:
#!/usr/bin/perl
use IO::Socket::INET;

sub OpenSocket
{
my $name = '64.93.81.10';
my $port = 5020;
$socket = IO::Socket::INET->new('PeerAddr' => $name,
'PeerPort' => $port,
'Proto' => 'tcp')
or die "Can't create socket ($!)\n";
}

sub Send
{
my $data = $_[0];
my $terminator=pack("h2", "FF");
print $socket $data;
print $socket $terminator;
}

OpenSocket();

Send('<RECDESC><ReqType>SNAP</ReqType></RECDESC>');

while (defined($_ = $socket->getline)) {print;}

close $socket;
exit;
Logged
adam12
New Member
*
Posts: 4


« Reply #3 on: July 08, 2008, 09:59:43 PM »

Okay I figured something out.  I didn't get that the QuoteTracker API interfaced directly with QuoteTracker.  I thought the API was an interface method to the broker to suck data directly off of their feed.

I wanted to use a Linux box to just sit there and collect data directly from MB Trading.  Is this possible?
Logged
ColinRiche
support
Hero Member
****
Posts: 149



« Reply #4 on: July 09, 2008, 09:22:50 PM »

Okay I figured something out.  I didn't get that the QuoteTracker API interfaced directly with QuoteTracker.  I thought the API was an interface method to the broker to suck data directly off of their feed.

I wanted to use a Linux box to just sit there and collect data directly from MB Trading.  Is this possible?

Use QuoteTracker to pull in the data from MB
then use QT's API to feed the data into the Linux box

i think i have that correct, Jerry ?

 Roll Eyes
Logged
ydfah
support
Hero Trader
****
Posts: 711


« Reply #5 on: July 10, 2008, 02:13:54 AM »

That will work, though you would need to email QT support to get the modification that will allow you to connect to QT API from machines on your LAN.
Logged
ColinRiche
support
Hero Member
****
Posts: 149



« Reply #6 on: July 10, 2008, 11:52:03 AM »

Adam,

You appear to have some experience with Perl

I want to use Perl on a windows box
but running into problems when installing modules

any tips ?

cheers
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!