line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PFIX; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
69633
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
60
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
311
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
PFIX - Perl FIX protocol library! |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Version 0.02 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Perl FIX protocol implementation. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The Financial Information eXchange (FIX) Protocol is a messaging standard developed specifically for the real-time electronic exchange of securities transactions. FIX is a public-domain specification owned and maintained by FIX Protocol, Ltd. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This module offers some simple methods to parse or build a FIX message. |
26
|
|
|
|
|
|
|
It has knowledge of the FIX dictionary. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
The module here is vastly imcomplete but was written for an interface project (now in production) and thus is operational. |
29
|
|
|
|
|
|
|
However to take it to the next step it needs more work. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Although I will do my best to minimise radical changes, next versions may not be backward compatible - be prepared (sorry). |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
use PFIX::Message; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# create a FIX message object |
37
|
|
|
|
|
|
|
my $msg = PFIX::Message->new(version=>'FIX44'); |
38
|
|
|
|
|
|
|
# initialise it with a string |
39
|
|
|
|
|
|
|
$msg->fromString("8=FIX.4.4\0019=41\00135=.........10=011"); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# set some fields |
42
|
|
|
|
|
|
|
$msg->setField('Symbol','IBM'); # assign value using tag name |
43
|
|
|
|
|
|
|
$msg->setField(56,'TARGETSYSTEM'); # assign value using tab number |
44
|
|
|
|
|
|
|
# get some field values |
45
|
|
|
|
|
|
|
$msg->getField(11); |
46
|
|
|
|
|
|
|
# delete fields |
47
|
|
|
|
|
|
|
$msg->delField(123); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# now produce new FIX protocol string. |
50
|
|
|
|
|
|
|
my $str=$msg->toString(); |
51
|
|
|
|
|
|
|
... |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 function1 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
0
|
1
|
|
sub function1 { |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 function2 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
0
|
1
|
|
sub function2 { |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
"Gabriel Galibourg", C<< <""> >> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 BUGS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
76
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
77
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
perldoc PFIX |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
You can also look for information at: |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * CPAN Ratings |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * Search CPAN |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
L |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=back |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Copyright 2010 "Gabriel Galibourg". |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
120
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
121
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=cut |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
1; # End of PFIX |