How to Create an XML Request Manually
When you want to create a request manually, you first need to know what data you wish to receive, and in which format. For clients who have a subscription for less than 3 organisations, we urge to look at their personalized request message which is sent to them as part of the TBXDS registration information.
Let's assume the following:
- We want news from the agency Tijd.Nieuwslijn, starting from 2005/07/20 (yyyy/mm/dd), and up to yesterday. Note: This is an optional service, supplied as a part of the TBXDS/News service.
- We want quotes, again from the AEX exchange, with ticker BRUI.
- Finally, we want all returned ticker data named according to the TBMALFA scheme, and we also want to send data according to the TBMALFA scheme, and the requested language will be nl (Dutch).
To build our request, we'll start with a simple XML document, containing only the root element <TBMDataRequest>.
- <?xml version="1.0"?>
- <TBMDataRequest version="3.5">
- </TBMDataRequest>
Next, we'll fill in the defaults, mentioned last in our wish list:
- <?xml version="1.0"?>
- <TBMDataRequest version="3.5" user-name="TBXDS" ticker-type="TBMALFA">
- </TBMDataRequest>
And your default response settings:
- <?xml version="1.0"?>
- <TBMDataRequest version="3.5" user-name="TBXDS" ticker-type="TBMALFA">
- </TBMDataRequest>
Note Since the default values for the ticker types (<TickerType> and ticker-type) is already "TBMALFA", and the default language is also already Dutch ("nl"), the <ResponseSettings> node and the ticker-type attribute can be left out altogether. Because different values are possible, this example does include these settings.
Next, we'll start with the news
- <?xml version="1.0"?>
- <TBMDataRequest version="3.5" user-name="TBXDS" ticker-type="TBM">
- </TBMDataRequest>
Note the use of last-article-id, which you can use to receive only data you haven't received before, even if their date was set higher than the one given here (see Last Published Ids).
Finally, we'll handle the most important data of all: the exchange quotes.
- <?xml version="1.0"?>
- <TBMDataRequest version="3.5" user-name="TBXDS" ticker-type="TBMALFA">
- </TBMDataRequest>
Again, we've got no last ids to handle.
The next section gives an overview of the response structure, assuming everything goes well.