Using Bloomberg's Data License Web Service in .NET, I'm wondering what category does the PX_LAST field belong to?
Bloomberg has very minimal documentation on their web service API, but based on what I could find the categories are:
- Security Master
- Derived
- Historical
- Closing Values
Basically I am doing a GetData request to retrieve the PX_LAST field on an FX currency pair, however I am unclear as to whether this field is retrieving the last traded value or the last closing price. I would need the last closing price.
com.bloomberg.software.GetDataHeaders headers = new com.bloomberg.software.GetDataHeaders();
headers.programflag = com.bloomberg.software.ProgramFlag.adhoc;
headers.programflagSpecified = true;
headers.closingvalues = true;
headers.closingvaluesSpecified = true;
headers.derived = true;
headers.derivedSpecified = true;
headers.historical = true;
headers.historicalSpecified = true;
headers.secmaster = true;
headers.secmasterSpecified = true;
headers.quotecomposite = true;
headers.quotecompositeSpecified = true;
headers.estimates = true;
headers.estimatesSpecified = true;
headers.ws = 0;
headers.snSpecified = true;
headers.usernumberSpecified = true;
headers.wsSpecified = true;
headers.creditrisk = true;
headers.creditriskSpecified = true;
headers.regcomp = true;
headers.regcompSpecified = true;
FX trading is decentralized and takes place through transactions at brokerages, over-the-counter (OTC) markets, or via the interbank system, rather than centralized exchanges. Therefore, Bloomberg has no actual traded prices for FX but just indicative quotes.
Technically, there is also no closing price because there is no exchange and no trading hours.
To understand what Bloomberg does you need the following:
ALLQfor example shows all quotes (that your institution has access to). There will be a large amount of banks and brokers quoting bid and ask to BloombergQFXandXDF.So using PX_LAST will follow your settings and show you a specific time based on these. You can either use BFIX tickers or add the data source (e.g. BGN, which is New York 5pm) to the ticker to ensure you get the time you desire.
Just pulling PX_LAST without a date will also simply pull the very latest quote available. So you will need go use a historical date override or a field hay retrieves the precious days value. Bear in mind that this can also be misleading based on your time zone.