Bloomberg FTP Introduction

When sending request files to Bloomberg via FTP, you need to prepare a request file in a special format. Here is an example with some of the most common parameters:

START-OF-FILE
FIRMNAME=XXXXX
PROGRAMFLAG=adhoc
PROGRAMNAME=gethistory
REPLYFILENAME=data.out
SECID=TICKER
COLUMNHEADER=yes
SECMASTER=yes
CLOSINGVALUES=yes
DERIVED=yes
COMPRESS=no
DELIMITER=,
HEADER=no
DATERANGE=31

START-OF-FIELDS
VOLUME
PX_LAST
PX_SETTLE
END-OF-FIELDS

START-OF-DATA
ES1 Index
END-OF-DATA
END-OF-FILE

    Header parameters:

  • FIRMNAME — your company identifier for Bloomberg. Starts with "dl" (Data License) follower by some numeric id.
  • PROGRAMFLAG — for a single request to bloomberg, use adhoc or oneshot. Adhoc requests are started to execute immediately, but might be subject to extra cost.
  • PROGRAMNAME — most common programs are getdata, gethistory and getquotes. getdata program is typically used to retrieve reference data such as contract data, expiration dates, holidays, or last daily values for a given security. To retrieve daily values, such as price, volume, etc. for a period over several days, use gethistory program. getquotes program is used to retrieve price tick data on a second precision.
  • REPLYFILENAME — name of the file that Bloomberg will send as a reply. They recommend to give it .out extension.
  • SECID — type of security identified that is used inside START-OF-DATA section. With TICKER you can use generic names like ES1 Index, but you can also use ISIN, SEDOL, VALOREN and others.
  • SECMASTER, DERIVED, CLOSINGVALUES — put yes just to make sure you are not missing any data.
  • DELIMITER — specifies the field delimiter to use in the resulting output file.
  • COLUMNHEADER — whether you want the column names to be present in the output file, typically yes.
  • COMPRESS — whether the output file will be gzip compressed. Response files for the getquotes program will always be compressed irrespective of this value.
  • HEADER — whether the output file should contain the header from the request file.

Data parameters:

START-OF-FIELDS — list the names of the fields you want to retrieve data for.

START-OF-DATA — list the security ids you want to retrieve data for.