Professional Documents
Culture Documents
DatafeedspecG4 00b - 3
DatafeedspecG4 00b - 3
DatafeedspecG4 00b - 3
Technical Specifications
Version G4.00b
IDX
Indonesia Stock Exchange, Inc.
CHANGES NOTE
INTRODUCTION
The IDX Data Feed is a continuous data stream transmitted from the IDX Trading System. The
data transmission is available every market day between 8:30 am and 5:30 pm. The transmitted
data contains trading information for every securities traded in the IDX.
The IDX data stream is continuously transmitted from the IDX site to the subscriber’s site by
using TCP/IP protocol. Data feed system will sent the stream to the client based on client profile
or reading option passed in the handshaking process.
Previous day data stream is available upon request and saved in text file.
DATA
The Data Feed consists of data transmitted as records. Records are transmitted continuously.
There are:
• A trade may be sent before orders although the orders come first.
RECORD FORMATS
Date : 8 Bytes
Date presented in YYYYMMDD format.
Checksum : 2 Bytes
The C language algorithm (appendix A) is used to calculate the checksum
All the characters that come up before the checksum including the header are
used as the parameters for the checksum algorithm.
CR : 1 Byte
Carriage Return / 13th ASCII
LF : 1 byte
Line Feed / 10th ASCII
Data format
Field Name Type Width Dec Description
#
1.1 Status Char 1 - Possible values are:
'1' for Begin sending records
'2' for Still sending records: idle time
'3' for Begin first session
'4' for End first session
'5' for Begin second session
'6' for End second session
‘7’for End sending records
‘8’ for Begin Pre-opening
‘9’ for End Pre-opening
1.2 Message Char 30 - • Begin sending records
• idle
• Begin first session
• End first session
• Begin second session
• End second session
• End sending records
• Begin Pre-opening
• End Pre-opening
Notes: Before the First Session begins, sometimes the trading system is shut down for some
static data updating. In this case, Trading Status ‘7’ (end sending record) will be
sent. All data that have been sent are canceled. When the Trading Engine is re-
started, Trading Status ‘1’ will be sent again and the data will be sent starting from
the very beginning.
Description:
JSX Header
| Separator
20081230 Date
| Separator
100001 Time
| Separator
0123456 Sequence #
| Separator
0 Record type
| Separator
3 Status
| Separator
Begin First Message
Session
| Separator
(CS) Checksum
(CR) Carriage Return
(LF) Line Feed
1.1 Order
1.2 Trade
Record format
Field # Name Type Width Dec Description
2.1 *) Trade Time Integer 6 HHMMSS
2.2 Trade command (Matched / Integer 1 0 = Matched
Withdrawn) 1 = Withdrawn
2.3 Security code Char 10
2.4 Board code Char 4 Possible values are:
See apendix D
2.5 Trade # Long 8
2.6 Price Num 14 2
2.7 Volume Num 12 0 In unit size
2.8 Buyer code Char 4 -
2.9 Buyer Type (Investor Type) Char 1 - Possible values are:
‘F’ = Foreign
‘D’ = Domestic
'H' = House Acc.
2.10 Seller code Char 4 -
2.11 Seller Type (Investor Type) Char 1 - Possible values are:
‘F’ = Foreign
‘D’ = Domestic
'H' = House Acc.
2.12 Best Bid Price Double 14 2
2.13 Best Bid Volume Double 12 0
2.14 Best Offer Price Double 14 2
2.15 Best Offer Volume Double 12 0
2.16 Buyer order No. Num 10 0 Order Sequence #
2.17 Seller order No. Num 10 0 Order Sequence #
Record format
Field # Name Type Width Dec Description
3.1. Security Code Char 10 -
3.2. Security Name Char 30 -
3.3 Security status Char 1 - Possible values are:
‘0’ = Active Stock
‘1’ = Suspended Stock
3.4 Security Type Char 1 - possible value:
‘O’ : Ordinary stock
‘R’ : Right
‘W’ : Warrant
‘M’ : Mutual Fund (ETF)
3.5. Sector Char 4 - possible value:
see appendix D for detail
3.6 IPO Price Num 14 2
3.7 Base Price Num 14 2
3.8 Listed shares Num 14 0 Issued Shares= Listed Shares
3.9 Tradable listed Num 14 0
shares
3.10 Shares per Lot Integer 5 0
Data format
Field # Name Type Width Dec Description
4.1 Broker code Char 8 -
4.2 Broker name Char 30 -
4.3 Broker status Char 1 - Possible values are:
‘0’ = Active broker
‘1’ = Suspended broker
Record format
Field # Name Type Width Dec Description
5.1. Security Code Char 10**) -
5.2 Board code Char 4
5.3 Remarks Char 8 - See Appendix G
5.4 Previous price Num 14 2
5.5 Highest price Num 14 2
5.6 Lowest price Num 14 2
5.7 Closing price Num 14 2 Last traded price
5.8 Change Num 9 2 First character of this field is '+'
or ‘-’.
5.9 Traded volume Num 12 0
5.10 Traded value Num 16 0
5.11 Traded frequency Num 7 0
5.12 Individual index Num 14 4
5.13 # of available for Num 14 0 # of available shares for foreign
foreigners investors
5.14 Opening price Num 14 2
5.15 Best bid price Num 14 2
5.16 Best bid volume Num 12 0
5.17 Best offer price Num 14 2
5.18 Best offer volume Num 12 0
1.6 Indices
Data format
Field # Name Type Width Dec Description
6.1 Index code Char 10 - Possible value are:
‘COMPOSITE’
‘AGRI’
‘MINING
‘BASIC-IND’
‘MISC-IND’
‘CONSUMER’
‘PROPERTY’
‘INFRASTRUC’
‘FINANCE’
‘TRADE’
‘MANUFACTUR’
‘JII’
‘LQ 45’
‘MBX’
‘DBX’
6.2 Exchange base value double 17 0 Current base value
6.3 Exchange market value double 17 0 Current market value
6.4 Index double 14 4 Current index
Data format
Field # Name Type Width Dec Description
7.1 Broker code Char 8 -
7.2 Suspend/Release Char 1 - Possible values are:
flag 0 = Suspended
1 = Released
Data format
Field # Name Type Width Dec Description
8.1 Stock code Char 10 -
8.2 Suspend/Release Char 1 - 0 = Suspended
flag 1 = Released
1.9 News/Messages
Data format
Field # Name Type Width Dec Description
9.1 Message # Int 6 - Message ID
9.2 Subject Char 10 -
9.3 HeadLine/Title Char 40 -
9.4 Content (trimmed text) Char 2000 - News
Notes:
The Contrent may contain more than one line, each line separated by ‘double-slash‘ (‘//’).
Maximum characters in this column is 2.000 characters including ‘double-slash’ separator .
Data format
Field # Name Type Width Dec Length Description
10.1 Type Char 1 - Fixed Possible Value:
‘D’ for Cash Dividend
‘B’ for Bonus
‘S’ for Stock Dividend
‘R’ for Right Issue
10.2 Stock code Char 10 - Variable
10.3 Amount float 12 2 Variable Only for Cash Dividend,
null for others.
10.4 Ratio 1 Num 4 0 Variable
10.5 Ratio 2 Num 4 - Variable
10.6 Cum Date Date 8 - Fixed
10.7 Ex Date Date 8 - Fixed
10.8 Recording Date Date 8 - Fixed
10.9 Distribution Date Date 8 - Fixed
Data Formats
The data in record consist of a number of fields. Each field may be either character or numeric
(integer, long, double) and can have different lengths.
All numbers are represented in ASCII 8 bit format. For each numeric field in a record, the width
and the number of decimal are arranged in a variable length and the decimal point is
transmitted.
The following table illustrates some numbers with their possible representations in the Data
Feed:
For the 'Change ' field, which can appear in record types '5' (Stock Summary), the first character
of the field is either a ‘+’ or a '-' character. For example, a change with value:
Appendix A
CHECKSUM ALGORITHM
The 2 byte checksum at the end of each record is a CRC value. The algorithm is taken from the
book 'C Programmer's Guide to Serial Communications' by Joe Campbell, 1987 published by
Howard W. Sams & Company.
#define DCI 17
#define DC3 19
#define CR 13
#define LF 10
#define POLY 0x1021 /* Generator polynomial */
accum = 0;
for (i = 0; i < length ; i++) /* Loop for each char in the buffer */
{
data = *(buffer + i);
data <<= 8; /* Data to high byte
for (j = 8 ; j > 0 ; j--)
{
if ((data ^ accum) & 0x8000)
accum = (accum << 1) ^ POLY; /* Shift and subtract poly */
else
accum <<= 1;
data <<= 1;
}
}
Appendix B
Item Description
Transmission Media Network Transport Media
Transmission Code ASCII Code - TCP/IP Encapsulated
Synchronization Start-stop System
Output Transmission Speed Minimum 64000 Bps
Bit Sending Order From Lower to Higher
APPENDIX C
APPENDIX D
Handshaking procedure is applied after connection to data feed server is established. Remote
client should send first data containing data feed username, data feed password and reading
option <optional> separated with pipe (“|”) character. The server will reply with OK if the
verification is correct or FAILED if the verification is failed. After that the server will start
sending records according to reading option sent in first data, or reading option stored in user
profile.
Data feed client will get USER and PASS when he registered to JSX Data feed.
Successful Handshake
Failed Handshake
OPTIONS
There are 3 options that user can choose when user start to connect, as follows:
A start sending data from the beginning of day (record no:1)
C start sending data from the current data feed status (the current data)
<n> n = sequence number; start sending data from the sequence number n.
example: if n = 1000 then data will be sent starting from sequence no: 1000.
In idle condition, when there is no data sending by the trading system, record type “0” (data
feed status) will be sent every 30 seconds.
If user does not receive data from MAIN server (idle) for more than 2 x 30 seconds (2 times of
idle period), then user must do re-connection to Backup Server (192.168.17.3).
User can do the same procedure as the procedure of connection to main server, but change IP
Address to 192.168.17.3 instead of 192.168.17.2.
User has the same OPTION as user connects to the MAIN server, which are: A, C, or <n>,
however, it is recommended to choose <n> where n is the last sequence number received plus
one. Example: if the last sequence number received is 777, then the parameter of connection is
USER|PASS|778
Successful Handshake
APPENDIX E
Code Description
11 Crops
12 Plantation
13 |Animal Husbandry
14 Fishing
15 Forestry
19 Other not elsewhere classified
21 Coal Mining
22 Crude Petroleum & Natural Gas
23 Metal & Mineral Mining
24 Land/Stone Quarrying
29 Other not elsewhere classified
31 Cement
32 Ceramics, Glass, Porcelain
33 Metal and Allied Products
34 Chemicals
35 Plastics
36 Animal Feed
37 Wood Industries
38 Pulp and Paper
39 Other not elsewhere classified
41 Machinery and Heavy Equipment
42 Automotive and Components
43 Textile, Garment
44 Footwear|
45 Cable
46 Electronics
49 Other not elsewhere classified
51 Food and Beverages
52 Tobacco Manufacturers
53 Pharmaceuticals
54 Cosmetics and Household
55 Industri Peralatan RT
59 Other not elsewhere classified
61 Construction
62 Property and Real Estates
69 Other not elsewhere classified
71 Energy
72 Toll Road, Airport, Harbor
73 Telecomunication
74 Transportation
75 Rancang Bangun Rekayasa
Code Description
79 Other not elsewhere classified
81 Bank
82 Financial Institution
83 Securities Company
84 Insurance
85 Investment Fund/Mutual Fund
89 Other not elsewhere classified
91 Wholesale (Durable Goods)
92 Wholesale (NonDurable Goods)
93 Retail Trade
94 Hotel, Restaurant
95 Tourism and Entertaiment
96 Advertising and Mass Media
97 Computer and Services
98 Perusahaan Investasi
99 Other not elsewhere classified
APPENDIX F
Jakarta (WIB = West Indonesian Time Zone) time zone 7 hours after Greenwich Mean Time
(GMT).
APPENDIX G
VALUES OF REMARKS
ON STOCK SUMMARY RECORD
Field “Remarks” on Stock Summary Record has 8 digits.
Each digit carries information of the stock, as explained below:
Example:
Content:: C D M 3 L K O 1
Digit number: 1 2 3 4 5 6 7 8
Information:
1. 1st -2nd digit: the contents are CD, means that the issuer of the stock is having
Coroprate Action: DIVIDEND and currently the corporate action is in Cum period
2. 3rd digit: the content is M, means that the stock is Marginable
3. 4th : the content is 3, means that the stock is constituent of Manufactur sectoral index
4. 5th – 6th digit: the contents are LK, means that the stock is constituent of LQ45 and
Kompas100 index
5. 7th digit: the content is O, means that the stock can be traded in pre opening session
6. 8th digit: the content is I, means that the stock is included in Main Board and the
constituent of MBX index