Finance::OATS - Stub of a Perl extension to support generating OATS records
use Finance::OATS qw(:all); $MPID = "TEST"; $OSOID= 9999; # all variables must be set before first call to AddNewAndRoute and # friends # call AddNewAndRoute and AddCancel a bunch of times # closes last FORE file CloseFOREFile();
Simple module to generate ROE records for OATS and package them up into FORE files.
The NASDR OATS website, at http://www.nasd.com/web/idcplg?IdcService=SS_GET_PAGE&nodeId=377
None by default.
AddNewAndRoute AddCancel
CloseFOREFile
And a bunch of variables which can be used to tweak settings; settings must be tweaked before first call to AddNewAndRoute or AddCancel.
Mike Giroux, rmgiroux@acm.org
Copyright (C) 2006 by Mike Giroux and Wang Trading, LLC
This library is free software; you can redistribute it and/or modify it under the terms of the General Public License version 2, a.k.a. GPLv2.
See LICENSE file for details.
This library is released under the GPL with the kind permission of Dr. Meng-Yuan Wang, the Managing Partner of Wang Trading, LLC.
This library is a STUB. It's the beginnings of an OATS implementation, but it is far from complete. Many of the ROE fields contain hard-coded values which may not be appropriate to your case; please check them carefully!
Neither Wang Trading, M-Y Wang, nor Mike Giroux is responsible nor liable for any problems which may arise through the use of this library.
YOU are RESPONSIBLE for any files you upload to NASDR. _YOU_ are liable for fines if they are wrong. Please be very careful!
At a minimum, use the NASDR OATS test site and make sure everything looks good.
See the TBD comments.
Generates New Order and Route events for a new order
Arguments: Symbol => 'MSFT', Side => 'B', # or 'S', or 'SS', or 'SX' OrderID=> 'AISL-123', # our order ID Time => 'HHMMSS', # order timestamp Price => '12.12345', # price, in dollars, to 7 decimal places if need be Shares => 1200, # size, in shares MPID => 'ISLD', # sent-to MPID (opt., def ISLD) OtherID=> '123432', # exchange order ID Date => 'yyyymmdd', # optional, defaults to today IOC => 'IOC', # optional, specified if order is IOC Visible=> 'Y', # optional, 'Y' or 'N' # ******* TBD: LIST OUT OF DATE!!!! *********** RouteType=> 'C', # 38) Routing method code (defaults to 'C') # E routed elec to member firm # C routed to ECN # L routed to SelectNet # N routed non-electronic to memb firm # M routed to non-member firm # O routed to SuprtSOES # P routed to Primex # S routed to SOES # X routed to exchange ProgramTradingCode=>'Y',# optional, 'Y' or 'N' IndexArbCode=>'N', # optional, 'Y' or 'N' PriceType=>'LIM', # optional, 'LIM' or 'MKT'
Arguments: Symbol => 'MSFT', OrderID=> 'AISL-123', # our order ID Time => 'HHMMSS', # order timestamp CancelType=> 'F', # 'F'ull or 'P'artial, defaults to F SharesCanceled => 1200, # shares canceled SharesRemaining => 100, # shares canceled MPID => 'ISLD', # sent-to MPID (opt., def ISLD) Date => 'yyyymmdd', # optional, defaults to today
Generates Cancel/Replace report
Arguments: Symbol => 'MSFT', Side => 'B', # or 'S', or 'SS', or 'SX' OrderID=> 'AISL-123', # new order ID OrigOrderID=> 'AISL-122', # original order ID Time => 'HHMMSS', # new order timestamp OrigTime=> 'HHMMSS', # new order timestamp Price => '12.12345', # price, in dollars, to 7 decimal places if need be Shares => 1200, # size, in shares MPID => 'ISLD', # sent-to MPID (opt., def ISLD) OtherID=> '123432', # exchange order ID Date => 'yyyymmdd', # optional, defaults to today IOC => 'IOC', # optional, specified if order is IOC Visible=> 'Y', # optional, 'Y' or 'N' RouteType=> 'C', # 38) Routing method code (defaults to 'C') # E routed elec to member firm # C routed to ECN # L routed to SelectNet # N routed non-electronic to memb firm # M routed to non-member firm # O routed to SuprtSOES # P routed to Primex # S routed to SOES ProgramTradingCode=>'Y',# optional, 'Y' or 'N' IndexArbCode=>'N', # optional, 'Y' or 'N' PriceType=>'LIM', # optional, 'LIM' or 'MKT'
To install Finance::OATS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::OATS
CPAN shell
perl -MCPAN -e shell install Finance::OATS
For more information on module installation, please visit the detailed CPAN module installation guide.