Vous êtes sur la page 1sur 69

GlobalView Software, Inc

Data Connection API 2.0

GVSI 2005-2007, Proprietary and Confidential

TABLE OF CONTENTS
Page
1

INTRODUCTION.......................................................................................1
1.1

Scope .............................................................................................1

1.2

Intended Audience..........................................................................1

1.3

Supporting Documentation .............................................................1

1.4

Revision History..............................................................................1

SYSTEM OVERVIEW ...............................................................................2


2.1

API Architecture .............................................................................3

2.2

API Architecture Message Structure...............................................4

2.3

Messaging Detail ............................................................................4

2.4

The Request String.........................................................................5

2.5

Specifying Filters in the Request String (Conditions)......................6

2.6

The Response String......................................................................7

2.7

Values in the Request and Response String ..................................8

2.8

The Raw XML ..............................................................................8

2.9

The Data Stores ...........................................................................11

2.10

Correction Data Stores .................................................................11

2.11

Data Connection URL...................................................................11

2.12

Symbols and Aliases ....................................................................11

2.13

Authentication Issues ...................................................................12

2.14

Addressing Error Conditions/Error Codes ....................................13

DATA CONNECTION API.......................................................................15


3.1

MetaData Retrieval.......................................................................15
3.1.1 getInstrumentList ...............................................................15
3.1.2 getInstrumentRootList........................................................17
3.1.3 getInstrumentMetaData .....................................................18
3.1.4 getCurrencyList..................................................................19
3.1.5 getExchangeList ................................................................20
3.1.6 getUserDefinedInstrumentList ...........................................21
3.1.7 getOptionRootInstruments .................................................23
3.1.8 getVersion..........................................................................25

3.2

Realtime and Historical Price API Methods ..................................26

TABLE OF CONTENTS
(continued)
Page
3.2.1 getDailyPrices....................................................................26
3.2.2 getHourlyISOPrices ...........................................................29
3.2.3 getDailyISOPrices..............................................................31
3.2.4 getTradePrices ..................................................................33
3.2.5 getLiveQuotePrices ...........................................................35
3.2.6 getIntradayPrices...............................................................38
3.2.7 getNews.............................................................................40
3.2.8 getHourlyISOCorrections ...................................................43
3.2.9 getDailyISOPriceCorrections .............................................45
3.2.10 getPriceCorrections ...........................................................47
3.3

Data Quality API Methods ............................................................49


3.3.1 Are{dataSet}PricesAvailable ..............................................49
3.3.2 are{dataSet}PricesInAbsoluteThreshold ............................51
3.3.3 are{dataSet}PricesInPercentileThreshold ..........................54

3.4

Data Import Methods ....................................................................57


3.4.1 importInstrumentPrice........................................................58
3.4.2 importInstrumentPriceCorrection .......................................60
3.4.3 importInstrumentMetaData ................................................62
3.4.4 getImportStatistics .............................................................64

FREQUENTLY ASKED QUESTIONS .....................................................66

ii

Data Connnection API 2.0

1 Introduction
MarketView provides customers with access to many data sets, including detailed historical
price data. The system makes available an Application Program Interface (API) as detailed in
this document.

1.1 Scope
This document provides methods definition, sample code, and all technical details necessary for
customers to develop applications that interface with the MarketView ASP system.

1.2 Intended Audience


This document is intended for IT developers working for or on behalf of MarketView customers.

1.3 Supporting Documentation


Document

Description

API_REQUEST.xsd

Request XML schema for making requests to the API

API_RESPONSE.xsd

Response XML schema for responses from the API

1.4 Revision History


Date

API Version

Document Version

8/23/05

1.0

1.0

1/9/2006

1.0

1.0.1

7/26/2006

2.0

2.0

GVSI 2005-2007, Proprietary and Confidential

Page 1

Data Connnection API 2.0

2 System Overview
Data Connection provides easy access to GlobalViews comprehensive data center XML based
Web Services . Data sets include real-time, intraday, and historical prices data sources, including
posted corrections, as well as news. This gives you access to the complete breadth of the
GlobalData services, including exchange data, Platts, Argus and many others, as well as
pproprieatry data from your custom applications.
Data Query Facilities

Easy access to real-time, intraday, and historical price data frequencies, through an
easy-to-use web-centric API
Conditional filters permit easy filtering for the desired data
Instrument metadata
Corrections from the exchange/data provider
News

Data Quality Facilities

Programmatically determine availability of price quotes


Determine quality of price quotes by checking them against thresholds (which may be
expressed as either fixed amounts or percentages)

Data Import Facilities

Set up intra-company data feeds for prices and news; the same data is available for use
by your MarketView desktop applications
Monitor data imports for number of quotes poked; insertion errors

Based on Industry Standards

Uses industry-standard SOAP/XML API (Apache Axis)


Implemented over HTTPS for data security
Uses XML in both request and response, allowing for an easy-to-use and expressive
message payload

GVSI 2005-2007, Proprietary and Confidential

Page 2

Data Connnection API 2.0

2.1 API Architecture


Because all calls are expressed in standard Web Services Definition Language (WSDL),you do
not need proprietary software (neither DLLs nor JARs,) to access MarketView data.

API User

XML
https://webapi.gvsi.com/services/mv2

Internet

External
GlobalView Network

MarketView Web Services

Permissions

GVSI 2005-2007, Proprietary and Confidential

Data

Data

Data

Data

Data

Data

Page 3

Data Connnection API 2.0

2.2 API Architecture Message Structure


The API is a set of SOAP/XML-based web services, exposed externally via a secure (HTTPS)
web page. API users can request data by making SOAP requests.

API Message Format

SSL Encryption (HTTPS secure transmission)


HTTP Envelope (text):
POST /services/mv2
Host: webapi.gvsi.com
Content-Type: application/soap+XML; charset="utf-8"
Content-Length: ....
SOAP Envelope (XML):
<env:Envelope XMLns:env="http://
www.w3.org/2003/05/soap-envelope" >
<env:Header>...
Data (XML):
<dailyprice><date>2005-0401...</daily-price>

2.3 Messaging Detail


All of the API methods are wrapped in a web services protocol within which a separate policy
handles exceptions relating to:

User authentication,

SOAP/XML message validation,

Method signature validation,

System availability,

User (data entitlements) permissioning.

The response XML includes price data, a code and description to provide feedback to the caller.
Responses are as detailed as possible, providing feedback on an instrument-by-instrument
basis whenever possible. When a global error occurs, such as credential failure or server error,
a global response is returned. It should be noted also, a permission error may be sent for one
instrument if the user is a valid API user but not entitled to the instrument requested.

GVSI 2005-2007, Proprietary and Confidential

Page 4

Data Connnection API 2.0

MarketView software prevents concurrent use of software by the same user credentials. Data
Connection preserves this limitation it will log off users using the same user account, from
either MarketView or Data Connection. It is to your advantage therefore to procure separate
accounts between your MarketView and Data Connection clients.

2.4 The Request String


The Request String is a parameter that is present in the majority of MarketView Web Services
API function calls. The contents of the string follow XML conventions, according to the schema
described in API_REQUEST.xsd. This allows you great flexibility in terms of specifying which
field(s) you want to query, for which instrument(s), given which condition(s). Here is a
breakdown the component sections of a sample Request String,
<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID=/CLV6 />
<INSTRUMENT INSTRUMENT_ID=/CLQ6 />
...
</INSTRUMENTS>
<INSTRUMENT_SEARCHES>
<INSTRUMENT_SEARCH INSTRUMENT_ID=/CL* />
...
</INSTRUMENT_SEARCHES>
<CONDITIONS
START_DATE=2006-06-01T12:00:00Z
END_DATE=2006-07-01T12:00:00Z
AGGREGATE_TYPE=F
/>
<TAGS>
<TAG NAME=INSTRUMENT_ID />
<TAG NAME=CLOSE />
<TAG NAME=HIGH />
<TAG NAME=TRADE_DATETIME />
</TAGS>
</API_REQUEST>

Notes:
1. A data request comprises of a list of instruments, enclosed in-between two
<INSTRUMENTS> tags. You can request quotes for one-to-many instruments at one
time.
2. You can also search for instruments by passing wildcards in-between two
<INSTRUMENT_SEARCHES> tags. In a price quote request, one or the other pair of
tags must appear. Or, as in the sample above, both sets of tags may appear in the
same request.
3. The <CONDITIONS> tags allows you to set up filters on the returned data, to narrow
the range of returned data.
4. The <TAGS> tags allows you to specify the fields you want returned in response to
your query. In this example, Data Connection will return the fields, INSTRUMENT_ID,
CLOSE, HIGH, and TRADE_DATETIME. If <TAGS> is not specified, Data Connection
will return values for a default set of fields.

GVSI 2005-2007, Proprietary and Confidential

Page 5

Data Connnection API 2.0

2.5 Specifying Filters in the Request String (Conditions)


<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID=/CLV6 />
<INSTRUMENT INSTRUMENT_ID=/CLQ6 />
...
</INSTRUMENTS>
<INSTRUMENT_SEARCHES>
<INSTRUMENT_SEARCH INSTRUMENT_ID=/CL* />
...
</INSTRUMENT_SEARCHES>
<CONDITIONS
START_DATE=2006-06-01T12:00:00Z
END_DATE=2006-07-01T12:00:00Z
AGGREGATE_TYPE=F
/>
...
Looking at the above request, youll see that we allow you specify a list of instruments by their
specific INSTRUMENT_IDs, but also allow you to simultaneously specify instruments by
wildcard masks. That collection of instruments are filtered through the CONDITIONS, each of
whom must be met.
Describing this through the metaphor of a SQL-language database, you can specify queries like,
SELECT tag(s)
FROM GVSI_INFRASTRUCTURE
WHERE
(
(
INSTRUMENT_ID = id0
OR
INSTRUMENT_ID = id1
OR
...
OR
INSTRUMENT_ID = idx)
OR
(
INSTRUMENT_ID LIKE pattern0
OR
INSTRUMENT_ID LIKE pattern1
OR
...
OR
INSTRUMENT_ID LIKE patternx)
)
AND
tag1 = condition1
AND
tag2 = condition2
AND
...
AND

tagx = conditionx;

GVSI 2005-2007, Proprietary and Confidential

Page 6

Data Connnection API 2.0

Although describable in terms of a SQL database, keep in mind that our infrastructure is tuned to
be a ticker plant, not a general-purpose database. Specifically,

Conditions can only be tested for equality.

All conditions specified must be met for a record to match.

We do however offer facilities for date range queries, using START_DATE and
END_DATE tags.

While you can use Data Connection for data-mining queries, its underlying infrastructure runs
most efficiently when given specific queries.

2.6 The Response String


Data Connection API functions universally return a string value. That string is formatted in XML,
according to the schema laid out in API_RESPONSE.xsd. Again, there are several sections of
the response string; here is a breakdown of them,
<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT MID_POINT="58.450" MONEY_FLOW="N/A"
LAST="N/A" CONTRIBUTOR="N/A" LOW="57.40"
HIGH="59.50" AGGREGATE_TYPE="N/A"
EXCHANGE_IDENTIFIER="N/A" USAGE_HOUR="N/A"
TICK_TYPE="43" OPEN_INTEREST="114136"
EXCHANGE_CODE="N/A" VOLUME="130289"
INSTRUMENT_ID="/CLX6" OPEN="58.80"
TRADE_DATETIME="2006-10-18T12:00:00-0500"
CLOSE="57.65" TICK_COUNT="N/A"
TRADE_VOLUME="N/A" />
<INSTRUMENT MID_POINT="58.250" MONEY_FLOW="N/A"
LAST="N/A" CONTRIBUTOR="N/A" LOW="57.55"
HIGH="58.95" AGGREGATE_TYPE="N/A"
EXCHANGE_IDENTIFIER="N/A" USAGE_HOUR="N/A"
TICK_TYPE="0" OPEN_INTEREST="69162"
EXCHANGE_CODE="N/A" VOLUME="567"
INSTRUMENT_ID="/CLX6" OPEN="58.35"
TRADE_DATETIME="2006-10-19T12:00:00-0500"
CLOSE="58.50" TICK_COUNT="N/A"
TRADE_VOLUME="N/A" />
</INSTRUMENTS>
</API_RESPONSE>

1
2
3

Notes:
1. All responses begin with the line, API_RESPONSE. If there is an error in servicing the
request, that is enumerated as the attribute CODE; DETAILS in turn provides a textual
description of the error.
2. As this function returns one-to-many instrument quotes, it is embedded within the tags,
<INSTRUMENTS>. All Data Connection methods follow this pattern: a plural form of the
tag, followed by one-to-many singular-form tags (INSTRUMENTS versus
INSTRUMENT.)

GVSI 2005-2007, Proprietary and Confidential

Page 7

Data Connnection API 2.0

3.

Each individual quote in turm is embedded within the tag, <INSTRUMENT>. The
individual fields are treated as attributes of the INSTRUMENT tag.

2.7 Values in the Request and Response String


Within both the Request and Response strings, all attributes are expressed as string values
e.g., they are wrapped in double-quotation marks (.)
1. Note that all arguments embedded in the Request String are handled as strings
e.g., they are wrapped in double-quotation marks (). A numeric value, therefore, is
expressed as VALUE=5, not VALUE=5.
2. All datetime fields are shown in ISO 8601 format. This means, expressed with the
format yyyy-mm-dd, followed by the letter T, then hh:mm:ss for the time portion.
The timezone immediately follows; expressed as an hour and minute offset from
UTC, with the format, hhmm . The abbreviation Z may replace the hour and minute
offset, and denotes +0000.

For example, Americas/Chicago (a.k.a., Central Standard Time, or CST)


would be denoted as -0600, as there are 6 hours difference between it and
the UTC. (Although, note that Daylight Savings Time affects the offset from
UTC.)

Asia/Singapore (SGT) is expressed as +0800.

2.8 The Raw XML


Data Connection is implemented in SOAP/XML using Apache Axis 1 Framework, running on a
J2EE application server. Weve discovered through previous support requests that developers
who are not familiar with this stack become confused about how method arguments and the
requestXML String are encoded and transmitted.
Weve found that the best way to illustrate the conversation is to use a proxy that captures and
logs the packets. An example of such a proxy is tcpmon, which is part of the Apache
Foundations Axis 1 source distribution. Proxies such as tcpmon are very helpful for when the
dynamics of a conversation between the client are server are not understood.
Following is a sample incoming request, captured by tcpmon,

GVSI 2005-2007, Proprietary and Confidential

Page 8

Data Connnection API 2.0

POST /services/mv2 HTTP/1.0


Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.2.1
Host: service.gvsi.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 616
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><getInstrumentList
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<user xsi:type="xsd:string">test_user</user>
<password xsi:type="xsd:string">test_password</password>
<requestXML xsi:type="xsd:string">&lt;API_REQUEST&gt;
&lt;CONDITIONS EXCHANGE_CODE=&quot;PLG&quot; /&gt;&lt;/API_REQUEST&gt;
</requestXML></getInstrumentList></soapenv:Body></soapenv:Envelope>
Notes:
1.

Given that SOAP/XML is a protocol implemented on top of the HTTP stack, there
naturally is a HTTP header.

2.

The method being invoked is getInstrumentList. This particular method


(documented in Section 3) requires that the user provide three parameters.

3.

These parameters are user, password and requestXML. The values for the first
two, user and password, establishes your authentication on Data Connection.
HTTP/HTTPS protocols authentication, used to gain authorization to a specific
URI/URL, is not used.

4.

The third parameter, requestXML, contains the body of the request, encoded in
XML. To facilitate this, the <, >, , and & characters in the string must be escaped to
their legal XML equivalents.

GVSI 2005-2007, Proprietary and Confidential

Page 9

2
3

Data Connnection API 2.0

The response from Data Connection, in turn, looks like,


HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-3.2.7 (build:
CVSTag=JBoss_3_2_7 date=200501280217)
Content-Type: text/xml;charset=utf-8
Date: Wed, 01 Nov 2006 20:59:20 GMT
Server: Apache-Coyote/1.1
Connection: close
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<getInstrumentListResponse>
<getInstrumentListResponse xsi:type="xsd:string">&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;API_RESPONSE CODE=&quot;0&quot; DETAILS=&quot;&quot; &gt;
&lt;INSTRUMENTS&gt;
&lt;INSTRUMENT INSTRUMENT_ID=&quot;#AAAXS00&quot;
CURRENCY_CODE=&quot;USD&quot;
... etc ...

Notes:
1.

Again, given as how SOAP/XML is implemented over HTTP/HTTPS, there is a HTTP


header at the beginning of the response.

2.

The user invoked a service called getInstrumentList. Its response is called


getInstrumentListResponse, which is encoded as an XML String. That is what we
refer to as the Response String every method returns a Response String (whose
name follows the pattern methodNameResponse.) Note the requisite escape-XML
sequences &lt;, &quot;, et al, are present as well.

While understanding what the raw XML looks like is helpful, by no means do we
recommend that your application creates or parses messages at this low level. Use a Web
Services library that supports the SOAP/XML protocol. The Apache Foundations
(http://www.apache.org) Axis 1 can be used for your client applications. Microsofts Visual
Studio (2003 and above) also comes with the .Net Web Services API. Other toolkits exist,
targeting different development languages and environments.
While we dont advocate any toolkit over the other, were most familiar with The Apache
Foundations Axis 1, in terms of being able to offer suggestions/support.

GVSI 2005-2007, Proprietary and Confidential

Page 10

Data Connnection API 2.0

2.9 The Data Stores


GlobalView keeps several data frequencies that are dependent on the source of the pricing
data.

Tick or Trade data is available for Futures type data from sources such as the
NYMEX or ICE. This data represents each transaction executed on a specific
exchange for a specific contract.

LiveQuote data is the most recent data for a specific instrument. Some data from
Futures exchanges update many times a day, other end-of-day data sources update
only once a day.

Intraday data is tick data aggregated into even minute summaries, showing a open,
high, low, close for each interval. This data is mostly available from Futures
exchanges such as NYMEX or ICE.

Daily data is a summary record for each day, potentially including prices, open, high,
low, close, and also a volume and open interest. Futures data, as well as, end-of-day
data have a record representing an instruments daily activity.

As there are major differences between ISO (electricity-related) instruments and other
energy instruments, we keep those price quotes in a separate datastore, with Daily
and Hourly striping.

2.10 Correction Data Stores


From time to time, the exchange or data vendor may issue corrections to symbol quotes.
Often, the price is corrected, although other fields in the price quote could be corrected. We
handle corrections by,

Updating the primary data stores, so youll receive the corrected field(s) if you execute
a query.

Updating a correction data store, that keeps the trade date corrected, as well as the
date the correction was issued.

As ISO symbols are different from other symbols, we keep their corrections in a
different data store than other symbols corrections.

2.11 Data Connection URL


Data Connection is hosted from URL,
https://webapi.gvsi.com/services/mv2
We also have development servers, against which you should develop your client software.
The reason for this is quality-of-service well advise you as the name of servers assigned to
you.

2.12 Symbols and Aliases


When dealing with future contracts, you have to be aware that contracts (frequently) expire on a
monthly basis. This necessitates that you know the exchanges symbology, expiration dates,

GVSI 2005-2007, Proprietary and Confidential

Page 11

Data Connnection API 2.0

and be prepared to change your queries several times during the month. To address this
inconvenience, Data Connection supports rolling symbol aliases.
To illustrate, lets look at NYMEX Crude Light Future contracts, whose root symbol is /CL. You
could reference a specific contract by specifying its single-letter month code/single-digit year
code (as in /CLF7 for the January 2007 daily session contract,) but specifying (and editing) the
specific contracts you need is onerous and prone to mistakes. Chances are your business
analysts did not specifically want the January 07 contract, they wanted the front months
contract. It just so happens that at a given time of the year, the front month contract is the
January 07 contract. (But, later in the year, it will be the February 07 contract.)
We address this problem for you by providing rolling symbol aliases. These are
INSTRUMENT_IDs that contains the sequence [num] (squared brackets with a single-digit.)
The digit refers to how many months out from the current months Future Contract you want to
select. For example, assume it is January, and you want the contract that is two months out.
That would be the March contract. So, you should query for /CL[2]. If you want the front months
contract, that would be /CL[0].
The flipside, given that you ask for a symbol by its rolling symbol alias, how do you know that
/CL[0] refers to /CLF7? The Actual contracts symbol has been mapped to the UNDERLIER
tag, which Data Connection can return for you in your requests.
Day Session

Globex (ACCESS) Session

Front Month

/CL[0]

Front Month

/GCL[0]

One Month Out

/CL[1]

One Month Out

/GCL[1]

Two Months Out

/CL[2]

Two Months Out

/GCL[2]

Three Months Out

/CL[3]

Three Months Out

/GCL[3]

Four Months Out

/CL[4]

Four Months Out

/GCL[4]

Five Months Out

/CL[5]

Five Months Out

/GCL[5]

Six Months Out

/CL[6]

Six Months Out

/GCL[6]

Seven Months Out

/CL[7]

Seven Months Out

/GCL[7]

Eigh Months Out

/CL[8]

Eigh Months Out

/GCL[8]

Nine Months Out

/CL[9]

Nine Months Out

/GCL[9]

2.13 Authentication Issues


Authentication in Data Connection is established through the published methods requiring user
and password parameters. Based on those values, we establish what data you can query
(broken down at the exchange- and news data source-level.) We dont use HTTPs
authentication mechanisms (requiring username and password to access URLs.) Which isnt to
say, you wont be required to provide some sort of authentication to pass a request.
Your company might have proxies set up, to enable HTTP access through your firewall. Some
proxies may require user name and password to leave the building. Being able to access the
Data Connection web site through your web browser is not absolute proof that your proxy does
not require authentication; the browser may already be set up by your IT staff.

GVSI 2005-2007, Proprietary and Confidential

Page 12

Data Connnection API 2.0

Such issues are generally between your IT staff and yourself; were not in a position where we
can provide much help. Although well note that the underlying HTTP protocol layer in your
SOAP/XML toolkit should have support for setting up authentication for any proxies your firm
may have, see its documentation for details. Axis tcpmon is an excellent tool to determine how
your corporate proxy works: it is too simple(or unencumbered) to have your authentication
pre-configured, such as your web browser would be. Place it in-between your client and the
corporate proxy.

2.14 Addressing Error Conditions/Error Codes


In Section 2.6, you saw that we return as the first line of the Response String a line that looks
like,
<API_RESPONSE CODE="0" DETAILS="" >
This is one place in the Response String where an error condition may be expressed to you.
The CODE attribute having any non-zero value is indicative of an error; the DETAILS attempts
to describe the error.If an error is reported here, then the request itself could not be processed
e.g., you may have passed incorrect credentials.
The other sort of error that can be reported are errors at the per sub-request level. For example,
you queried for a number of symbols, but one of the symbols does not exist. You would then
see a response like,
<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT ERROR_CODE="120" ERROR_DESCRIPTION="Cannot permission request because no
exchange was found for &apos;#JMD33497127&apos;" INSTRUMENT_ID="#JMD33497127" />
<INSTRUMENT INSTRUMENT_ID="#JMD33497125" />
</INSTRUMENTS>
</API_RESPONSE>

Notice the INSTRUMENT with ERROR_CODE and ERROR_DESCRIPTION attributes. These


only appear on lines where an error occurred in the request. The next lines instrument had no
errors, so the attributes you asked for are displayed.
(The error in the above example frequently happens because the symbol you are querying for
does not exist. A convenient way to check the validity of the
The API_REPONSE line will display values for CODE and DETAILS even if there is no errors;
the intra-response lines will display ERROR_CODE and ERROR_DESCRIPTION only if there
is an error. Regardless of where the error appears in the response, it follows this error code
mapping,
Code
0
-10
-20
-30
-31
-32
-40

Description
Success
General Error
Authentication Error (invalid user name/password)
Invalid Parameters in the web server request
Invalid Instrument Attributes in the web server request
Invalid Conditions Attributes in the web server request
Instrument missing from response

GVSI 2005-2007, Proprietary and Confidential

Page 13

Data Connnection API 2.0

120

130
136
138
9001

Price and correction requests are limited to 10,000 instruments. Reduce


the number of instruments requested or narrow the instrument search
wildcard parameters.
Requested more than 50,000 price or correction price data elements.
Reduce the calendar range, the number of instruments requested, or
narrow the instrument search wildcard parameters.
You are not permissioned for the requested instrument(s). This can be
because a) you truly are not permissioned, or b) because the symbol is
misspelt, and there is no exchange associated with the symbol you asked
for.
A database error occurred.
The server is unable to retrieve the desired data because there it is unable
to locate a database for the requested data.
No instruments matched the query search pattern. Modify the search
parameter.
Corrections are not available for the requested instrument.

GVSI 2005-2007, Proprietary and Confidential

Page 14

Data Connnection API 2.0

3 Data Connection API


Data Connection API can be broken down into five categories of method calls. These are,

MetaData Retrieval

Real & Historical Price Retrieval

Data Quality

Data Import/Upload

Utility methods

This section provides a reference of those methods.

3.1 MetaData Retrieval


MetaData may be thought of as data concerning an instrument or instruments that are not
germaine to the realtime price or historical price data. Examples include, exchange where
traded, company name, currency, underlier security, etc. As this data is very static, we often
employ different infrastructure to store it than for historical or realtime prices. While you
generally can also receive metadata information from the price API methods, understand that
theres an overhead of joining the query between two data stores.

3.1.1 getInstrumentList
Returns a list of instruments for the given exchange code, for which the user has query
permissions. The user can only specify one exchange code per invocation.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
EXCHANGE_CODE

Description
API user identifier
API user password (case-sensitive)
Request String, formatted as per the schema at
API_REQUEST.xsd. This request must contain a
<CONDITIONS> clause specifying one (and only one)
EXCHANGE_CODE.

Description
Must be specified. This is due to the high number of instruments
that may be returned (both in terms of response time, and the
length of the returned string)

User-Specifiable Tags:
Name
Description
N/A
N/A

GVSI 2005-2007, Proprietary and Confidential

Page 15

Data Connnection API 2.0

Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
<API_REQUEST>
<CONDITIONS EXCHANGE_CODE="PLG" />
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="#AAAXS00" CURRENCY_CODE="USD" CONTRACT_EXPIRATION_DATE="N/A"
INSTRUMENT_TYPE="SP" EXCHANGE_CODE="PLG" LOT_UNITS="THM" />
<INSTRUMENT INSTRUMENT_ID="#AAAXU00" CURRENCY_CODE="USD" CONTRACT_EXPIRATION_DATE="N/A"
INSTRUMENT_TYPE="SP" EXCHANGE_CODE="PLG" LOT_UNITS="THM" />
<INSTRUMENT INSTRUMENT_ID="#AAAXW00" CURRENCY_CODE="USD" CONTRACT_EXPIRATION_DATE="N/A"
INSTRUMENT_TYPE="SP" EXCHANGE_CODE="PLG" LOT_UNITS="THM" />
<INSTRUMENT INSTRUMENT_ID="#AADNX00" CURRENCY_CODE="USD" CONTRACT_EXPIRATION_DATE="N/A"
INSTRUMENT_TYPE="SP" EXCHANGE_CODE="PLG" LOT_UNITS="GJ" />
etc
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 16

Data Connnection API 2.0

3.1.2 getInstrumentRootList
Returns a list of root instruments and associated metadata for which the user has permissions
to query/view data. There is no RequestXML parameter.
Arguments:
Type
Name
String
User
String
userPassword
Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)

Description
There is no RequestXML parameter

User-Specifiable Tags:
Name
Description
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
N/A
Example Response XML:
<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<INSTRUMENT_ROOTS>
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="/WS" EXCHANGE_CODE="NYM" CURRENCY_CODE="USD"
INSTRUMENT_DESCRIPTION="WTI Financial" LOT_UNITS="BBL" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="7.803" />
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="/PN" EXCHANGE_CODE="NYM" CURRENCY_CODE="USD"
INSTRUMENT_DESCRIPTION="Propane Gas" LOT_UNITS="GAL" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="0.0" />
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="/PL" EXCHANGE_CODE="NYM" CURRENCY_CODE="USD"
INSTRUMENT_DESCRIPTION="NYMEX Futures" LOT_UNITS="TOZ" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="0.0" />
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="1tBPM" EXCHANGE_CODE="IPE" CURRENCY_CODE="GBP"
INSTRUMENT_DESCRIPTION="ICE UK Baseload Electricity" LOT_UNITS="MWH" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="1.0" />
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="1tGWM" EXCHANGE_CODE="IPE" CURRENCY_CODE="GBC"
INSTRUMENT_DESCRIPTION="ICE NBP Natrual Gas" LOT_UNITS="THM" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="1.0" />
<INSTRUMENT_ROOT INSTRUMENT_ROOT_NAME="1tGAS" EXCHANGE_CODE="IPE" CURRENCY_CODE="USD"
INSTRUMENT_DESCRIPTION="IPE Futures" LOT_UNITS="MT" INSTRUMENT_TYPE="F"
CONVERSION_FACTOR="7.46" />
etc
</INSTRUMENT_ROOTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 17

Data Connnection API 2.0

3.1.3 getInstrumentMetaData
Returns metadata associated with a given symbol. NOTE: due to infrastructure limitations, this
method services only one Instrument per invocation.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)
Request String, formatted as per the schema at
API_REQUEST.xsd. The request must contain a
<INSTRUMENTS> clause, containing one (and only one)
INSTRUMENT_ID.

Description
N/A

User-Specifiable Tags:
Name
Description
N/A
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
<API_REQUEST>
<!-- You can only specify one instrument per request -->
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/NGZ6" />
</INSTRUMENTS>
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<INSTRUMENTS>
<INSTRUMENT CONV_FACTOR="0.0" EXCHANGE_CURRENCY="USD" EXPIRATION_DATE="2006-11-28"
UNDERLIER="/NGZ6" INSTRUMENT_ID="/NGZ6" CURRENCY="USD" SYMBOL_DESCRIPTION="Dec 06 Natural
Gas" OPTION_ROOT="/NG" PUT_CALL="U" LOT_UNITS="MMB" EXCHANGE_CODE="NYM" SECURITY_TYPE="F"
SESSION="1"/>
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 18

Data Connnection API 2.0

3.1.4 getCurrencyList
Returns a list of currencies and associated metadata.
Arguments:
Type
Name
String
User
String
userPassword
Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)

Description
N/A

User-Specifiable Tags:
Name
Description
N/A
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available currency. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
N/A
Example Response XML:
<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<CURRENCIES>
<CURRENCY CURRENCY_CODE="USD" CURRENCY_DESCRIPTION="U.S. Dollar" />
<CURRENCY CURRENCY_CODE="CAD" CURRENCY_DESCRIPTION="Canadian Dollar" />
<CURRENCY CURRENCY_CODE="CHF" CURRENCY_DESCRIPTION="Swiss Franc" />
<CURRENCY CURRENCY_CODE="GBP" CURRENCY_DESCRIPTION="British Pound" />
<CURRENCY CURRENCY_CODE="EUR" CURRENCY_DESCRIPTION="Euro" />
<CURRENCY CURRENCY_CODE="JPY" CURRENCY_DESCRIPTION="Japanese Yen" />
<CURRENCY CURRENCY_CODE="SGD" CURRENCY_DESCRIPTION="Singapore Dollar" />
<CURRENCY CURRENCY_CODE="AUD" CURRENCY_DESCRIPTION="Australian Dollar" />
<CURRENCY CURRENCY_CODE="NZD" CURRENCY_DESCRIPTION="New Zealand Dollar" />
<CURRENCY CURRENCY_CODE="HKD" CURRENCY_DESCRIPTION="Hong Kong Dollar" />
<CURRENCY CURRENCY_CODE="DKK" CURRENCY_DESCRIPTION="Danish Krone" />
</CURRENCIES>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 19

Data Connnection API 2.0

3.1.5 getExchangeList
Returns a list of exchanges available in the infrastructure, and their associated metadata.
Arguments:
Type
Name
String
User
String
userPassword
Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)

Description
N/A

User-Specifiable Tags:
Name
Description
N/A
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available exchange. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
N/A
Example Response XML:
<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<EXCHANGES>
<EXCHANGES>
<EXCHANGE EXCHANGE_CODE="06A" EXCHANGE_DESCRIPTION="Platts Coal International"
EXCHANGE_EXPIRATION_DATETIME="2010-12-31T12:00:00Z" />
<EXCHANGE EXCHANGE_CODE="06B" EXCHANGE_DESCRIPTION="Platts Coal US"
EXCHANGE_EXPIRATION_DATETIME="2010-12-31T12:00:00Z" />
<EXCHANGE EXCHANGE_CODE="06C" EXCHANGE_DESCRIPTION="Platts Natural Gas"
EXCHANGE_EXPIRATION_DATETIME="2010-12-31T12:00:00Z" />
etc
</EXCHANGES>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 20

Data Connnection API 2.0

3.1.6 getUserDefinedInstrumentList
Returns a list of user-defined instruments. These are known as User Defined Formulas in the
MarketView client, and allow the user to map a formula to an instrument symbol. The
instruments returned by this call in turn can be used in subsequent methods in Data
Connection. The process of defining these instruments are outside the scope of Web
Services; use the MarketView GUI application to create/edit your user defined instruments.
Arguments:
Type
Name
String
User
String
userPassword
Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)

Description
N/A

User-Specifiable Tags:
Name
Description
N/A
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available exchange. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 21

Data Connnection API 2.0

Example Request XML:


N/A
Example Response XML:
<?xml version="1.0" encoding="UTF-8" ?>
<API_RESPONSE CODE="0" DETAILS="">
<USER_DEFINED_INSTRUMENTS>
<USER_DEFINED_INSTRUMENT USER_DEFINED_INSTRUMENT_NAME="@321SF"
USER_DEFINED_INSTRUMENT_DEFINITION="(((($SV(#PGADG00)*0.42)($SV(#PCAAD00)))*2)+(($SV(#POAEY00)*0.42)-$SV(#PCAAD00)))/3"
USER_DEFINED_INSTRUMENT_FOLDER="UserFolder" CURRENCY_SOURCE="" INSTRUMENT_DESCRIPTION="SF
321 Crack" LOT_UNITS="" SECURITY_TYPE="UDF" CONVERSION_FACTOR="1.0" PRECISION="13.0"
EXPIRATION_DATETIME="N/A" />
<USER_DEFINED_INSTRUMENT USER_DEFINED_INSTRUMENT_NAME="@FPL"
USER_DEFINED_INSTRUMENT_DEFINITION="$SV(#MPPEPJM05N05Q)+$SV(/NG[0])"
USER_DEFINED_INSTRUMENT_FOLDER="UserFolder" CURRENCY_SOURCE="USF"
INSTRUMENT_DESCRIPTION="Amerex with NG" LOT_UNITS="" SECURITY_TYPE="UDF"
CONVERSION_FACTOR="1.0" PRECISION="13.0" EXPIRATION_DATETIME="N/A" />
<USER_DEFINED_INSTRUMENT USER_DEFINED_INSTRUMENT_NAME="@PNWUNLCR"
USER_DEFINED_INSTRUMENT_DEFINITION="($SV(#PGADF00)*.42)-$SV(#PCAAD00)"
USER_DEFINED_INSTRUMENT_FOLDER=" UserFolder " CURRENCY_SOURCE=""
INSTRUMENT_DESCRIPTION="PNW UNL Crack" LOT_UNITS="" SECURITY_TYPE="UDF"
CONVERSION_FACTOR="1.0" PRECISION="13.0" EXPIRATION_DATETIME="N/A" />
<USER_DEFINED_INSTRUMENT USER_DEFINED_INSTRUMENT_NAME="@SFLSDCR"
USER_DEFINED_INSTRUMENT_DEFINITION="($SV(#POAEY00)*.42)-$SV(#PCAAD00)"
USER_DEFINED_INSTRUMENT_FOLDER=" UserFolder " CURRENCY_SOURCE="IMF"
INSTRUMENT_DESCRIPTION="SF Low Sulphur Diesel Crack" LOT_UNITS="" SECURITY_TYPE="UDF"
CONVERSION_FACTOR="1.0" PRECISION="13.0" EXPIRATION_DATETIME="N/A" />
<USER_DEFINED_INSTRUMENT USER_DEFINED_INSTRUMENT_NAME="@STRIPAMIGO"
USER_DEFINED_INSTRUMENT_DEFINITION="($SV(/NGU4)+$SV(/NGX4)+$SV(/NGZ4))/3"
USER_DEFINED_INSTRUMENT_FOLDER=" UserFolder" CURRENCY_SOURCE="" INSTRUMENT_DESCRIPTION="3
month strip" LOT_UNITS="" SECURITY_TYPE="UDF" CONVERSION_FACTOR="1.0" PRECISION="14.0"
EXPIRATION_DATETIME="N/A" />
</USER_DEFINED_INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 22

Data Connnection API 2.0

3.1.7 getOptionRootInstruments
Returns a list of instruments associated with a root or an underlier symbol. This is useful if you
would like a list of current future contracts associated with Natural Gas, or options of an
underlying instrument. The CONDITIONS clause must appear in the request.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML
Condition Tags:
Name
OPTION_ROOT
UNDERLIER
SECURITY_TYPE
CURRENT_SESSION

Description
API user identifier
API user password (case-sensitive)
Request XML, with a requisite CONDITIONS clause.

Description
The root symbol for option or futures contracts Either this or
UNDERLIER must appear.
The underlying symbol. Either this or OPTION_ROOT must
appear.
F for Futures; O for Options
Session the instrument trades on (1=night 2=day)

User-Specifiable Tags:
Name
Description
N/A
N/A
Default Tags:
Name
INSTRUMENT_ID, EXPIRATION_DATE, SYMBOL_DESCRIPTION, CURRENCY,
SECURITY_TYPE
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available exchange. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 23

Data Connnection API 2.0

Example Request XML:


<API_REQUEST>
<CONDITIONS
OPTION_ROOT="/CL"
SECURITY_TYPE="F"
CURRENT_SESSION="2" />
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ0" DISPLAY_CONTRACT_EXPIRATION_DATE="Dec-2010"
SYMBOL_DESCRIPTION="Dec 10 Light Crude Oil" CURRENCY="USD" SECURITY_TYPE="F" PUT_CALL="U"
/>
<INSTRUMENT INSTRUMENT_ID="/CLZ1" DISPLAY_CONTRACT_EXPIRATION_DATE="Dec-2011"
SYMBOL_DESCRIPTION="Dec 11 Light Crude Oil" CURRENCY="USD" SECURITY_TYPE="F" PUT_CALL="U"
/>
<INSTRUMENT INSTRUMENT_ID="/CLZ2" DISPLAY_CONTRACT_EXPIRATION_DATE="Dec-2012"
SYMBOL_DESCRIPTION="Dec 12 Light Crude Oil" CURRENCY="USD" SECURITY_TYPE="F" PUT_CALL="U"
/></INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 24

Data Connnection API 2.0

3.1.8 getVersion
Returns the version of Data Connection. This method exists to facilitate customer support
issues. It is the exception to the rule, as it returns ithe version identifier in the DETAILS
attribute of the API_RESPONSE.
Arguments:
Type
Name
N/A
Condition Tags:
Name
N/A

Description

Description

User-Specifiable Tags:
Name
Description
N/A
N/A
Default Tags:
Name
N/A
Response:
Type
Description
String
XML structured to contain a response for the request. The
API_RESPONSEs error description field contains the version identifier.
Request XML
N/A
Response XML
<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="MarketView Web Services: 2.0.228-0 buildDate: Mon Dec 04
12:35:00 CST 2006 javacVersion: 1.4.2_10 javaClass.Ver: 48.0 buildHost: wchpbwh1 vcBuildLabel: MarketView Web Services Version 2.0.228-0 vcRequest-Label: ProductionBuild" />

GVSI 2005-2007, Proprietary and Confidential

Page 25

Data Connnection API 2.0

3.2

Realtime and Historical Price API Methods


Data Connection provides realtime pricing data in Intraday and Daily strips. We also keep
LiveQuote (latest) data, and Historical Trades (ticks) data stores. In addition, we also keep
corrections issued by the exchange.
ISO data is fairly different from other securities, keeping disparate information such as usage
hour and date, voltage et al. As such, we keep them in separate datastores, in daily and hourly
ISO strips. We also keep ISO corrections.
Rounding out our offerings is News. As in MarketView, you can receive a collection of news
headlines, headlines with the story body, or headlines with a URL that a HTML browser can
load & display.

3.2.1 getDailyPrices
Returns daily strip prices from the intraday datastore, for a user-defined set of instruments,
covering a user-defined period of time. The user may specify which Tags (a.k.a., fields) they
want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
UserPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. Any number of instruments can be
requested as shown below.

Description
Does not appear in the <CONDITIONS> clause; instead appears
in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two fields,
creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

GVSI 2005-2007, Proprietary and Confidential

Page 26

Data Connnection API 2.0

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
This sessions highest transaction
value
This sessions lowest transaction
value
Date and Time of the last reported
Trade, in ISO format
The Date portion (only) of the
TRADE_DATETIME
This session's opening price
Today's total trading volume
Open interest
Settlement price. The official closing
price of a commodity
Midpoint
Name of underlying company
Symbol description

HIGH
LOW
TRADE_DATETIME
TRADE_DATE
OPEN
VOLUME
OPEN_INTEREST
CLOSE
MID_POINT
COMPANY_NAME
SYMBOL_DESCRIPTION

Default Tags:
Name
INSTRUMENT_ID, TRADE_DATETIME, OPEN, HIGH, LOW, CLOSE
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 27

Data Connnection API 2.0

Example Request XML:


<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ6"/>
</INSTRUMENTS>
<INSTRUMENT_SEARCHES>
<INSTRUMENT_SEARCH INSTRUMENT_ID="/NG?6"/>
</INSTRUMENT_SEARCHES>
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT LOW="7.800" OPEN_INTEREST="48149" VOLUME="0" INSTRUMENT_ID="/NGZ6"
TRADE_DATETIME="2006-11-17T12:00:00-0600" HIGH="8.250" OPEN="7.820" CLOSE="8.179" />
<INSTRUMENT LOW="7.060" OPEN_INTEREST="15246" VOLUME="31628" INSTRUMENT_ID="/NGX6"
TRADE_DATETIME="2006-10-27T12:00:00-0500" HIGH="7.720" OPEN="7.410" CLOSE="7.153" />
<INSTRUMENT LOW="4.070" OPEN_INTEREST="29266" VOLUME="46642" INSTRUMENT_ID="/NGV6"
TRADE_DATETIME="2006-09-27T12:00:00-0500" HIGH="4.450" OPEN="4.440" CLOSE="4.201" />
<INSTRUMENT LOW="7.040" OPEN_INTEREST="0" VOLUME="7228" INSTRUMENT_ID="/NGS6"
TRADE_DATETIME="2006-10-27T12:00:00-0500" HIGH="7.740" OPEN="7.459" CLOSE="7.153" />
<INSTRUMENT LOW="7.700" OPEN_INTEREST="0" VOLUME="35122" INSTRUMENT_ID="/NGT6"
TRADE_DATETIME="2006-11-17T12:00:00-0600" HIGH="8.241" OPEN="7.712" CLOSE="8.200" />
<INSTRUMENT LOW="6.080" OPEN_INTEREST="21114" VOLUME="53063" INSTRUMENT_ID="/NGU6"
TRADE_DATETIME="2006-08-29T12:00:00-0500" HIGH="6.950" OPEN="6.180" CLOSE="6.816" />
<INSTRUMENT LOW="55.08" OPEN_INTEREST="38084" VOLUME="0" INSTRUMENT_ID="/CLZ6"
TRADE_DATETIME="2006-11-17T12:00:00-0600" HIGH="56.30" OPEN="55.50" CLOSE="55.81" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 28

Data Connnection API 2.0

3.2.2 getHourlyISOPrices
Returns ISO data in hourly strips, for a user-defined set of instruments, covering a userdefined period of time. The user may specify which Tags (a.k.a., fields) they want to have
returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML
Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
AGGREGATE_TYPE
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML.

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
1 for PEAK, 2 for OFFPEAK, 0 for BOTH
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
Settlement price
Date and Time of the last reported
trade
Usage hour as 24-hour integer

CLOSE
TRADE_DATETIME
USAGE_HOUR

Default Tags:
Name
INSTRUMENT_ID, TRADE_DATETIME, CLOSE
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
GVSI 2005-2007, Proprietary and Confidential

Page 29

Data Connnection API 2.0

API_RESPONSE will only contain an error code and error description.

Example Request XML:


<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="#JMD33092311" />
</INSTRUMENTS>
<CONDITIONS DAYS_BACK="3" AGGREGATE_TYPE="1" />
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT OFFPEAK_DAILY_AGGREGATE="80.200000" DAILY_AGGREGATE="80.200000"
LAST="80.200000" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="80.200000" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T13:00:000600" CLOSE="80.200000" />
<INSTRUMENT OFFPEAK_DAILY_AGGREGATE="74.100000" DAILY_AGGREGATE="74.100000"
LAST="74.100000" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="74.100000" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T14:00:000600" CLOSE="74.100000" />
<INSTRUMENT OFFPEAK_DAILY_AGGREGATE="69.860000" DAILY_AGGREGATE="69.860000"
LAST="69.860000" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="69.860000" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T15:00:000600" CLOSE="69.860000" />
<INSTRUMENT OFFPEAK_DAILY_AGGREGATE="66.780000" DAILY_AGGREGATE="66.780000"
LAST="66.780000" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="66.780000" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T16:00:000600" CLOSE="66.780000" />
<INSTRUMENT OFFPEAK_DAILY_AGGREGATE="61.790000" DAILY_AGGREGATE="61.790000"
LAST="61.790000" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="61.790000" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T17:00:000600" CLOSE="61.790000" />
etc
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 30

Data Connnection API 2.0

3.2.3 getDailyISOPrices
Returns ISO data in daily strips, for a user-defined set of instruments, covering a user-defined
period of time. The user may specify which Tags (a.k.a., fields) they want to have returned, or
rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
AGGREGATE_TYPE
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request may contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE. The
AGGREGATE_TYPE element can be used to restrict the
result to peak (AGGREGATETYPE of 1) or off-peak (2)
hours.

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
1 for PEAK, 2 for OFFPEAK, 0 for BOTH
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
Settlement price
Date and Time of the last reported
trade
Usage Day as YYYY-MM-DD
Usage hour as 24-hour integer
Integer; node ID
Location
Security description

CLOSE
TRADE_DATETIME
USAGE_DAY
USAGE_HOUR
NODE_ID
LOCATION
SYMBOL_DESCRIPTION

GVSI 2005-2007, Proprietary and Confidential

Page 31

Data Connnection API 2.0

Name
VOLTAGE
POWER_TYPE

Description
Voltage (in KV)
Power type (HUB, ZONE, GEN,
AGGREGATE, INTERFACE, EHV,
LOAD, HUB NODE, NETWORK
NODE)

Default Tags:
Name
INSTRUMENT_ID, CLOSE, TRADE_DATETIME, USAGE_HOUR, USAGE_DAY,
SYMBOL_DESCRIPTION
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="#JMD33092311" />
</INSTRUMENTS>
<TAGS>
<TAG TAG_NAME=DAILY_AGGREGATE />
<TAG TAG_NAME=OFFPEAK_DAILY_AGGREGATE />
<TAG TAG_NAME=LAST />
<TAG TAG_NAME=PEAK_DAILY_AGGREGATE />
<TAG TAG_NAME=USAGE_HOUR />
<TAG TAG_NAME=EXCHANGE_CODE />
<TAG TAG_NAME=INSTRUMENT_ID />
<TAG TAG_NAME=TRADE_DATETIME />
<TAG TAG_NAME=CLOSE />
</TAGS>
<CONDITIONS DAYS_BACK="3" AGGREGATE_TYPE="1" />
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT DAILY_AGGREGATE="66.670625" OFFPEAK_DAILY_AGGREGATE="66.670625"
LAST="66.670625" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="66.670625" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-03T12:00:000600" CLOSE="66.670625" />
<INSTRUMENT DAILY_AGGREGATE="69.245625" OFFPEAK_DAILY_AGGREGATE="69.245625"
LAST="69.245625" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="69.245625" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-06T12:00:000600" CLOSE="69.245625" />
<INSTRUMENT DAILY_AGGREGATE="59.793125" OFFPEAK_DAILY_AGGREGATE="59.793125"
LAST="59.793125" AGGREGATE_TYPE="N/A" PEAK_DAILY_AGGREGATE="59.793125" USAGE_HOUR="0"
EXCHANGE_CODE="N/A" INSTRUMENT_ID="#JMD33092311" TRADE_DATETIME="2006-11-07T12:00:000600" CLOSE="59.793125" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 32

Data Connnection API 2.0

3.2.4 getTradePrices
Returns the Trade (a.k.a., Tick or Historical) prices for a user-defined set of instruments,
covering a user-defined period of time. The user may specify which Tags (a.k.a., fields) they
want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request may contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE. The
AGGREGATE_TYPE element can be used to restrict the
result to peak (AGGREGATETYPE of 1) or off-peak (2)
hours.

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
Trade price or value
Date and Time of the last reported
trade
Transactional volume of the last trade
price reported in TRDPRC_1

LAST
TRADE_DATETIME
TRADE_VOLUME

Default Tags:
Name
INSTRUMENT_ID, LAST, TRADE_DATETIME, TRADE_VOLUME

GVSI 2005-2007, Proprietary and Confidential

Page 33

Data Connnection API 2.0

Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument. If a global error occurs, such as authentication, the
API_RESPONSE will only contain an error code and error description.
Example Request XML:
<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ6" />
</INSTRUMENTS>
<CONDITIONS DAYS_BACK="2" />
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.65"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.55"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.80"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.80"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.55"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.55"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.45"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.55"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.60"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.60"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.70"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.65"
TRADE_VOLUME="0" />
<INSTRUMENT INSTRUMENT_ID="/CLZ6" LAST="55.65"
TRADE_VOLUME="0" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

TRADE_DATETIME="2006-11-17T15:06:12-0600"
TRADE_DATETIME="2006-11-17T15:06:19-0600"
TRADE_DATETIME="2006-11-17T15:06:39-0600"
TRADE_DATETIME="2006-11-17T15:06:44-0600"
TRADE_DATETIME="2006-11-17T15:07:22-0600"
TRADE_DATETIME="2006-11-17T15:08:44-0600"
TRADE_DATETIME="2006-11-17T15:11:05-0600"
TRADE_DATETIME="2006-11-17T15:11:05-0600"
TRADE_DATETIME="2006-11-17T15:12:42-0600"
TRADE_DATETIME="2006-11-17T15:12:43-0600"
TRADE_DATETIME="2006-11-17T15:13:36-0600"
TRADE_DATETIME="2006-11-17T15:14:25-0600"
TRADE_DATETIME="2006-11-17T15:14:29-0600"

Page 34

Data Connnection API 2.0

3.2.5 getLiveQuotePrices
Returns Livequote prices for a set of instruments, covering a user-defined period of time. The
user may specify which Tags (a.k.a., fields) they want to have returned, or rely on the default
set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

AGGREGATE_TYPE
START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE:

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
1 for peak; 2 for off-peak; 0 for all
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
Last trade price or value (most
recent)
Net change from previous close
This session's highest transaction
value
This session's lowest transaction
value
Date and Time of the last reported
trade
Date portion of TRADE_DATETIME
This session's opening price

LAST
NET_CHANGE
HIGH
LOW
TRADE_DATETIME
TRADE_DATE
OPEN

GVSI 2005-2007, Proprietary and Confidential

Page 35

Data Connnection API 2.0

Name
HIST_CLOSE
BID

Description
Most recent closing or settlement
price
Latest bid price

ASK

Latest ask price

BID_SIZE

The quantity bid at the latest bid price

ASK_SIZE
TOTAL_VOLUME

The quantity offered at the latest ask


price
Today's total trading volume

OPEN_INTEREST

Open interest

STRIKE
VOLUME

Strike price (the price at which the


option is exercisable)
Today's total trading volume

PUT_CALL

P = put C = call U = underlier

TRADE_VOLUME

Transactional volume of the last trade


price reported
Symbol description
Name of underlying company
Date of bid
Date of ask
Midpoint
Daily Aggregate
Daily Peak Aggregate
Daily Off Peak Aggregate

SYMBOL_DESCRIPTION
COMPANY_NAME
BID_DATETIME
ASK_DATETIME
MID_POINT
DAILY_AGGREGATE
PEAK_DAILY_AGGREGATE
OFFPEAK_DAILY_AGGREGAGE

Default Tags:
Name
INSTRUMENT_ID, LAST, NET_CHANGE, HIGH, LOW, TRADE_DATETIME,
OPEN, BID, ASK, BID_SIZE, ASK_SIZE, COMPANY_NAME
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 36

Data Connnection API 2.0

Example Request XML:


<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ6" />
<INSTRUMENT INSTRUMENT_ID="/NGZ6"/>
</INSTRUMENTS>
</API_REQUEST>

Example Response XML:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT LOW="7.800" INSTRUMENT_ID="/NGZ6" BID="8.180" HIGH="8.250" COMPANY_NAME="N/A"
OPEN="7.820" LAST="8.179" ASK="8.180" TRADE_DATETIME="2006-11-17T19:29:37-0600" />
<INSTRUMENT LOW="55.08" INSTRUMENT_ID="/CLZ6" BID="N/A" HIGH="56.30" COMPANY_NAME="N/A"
OPEN="55.50" LAST="55.81" ASK="N/A" TRADE_DATETIME="2006-11-17T19:50:00-0600" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 37

Data Connnection API 2.0

3.2.6 getIntradayPrices
Returns intraday prices for a set of instruments, covering a user-defined period of time. The
user may specify which Tags (a.k.a., fields) they want to have returned, or rely on the default
set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

AGGREGATE_TYPE
BAR_INTERVAL

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE. Any
number of instruments can be requested as shown below:

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
1 for peak; 2 for off-peak; 0 for all
Desired stripping, in minutes. Available are 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 90, 120, 150, 180,
210, 240.
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of TRADE_DATE and TRADE_TIME
(Use TRADE_DATETIME instead.) But see INSTRUMENT_ID
above.

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
The securitys instrument identifier. If
<TAGS> are specified, this field must
appear in the request.
Last trade price or value
This sessions highest transaction
value
This sessions lowest transaction
value
Date and Time of the last reported
trade

LAST
HIGH
LOW
TRADE_DATETIME

GVSI 2005-2007, Proprietary and Confidential

Page 38

Data Connnection API 2.0

Name
TRADE_DATE
OPEN

Description
Date portion of TRADE_DATETIME
This sessions opening price

Default Tags:
Name
INSTRUMENT_ID, TRADE_DATETIME, OPEN, HIGH, LOW, LAST
Response:
Type
Description
String
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If a
global error occurs, such as authentication, the API_RESPONSE will only
contain an error code and error description.
Example XML Request:
<API_REQUEST>
<INSTRUMENT_SEARCHES>
<INSTRUMENT_SEARCH INSTRUMENT_ID="/CL?6" />
</INSTRUMENT_SEARCHES>
</API_REQUEST>

Example Xml Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT LAST="N/A" LOW="56.30" HIGH="56.34"
TRADE_DATETIME="2006-11-17T07:20:00-0600" />
<INSTRUMENT LAST="N/A" LOW="56.17" HIGH="56.36"
TRADE_DATETIME="2006-11-17T07:25:00-0600" />
<INSTRUMENT LAST="N/A" LOW="56.31" HIGH="56.35"
TRADE_DATETIME="2006-11-17T07:30:00-0600" />
<INSTRUMENT LAST="N/A" LOW="56.34" HIGH="56.36"
TRADE_DATETIME="2006-11-17T07:35:00-0600" />
<INSTRUMENT LAST="N/A" LOW="56.34" HIGH="56.34"
TRADE_DATETIME="2006-11-17T07:40:00-0600" />
<INSTRUMENT LAST="N/A" LOW="56.38" HIGH="56.38"
TRADE_DATETIME="2006-11-17T07:45:00-0600" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

INSTRUMENT_ID="/CLT6" OPEN="56.30"
INSTRUMENT_ID="/CLT6" OPEN="56.36"
INSTRUMENT_ID="/CLT6" OPEN="56.34"
INSTRUMENT_ID="/CLT6" OPEN="56.36"
INSTRUMENT_ID="/CLT6" OPEN="56.34"
INSTRUMENT_ID="/CLT6" OPEN="56.38"

Page 39

Data Connnection API 2.0

3.2.7

getNews
Returns News articles. Articles either have their own body (e.g., the story,) or have a reference
to a web URL, to be used by a web browser. The user may specify which Tags (a.k.a., fields)
they want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
NEWS_SOURCE
NEWS_DEPTH
START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE.

Description
ID Code for News Source. Must appear
Not a condition per se, but controls the number of headlines
returned by query. Defaults to 300.
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two fields,
creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the two
fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the START_DATE/
END_DATE pair, with the proviso that END_DATE is the current
date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a CONDITION
tag, with the exception of NEWS_DATE and NEWS_TIME (Use
NEWS_DATETIME instead.)

User-Specifiable Tags:
Name
NEWS_DATETIME
NEWS_DATE
NEWS_TIME
NEWS_HEADLINE
NEWS_BODY
NEWS_STORY_NUMBER
NEWS_SOURCE
NEWS_PAGE
NEWS_CATEGORIES
NEWS_SYMBOL

Description
News Story DateTime
Date portion of NEWS_DATETIME
Time portion of NEWS_DATETIME
Headline Text
Story Text
News Story ID Number
ID Code for News Source
The News Page Number
News Category
Instrument/Symbol associated with
Story
Keywords in the headlines
Server News Story Date
Server News Story Time
URL/URI pointing to the story on the
Web (used in conjunction with web

NEWS_KEYWORDS
NEWS_SERVER_DATE
NEWS_SERVER_TIME
NEWS_HREF

GVSI 2005-2007, Proprietary and Confidential

Page 40

Data Connnection API 2.0

browser component.)
Default Tags:
Name
NEWS_DATETIME, NEWS_HEADLINE, NEWS_BODY,
NEWS_STORY_NUMBER, NEWS_SOURCE, NEWS_PAGE,
NEWS_CATEGORIES, NEWS_SYMBOL, NEWS_KEYWORDS,
NEWS_SERVER_DATE, NEWS_SERVER_TIME, NEWS_HREF
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 41

Data Connnection API 2.0

Example XML Request:


<API_REQUEST>
<CONDITIONS NEWS_SOURCE="PGA" NEWS_PAGE="5" NEWS_DEPTH="5" />
<TAGS>
<TAG TAG_NAME="NEWS_HEADLINE" />
<TAG TAG_NAME="NEWS_BODY" />
<TAG TAG_NAME="NEWS_CATEGORIES" />
<TAG TAG_NAME="NEWS_SOURCE" />
<TAG TAG_NAME="NEWS_DATETIME" />
<TAG TAG_NAME="NEWS_PAGE" />
</TAGS>
</API_REQUEST>

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<NEWS_ARTICLES>
<NEWS_ARTICLE NEWS_HEADLINE="5--European Products 352: HSFO TRADE: TOTSA BP 1 kt b/e
267" NEWS_BODY="08Nov06/1145 am EST/1645 GMT
--1645 GMT: HSFO TRADE: TOTSA BP 1 kt b/e 267
--1644 GMT: HSFO TRADE: TOTSA-BP 1kt $267 FE
--1640 GMT: HSFO TRADE: CORRECTION Totsa to Statoil 1kt 267
b/e...SHOULD READ AS F/E DATES
--1634 GMT: ULSD TRADE: Litasco - Gunvor Intl French Winter
50ppm ULSD 20kts +/-10% sellers option, CIF Le Havre during
26-30 Nov, disch options Hamburg-Bordeaux + N Spain, otherwise
std flexi terms, BP GT+Cs, Dec IPE + 27
--1633 GMT: HSFO TRADE: (NON MOC) koch chemoil 5 kt 267 be
--1633 GMT: ULSD TRADE: MS - Totsa 20kt+/-10% s/o Flexi terms,
French Winter 50ppm ULSD, CIF Le Havre with Hbg/Bdx options,
18-22 Nov, Dec + 29
--1633 GMT: HSFO TRADE: (NON MOC) FAMM to Chemoil 1kt 267 b/e
--Platts Global Alert-" NEWS_CATEGORIES="0005" NEWS_SOURCE="PGA" NEWS_DATETIME="2006-11-08T16:45:00-0600"
NEWS_PAGE="000005" />
<NEWS_ARTICLE NEWS_HEADLINE="5--European Products 352: HSFO TRADE: TOTSA BP 1 kt b/e
267" NEWS_BODY="08Nov06/1145 am EST/1645 GMT
--1645 GMT: HSFO TRADE: TOTSA BP 1 kt b/e 267
--1644 GMT: HSFO TRADE: TOTSA-BP 1kt $267 FE
--1640 GMT: HSFO TRADE: CORRECTION Totsa to Statoil 1kt 267
b/e...SHOULD READ AS F/E DATES
--1634 GMT: ULSD TRADE: Litasco - Gunvor Intl French Winter
50ppm ULSD 20kts +/-10% sellers option, CIF Le Havre during
26-30 Nov, disch options Hamburg-Bordeaux + N Spain, otherwise
std flexi terms, BP GT+Cs, Dec IPE + 27
--1633 GMT: HSFO TRADE: (NON MOC) koch chemoil 5 kt 267 be
--1633 GMT: ULSD TRADE: MS - Totsa 20kt+/-10% s/o Flexi terms,
French Winter 50ppm ULSD, CIF Le Havre with Hbg/Bdx options,
18-22 Nov, Dec + 29
--1633 GMT: HSFO TRADE: (NON MOC) FAMM to Chemoil 1kt 267 b/e
--Platts Global Alert-" NEWS_CATEGORIES="PG" NEWS_SOURCE="PGA" NEWS_DATETIME="2006-11-08T16:45:00-0600"
NEWS_PAGE="000005" />
</NEWS_ARTICLES>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 42

Data Connnection API 2.0

3.2.8 getHourlyISOCorrections
Returns price corrections for ISO instruments. The user may specify which Tags (a.k.a., fields)
they want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE.

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids)
or <INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two
fields, creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the
two fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the
START_DATE/ END_DATE pair, with the proviso that
END_DATE is the current date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a
CONDITION tag, with the exception of NEWS_DATE and
NEWS_TIME (Use NEWS_DATETIME instead.)

User-Specifiable Tags:
Name
INSTRUMENT_ID
CORRECTION_DATETIME

Description
Instrument ID. Must appear
Date and time on which the correction
was made.
Last trade price or value
Settlement price
Date and time of the trade
Day of Month (format YYYY-MM-DD)
Hour of usage
Node ID
Location

LAST
CLOSE
TRADE_DATETIME
USAGE_DAY
USAGE_HOUR
NODE_ID
LOCATION

GVSI 2005-2007, Proprietary and Confidential

Page 43

Data Connnection API 2.0

Default Tags:
Name
INSTRUMENT_ID, CORRECTION_DATETIME, LAST, CLOSE,
TRADE_DATETIME, USAGE_DAY, USAGE_HOUR, NODE_ID, LOCATION
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 44

Data Connnection API 2.0

3.2.9 getDailyISOPriceCorrections
Returns price corrections for ISO instruments. The user may specify which Tags (a.k.a., fields)
they want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID
START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE.

Description
The instrument id. Must appear
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two
fields, creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the
two fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the
START_DATE/ END_DATE pair, with the proviso that
END_DATE is the current date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a
CONDITION tag, with the exception of NEWS_DATE and
NEWS_TIME (Use NEWS_DATETIME instead.)

User-Specifiable Tags:
Name
INSTRUMENT_ID

Description
Does not appear in the
<CONDITIONS> clause; instead
appears in <INSTRUMENTS>
(specific instrument_ids) or
<INSTRUMENT_SEARCHES>
(wildcards)
Date and time on which the correction
was made.
Last trade price or value
Settlement price
Date and time of the trade
Day of Month (format YYYY-MM-DD)
Hour of usage
Node ID
Location

CORRECTION_DATETIME
LAST
CLOSE
TRADE_DATETIME
USAGE_DAY
USAGE_HOUR
NODE_ID
LOCATION

GVSI 2005-2007, Proprietary and Confidential

Page 45

Data Connnection API 2.0

Default Tags:
Name
INSTRUMENT_ID, CORRECTION_DATETIME, LAST, CLOSE,
TRADE_DATETIME, USAGE_DAY, USAGE_HOUR, NODE_ID, LOCATION
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 46

Data Connnection API 2.0

3.2.10 getPriceCorrections
Returns price corrections for normal (non-ISO) instruments. The user may specify which Tags
(a.k.a., fields) they want to have returned, or rely on the default set of Tags.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID

START_DATE

END_DATE

DAYS_BACK

RECORDS_BACK
Other Tags

Description
API user identifier
API user password (case-sensitive)
Request XML. The request most contain a single
conditions clause identifying either a number of calendar
days back or a START_DATE and END_DATE.

Description
Does not appear in the <CONDITIONS> clause; instead
appears in <INSTRUMENTS> (specific instrument_ids)
or <INSTRUMENT_SEARCHES> (wildcards)
A date in the format, YYYY-MM-DD. If specified, then
END_DATE must be specified as well. Between the two
fields, creates a date-within-range query.
A date in the format, YYYY-MM-DD. If specified, then
START_DATE must be specified as well, Between the
two fields, creates a date-within-range query.
Expressed as an integer. Synonymous with the
START_DATE/ END_DATE pair, with the proviso that
END_DATE is the current date.
Synomyn for DAYS_BACK
Any of the User-Specifiable tags may appear as a
CONDITION tag, with the exception of NEWS_DATE and
NEWS_TIME (Use NEWS_DATETIME instead.)

User-Specifiable Tags:
Name
INSTRUMENT_ID
CORRECTION_DATETIME

Description
Instrument ID. Must appear
Date and time on which the correction
was made.
Last trade price or value
Settlement price
Date and time of the trade

ORIGINAL_PRICE
NEW_PRICE
TRADE_DATETIME

GVSI 2005-2007, Proprietary and Confidential

Page 47

Data Connnection API 2.0

Default Tags:
Name
INSTRUMENT_ID, CORRECTION_DATETIME, ORIGINAL_PRICE, NEW_PRICE,
TRADE_DATETIME
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 48

Data Connnection API 2.0

3.3

Data Quality API Methods


Data Connection provides functions that allow you to inspect data quality in the Intraday,
LiveQuote, Daily, Trades, ISO-Hourly and ISO-Daily data stores. These allow you to check,

Is there a quote available for the given day

Does the quote lie within a certain threshold of previous quotes in the system
o Expressible as a fixed amount
o Expressible as a percentage
o The positive threshold (amount the quote goes up) can be explicitly expressed
o The negative threshold (amount the quote goes down) can be explicitly expressed
o You can set the sampling size of previous quotes e.g., read and average the
lastmost x quotes, then compare that value to the threshold values.
o The field being compared in the quote is user-definable. So, you could compare
the CLOSE, LAST, or VOLUME.

3.3.1 Are{dataSet}PricesAvailable
Data Connection provides this family of methods (areDailyPricesAvailable,
areHourlyISOPricesAvailable, areDailyISOPricesAvailable, areTradePricesAvailable,
areLiveQuotePricesAvailable, and areIntradayPricesAvailable,,) to determine if a price
quote has been delivered for the given instrument(s) today. Reasons why quotes may not be
available vary, but can include issues such as exchange holidays or transmission problems. If
you are concerned that you may not have a complete dataset, this family of methods can help
you track down issues.
Essentially, these methods run a variant of get{dataSet}Prices methods, documented in
Sections 3.2.1 3.2.6, where there is a <CONDITIONS> clause of DAYS_BACK=2 set, to
previous two days quotes.
Data Connection determines whether a quote for today is available, and returns that
information to you through the tag QUOTE_AVAILABLE. If the quote is available, this tag has
the value of AVAILABLE; else NOT AVAILABLE.
Note that the definition of today is a little nebulous: MarketViews infrastructure stores all
date/times in Greenwich Mean Time, and does not necessarily know then the day ends at
the Exchange where the Instrument is quoted from. Therefore, it is up to you to specify the
Exchanges timezone (through the TIMEZONE tag.) If no timezone is specified, Data
Connection assumes America/Chicago.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Condition Tags:
Name
INSTRUMENT_ID
GVSI 2005-2007, Proprietary and Confidential

Description
API user identifier
API user password (case-sensitive)
Request XML. The request should contain a
<CONDITIONS> clause identifying the TIMEZONE for
which to run the query.

Description
Does not appear in the <CONDITIONS> clause; instead
Page 49

Data Connnection API 2.0

appears in <INSTRUMENTS> (specific instrument_ids)


or <INSTRUMENT_SEARCHES> (wildcards)
Should appear; as all quotes date/time fields are stored
in Greenwich Mean Time, how does Data Connection
determine when (in equivalent GMT,) the day ends at the
Exchanges timezone?

TIMEZONE

Given that information, Data Connection then looks for the


lastmost quote being within the range of 0:00:00 to
23:23:59 of todays date for the given timezone.
If you do not specify timezone, it is assumed to be
Americas/Chicago, or GMT-06:00 (ISO 8601
designation for Central Standard Timezone)
Default Tags:
Name
Whatever the default tags are for the given method, plus INSTRUMENT_ID,
TRADE_DATETIME, QUOTE_AVAILABLE
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

Example XML Request:


<API_REQUEST>
<INSTRUMENTS>
<INSTRUMENT INSTRUMENT_ID="/CLZ6" />
</INSTRUMENTS>
<CONDITIONS TIMEZONE="America/New York" />
</API_REQUEST>

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="59.700" CONTRIBUTOR="N/A" LAST="N/A" LOW="59.10"
EXCHANGE_ID="N/A" TICK_TYPE="34" OPEN_INTEREST="244435" EXCHANGE_CODE="N/A"
VOLUME="242868" INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-11-08T12:00:00-0600"
TICK_COUNT="N/A" HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="59.30" CLOSE="59.83"
TRADE_VOLUME="N/A" QUOTE_AVAILABLE="AVAILABLE" />
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="60.915" CONTRIBUTOR="N/A" LAST="N/A" LOW="60.50"
EXCHANGE_ID="N/A" TICK_TYPE="0" OPEN_INTEREST="224199" EXCHANGE_CODE="N/A" VOLUME="0"
INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-11-09T12:00:00-0600" TICK_COUNT="N/A"
HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="60.00" CLOSE="61.16" TRADE_VOLUME="N/A"
QUOTE_AVAILABLE="AVAILABLE" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 50

Data Connnection API 2.0

3.3.2 are{dataSet}PricesInAbsoluteThreshold
Data Connection provides this family of methods (areDailyPricesInAbsoluteThreshold,
areHourlyISOPricesInAbsoluteThreshold, areDailyISOPricesInAbsoluteThreshold,
areTradePricesInAbsoluteThreshold, areLiveQuotePricesInAbsoluteThreshold, and
areIntradayPricesInAbsoluteThreshold,) to determine if a price quote is within a userspecified threshold. The major difference between this family of methods and those
documented in Section 3.3.3 is these methods deal with fixed numbers (e.g., a constant);
the family of methods in Section 3.3.3 instead deals with changes in the quotes that are a
percentage.
For example, you might wish to be notified if the last price of an instrument increases or
decreases by more than $5 of the average last, established by sampling x previous price
quotes. These methods allow you to determine that.
In order to use these methods properly, you first need to indicate which tag you want Data
Connection to analyze. This is set with the THRESHOLD_FIELD tag in the CONDITIONS
clause; by default, the tag CLOSE is inspected. Other reasonable tags might be LAST, or
VOLUME. (Obviously, tags analyzed must be numeric)
Next, you need to set the SAMPLE_SIZE tag in the CONDITIONS clause. Doing so
establishes the number of records Data Connection should look at when establishing what the
average value of the THRESHOLD_FIELD is. By default, the SAMPLE_SIZE is set to 1
(which means, the previous quote in the system is used to establish the average an
average, sampling one record.)
Next you need to set the CHECK_SIZE tag in the CONDITIONS clause. This indicates how
many quotes, following the SAMPLE_SIZE, you would like to analyze for being within
threshold values. The default value for CHECK_SIZE is 1. (What this means is, if both
SAMPLE_SIZE and CHECK_SIZE are set to 1, the last two quotes are read the second-tolast to establish the average, the last to analyze for thresholds.)

The following diagram shows the relationship of SAMPLE_SIZE versus CHECK_SIZE:


Sample Size indicates the number of quotes in the system for which you want to system to
sample, and establish an average value. Check Size designates the number of quotes
immediately following the Sample Size, which will be tested against thresholds of that average
value. Check Size always ends at the lastmost quote in the system, and Sample Size always
abuts Check Size.

GVSI 2005-2007, Proprietary and Confidential

Page 51

Data Connnection API 2.0

Finally, you must set the thresholds to compare against. You have two ways to do this,

If the range you want to check for is the same amount (e.g., the threshold is a value,
like 2), assign THRESHOLD_AMOUNT tag in the CONDITIONS clause.

If you would like individual control of the ceiling the quote can increase by, set the
POSITIVE_THRESHOLD_AMOUNT tag in the CONDITIONS clause. For the floor,
set the NEGATIVE_THRESHOLD_AMOUNT tag. (If you specify positive threshold,
you must also specify negative threshold.) Both amounts should be positive.

Data Connection will run a query for you, adding a tag named THRESHOLD_REPORT, that
reports whether the tag specified is within or outside the specified threshold.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Description
API user identifier
API user password (case-sensitive)
Request XML. The request must contain a
<CONDITIONS> clause with the THRESHOLD_AMOUNT
or the POSITIVE_THRESHOLD_AMOUNT -NEGATIVE_THRESHOLD_AMOUNT pair (both must
appear)

Condition Tags:
Name
INSTRUMENT_ID

SAMPLE_SIZE

CHECK_SIZE

THRESHOLD_FIELD
THRESHOLD_AMOUNT

POSITIVE_THRESHOLD_AMOUNT

NEGATIVE_THRESHOLD_AMOUNT

Description
Does not appear in the <CONDITIONS>
clause; instead appears in <INSTRUMENTS>
(specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
Specifies the number of records to read from
the datastore to establish the average. Defaults
to 1.
Specifies the number of records to read from
the datastore to for analysis against the
average. Defaults to 1.
The tag in the quote(s) to compare. Defaults to
CLOSE; must be a numeric field.
The threshold amount to compare against.
Shortcut for specifying
POSITIVE_THRESHOLD_AMOUNT and
NEGATIVE_THRESHOLD_AMOUNT with the
same value.
The threshold value for positive value change
that the quote value cannot exceed. A positive
value.
The threshold value for negative value change
that the quote value cannot exceed. A positive
value.

Default Tags:
Name
Whatever the default tags are for the given method, plus INSTRUMENT_ID,
TRADE_DATETIME, the tag specified by THRESHOLD_FIELD, and
GVSI 2005-2007, Proprietary and Confidential

Page 52

Data Connnection API 2.0

Name
THRESHOLD_REPORT.
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

Example XML Request:


NOT A REAL SAMPLE

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="59.700" CONTRIBUTOR="N/A" LAST="N/A"
LOW="59.10" EXCHANGE_ID="N/A" TICK_TYPE="34" OPEN_INTEREST="244435"
EXCHANGE_CODE="N/A" VOLUME="242868" INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-1108T12:00:00-0600" TICK_COUNT="N/A" HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="59.30"
CLOSE="59.83" TRADE_VOLUME="N/A" QUOTE_AVAILABLE="NOT AVAILABLE" />
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="60.915" CONTRIBUTOR="N/A" LAST="N/A"
LOW="60.50" EXCHANGE_ID="N/A" TICK_TYPE="0" OPEN_INTEREST="224199"
EXCHANGE_CODE="N/A" VOLUME="0" INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-1109T12:00:00-0600" TICK_COUNT="N/A" HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="60.00"
CLOSE="61.16" TRADE_VOLUME="N/A" QUOTE_AVAILABLE="AVAILABLE" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 53

Data Connnection API 2.0

3.3.3 are{dataSet}PricesInPercentileThreshold
Data Connection provides this family of methods (areDailyPricesInPercentileThreshold,
areHourlyISOPricesInPercentileThreshold, areDailyISOPricesInPercentileThreshold,
areTradePricesInPercentileThreshold, areLiveQuotePricesInPercentileThreshold, and
areIntradayPricesInPercentileThreshold,) to determine if a price quote is within a userspecified threshold. The major difference between this family of methods and those
documented in Section 3.3.2 is that the former deals with fixed numbers (e.g., a constant);
this family of methods instead deals with changes in the quotes that are a percentage.
For example, you might wish to be notified if the last price of an instrument increases or
decreases by more than 5% of the average last, established by sampling x previous price
quotes. These methods allow you to determine that.
In order to use these methods properly, you first need to indicate which tag you want Data
Connection to analyze. This is set with the THRESHOLD_FIELD tag in the CONDITIONS
clause; by default, the tag CLOSE is inspected. Other reasonable tags might be LAST, or
VOLUME. (Obviously, tags analyzed must be numeric)
Next, you need to set the SAMPLE_SIZE tag in the CONDITIONS clause. Doing so
establishes the number of records Data Connection should look at when establishing what the
average value of the THRESHOLD_FIELD is. By default, the SAMPLE_SIZE is set to 1
(which means, the previous quote in the system is used to establish the average an
average, sampling one record.)
Next you need to set the CHECK_SIZE tag in the CONDITIONS clause. This indicates how
many quotes, following the SAMPLE_SIZE, you would like to analyze for being within
threshold values. The default value for CHECK_SIZE is 1. (What this means is, if both
SAMPLE_SIZE and CHECK_SIZE are set to 1, the last two quotes are read the second-tolast to establish the average, the last to analyze for thresholds.)
Finally, you must set the thresholds to compare against. You have two ways to do this,

If the range you want to check for is the same amount (e.g., the threshold is a value,
like 2), assign THRESHOLD_AMOUNT tag in the CONDITIONS clause. If you
would like to check against 5%, THRESHOLD_AMOUNT should be set to 5. Data
Connection will divide your entries by 100. Which means, fractional amounts in your
arguments are considered to be fractions of a percent.

If you would like individual control of the ceiling the quote can increase by, set the
POSITIVE_THRESHOLD_AMOUNT tag in the CONDITIONS clause. For the floor,
set the NEGATIVE_THRESHOLD_AMOUNT tag. (If you specify positive threshold,
you must also specify negative threshold.) Both amounts should be positive. If youd
like to check against 5%, pass 5 as the argument; Data Connection will divide your
arguments by 100. Which means, fractional amounts in your arguments are
considered to be fractions of a percent.

GVSI 2005-2007, Proprietary and Confidential

Page 54

Data Connnection API 2.0

Data Connection will run a query for you, adding a tag named THRESHOLD_REPORT, that
reports whether the tag specified is within or outside the specified threshold.
Arguments:
Type
Name
String
User
String
userPassword
String
requestXML

Description
API user identifier
API user password (case-sensitive)
Request XML. The request must contain a
<CONDITIONS> clause with the THRESHOLD_AMOUNT
or the POSITIVE_THRESHOLD_AMOUNT -NEGATIVE_THRESHOLD_AMOUNT pair (both must
appear)

Condition Tags:
Name
INSTRUMENT_ID

SAMPLE_SIZE

CHECK_SIZE

THRESHOLD_FIELD
THRESHOLD_AMOUNT

POSITIVE_THRESHOLD_AMOUNT

NEGATIVE_THRESHOLD_AMOUNT

Description
Does not appear in the <CONDITIONS>
clause; instead appears in <INSTRUMENTS>
(specific instrument_ids) or
<INSTRUMENT_SEARCHES> (wildcards)
Specifies the number of records to read from
the datastore to establish the average. Defaults
to 1.
Specifies the number of records to read from
the datastore to for analysis against the
average. Defaults to 1.
The tag in the quote(s) to compare. Defaults to
CLOSE; must be a numeric field.
The threshold amount to compare against.
Shortcut for specifying
POSITIVE_THRESHOLD_AMOUNT and
NEGATIVE_THRESHOLD_AMOUNT with the
same value. Data Connection will divide your
argument by 100, so if you want 5%, pass 5.
The threshold value for positive value change
that the quote value cannot exceed. A positive
value.
The threshold value for negative value change
that the quote value cannot exceed. A positive
value.

Default Tags:
Name
Whatever the default tags are for the given method, plus INSTRUMENT_ID,
TRADE_DATETIME, the tag specified by THRESHOLD_FIELD, and
THRESHOLD_REPORT.
Response:
Type
String

Description
XML structured to contain a response for the request. It will identify each
available instrument which has price corrections for the period specified. If
a global error occurs, such as authentication, the API_RESPONSE will
only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 55

Data Connnection API 2.0

Example XML Request:


NOT A REAL SAMPLE

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<INSTRUMENTS>
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="59.700" CONTRIBUTOR="N/A" LAST="N/A"
LOW="59.10" EXCHANGE_ID="N/A" TICK_TYPE="34" OPEN_INTEREST="244435"
EXCHANGE_CODE="N/A" VOLUME="242868" INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-1108T12:00:00-0600" TICK_COUNT="N/A" HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="59.30"
CLOSE="59.83" TRADE_VOLUME="N/A" QUOTE_AVAILABLE="NOT AVAILABLE" />
<INSTRUMENT MONEY_FLOW="N/A" MID_POINT="60.915" CONTRIBUTOR="N/A" LAST="N/A"
LOW="60.50" EXCHANGE_ID="N/A" TICK_TYPE="0" OPEN_INTEREST="224199"
EXCHANGE_CODE="N/A" VOLUME="0" INSTRUMENT_ID="/CLZ6" TRADE_DATETIME="2006-1109T12:00:00-0600" TICK_COUNT="N/A" HIGH="N/A" EXCHANGE_IDENTIFIER="N/A" OPEN="60.00"
CLOSE="61.16" TRADE_VOLUME="N/A" QUOTE_AVAILABLE="AVAILABLE" />
</INSTRUMENTS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 56

Data Connnection API 2.0

3.4 Data Import Methods


Data Connection provides data import facilities, that allow you to upload price quotes,
corrections and news stories into the GlobalView data servers. This is very useful if you have
information that you want to be available on a real-time basis to other members of your
company through the MarketView system and client application suite.
In order to take advantage of the powerful data import function, customers will need to
coordinate with GlobalView support in order to design and provision the facilities to meet the
requirements for the specific data sets, as well as enetitlements to limit who can see the data.
Contact your GlobalView sales person for more information.
Instrument Prices

importInstrumentPrice

importInstrumentPriceCorrection

importInstrumentMetaData

News Articles

importNews

Data Importation Runtime Monitoring

getImportStatistics

Data Connection Import Data methods require that you provide the name of the application.
That value is user-defined, and it allows you to fine-tune the granularity of the runtime statistics
we gather for you. Import Statistics keeps track of the number of success and failures to import
data, broken down by userName and application. If you partition the application name
passed by the type of data being imported (or the machine doing the importing,) this can help
you track down Production issues.
No restrictions are placed on application values you can use, nor do you have to do anything
special to register a legal value merely pass an application to one of the API calls if it did
not exist beforehand, it will be created.

GVSI 2005-2007, Proprietary and Confidential

Page 57

Data Connnection API 2.0

3.4.1 importInstrumentPrice
Allows the user to import a price for an instrument. This price is inserted into two data stores:
LiveQuote and Trade/Historical. For the Trade/Historical data store, we use the trade
datetime and the close tags. For LiveQuote we use the trade datetime, open, high, low,
volume, open interest and last tags. (Last and close tags would contain the same value.)
Data Connection allows one price quote to be published per method invocation.
Arguments:
Type
Name
String
User
String
userPassword
String
Application
String
requestXML
Required Tags:
Name
INSTRUMENT_ID
EXCHANGE_CODE
TRADE_DATETIME
CLOSE
LAST

Description
API user identifier
API user password (case-sensitive)
User-defined name of the importing application process.
Request XML.

Description
Identifier for the given instrument.
Exchange identifier for the instrument.
Date/Time of the price quote
Price communicated to the Trade/Historical data store
Price communicated to the LiveQuote data store

Optional Tags:
Name
HIGH
LOW
OPEN
VOLUME
OPEN_INTEREST
Response:
Type
String

Description
Sessions High price
Sessions Low price
Sessions opening price
Volume
Open Interest

Description
XML structured to contain a response for the request. API_RESPONSE
will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 58

Data Connnection API 2.0

Example XML Request:


<API_REQUEST>
<DAILY_PRICE
INSTRUMENT_ID="#TESTSYM1"
EXCHANGE_CODE="TEST"
TRADE_DATETIME="2006-06-07T14:00:00Z"
HIGH="100.0"
LOW="65.0"
OPEN="67.0"
VOLUME="45000"
OPEN_INTEREST="1200"
CLOSE="72.0"
LAST="72.0"
/>
</API_REQUEST>

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >

GVSI 2005-2007, Proprietary and Confidential

Page 59

Data Connnection API 2.0

3.4.2 importInstrumentPriceCorrection
Allows the user to import a price correction. The corrections will be propaged to the LiveQuote
and Trade/Historical data stores, and the date the correction was issued will be stored in the
Correction data store. The Correction data store has the dates corrections were issued per
trade date, but is unaware of what data field has been corrected.
Data Connection allows one price correction to be published per method invocation.
Arguments:
Type
Name
String
User
String
userPassword
String
Application
String
requestXML
Required Tags:
Name
INSTRUMENT_ID
EXCHANGE_CODE
CORRECTION_DATETIME
TRADE_DATETIME
CLOSE
LAST

Description
API user identifier
API user password (case-sensitive)
User-defined name of the importing application process.
Request XML.

Description
Identifier for the given symbol.
Exchange identifier for the symbol.
Date/Time of the price correction
Date/Time of the price quote
Price communicated to the Trade/Historical data store
Price communicated to the LiveQuote data store

Optional Tags:
Name
HIGH
LOW
OPEN
VOLUME
OPEN_INTEREST
Response:
Type
String

Description
Sessions High price
Sessions Low price
Sessions opening price
Volume
Open Interest

Description
XML structured to contain a response for the request. API_RESPONSE
will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 60

Data Connnection API 2.0

Example XML Request:


<API_REQUEST>
<PRICE_CORRECTION
INSTRUMENT_ID="#TESTSYM1"
EXCHANGE_CODE="TEST"
TRADE_DATETIME="2006-06-07T14:00:00Z"
CORRECTION_DATETIME="2006-11-29T12:00:00Z"
HIGH="100.0"
LOW="65.0"
OPEN="67.0"
VOLUME="45000"
OPEN_INTEREST="1200"
CLOSE="72.0"
LAST="72.0"
/>
</API_REQUEST>

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >

GVSI 2005-2007, Proprietary and Confidential

Page 61

Data Connnection API 2.0

3.4.3 importInstrumentMetaData
Allows the user to import metadata concerning a given instrument. Instrument metadata
includes fields such as description, currency, lot units, etc., and these are values that generally
do not change.
Data Connection allows one instruments metadata to be published per method invocation.
Arguments:
Type
Name
String
User
String
userPassword
String
Application
String
requestXML
Required Tags:
Name
INSTRUMENT_ID
EXCHANGE_CODE

Description
API user identifier
API user password (case-sensitive)
User-defined name of the importing application process.
Request XML.

Description
Identifier for the given symbol.
Exchange identifier for the symbol.

Optional Tags:
Name
SYMBOL_DESCRIPTION
CURRENCY
LOT_UNITS
MARKET
REGION
LOCATION
CONVERSION_FACTOR
EXPIRATION_DATE
Response:
Type
String

Description
Symbol description
Currency
Lot Units. E.g., gallons,barrows, etc.
Market (used in symbol search)
Region (used in symbol search)
Location (used in symbol search)
Lot unit conversion factor
Expiration Date

Description
XML structured to contain a response for the request. API_RESPONSE
will only contain an error code and error description.

GVSI 2005-2007, Proprietary and Confidential

Page 62

Data Connnection API 2.0

Example XML Request:


<API_REQUEST>
<INSTRUMENT_METADATA
INSTRUMENT_ID="#TESTSYM2"
EXCHANGE_CODE="TEST"
SYMBOL_DESCRIPTION="Test December Contract"
CURRENCY="USD"
LOT_UNITS="BBL"
MARKET="Gulf Coast 1% Oil"
REGION="United States"
LOCATION="QUAKERTOWN"
CONVERSION_FACTOR="100.0"
EXPIRATION_DATE="2006-12-01"
/>
</API_REQUEST>

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >

GVSI 2005-2007, Proprietary and Confidential

Page 63

Data Connnection API 2.0

3.4.4 getImportStatistics
Returns runtime statistics of applications that have been importing data (news, prices,
corrections) into Data Connection. Statistics gathered are, userName, application (which is a
user-defined value,) startDate, lastDate, count of errors and count of successes.
(We prepend a W to your USER_NAME. This allows us to separate permissions, vis--vis the
exchanges you can query from, versus the exchanges you can import data for.)
Arguments:
Type
Name
String
User
String
userPassword
Condition Tags:
Name
N/A

Description
API user identifier
API user password (case-sensitive)

Description
There is no RequestXML parameter

User-Specifiable Tags:
Name
Description
N/A
Response:
Type
Description
String
XML structured to match APIRESPONSE.to contain a response for the
request. It will identify each available instrument. If a global error occurs, such
as authentication, the API_RESPONSE will only contain an error code and
error description.

GVSI 2005-2007, Proprietary and Confidential

Page 64

Data Connnection API 2.0

Example XML Request:


N/A

Example XML Response:


<?xml version="1.0" encoding="UTF-8"?>
<API_RESPONSE CODE="0" DETAILS="" >
<IMPORT_STATISTICS>
<IMPORT_STATISTIC USER_NAME=" WMVWS_USER" APPLICATION_NAME="priceImportTool"
START_DATETIME="2006-10-21T02:01:58Z" LAST_DATETIME="2006-11-30T09:57:02Z"
ERROR_COUNT="53" SUCCESS_COUNT="14" />
<IMPORT_STATISTIC USER_NAME=" WMVWS_USER" APPLICATION_NAME="newsImportTool"
START_DATETIME="2006-11-29T12:51:20Z" LAST_DATETIME="2006-11-30T02:13:52Z"
ERROR_COUNT="16" SUCCESS_COUNT="12" />
<IMPORT_STATISTIC USER_NAME=" WMVWS_USER" APPLICATION_NAME="creditRiskReportTool"
START_DATETIME="2006-11-30T11:20:33Z" LAST_DATETIME="2006-11-22T02:50:01Z"
ERROR_COUNT="25" SUCCESS_COUNT="20" />
<IMPORT_STATISTIC USER_NAME=" WMVWS_USER" APPLICATION_NAME="someHost.yourdomain.com"
START_DATETIME="2006-10-31T06:27:47Z" LAST_DATETIME="2006-11-30T06:27:47Z"
ERROR_COUNT="0" SUCCESS_COUNT="1" />
</IMPORT_STATISTICS>
</API_RESPONSE>

GVSI 2005-2007, Proprietary and Confidential

Page 65

Data Connnection API 2.0

4 Frequently Asked Questions

What is the major difference between MarketView and Data Connection?


Besides the obvious difference (desktop GUI application versus Web Services), there is a major
difference is in how the products obtain information from GlobalViews data servers. The
MarketView application obtains price quotes through a publish/subscribe paradigm, versus
request/reply used in Data Connection.
Using the request/reply model, longer-running requests that attempt to gather large data sets
are subject to timeout constraints. Should timeouts become an issue (e.g., you want to request
10 years of Trade data,) it is probably better to have this request managed for you by
GlobalView as a one-time export. Contact us for details.

Where is Data Connection Hosted?


http://webapi.gvsi.com/services/mv2
GlobalView may also provide development servers, against which you can develop your client
software in a protected test environment.

What is the Web Services topography?


We support SOAP/ XML as implemented with Apache Axis 1.x.

What support is available for Data Connection?


GlobalView provides support for Data Connection as part of the intial implementation. Please
discuss details with your sales representative.

GVSI 2005-2007, Proprietary and Confidential

Page 66

Vous aimerez peut-être aussi