Last update | June 2015 |
Environment | Windows |
Language | Pert |
Compilers | Strawberry Perl (http://strawberryperl.com/) |
Prerequisites | Required elements:
|
The goal of this Getting Started tutorial is to download, build and run the Refinitiv Knowledge Direct (or TRKD) for Perl sample to retrieve content from the RKD data services.
This tutorial is part of a series of tutorials enabling the access of RKD content utilizing different technologies. The series includes the following:
The RKD API does not require us to code using any particular technology platform. However, the RKD package references many examples utilizing popular technologies such as Java, Perl, PHP, Ruby, Websphere and .NET. In this tutorial, we will download the RKD Perl sample, review the contents of the package and build and run the sample. Let's walk through the following steps:
Access the RKD Perl sample package from the Downloads section.
Uncompress the Perl package in a directory of your choosing.
The Perl sample contains a single file demonstrating the ability to retrieve a Quote from TRKD. Prior to running this sample, we need to setup the user credentials. Within the file Quotes.pl, assign your credentials within this section:
# Application
use constant APPLICATIONID => '';
use constant USERNAME => '';
use constant PASSWORD => '';
> Perl Quotes.pl
Content-type: text/html
RKD Token: E61F7BA516A9D6B9E75AA06B17F6BBD61C0908320EB70ECA1362F9BAB2AB591F72B37EF33C47111AB6F7AE213EDD9887519C6D1023CACA347A7AD4A11C50DF4535A8A4C91D1A2611EF30BEBDAFA0EDF3EBC968BC77AE558CBB448914140AFF9B
...
DSPLY_NAME : INTL BUS MA
TRDPRC_1 : 172.69
TRDPRC_2 : 172.68
TRDPRC_3 : 172.67
TRDPRC_4 : 172.68
TRDPRC_5 : 172.68
NETCHNG_1 : -0.65
HIGH_1 : 173.27
LOW_1: 172.28
PRCTCK_1 : 
CURRENCY : USD
TRADE_DATE : 22 MAY 2015
OPEN_PRC : 173.04
HST_CLOSE : 173.34
BID : 172.68
ASK : 172.72
NEWS_TIME : 16:19
BIDSIZE : 2
ASKSIZE : 1
ACVOL_1 : 303384
EARNINGS : 15.5537
YIELD : 2.9999
PERATIO : 11.144
6
DIVIDENDTP :
DIVPAYDATE : 10 JUN 2015
EXDIVDATE : 06 MAY 2015
CTS_QUAL :
BL
KCOUNT : 1
BLKVOLUM : 36938
TRD_UNITS : 4DP
PCTCHNG : -0.375
DJTIME :
CLOSE_BID : 173.4
CLOSE_ASK : 173.44
DIVIDEND : 5.2
HSTCLSDATE : 21 MAY 2015
YRHIGH :
196.4
YRLOW : 149.56
YCHIGH_IND :
YCLOW_IND :
CUM_EX_MKR :
PRC_QL2 :
TRDVOL_1 : 100
BID_MMID1 :
ASK_MMID1 :
OPTION_XID : YCHMOT
YRHIGHDAT : 28
JUL 2014
YRLOWDAT : 29 JAN 2015
IRGPRC : 172.68
IRGVOL : 72
IRGCOND : ODD
SALTIM : 19:27:56
GV3_TEXT :
QUOTIM : 19:27:58
GV2_FLAG :
GV3_FLAG :
GV4_FLAG :
EXCHTIM : 19:27:56
VOL_X_PRC1 : 172.7205
ADJUST_CLS : 173.34
STOCK_TYPE :
IMP_VOLT : 0.0
RDN_EXCHD2 : NYS
YEAR_FCAST : 06N
PCT_ABNVOL : 0.4529
BC_10_50K
: 1
BC_50_100K : 0
BC_100K : 0
PMA_50D : 165.9734
PMA_150D : 162.2589
PMA_200D
: 169.0744
VMA_10D : 669831
VMA_25D : 882737
VMA_50D : 1067763
PRC_QL3 : R
OFF_CLOSE : 0.0
MNEMONIC : IBM
FIN_STATUS : N
TRD_THRU_X :
CF_ASK : 172.72
CF_BID : 172.68
CF_CLOSE : 173.34
CF_DATE : 22 MAY 2015
CF_EXCHNG : NYS
CF_HIGH : 173.27
CF_LAST : 172.69
CF_LOW : 172.28
CF_NETCHNG : -0.65
CF_OPEN : 173.04
CF_SOURCE : NYS
CF_TICK : 
CF_TIME : 19:27:00
CF_VOLUME : 303384
CF_YIELD : 2.
9999
CF_NAME : INTL BUS MACHINE
CF_CURRENCY : USD