eventsforeach www.recognia.com
recognia/api/eventsforeach?crt=drn:eq:thismonth,iid:eq:RC-1001&for=ecl:each:C:S:I:O&qty=5&srt=end:desc

This API command returns lists of events that match a set of criteria. You specify the base criteria to apply, as well as a sort order and a maximum quantity to return. You also specify a criteria to iterate over. A separate query combining the base criteria and each value to be iterated is performed. The sort order and quantity is applied to each query. The events are returned in separate blocks in the XML so the caller will know which events match which set of criteria.

The example call shown above will retrieve the most recent five indicator events and the most recent five oscillator events, within the current month, for instrument RC-1001.

Recognia does not currently support querying for events across multiple countries; attempting to do so will return an error.

Parameters
Name Type Required Default Description
crt String true

See the documentation for events for the details on the criteria parameter.

for String true

This parameter indicates the criteria that will be used for the for loop. Any of the criteria for the crt parameter can be used. The following criteria make logical sense: ecl, eti, iid, sic, tct, thz, and tty.

The following is an example of the for portion of an eventsforeach call:

for=ecl:each:I:O

This will result in two blocks of events being returned, one for indicator event types, and one for oscillator event types.

qty Integer false 100 Specify the maximum number of matching events to return.
srt String false Specify the sort order for the events returned. Possible sort fields are: cfm, cls, cnr, ecl, edr, eid, end, eti, exc, cms, rts, pds, ixs, ity, per, pmv, str, sym, tct, tdr, tty, vol. str is the Start Date for the event. Sort order is specified by appending a :desc to the sort field dor a descending sort and :asc for an ascending sort. Sorting is ascending by default. Multiple sort criteria can be specified by separating them with a comma. Eg. srt=end:desc,vol:desc
lang String false en Specify the language of the events returned. Possible language codes are: 'en' (English) and 'fr' (French).

Return

One <list count="" type="event" for=""> tag for each value in the for iterator, if no errors. The count attribute contains the number of child <event> nodes. The for attribute contains the additional criteria applied to the query. For example, if for=ecl:each:C:S:I:O was passed to the API call, then there would be two <list> nodes, one with a for="ecl:eq:I" attribute and one with a for="ecl:eq:O" attribute. A <list> node will be empty (and count=0) if the criteria was properly specified but no matching events were found.

<status> tag if there were errors. Contents can be
Value Description
failed

if the user could not be authenticated

failed

if incorrect parameters were specified

failed

if there was an internal Recognia error. Recognia is notified immediately in this instance

If failed is returned, check the <errors> tag in the <header> block for the reason.