API Guide - Trayport

Transcription

API Guide - Trayport
Trayport® GlobalVision
API Guide
8.12.4
for Broker Trading System
API Guide
®
SM
SM
This document describes the Trayport GlobalVision Broker Trading System API (Application Programming
Interface). The document is aimed at developers who are integrating GlobalVision with another system, such as
a back or middle office system.
Legal Notice
All rights reserved.
®
The software contains proprietary information of Trayport Limited; it is provided under a licence agreement
containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the
software is prohibited.
Due to continued product development this information may change without notice. The information and
intellectual property contained herein is confidential between Trayport Limited and the client and remains the
exclusive property of Trayport Limited. If you find any problems in the documentation, please report them to
us in writing. Trayport Limited does not warrant that this document is error-free.
This guide is for the client's internal use with a licensed Trayport product only. No part of this publication may
be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, photocopying, recording or otherwise without the prior written permission of Trayport Limited.
All information submitted to Trayport will be subject to Trayport’s Privacy Policy as amended from time to
time. The privacy policy can be found at www.trayport.com.
Trayport is a registered trademark of Trayport Limited.
This document was written using Author-it in British English.
It was last updated on 22/04/2014 (16:56).
7th Floor, Broadgate West, 9 Appold Street, London, EC2A 2AP
Trayport Home Page http://www.trayport.com
©
Copyright 2014 Trayport
Contents
Chapter 1: Introduction to the API Guide .......................................................................................3
Chapter 2: API Overview ................................................................................................................5
2.1 Using the API ................................................................................................................................................ 5
2.1.1 Using the API for Straight-Through Processing .................................................................................... 5
2.1.2 The API functions ................................................................................................................................. 5
2.2 Requirements and Prerequisites .................................................................................................................. 7
2.3 Connectivity Issues ....................................................................................................................................... 7
2.4 Sample Code ................................................................................................................................................. 8
2.5 Language Issues ............................................................................................................................................ 9
2.6 Comments .................................................................................................................................................... 9
2.7 Valid XML .................................................................................................................................................... 10
2.8 User Accounts ............................................................................................................................................. 10
2.9 Error Handling ............................................................................................................................................ 10
Chapter 3: IGlobalVision8API Interface ........................................................................................ 11
3.1 Login ........................................................................................................................................................... 11
3.2 LoginGUI ..................................................................................................................................................... 11
3.3 ConnectionSettings..................................................................................................................................... 12
3.4 Logout ......................................................................................................................................................... 13
3.5 UseSchema ................................................................................................................................................. 13
3.6 QueryXMLRecordSet .................................................................................................................................. 14
3.7 Subscribe .................................................................................................................................................... 15
3.8 Unsubscribe ................................................................................................................................................ 15
3.9 ExecuteAction ............................................................................................................................................. 16
3.10 SetAPIOptions ........................................................................................................................................... 17
Chapter 4: _IGlobalVision8APIEvents Interface............................................................................. 21
4.1 OnServerConnect ....................................................................................................................................... 21
4.2 OnServerDisconnect ................................................................................................................................... 21
4.3 OnNewData ................................................................................................................................................ 21
Appendix A: XML Query Format.................................................................................................. 23
A.1 Introducing the Query Format ................................................................................................................... 23
A.1.1 Constructing More Complex Filters .................................................................................................. 23
A.1.2 The All Option ................................................................................................................................... 23
A.2 Companies .................................................................................................................................................. 24
A.3 Users........................................................................................................................................................... 25
A.4 Instrument Properties ................................................................................................................................ 26
A.5 Instrument Definitions ............................................................................................................................... 27
A.6 Instrument Attributes ................................................................................................................................ 27
A.7 Orders......................................................................................................................................................... 29
A.8 Instrument Specifier ................................................................................................................................... 32
A.9 Order Summary Information ...................................................................................................................... 33
A.10 Trades and Historical Trades .................................................................................................................... 33
A.11 Trade Summary Information .................................................................................................................... 37
A.12 Sequences ................................................................................................................................................ 37
A.13 Sequence Items ........................................................................................................................................ 38
A.14 Term Formats ........................................................................................................................................... 39
A.15 Trading Accounts ...................................................................................................................................... 40
A.16 Groups ...................................................................................................................................................... 41
A.17 Market Events .......................................................................................................................................... 42
i
A.18 Historical Orders ...................................................................................................................................... 42
A.19 Order History ............................................................................................................................................ 43
Appendix B: XML Record Format................................................................................................. 44
B.1 Company Records ....................................................................................................................................... 44
B.2 User Records .............................................................................................................................................. 46
B.3 Instrument Properties Records .................................................................................................................. 47
B.4 Instrument Definition Records ................................................................................................................... 54
B.5 Order Records ............................................................................................................................................ 55
B.6 Instrument Specifier ................................................................................................................................... 59
B.7 Constituents ............................................................................................................................................... 60
B.8 Order Summary Records ............................................................................................................................ 61
B.9 Trade Records ............................................................................................................................................. 62
B.10 Trade Summary Records .......................................................................................................................... 70
B.11 Sequence Records .................................................................................................................................... 71
B.12 Sequence Item Records ............................................................................................................................ 71
B.13 Terms ........................................................................................................................................................ 72
B.14 Term Format Records ............................................................................................................................... 73
B.15 Trading Account Records .......................................................................................................................... 74
B.16 Groups Record .......................................................................................................................................... 75
B.17 Market Event Records .............................................................................................................................. 75
B.18 Historical Orders Records ......................................................................................................................... 78
B.19 Order History Records .............................................................................................................................. 78
B.20 Annotations .............................................................................................................................................. 83
Appendix C: XML Action Format ................................................................................................. 85
C.1 Inserting, Updating, and Deleting Deals ..................................................................................................... 85
C.2 External Reference Prices ........................................................................................................................... 90
C.3 Market Events ............................................................................................................................................ 91
C.4 Starting a Matching Session ....................................................................................................................... 97
Appendix D: Return Codes and Messages .................................................................................... 98
Appendix E: GlobalVision 8 API Change History .......................................................................... 103
Glossary .................................................................................................................................... 106
Chapter 1: Introduction to the API Guide
This document is divided into the following sections.

Chapter 1: Introduction to the API Guide - provides information about what this document contains.

Chapter 2: API Overviewintroduces the API and provides important information that you should know
before you start writing your own applications using the API.

Chapter 3: IGlobalVision8API Interface - provides detailed reference information about the event handlers
that can be raised by the API.

Chapter 4: _IGlobalVision8APIEvents Interface - provides detailed reference information about the API
functions that you can use in your applications.

Appendix A: XML Query Format - describes the XML query format you will need to use when constructing
XML strings to query the API.

Appendix B: XML Record Format - describes the XML record format used by the API. It is important to
understand this format so that your application can correctly parse the data it receives from the API.

Appendix C: XML Action Format - describes the XML format used to submit actions to the API.

Appendix D: Return Codes and Messages - provides a list of the return codes and messages generated by
the API.

Appendix E: GlobalVision 8 API Change History - provides a summary of the changes that have been made
to the API in recent releases. If you have written an application against an older version of the API, you
should refer to this section to see what changes you need to make to your application so that it works with
the latest version.

Glossary on page 106 - provides definitions of the terms used in this document.
Typographical Conventions
Typographical conventions used in this document:
Note
Notes emphasise points related to the current topic.
Tip
Tips provide information that helps you to apply the techniques and procedures described in the text, to
your specific needs. Tips can provide alternative methods that may not be obvious, and they can provide
assistance with understanding the benefits and capabilities of the feature or process that is being described.
Warning
Warnings contain information about issues that might cause a problem in the future, or essential
instructions.
Italic
Italic is used when referring to the names of entities such as: dialog boxes, file names, directory paths, service
names, and names of documents. It is also used for figure captions and when introducing a term for the first
time.
3
Bold
Bold is used to emphasise the importance of a point, and, in a series of numbered steps, to indicate items that
you must select, for example: menu options, command buttons, or items in a list.
4
Chapter 2: API Overview
The GlobalVision API provides a programmatic interface that allows you to retrieve data from GlobalVision
(such as details of orders and trades), and use that data in other applications. For example, you could use the
API to integrate your back and middle office systems with GlobalVision.
This Chapter introduces the API and provides important information that you should know before you start
writing your own applications using the API.
2.1 Using the API
In order to use the API, you must write an application to communicate with GlobalVision.
Your application must first login to the GlobalVision server. Your application can only communicate with
GlobalVision once the login has successfully completed.
Once it has logged in, your application can begin using the API functions to send requests to GlobalVision in
order to retrieve live market information. There are two ways for your application to retrieve information from
the GlobalVision server.

Your application can perform a query to request all the data about a particular aspect of the market. For
example, your application could request details of all the orders in the market for a particular instrument,
or all the trades that have taken place for that instrument.

Your application can subscribe to notifications about particular events. Every time an event of that type
takes place, GlobalVision will send your application details of the event. For example, your application
could subscribe to details about deals taking place for a particular instrument. Every time a deal takes
place on that instrument, GlobalVision will send details of the deal to your application.
Note
It is only possible to subscribe to certain types of events. For full details on which events support
subscriptions, and which do not, please refer to the individual sections in XML Query Format.
When your application has finished using the API, it must disconnect by logging out.
2.1.1 Using the API for Straight-Through Processing
The GlobalVision API is often used to perform straight-through processing of deals, integrating GlobalVision
with a back-office system. In order to perform straight-through processing, your application should subscribe to
notifications about the relevant type of deals. Once this subscription is in place, the GlobalVision server will
send your application details of each deal taking place, as it takes place. Your application can then process the
deal details and send the information to your back-office system.
2.1.2 The API functions
To query the server for live data, your application should call the QueryXMLRecordSet function, indicating
what information is required by passing a string of XML to the function. The format of the XML is described in
XML Query Format.
GlobalVision will respond to the request with a result in XML. For example, your application might send a
request to GlobalVision for details of all the orders in the market for a particular instrument. GlobalVision will
return a set of XML records describing the orders (the format of the returned XML is described in Appendix B:
XML Record Format). Your application can then parse the records and perform whatever processing is required
to manipulate the returned information.
5
In order to subscribe to notifications about specific events taking place, your application should call the
Subscribe function, indicating what to subscribe to by passing a string of XML to the function. Every time an
event that your application has subscribed to takes place, GlobalVision will send a notification in the form of an
OnNewData event containing details of the event.
The following figure shows a typical series of function calls and events occurring in an API session.
Figure 1: A typical series of function calls and events
Warning
The API is case-sensitive. Any elements and attributes that appear in your XML strings must match the case
shown in this document exactly.
6
2.2 Requirements and Prerequisites
The following table lists the hardware and software requirements and prerequisites for the API.
Area
Requirements
Installed
Software
In order to use the API, the following software must be installed on the machine running
the API:


One of the following operating systems:

Microsoft Windows Vista Business

Microsoft Windows 7

Microsoft Windows 2003 Server with Service Pack 2 (SP2)

Microsoft Windows 2003 Server R2

Microsoft Windows 2008 Server with Service Pack 2 (SP2)

Microsoft Windows 2008 Server R2.
Microsoft XML Parser version 6.0 with Service Pack 1 (SP1).
Connectivity
The API acts as a client to the GlobalVision server, so the application using the API is
therefore subject to the same connectivity requirements as the GlobalVision Front-End. For
more information about connectivity requirements, see the Administration Tools Guide.
GlobalVision
Server
This version of the API is designed to work only with servers that are GlobalVision 8 and
above.
Supported
Languages
The API is implemented as a COM component. It therefore supports any development
languages that support COM. The API has been tested with the following languages:

ASP

C++

C#

JavaScript (HTML)

.NET

VBScript

Visual Basic

Visual Basic for Applications.
Note
In this document, all interface functions are described in Visual Basic format. C++ users
should refer to the supplied Interface Definition Language file (gvapi.idl, located in the
src directory in the API installation location) to find the C++ alternatives.
2.3 Connectivity Issues
If you configure your application to subscribe to notifications about a particular type of event, and the API loses
its connection with the server, any events taking place during the disconnection will not be sent to your
application. You should therefore make sure that your application is designed to handle disconnections.
If a disconnection occurs, the API raises the OnServerDisconnect event, and automatically attempts to
reconnect to the server every 30 seconds. Once the API has successfully reconnected, it raises the
7
OnServerConnect event. On receiving this notification, your application should specifically query the server
for details of events that it may have missed.
For example, to find out about any trades that took place during the disconnection, your application can use
QueryXMLRecordSet to query for <TRADES> with a <LASTUPDATE> time that is more recent than the last
update time on the last trade event successfully received by your application before the disconnection. Using
this value should ensure that the API returns details of all the missed trades.
You can also use the <LASTUPDATE> time to query for any updates to <ORDERS/> that have taken place
during the disconnection.
Warning
In some cases, using this strategy will cause the API to return duplicates of records you have already
received, in addition to the missed records. For this reason, it is important that your application also
specifically checks for duplicates when parsing the results.
For record types that do not return time information, the only way to retrieve any records that your application
missed during the disconnection is to query for all the records and compare the result against those already
received by your application.
2.4 Sample Code
The following table lists the sample code provided with the API.
Language
Code Provided
ATL
An example using VCPROJ.
C#
An example using Visual C# project.
JavaScript (HTML)
A sample demonstrating how the API could be called by a web application.
Microsoft Access (VBA)
A sample Microsoft Access 2000 database.
Microsoft Excel (VBA)
A sample demonstrating how the API could be used from Microsoft Excel. The
sample demonstrates how order and trade details can be imported in real time.
The sample also demonstrates how the API could be used to display data from
different servers on the same screen in Microsoft Excel (it currently supports the
concurrent login of up to four different servers).
8
2.5 Language Issues
The following table lists some issues you may encounter with using the API with specific languages.
Language
Potential Issue
Visual Basic
All dates and times used by the API are expressed in ISO 8601 format. This format
combines the date and time in a single string. You cannot pass a date and time in this
format directly into a Visual Basic Date object. The following are two possible solutions to
this problem:

Validate all XML in your application against the schema. The schema defines the data
types of the attributes: in Microsoft XML Parser you can then use this method to
return a Date object directly:
IXMLDOMNode::nodeTypedValue

Alternatively, convert the String containing the date into a suitable format by using
some code similar to the following. This code removes the milliseconds and the
delimiting T from the string.
Dim myStr as String
Dim myDate as Date
myStr = xmlparser.getNamedItem("DateTime") Mid(myStr, 11,1) =
" " 'Replace the delimiting T
myStr = Left(myStr, 19) 'Remove the milliseconds
myDate = myStr
C++
You may also encounter this problem when using dates and times in C++. You can also
solve the problem by validating the data against the schema, which defines the attribute
data types. Your C++ application can then use IXMLDOMNode::nodeTypedValue in
Microsoft XML Parser to retrieve the data directly from the API DateTime fields. This
method returns data of type DATE, which COleDateTime can take in using one of its
constructors.
2.6 Comments
If necessary, you can include comments in the XML strings that you pass to the API, as long as the string is still
valid XML. Comments must start with <!-- and end with -->.
The following is an example of a valid use of comments within an XML string. In this query, both the text This is
a comment, and the entire <TRADES> element are commented out.
<CRITERIA>
<!-- This is a comment -->
<ORDERS>
<SIDE>Bid</SIDE>
<STATUS>Firm</STATUS>
</ORDERS>
<!-- TRADES>
<INITTRADER>My</INITTRADER>
<TRADEDATE From="2006-08-25T00:00:00" Until="2006-08-25T23:59:59"/>
</TRADES -->
</CRITERIA>
The following is an example of a use of comments that is not valid. In this example, the user has attempted to
comment out one of the attributes on the <TRADEDATE> element. This is not valid XML because the < and >
characters that start and end the comment appear inside the element. Attempting to pass an XML string like
this to the API generates an error.
9
<CRITERIA>
<ORDERS>
<SIDE>Bid</SIDE>
<STATUS>Firm</STATUS>
</ORDERS>
<TRADES>
<INITTRADER>My</INITTRADER>
<TRADEDATE <!-- From="2006-08-25T00:00:00" -->
From="2006-09-25T00:00:00" Until="2006-09-25T23:59:59"/>
</TRADES>
</CRITERIA>
2.7 Valid XML
It is important to ensure that your XML query strings are valid and well formed. In particular, you must ensure
that you escape any of the following characters if you need to include them in your query strings: &, <, and >.
You must replace these characters with their entities (&amp;, &lt;, and &gt;).
You must also escape any quote marks you need to include in your XML string. If the XML string is enclosed in
double-quotes (") then you will need to escape any double quotes by replacing them with &quot;.
Alternatively, if the string is enclosed in single quotes ('), then you will need to escape any single quotes by
replacing them with &apos;.
Failing to escape these special characters will result in error messages being returned by the API.
2.8 User Accounts
In order to use the API, your application must log in to the GlobalVision server using a user account that has
been assigned the Read-Only API user permission (in the User Administration tool).
Both Trader and Broker user accounts can connect to the GlobalVision server through the API, but the available
functionality will vary depending on the type of account used to connect to the server.
In addition, the market information returned by the API is subject to the same permissions as other methods of
accessing the server. For example, if you connect to the API using a Trader user account, then that account will
typically not have permission to see the aggressor and initiator details for trades where the user was not one of
the counter parties. This information will therefore not appear in <TRADE/> records returned by the API to
that user (just as this information would not appear in the Deals window in the GlobalVision Front-End).
Note
When using a trader account to connect using the API, you should note that you will not be able to
simultaneously connect to the GlobalVision Front-End with the same user account unless you have been
allocated more than one concurrent login. The number of concurrent logins assigned to a user is specified in
the User Administration tool.
2.9 Error Handling
To improve error handling, the following changes have been made.

The GlobalVision8 API now implements ISupportErrorInfo http://msdn.microsoft.com/enus/library/ms221083.aspx, to provide more information when an error occurs in the API.

The GlobalVision8 API has been improved to return more appropriate return codes if an exception occurs
while processing a request, rather than allowing the exception to propagate across the COM boundary.
10
Chapter 3: IGlobalVision8API Interface
This Chapter provides detailed reference information about the API functions that you can use in your
applications.
COM Object
Gvapi.GlobalVision8API
Interface
IGlobalVision8API
Class ID
CE92C3B9-9A93-40E1-85AB-6A49170AEF7F
3.1 Login
Login logs in and authenticates with the server.
Synopsis
Login(string strServerAddress, int nPortNumber, string strUserName, string
strPassword) as string
Inputs
Parameter
Description
strServerAddress
The address of the server to connect to. The server address must either be in the
form of a domain name (a series of words separated by dots, rather like a website
address, for example server.company.com) or an IP address (four numbers
separated by dots, for example, 192.168.122.1).
nPortNumber
The port number to connect to on the server. The port number is usually 11997.
strUserName
The username of a valid account on the server.
strPassword
The password associated with the account specified in strUserName.
3.2 LoginGUI
LoginGUI opens the standard GlobalVision login window.
Synopsis
LoginGUI() as string
Outputs
Returns
Description
string
A result in XML. If the function is successful, the API will return the following.
<GV8APIREPLIES xmlns="gv8api-trayport-com">
11
Returns
Description
<REPLY Code="0" Message="Success." Reason=""/>
</GV8APIREPLIES>
If the function fails, the API will return something similar to the following.
<GV8APIREPLIES xmlns="gv8api-trayport-com">
<REPLY Code="301" Message="Login Failure." Reason="Cannot
establish connection to server.example.com::11997."/>
</GV8APIREPLIES>
Note

LoginGUI can be used as an alternative to Login if you do not want to pass the user credentials, server
details, and port number as parameters. If LoginGUI succeeds, the OnServerConnect event is fired,
and a persistent TCP level connection is maintained with the specified server until Logout is called.

Only one concurrent connection to a server is permitted for each instance of the API. If a subsequent
connection attempt is received, LoginGUI will return an error.
3.3 ConnectionSettings
ConnectionSettings displays the standard GlobalVision Connection Settings dialog box where you can configure
the API's connection to the server (for example, you can configure whether the API will connect through a
proxy server).
Synopsis
ConnectionSettings() as boolean
Outputs
Returns
Description
boolean
True if the dialog box was displayed and the user clicked OK.
<GV8APIREPLIES xmlns="gv8api-Trayport-com"> <REPLY Code="0"
Message="Success." Reason=""/> <SERVERSUBSCRIPTIONINFO
Enabled="false" MaxSubscriptions="0"/> </GV8APIREPLIES>
If the function fails, the API will return something similar to the following.
<GV8APIREPLIES xmlns="gv8api-Trayport-com"> <REPLY Code="301"
Message="Login Failure." Reason="Cannot establish connection to
server.example.com::11997."/> <SERVERSUBSCRIPTIONINFO
Enabled="false" MaxSubscriptions="0"/> </GV8APIREPLIES>
Note
For more information about the GlobalVision connection settings, see the Administration Tools Guide.
12
Tip
The connection settings are stored in the server's registry. This ensures that the settings persist between
sessions.
3.4 Logout
Logout terminates the TCP level connection.
Synopsis
Logout() as void
Note
When Logout completes, the OnServerDisconnect event is fired.
3.5 UseSchema
UseSchema sets the type and location of the schema that will be referenced by all future XML returned by the
API.
Synopsis
UseSchema(string strSchemaLocation, int nSchemaType) as void
Inputs
Parameter
Description
strSchemaLocation
The location and name of the schema to be referenced. URLs and file locations
are both valid.
nSchemaType
The type of schema to be referenced. The following are valid values:

0 - SchemaType_NONE: No schema should be used.

1 - SchemaType_XDR: XDR (Microsoft XML parser) format schema.

2 - SchemaType_W3C: XSD (W3C Standard) format schema.
Outputs
Returns
Description
void
N/A
Note
This function sets the namespace declaration used in the root tag of the XML returned by the API. The
appropriate namespace declaration will depend on the type of schema you wish to validate the XML against
(the XML parser will use the declaration to locate the appropriate schema). Although the API can return XML
formatted for validation with XDR Compatible parsers, an XDR schema is not supplied (only an XSD schema,
13
Trayport-api-schema.xsd, is supplied with the API). XSD is the W3C standard schema. It is widely
supported, and is the recommended option.
Examples
The following examples show how the XML output may look as a result of using each of the different options.
SchemaType_NONE
<ORDER xmlns='gv8api-trayport-com'>
...
</ORDER>
SchemaType_XDR
<ORDER xmlns='x-schema:c:\schema\trayport-api-schema.xdr'>
...
</ORDER>
SchemaType_W3C
<ORDER xmlns='gv8api-trayport-com'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="gv8api-trayport-com
c:\schema\trayport-api-schema.xsd">
...
</ORDER>
3.6 QueryXMLRecordSet
QueryXMLRecordSet retrieves the specified information from the server. For example, your application can
use this function to return details of all the orders currently in the market, or the trades that have taken place.
Synopsis
QueryXMLRecordSet(string strXMLCriteria) as string
Inputs
Parameters
Description
strXMLCriteria
An XML string indicating the data records to return.
See XML Query Format for full details of the format you need to use to construct
XML queries.
Outputs
Returns
Description
string
A list of records in XML. The format of this data is described in XML Record Format.
14
3.7 Subscribe
Subscribe allows you to define the types of event taking place on the server that you want to receive
notifications about. Your application will only receive notifications about events that you have subscribed to.
Synopsis
Subscribe(string strXMLCriteria, string strXMLReturn) as integer
Inputs
Parameters
Description
strXMLCriteria
An XML string indicating the data records to show in notifications. For example, the
XML string might instruct the API to return details of trades as they take place, or of
new orders submitted to the market. By making use of the available options, you can
filter the notifications so that they contain only the specific information that you are
interested in.
See XML Query Format for full details of the XML string format used by this
parameter, and the various options that are available for filtering the notifications.
Outputs
Returns
Description
integer
If the subscription succeeds, it returns a unique subscription ID (if you need to unsubscribe
from this notification, you can do so by calling Unsubscribe using this ID). The function
will also populate the string strXMLReturn with a message similar to the following.
<GV8APIREPLIES xmlns="gv8api-trayport-com">
<REPLY Code="0" Message="Success." Reason=""/>
</GV8APIREPLIES>
If the function fails, it returns 0 and populates the string strXMLReturn with an error message formatted in
XML. For a full list of return codes and their meanings, see Return Codes and Messages.
Note

Once you have successfully subscribed to notifications, an OnNewData event will be raised every time
an event matching your subscription criteria takes place.

It is only possible to subscribe to certain types of events. For full details on which events support
subscriptions, and which do not, please refer to the individual sections in XML Query Format.
3.8 Unsubscribe
Unsubscribe cancels a subscription.
Synopsis
Unsubscribe(int nSubscriptionID) as boolean
15
Inputs
Parameters
Description
nSubscriptionID
The ID of the subscription to unsubscribe from (the ID previously returned by a
successful call to Subscribe).
Outputs
Returns
Description
boolean
True if the unsubscription is successful; false if the unsubscription is unsuccessful.
3.9 ExecuteAction
ExecuteAction attempts to carry out the specified action on the server. This function allows you to insert
non-tradable feed prices into GlobalVision using the API.
You can also use this function to add, delete, or update deals.
Synopsis
ExecuteAction(string strXMLAction) as string
Inputs
Parameters
Description
strXMLAction
An XML string indicating the deal to add, update, or delete, or the feed price to
submit.
See XML Action Format for full details of the format you need to use to construct XML
strings to submit deals using this function.
Outputs
Returns
Description
string
A result in XML.
If the function is successful, the API will return the following.
<GV8APIREPLIES xmlns="gv8api-trayport-com">
<REPLY Code="0" Message="Success." Reason="">
<SERVERSUBSCRIPTIONINFO Enabled="false" MaxSubscriptions="0"/>
</GV8APIREPLIES>
If the function fails, it returns an error message. For a full list of return codes and their
meanings, see Return Codes and Messages.
Note
In order to insert a non-tradable feed price using this function, you must be logged in using an account with
permission to insert feed prices. The following is an example of the type of XML string you must construct to
16
insert a feed price. The <INSTSPECIFIER> element identifies the instrument to insert the feed price for.
This must be an instrument that uses the Price Feed Transaction Engine. For more information about the
format of the <INSTSPECIFIER> element, see Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<ORDER Action="InsertFeed" Price="10.45" Side="Bid">
<INSTSPECIFIER InstID="6" SeqSpan="N/A"/>
</ORDER>
</GV8APIACTIONS>
To remove a feed price that you have previously inserted, call ExecuteAction again with the same XML
string, but change the Action to DeleteFeed.
3.10 SetAPIOptions
SetAPIOptions sets various options for the API.
Synopsis
SetAPIOptions(string strXML) as string
Inputs
Parameters
Description
strXML
A string of XML indicating the API options to set. The XML string can consist of any of the
elements listed the table API Connection Options (in the Notes section) enclosed in
<CONNECTIONOPTIONS> ... </CONNECTIONOPTIONS> tags.
Outputs
Returns
Description
string
A result in XML.
If the function is successful, the API will return the following.
<GV8APIREPLIES xmlns="gv8api-trayport-com">
<REPLY Code="0" Message="Success." Reason=""/>
</GV8APIREPLIES>
If the function fails, it returns an error message. For a full list of return codes and their
meanings, see Return Codes and Messages.
API Connection Options
The following table lists the child elements (and their options) that you can include in the XML string passed to
SetAPIOptions.
17
Child Element
Description
<DISCONNECT_ACTION>
Specifies what the server should do if the API loses its connection to
the server. This element takes one of the following options:
<KEEPALIVETIMEOUT_MS>

Withhold
Withhold all firm orders on the server owned by the trader using
the API.

Remove
Delete all firm orders owned by the Trader using the API.

Nothing
Take no action.
Specifies how often (in milliseconds) the server and the API should
send each other keep-alive messages. The lower the value of this
setting, the more sensitive the connection will be to network problems.
The default is 240000 ms (any value you specify will be rounded to the
nearest 60000 ms).
Note
If you want to change the timeout, you must set your preferred
alternative value before logging in to the API using Login or
LoginGUI.
<DIRECT_CONNECTION_PORT>
Selects a port to use for the connection. You may need to change the
port if the computer running the API does not have a direct connection
to the Internet. This element takes one of the following options:

GlobalVisionDirect
Use the port specified in the login method (usually 11997).

SSL
Use port 443.

HTTP
Use port 80.
Note
If you want to change the port, you must set your preferred
alternative value before logging in to the API using Login or
LoginGUI.
<WEB_PROXY>
18
Specifies the HTTP proxy server to use to connect to the server. This
element has the following attributes:

Address
The address of the HTTP proxy server. The server address must
either be in the form of a domain name (a series of words
separated by dots, rather like a website address, for example
server.company.com) or an IP address (four numbers separated by
dots, for example, 192.168.122.1).

PortNumber
The port number to connect to on the proxy server.

Username
The username to use to connect to the proxy server. This attribute
is optional.
Child Element
Description

Password
The password to use to connect to the proxy server. This attribute
is optional.
Note
If you want to change the web proxy, you must specify your
preferred alternative before logging in to the API using Login or
LoginGUI.
<PASSWORD>
Changes the login password. This element has the following required
attributes:

Old
The old password.

New
The new password.
Note
If your attempt to change the password fails (for example because
you did not specify the correct old password), then you will not be
able to log in to the API again until you have either called
SetAPIOptions again with an empty <CONNECTIONOPTIONS/>
string, or used SetAPIOptions to successfully change the password.
If you are logged in to the API when you initiate the failed call to
SetAPIOptions, then you can continue to use the API until you log
out. However, once you have logged out, any subsequent attempts
to log in will fail with error 203 (the password could not be
changed), and you will have to either call SetAPIOptions either
with an empty <CONNECTIONOPTIONS/> string, or use it to
successfully change the password before you can log in again.
<CALCULATED_PRICES>
Specifies whether the API should return calculated orders. This
element has the following attributes:

Enabled
Set this attribute to "true" to configure the API to return calculated
orders, or "false" to configure the API not to return calculated
orders. This attribute is required.

MaximumDepth
The maximum number of iterations to use to generate calculated
orders. By default, this value is set to 10.
Notes

If you want to retrieve calculated orders using the API, you must
ensure that you have already logged in to the API using Login
or LoginGUI before calling this function to enable calculated
orders or configure the maximum depth.

The ability to retrieve calculated orders through the API is
subject to additional licensing. You will not be able to retrieve
details of calculated orders unless your server is appropriately
licensed.
19
Example: Setting the API Options
The following example XML string configures the API to:

withhold the API user's orders on disconnection

use a 60 second (60000 ms) timeout

connect using the specified HTTP proxy server, with the specified username and password.
<CONNECTIONOPTIONS>
<DISCONNECT_ACTION>Withhold</DISCONNECT_ACTION>
<KEEPALIVETIMEOUT_MS>60000</KEEPALIVETIMEOUT_MS>
<WEB_PROXY Address="proxyserver.company.com"
PortNumber="80"
Username="charlottestant"
Password="g0ld3nb0wl"/>
</CONNECTIONOPTIONS>
20
Chapter 4: _IGlobalVision8APIEvents
Interface
This Chapter provides detailed reference information about the event handlers that can be raised by the API.
An event is raised when something happens (for example, an event is raised whenever a connection or
disconnection to the API takes place).
COM Object
Gvapi.GlobalVision8API
Interface
IGlobalVision8APIEvents
Class ID
CE92C3B9-9A93-40E1-85AB-6A49170AEF7F
4.1 OnServerConnect
The OnServerConnect event is raised when the API successfully connects to the server (both at login, and
during a reconnection).
Synopsis
OnServerConnect()
Note
If your application is listening for real-time information by handling the OnNewData event, and there is a loss
of connection to the server, any transactions that take place during the disconnection will be missed. When
the OnServerConnect event is raised, your application should query for any transactions that missed
during the period of disconnection.
4.2 OnServerDisconnect
The OnServerDisconnect event is raised every time the API disconnects from the server (either because the
API received a call to Logout or because the API lost the connection to the server).
Synopsis
OnServerDisconnect()
4.3 OnNewData
The OnNewData event is raised when an action relating to the data on the server occurs.
Synopsis
OnNewData(string strData)
Outputs
21
Returns
Description
string
An XML record notification indicating that some event has occurred to the data on the
server. The format of this data is described in XML Record Format.
Note
In order to receive notifications about any given type of event (for example events relating to users, orders,
or deals), you must have subscribed to receive those notifications using Subscribe.
22
Appendix A: XML Query Format
This section describes the XML query format used by the API. You will need to construct XML strings in this
format in order to provide input to the functions QueryXMLRecordSet, and Subscribe.
A.1 Introducing the Query Format
XML queries passed to the API consist of one or more of the elements described in this section, enclosed in
<CRITERIA> ... </CRITERIA> tags.
For example, the following string could be passed as input to QueryXMLRecordSet (to retrieve all order and
trade details), or it could be passed as input to Subscribe (to subscribe to notifications about all order and
trade details).
<CRITERIA>
<ORDERS/>
<TRADES/>
</CRITERIA>
A.1.1 Constructing More Complex Filters
In the previous example, the <ORDERS> and <TRADES> elements were included with no options, so the API
returns all the corresponding records. It is also possible to restrict the data returned for any given element by
specifying various options that filter the results.
For example, the following is a slightly more complex query string. Instead of simply returning all the order and
trade details, this example uses the options of those elements to restrict the data returned so that it only
includes:

orders that are firm and on the bid side, and;

trades executed on the 25th August 2014, where the initiator is the currently logged in user.
<CRITERIA>
<ORDERS>
<SIDE>Bid</SIDE>
<STATUS>Firm</STATUS>
</ORDERS>
<TRADES>
<INITTRADER>My</INITTRADER>
<TRADEDATE From="2014-08-25T00:00:00" Until="2014-08-25T23:59:59"/>
</TRADES>
</CRITERIA>
As shown in this example, some of the elements that you can use in a query have multiple optional child
elements. If you include more than one child element in a single query, the options specified for each child
element are combined in the filter to form a logical AND. Only records satisfying each child element are
returned by the API.
For example, in the above example only orders that are firm and on the bid side are returned. The query would
not return other types of order from the bid side, or firm orders from the ask side.
A.1.2 The All Option
Many of the elements accept the option All. This instructs the API not to filter on that element, and to
therefore return all matching results for that element (subject to any other filters set for the same element). As
23
an alternative to explicitly specifying the option All, you can also achieve the same result by leaving the
element empty. The API considers each of the following XML strings to be the same:

<COMPANIES>All</COMPANIES>

<COMPANIES></COMPANIES>

<COMPANIES/>
Note
Where an element has more than one child element, setting the All option on one of those elements will
not actually return all the matching results if you also filter on one of the other child elements.
For example, as described in Users, the <USERS> element has two child elements (<USER> and
<COMPANY>). If you use both child elements in a single query, then only records satisfying the combined
options specified by both child elements are returned. For example, if your query requests all users but also
specifies a company ID, the API will only return all the users from the specified company, rather than
returning all the defined users.
If you want to return all the currently defined users from all companies, you must either omit the
<COMPANY> child element altogether, or specifically request results from all companies (by using
<COMPANY/> or <COMPANY>All</COMPANY>).
A.2 Companies
The <COMPANIES> element returns details about companies defined on the server.
Note
You can use this element both to query for information about the defined companies, and to subscribe to
updates to the company records.
The COMPANIES Element Options
Element
Option
Returns
<COMPANIES>
My
The currently logged in user's company.
All
All companies currently defined on the server.
A Company ID
The company with the specified ID.
Tip
For full details of the format of the information returned in a company record, see Company Records.
Example: The COMPANIES Element
The following XML string retrieves the company of the user who is currently logged in.
<CRITERIA>
<COMPANIES>My</COMPANIES>
<EXECUTIONVENUEID>ABC</EXECUTIONVENUEID>
</CRITERIA>
24
A.3 Users
The <USERS> element returns details about users defined on the server.
Note
You can use this element both to query for information about the defined users, and to subscribe to updates
to the user records.
The USERS Element Options
Child Element
Option
Returns
<USER>
My
The currently logged in user.
All
All users currently defined on the server (or all users from the specified
company or companies, if the <COMPANY> element is also specified in the
query).
A User ID
The user with the specified ID.
My
Users from the currently logged in user's company.
All
Users from all companies currently defined on the server.
A Company ID
Users from the company with the specified ID.
<COMPANY>
Tip
For full details of the format of the information returned in a user record, see User Records.
Example: The USERS Element
The following XML string retrieves:

all users from the company with ID 27, and

all users from the logged in user's company.
<CRITERIA>
<USERS>
<USER>All</USER>
<COMPANY>27</COMPANY>
</USERS>
<USERS>
<USER/>
<COMPANY>My</COMPANY>
</USERS>
</CRITERIA>
25
A.4 Instrument Properties
The <INSTPROPERTIES> element returns details of the defined instrument properties.
Note
It is not possible to subscribe to instrument property updates. You can only use this element to query for the
instrument properties.
Child Element
<INSTSPECIFIER>
Options
Returns
Instrument properties for the instrument matching the specified
instrument filter. For full details of the format of this element, see
Instrument Specifier.
The information you need to specify to retrieve the properties will
depend on the type of instrument.

Live Atomics and Combinations
Specify the instrument's ID (InstID) and a SeqSpan of either All
or N/A.

Sequentials
Specify the instrument's ID (InstID), a SeqSpan of either
Single, Spread, or Range (depending on the type of
instrument), the ID of the appropriate sequence on the
instrument (FirstSequenceID), and the ID of a sequence item
on that sequence (FirstSequenceItemID). If you are querying
for the properties of a spread or range instrument, then you must
also specify the ID of the second sequence item
(SecondSequenceItemID).
Note
You can only specify one instrument in a given <INSTPROPERTIES> element. To retrieve the properties of
multiple instruments, you must use multiple <INSTPROPERTIES> elements, as shown in the example query
below.
Tip
For full details of the format of the information returned in an instrument properties record, see Instrument
Properties Records.
Example: The INSTPROPERTIES Element
The following XML Query retrieves the properties for:

the live atomic instrument with ID 232

the single period sequential instrument with ID 233

the spread on a different sequential instrument (an instrument with ID 234).
<CRITERIA>
<INSTPROPERTIES>
<INSTSPECIFIER InstID="232" SeqSpan="N/A"/>
</INSTPROPERTIES>
<INSTPROPERTIES>
<INSTSPECIFIER InstID="233" SeqSpan="Single" FirstSequenceID="1"
FirstSequenceItemID="84"/>
26
</INSTPROPERTIES>
<INSTPROPERTIES>
<INSTSPECIFIER InstID="234" SeqSpan="Spread" FirstSequenceID="1"
FirstSequenceItemID="84" SecondSequenceItemID="85"/>
</INSTPROPERTIES>
</CRITERIA>
A.5 Instrument Definitions
The <INSTDEFINITIONS> element returns details about instruments defined on the server.
Note
It is not possible to subscribe to instrument definition updates. You can only use this element to query for
the instrument definitions.
The INSTDEFINITIONS Element Options
Option
Returns
All
All instrument definitions.
An Instrument ID
Instruments with the specified ID.
Tip
For full details of the format of the information returned in an instrument definition record, see Instrument
Definition Records.
Example: The INSTDEFINITIONS Element
The following XML Query retrieves the definitions for the instruments with IDs 35, 48, 61, 62, and 63.
<CRITERIA>
<INSTDEFINITIONS>35</INSTDEFINITIONS>
<INSTDEFINITIONS>48</INSTDEFINITIONS>
<INSTDEFINITIONS>61</INSTDEFINITIONS>
<INSTDEFINITIONS>62</INSTDEFINITIONS>
<INSTDEFINITIONS>63</INSTDEFINITIONS>
</CRITERIA>
A.6 Instrument Attributes
The <INSTATTRIBUTES> element returns details of the defined Instrument Attributes.
Note
You can use this element both to query for information about the instruments attributes, and to subscribe
to updates to the instruments you are interested in.
Example: Querying Instrument Attribute Data on a Single Instrument
The following XML returns the instrument attributes for a single instrument:
<?xml version="1.0" standalone='yes'?>
27
<CRITERIA>
<INSTATTRIBUTESDATA>
<INSTSPECIFIER InstID="29" SeqSpan="N/A" />
</INSTATTRIBUTESDATA>
</CRITERIA>
Example: Querying All Instrument Attribute Data
The following XML queries all instrument data:
<?xml version="1.0" standalone='yes'?>
<CRITERIA>
<INSTATTRIBUTESDATA/>
</CRITERIA>
Example: Querying Default Instrument Attribute Data
If the Instrument Attributes Data has not been explicitly set using the API, then the Front‐End displays the price
format defaults configured by Instrument Creation or overridden in the Instrument Administration Tool. These
defaults can be retrieved using the API by querying for <INSTPROPERTIES>.
<?xml version="1.0" standalone='yes'?>
<CRITERIA>
<INSTPROPERTIES>
<INSTSPECIFIER InstID="29" SeqSpan="N/A"/>
</INSTPROPERTIES>
</CRITERIA>
Warning
Once Instrument Attributes for an instrument have been set using the API, any changes to instrument
defaults in Instrument Creation or the Instrument Administration Tool will be ignored. However, Instrument
Attributes can be removed, which restores the instrument defaults.
Example: Subscribing to Instrument Attribute Data Updates
An API user can subscribe to updates to Instrument Attributes Data.
<?xml version="1.0" standalone='yes'?>
<CRITERIA>
<INSTATTRIBUTESDATA>
<INSTSPECIFIER InstID="29" SeqSpan="N/A" />
</INSTATTRIBUTESDATA>
28
</CRITERIA>
Example: Receiving Updates
When the Instrument Attributes data is updated, the API receives XML similar to the example for Open Interest
shown below.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<INSTATTRIBUTES>
<INSTSPECIFIER InstID="29" SeqSpan="N/A"
FirstSequenceID="0"
FirstSequenceItemID="0"
SecondSequenceItemID="0"
TermFormatID="12"
InstName="TEST_INSTRUMENT"
FirstSequenceItemName=""
SecondSequenceItemName=""/>
<TERM Label="Open Interest" Desc="Open Interest" Default="0"
Type="integer">100</TERM>
<TERM Label="Open Interest Trade Delta" Desc="Open Interest Trade Delta"
Default="0" Type="integer">2</TERM>
<TERM Label="Open Interest Day Delta" Desc="Open Interest Day Delta"
Default="0" Type="integer">10</TERM>
</INSTATTRIBUTES>
</GV8APIDATA>
A.7 Orders
The <ORDERS> element returns details about orders in the market.
Note
You can use this element both to query for information about the orders in the market, and to subscribe to
order updates.
The ORDERS Element Options
Child Element
<ORDERIDENTIFIER>
Option
Returns
Orders matching the specified order ID and engine ID. This
element has the following attributes:

EngineID
29
Child Element
Option
Returns
The EngineID of the order.

OrderID
The OrderID of the order.
Note
You can include multiple <ORDERIDENTIFIER> elements in
your query, in which case the API will return all the matching
orders. Please note that the returned information will not
necessarily be in the same order as the
<ORDERIDENTIFIER> elements in your query.
<TRADER>
<TRADERCOMPANY>
<BROKERCOMPANY>
<LASTMODIFIERUSER>
<SIDE>
<STATUS>
<CREDITOK>
30
My
Orders belonging to the currently logged in user.
All
Orders belonging to any user.
A Trader ID
Orders belonging to the trader with the specified ID.
My
Orders belonging to the currently logged in user's company (if
the user is a trader).
All
Orders belonging to any trader company.
A Company ID
Orders belonging to the trader company with the specified ID.
My
Orders belonging to the currently logged in user's company (if
the user is a broker).
All
Orders belonging to any broker company.
A Company ID
Orders belonging to the broker company with the specified ID.
My
Orders last modified by the currently logged in user.
All
Orders last modified by any user.
A Trader ID
Orders last modified by the trader with the specified ID.
Bid
Orders from the bid side of the market.
Ask
Orders from the ask side of the market.
Both
Orders from either side of the market.
Firm
Orders with a status of "Firm".
Withheld
Orders with a status of "Withheld".
Reference
Orders with a status of Reference.
Indicative
Orders with a status of Indicative.
All
Orders with any status.
true or 1
Orders that the currently logged in user can trade (because
there is a trading agreement in place with the other party). The
Child Element
Option
Returns
user will only actually be able to trade the order if the order's
status is set to firm.
false or 0
Orders that the currently logged in user does not have an
agreement to trade.
<INSTSPECIFIER>
Orders matching the specified instrument filters. See
Instrument Specifier for more details about the format of this
element.
<LASTUPDATE>
Orders last updated between the specified dates and times (in
UTC time, written in ISO 8601 format). This element has the
following attributes:

From
The start date and time for the range.

Until
The end date and time for the range.
If necessary, you can omit one of the attributes. If you specify
only a From time, the element returns everything from after
that time. If you specify only a To time, the element returns
everything that took place up to that time.
For example, the following returns all orders updated between
07:00:09 on the 25th August 2014 and 17:01:05 on the 1st
September 2014:
<LASTUPDATE From="2014-08-25T07:00:09"
Until="2014-09-01T17:01:05"/>
<IMPLIEDTYPE>
Native
Orders that have been automatically generated by
GlobalVision.
External
Orders that have been automatically generated externally and
submitted to GlobalVision as calculated orders.
None
Orders that are not automatically generated.
All
Orders that have been automatically generated and orders that
have not been automatically generated.
Venue
Orders that are generated by the venue. You must be
configured to receive this type of implied price.
Tip
For full details of the format of the information returned in an order record, see Order Records.
Example: The ORDERS Element
The following XML string retrieves all firm orders that have been updated on the 25th November 2015, and
that belong to the currently logged in trader's company.
31
<CRITERIA>
<ORDERS>
<TRADERCOMPANY>My</TRADERCOMPANY>
<SIDE>Both</SIDE>
<STATUS>Firm</STATUS>
<LASTUPDATE From="2015-11-25T00:00:00" Until="2015-11-25T23:59:59"/>
</ORDERS>
</CRITERIA>
A.8 Instrument Specifier
The <INSTSPECIFIER> element specifies how to filter data in terms of instruments. You can use the
instrument specifier when querying for both orders and trades. If necessary, you can combine multiple
instrument specifiers within a single query (in which case records matching any of the instrument specifiers will
be returned).
The INSTSPECIFIER Element Attributes
Attribute
Returns
InstID
Records for the instrument with the specified ID.
FirstSequenceID
Records for the sequence with the specified ID.
SeqSpan
Records for the specified type of instrument (one of Single, Spread, Range,
N/A, and All).
FirstSequenceItemID
Records for the sequence item with the specified ID (or records for the range or
spread defined by the specified ID and the ID specified as the
SecondSequenceItemID, if this is a range or a spread instrument).
SecondSequenceItemID
Records for the sequence item with the range or spread defined by the
specified ID, and the ID specified as the FirstSequenceItemID. This
attribute is only applicable to range or spread instruments.
FirstSequenceItemName
The full name associated with the FirstSequenceItemID.
SecondSequenceItemName
The full name associated with the SecondSequenceItemID.
TermFormatID
The Price Format associated with the instrument as specified by the broker.
Tip
For full details of the format of the information returned on an instrument specifier, see Instrument
Specifier.
Example: The INSTSPECIFIER Element
The following XML string shows how you might use the <INSTSPECIFIER> element when querying for orders.
This example returns all firm orders belonging to the currently logged in trader's company that have been
updated on the 25th November 2015, and that match either of the instrument specifier filters:

orders that belong to the spread instrument with ID 121, the sequence with ID 1, and the spread defined
by IDs 31 and 32

orders that belong to the single period instrument with ID 126, and the sequence with ID 1.
32
<CRITERIA>
<ORDERS>
<TRADERCOMPANY>My</TRADERCOMPANY>
<SIDE>Both</SIDE>
<STATUS>Firm</STATUS>
<LASTUPDATE From="2015-11-25T00:00:00" Until="2015-11-25T23:59:59"/>
<INSTSPECIFIER InstID="121" SeqSpan="Spread" FirstSequenceID="1"
FirstSequenceItemID="31" SecondSequenceItemID="32"/>
FirstSequenceName="Euro – Euro Months"
SecondSequenceName="Jan-14" TermFormatID="32" TGTermFormatID="3"/>
</ORDERS>
</CRITERIA>
A.9 Order Summary Information
The <INSTORDERSUMMARIES> element returns a summary of the current orders in the market for the specified
instrument. The summary contains information such as the current best orders in the market, and the total
available quantity.
Note
You can use this element both to query for order summary information, and to subscribe to order summary
updates.
The INSTORDERSUMMARIES Element Options
Option
Returns
<INSTSPECIFIER>
Orders matching the specified instrument filter. See Instrument Specifier for more
details about the format of this element.
Tip
For full details of the format of the information returned in an order summary record, see Order Summary
Records.
Example: The INSTORDERSUMMARIES Element
The following XML Query retrieves summary information about the orders that belong to the spread
instrument with ID 121, the sequence with ID 1, and the spread defined by IDs 31 and 32.
<CRITERIA>
<INSTORDERSUMMARIES>
<INSTSPECIFIER InstID="121" SeqSpan="Spread" FirstSequenceID="1"
FirstSequenceItemID="31" SecondSequenceItemID="32"/>
</INSTORDERSUMMARIES>
</CRITERIA>
A.10 Trades and Historical Trades
The <TRADES> element returns details about trades that have taken place.
33
Note
You can use this element both to query for information about trades that have taken place, and to subscribe
to trade updates.
The <HISTORICALTRADES> element queries the database and returns details about trades that have taken
place.
The TRADES and HISTORICAL TRADES Element Options
Child Element
Option
Returns
<TRADEID>
All
Trades with any ID.
A Trade ID
Trades with an ID equal to or greater than the specified
ID.
My
Trades where the initiator trader is the currently logged in
user. If the currently logged in user is not a trader,
selecting this option returns no results.
All
Trades where the initiator trader is any user.
A Trader ID
Trades where the initiator trader is the trader with the
specified ID.
My
Trades where the initiator trader is from the currently
logged in user's company. If the currently logged in user is
not a trader, selecting this option returns no results.
All
Trades where the initiator trader is from any trader
company.
A Company ID
Trades where the initiator trader is from the company
with the specified ID.
My
Trades where the initiator broker company is the
currently logged in user's company. If the currently logged
in user is not a broker, selecting this option returns no
results.
All
Trades with any initiator broker company.
A Company ID
Trades where the initiator broker company is the
company with the specified ID.
My
Trades on orders that were last modified by the currently
logged in user.
All
Trades on orders last modified by any user.
A Trader ID
Trades on orders last modified by the trader with the
specified ID.
My
Trades where the aggressor trader is the currently logged
in user. If the currently logged in user is not a trader,
<INITTRADER>
<INITTRADERCOMPANY>
<INITBROKERCOMPANY>
<INITLASTMODIFIERUSER>
<AGGTRADER>
34
Child Element
Option
Returns
selecting this option returns no results.
<AGGTRADERCOMPANY>
<AGGBROKERCOMPANY>
<AGGLASTMODIFIERUSER>
<INITACTION>
All
Trades where the aggressor trader is any user.
A Trader ID
Trades where the aggressor trader is the trader with the
specified ID.
My
Trades where the aggressor trader is from the currently
logged in user's company. If the currently logged in user is
not a trader, selecting this option returns no results.
All
Trades where the aggressor trader is from any trader
company.
A Company ID
Trades where the aggressor trader is from the company
with the specified ID.
My
Trades where the aggressor broker company is the
currently logged in user's company. If the currently logged
in user is not a broker, selecting this option returns no
results.
All
Trades with any aggressor broker company.
A Company ID
Trades where the aggressor broker company is the
company with the specified ID.
My
Trades executed by the currently logged in user.
All
Trades executed by any user.
A Trader ID
Trades executed by the trader with the specified ID.
Buy
Trades where the initiator action was buying.
Sell
Trades where the initiator action was selling
Both
Trades with either initiator action.
<INSTSPECIFIER>
Trades matching the specified instrument filters. See
Instrument Specifier for more details about the format of
this element.
<TRADEDATE>
Trades that took place between the specified dates and
times (in UTC time, written in ISO 8601 format). This
element has the following attributes:

From
The start date and time for the range.

Until
The end date and time for the range.
If necessary, you can omit one of the attributes. If you
specify only a From time, the element returns everything
from after that time. If you specify only a To time, the
element returns everything that took place up to that
35
Child Element
Option
Returns
time.
<LASTUPDATE>
Trades that were last updated between the specified
dates and times (in UTC time, written in ISO 8601 format).
This element has the following attributes:

From
The start date and time for the range.

Until
The end date and time for the range.
If necessary, you can omit one of the attributes. If you
specify only a From time, the element returns everything
from after that time. If you specify only a To time, the
element returns everything that took place up to that
time.
Tip
For full details of the format of the information returned in a trade record, see Trade Records.
Example: The TRADES Element
The following XML string retrieves all trades involving the currently logged in trader's company that took place
on the 25th May 2009 from your local cache.
<CRITERIA>
<TRADES>
<TRADEID>All</TRADEID>
<INITTRADERCOMPANY>My</INITTRADERCOMPANY>
<LASTUPDATE From="2009-05-25T00:00:00"
Until="2009-05-25T23:59:59"/>
</TRADES>
<TRADES>
<TRADEID>All</TRADEID>
<AGGTRADERCOMPANY>My</AGGTRADERCOMPANY>
<LASTUPDATE From="2009-05-25T00:00:00"
Until="2009-05-25T23:59:59"/>
</TRADES>
</CRITERIA>
Example: The HISTORICALTRADES Element
The following XML string retrieves all trades involving the currently logged in trader's company that took place
between the 25th May 2009 and the 30th May 2009 from the database.
<CRITERIA>
<HISTORICALTRADES>
<TRADEID>All</TRADEID>
<INITTRADERCOMPANY>My</INITTRADERCOMPANY>
<LASTUPDATE From="2009-05-25T00:00:00"
Until="2009-05-25T23:59:59"/>
</HISTORICALTRADES>
<HISTORICALTRADES>
<TRADEID>All</TRADEID>
<AGGTRADERCOMPANY>My</AGGTRADERCOMPANY>
<LASTUPDATE From="2009-05-25T00:00:00"
Until="2009-05-25T23:59:59"/>
36
</HISTORICALTRADES>
</CRITERIA>
A.11 Trade Summary Information
The <INSTTRADESUMMARIES> element returns a summary of the trades for the specified instrument. The
summary contains information such as the price value of the last trade, and the quantity of the last trade.
The summary information is taken from the IPTS deal cache. If the last trade for the specified instrument is
outside of the IPTS deal cache, then no value will be returned.
Note
You can use this element both to query for trade summary information, and to subscribe to trade summary
updates.
The INSTTRADESUMMARIES Element Options
Option
Returns
<INSTSPECIFIER>
Trades for the instrument matching the specified instrument filter. See Instrument
Specifier for more details about the format of this element.
Tip
For full details of the format of the information returned in a trade summary record, see Trade Summary
Records.
Example: The INSTTRADESUMMARIES Element
The following XML Query retrieves summary information about the trades for the spread instrument with ID
121, the sequence with ID 1, and the spread defined by IDs 31 and 32.
<CRITERIA>
<INSTTRADESUMMARIES>
<INSTSPECIFIER InstID="121" SeqSpan="Spread" FirstSequenceID="1"
FirstSequenceItemID="31" SecondSequenceItemID="32"/>
</INSTTRADESUMMARIES>
</CRITERIA>
A.12 Sequences
The <SEQUENCES> element returns details about sequences defined on the server.
Note
It is not possible to subscribe to details of updates to sequences. You can only use this element to query for
the sequence details.
37
The SEQUENCES Element Options
Option
Returns
All
All sequences currently defined on the server.
A Sequence ID
The sequence with the specified ID.
Tip
For full details of the format of the information returned in a sequence record, see Sequence Records.
Example: The SEQUENCES Element
The following XML string retrieves the sequences with IDs 43, 58, 59, and 60.
<CRITERIA>
<SEQUENCES>43</SEQUENCES>
<SEQUENCES>58</SEQUENCES>
<SEQUENCES>59</SEQUENCES>
<SEQUENCES>60</SEQUENCES>
</CRITERIA>
A.13 Sequence Items
The <SEQUENCEITEMS> element returns details about the defined sequence items.
Note
It is not possible to subscribe to details of updates to sequence items. You can only use this element to
query for the sequence item details.
The SEQUENCEITEMS Element Options
Child Element
Option
Returns
<SEQUENCES>
All
All sequence items from all sequences.
A sequence ID
Sequence items defined for the sequence with the specified ID.
<TRADING>
Sequence items where the trading start and end dates are between the
specified dates and times (in UTC time, written in ISO 8601 format). This
element has the following attributes:

From
The start date and time for the range.

Until
The end date and time for the range.
If necessary, you can omit one of the attributes. If you specify only a
From time, the element returns everything from after that time. If you
specify only a To time, the element returns everything that took place up
to that time.
<PERIOD>
38
Sequence items where the period start and end dates are between the
specified dates and times (in UTC time, written in ISO 8601 format). This
Child Element
Option
Returns
element has the following attributes:

From
The start date and time for the range.

Until
The end date and time for the range.
If necessary, you can omit one of the attributes. If you specify only a
From time, the element returns everything from after that time. If you
specify only a To time, the element returns everything that took place up
to that time.
Tip
For full details of the format of the information returned in a sequence item record, see Sequence Item
Records.
Example: The SEQUENCEITEMS Element
The following XML string retrieves all the sequence items defined for the sequence with ID 1000001 for which
the period start and end dates are between the 1st January 2015 and the 31st March 2015.
<CRITERIA>
<SEQUENCEITEMS>
<SEQUENCES>1000001</SEQUENCES>
<PERIOD From="2015-01-01T00:00:00" Until="2015-03-31T23:59:59"/>
</SEQUENCEITEMS>
</CRITERIA>
A.14 Term Formats
The <TERMFORMATS> element returns details about defined price format terms.
Note
It is not possible to subscribe to details of updates to term formats. You can only use this element to query
for the term format details.
The TERMFORMATS Element Options
Option
Returns
All
All term formats currently defined on the server.
An ID
The term format with the specified ID.
Tip
For full details of the format of the information returned in a term format record, see Term Format Records.
39
Example: The TERMFORMATS Element
The following XML string retrieves the term formats with IDs 81, 85, and 89.
<CRITERIA>
<TERMFORMATS>81</TERMFORMATS>
<TERMFORMATS>85</TERMFORMATS>
<TERMFORMATS>89</TERMFORMATS>
</CRITERIA>
A.15 Trading Accounts
The <TRADINGACCOUNTS> element returns details about trading accounts defined on the server.
Note
You can use this element both to query for information about the defined trading accounts, and to subscribe
to updates to the trading account records.
The TRADINGACCOUNTS Element Options
Child Element
Option
Returns
<TRADERCOMPANY>
My
The trading accounts defined for the currently logged in
user's company.
All
All trading accounts currently defined on the server.
A Company ID
The trading accounts defined for the company with the
specified ID.
Tip
For full details of the format of the information returned in a trading accounts record, see Trading Account
Records.
Example: The TRADINGACCOUNTS Element
The following XML string retrieves:

all trading accounts defined for the company with ID 27, and

all trading accounts defined for the logged in user's company.
<CRITERIA>
<TRADINGACCOUNTS>
<TRADERCOMPANY>27</TRADERCOMPANY>
</TRADINGACCOUNTS>
<TRADINGACCOUNTS>
<TRADERCOMPANY>My</TRADERCOMPANY>
</TRADINGACCOUNTS>
</CRITERIA>
40
A.16 Groups
The <GROUPS> element returns details about instrument groups defined on the server.
Note
It is not possible to subscribe to details of updates to instrument groups. You can only use this element to
query for the instrument group details.
The GROUPS Element Options
Child
Element
Attribute
Returns
<GROUP>
IncludeInstruments
If you set the IncludeInstruments attribute on the <GROUPS>
element to false, the returned XML will not include details of
the instruments in the groups. If you set the
IncludeInstruments attribute to true (or omit it), then the
instrument details will be returned.
Name
The group with the specified name.
Tip
For full details of the format of the information returned in a groups record, see Groups.
Example: The GROUPS Element
The following XML string returns details of all groups defined on the server:
<CRITERIA>
<GROUPS/>
</CRITERIA>
The following XML string returns details of all groups defined on the server, but omits the details of the
instruments associated with each group:
<CRITERIA>
<GROUPS IncludeInstruments="false"/>
</CRITERIA>
The following XML string returns details of the instruments associated with the Gas group:
<CRITERIA>
<GROUPS>
<GROUP Name="Gas"/>
</GROUPS>
</CRITERIA>
41
A.17 Market Events
The <MARKETEVENTS> element returns details about Market Events that have been created on the server.
Note
You can use this element both to query for information about the defined Market Events, and to subscribe
to Market Event updates.
The MARKETEVENTS Element Options
Child Element
Option
Returns
<ID>
All
All Market Events currently defined on the server.
A Market Event ID
The Market Event with the specified ID.
Tip
For full details of the format of the information returned in a Market Event record, see Market Event
Records.
Example: The MARKETEVENTS Element
The following XML string retrieves the Market Events with IDs 12 and 13.
<CRITERIA>
<MARKETEVENTS>
<ID>12</ID>
<ID>13</ID>
</MARKETEVENTS>
</CRITERIA>
A.18 Historical Orders
The <HISTORICALORDERS> element returns details about orders placed during a specified period.
The HISTORICALORDERS Element Options
Child Element
Option
Returns
<WITHACTIVITY>
From
The start date of the period for which order information will be
returned.
Until
The end date of the period for which order information will be
returned.
Tip
For details of the format of the information returned in a historical orders record, see Historical Orders
Records.
42
Example: The ORDERS Element
The following XML string retrieves orders placed between 00:00 on 12th October 2012 and 00:00 on 13th
October 2012.
<CRITERIA>
<HISTORICALORDERS>
<WITHACTIVITY From='2012-10-12T00:00:00.000'
Until='2012-10-13T00:00:00.000'/>
</HISTORICALORDERS>
</CRITERIA>
A.19 Order History
The <ORDERHISTORY> element returns information on the history of a specific order.
The ORDERHISTORY Element Options
Child Element
Option
<PERSISTENTORDERID>
Returns
The persistent ID of the order for which you want to return
historical information. This is a unique ID that represents this
order throughout its lifetime in the system. This ID remains the
same throughout the order's lifetime.
Tip
For details of the format of the information returned in an order history record, see Order History Records.
Example: The ORDERHISTORY Element
The following XML string retrieves information for an order with the ID 396894.
<CRITERIA>
<ORDERHISTORY>
<PERSISTENTORDERID>396894</PERSISTENTORDERID>
</ORDERHISTORY>
</CRITERIA>
43
Appendix B: XML Record Format
This section describes the XML record format used by the API.
All XML records returned by the API have the following format:
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
...
</GV8APIDATA>
B.1 Company Records
The following is an example of the XML that might be returned by the API for a company record. The table
below describes the attributes that may appear in a company record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<COMPANY CompanyID="1000000" Action="Query"
CompanyCode="EUPO" CompanyName="Euro Power"
CompanyDetails="The Euro Power Company."
CompanyType="Trader"/>
<UNIQUEIDENTIFIER Authority="Emp. ID" Identifier="123456"/>
</GV8APIDATA>
COMPANY Record Attributes
Attribute
Description
CompanyID
The company's ID.
Action
The action that has caused the record to be returned. This attribute can have the
following values:

Query
The record has been returned as a result of a query.

Insert
A new company has been added to the system.

Update
The details for an existing company have been changed.

Remove
An existing company has been removed from the system.
CompanyCode
The company's code.
CompanyName
The company's name.
CompanyDetails
The company's details, as defined in the User Administration tool.
CompanyType
The company's type. This attribute can have the following values:
44

Broker

Trader
45
UNIQUEIDENTIFIER Record Attributes
Attribute
Description
Authority
The issuing authority.
Identifier
The unique company identifier.
B.2 User Records
The following is an example of the XML that might be returned by the API for a user record. The following table
describes the attributes that may appear in a user record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<USER UserID="6" Action="Query" UserName="Peter Quint"
UserDetails="Contact on 555 2123" CompanyCode="COMA"
CompanyID="100001" Type="Trader"
CreationTime="2012-09-14T10:27:55.083">
<UNIQUEIDENTIFIERS>
<UNIQUEIDENTIFIER Authority="Trayport"
Identifier="TRAYPORT1234"/></UNIQUEIDENTIFIERS>
<ADDITIONALDATA>
<METADATA Name="Desk Location" Value="Trading Desk 5"/>
</ADDITIONALDATA>
</USER>
</GV8APIDATA>
USER Record Attributes
Attribute
Description
UserID
The user's ID.
Action
The action that has caused the record to be returned. This attribute can have the
following values:

Query
The record has been returned as a result of a query.

Insert
A new user has been added to the system.

Update
The details for an existing user have been changed.

Remove
An existing user has been removed from the system.
UserName
The user's username.
UserDetails
The user's details, as defined in the User Administration Tool.
CompanyCode
The code for the user's company.
CompanyID
The ID of the user's company.
46
Attribute
Description
Type
The user's type. This attribute can have the following values:
CreationTime

Broker

Trader

Trader Read Only

SysAdmin
The datetime stamp of when the user was created in the system.
UNIQUEIDENTIFIER and ADDITIONALDATA Record Attributes
Attribute
Description
Authority
The issuing authority.
Identifier
The unique user identifier.
Name
The name of the additional metadata associated with the user.
Value
The value of the additional metadata associated with the user.
B.3 Instrument Properties Records
The following is an example of the XML that might be returned by the API within an instrument properties
record.
The <INSTSPECIFIER> element identifies the instrument that the properties relate to, while the
<PROPERTIES> element describes the properties themselves. Instrument Properties records may also contain
a <TERMFORMAT> element indicating the price formats associated with this instrument (any <TERMFORMAT>
details that are returned during an instrument properties query will show any price format overrides that have
been configured in the Instrument Administration tool).
The following table describes the attributes that may appear in a <PROPERTIES> element. For more
information about the attributes associated with the <INSTSPECIFIER> and <TERMFORMAT> elements, see
Term Format Records and Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<INSTPROPERTIES>
<INSTSPECIFIER InstID="233" SeqSpan="Single" FirstSequenceID="1"
FirstSequenceItemID="83" SecondSequenceItemID="0"
TermFormatID="1" InstName="Apples"
FirstSequenceItemName="Dec-06"
SecondSequenceItemName=""/>
<PROPERTIES Tradable="true" AllowVolumeDealing="true"
AlwaysAllOrNone="false" AllowSingleDealing="true"
ShowCounterPartyName="true" NeverBidHigherThanAsk="true"
EnableHiddenQuantity="true" EnableAllOrNone="true"
FindBestSingleDeal="true" AllowChoiceMarket="true"
DenyWorsePricesDespiteQuantity="false"
AllowGoodForDay="true"
AllowGoodTillDate="true" DefaultToAllOrNone="false"
PriceRangeMin="-1000000000" PriceRangeMax="1000000000"
SanePriceRangeMin="-1000000000"
47
SanePriceRangeMax="1000000000"
QuantityRangeMin="1" QuantityRangeMax="32000"
QuantityDecimalsMin="0" QuantityDecimalsMax="0"
QuantityStepping="1" DefaultQuantity="1"
PriceDecimalsMin="2" PriceDecimalsMax="2"
PriceStates="Withheld Firm" TradeImpliedPrices="true"
AllowMarketOrder="false" AllowTakeOverMarket="false"
NoVolumeWorkupForHiddenQuantities="false"
ConfirmVoiceDeals="false"
AllowBasketDealing="true" ShowDealConfirmPaidGiven="true"
DisableManualDeal="false"
UseSimpleDealVolumeAlgorithm="true"
AllowClientDealVolume="false"
UseHiddenQuantityVolumeDealing="true"
PriceWarningThreshold="0.05"
InstrumentDefinition="" ReasonabilityDelta="0"
RoFRTimeout="0" NegotiationRounds="None">
<ORDERPRICESTEPPING Max="0.01"/>
<MANUALDEALPRICESTEPPING Max="0.01"/>
</PROPERTIES
</INSTPROPERTIES>
</GV8APIDATA>
PROPERTIES Attributes
Attribute
Description
PriceWarningThreshold
The price warning threshold. GlobalVision will generate a warning
message if a trader using the GlobalVision Front-End attempts to submit
an order that is more than the specified percentage off the current market
best price. For example, if the price warning threshold is 5, traders see a
warning message if they try to submit an order that is off the market by
5%. The trader will still be able to submit the price, if he or she still wants
to, after seeing the warning message.
Tradable
Indicates whether or not the instrument is tradable. When this property is
set to false, no users are able to trade the instrument, regardless of any
other permission settings.
InstStatus
The instrument's status (the actions permitted for this instrument, as
defined by either the currently applicable session, or a Market Event).
If a Market Event has been run to override the default settings for the
current trading session, then this field will show the Market Event's status
string.
AllowVolumeDealing
Indicates whether or not orders on this instrument can be dealt using
volume dealing.
AlwaysAllOrNone
Specifies that all orders on this instrument trade on an all or none basis.
AllowSingleDealing
Indicates whether or not orders for this instrument can be dealt using
single dealing (the dealing of specific individual orders).
ShowCounterPartyName
Specifies that the names of the counter parties involved in any deals on
this instrument should always be shown in the deal confirmation message.
If this property is set to false, users may still be able to see the name of
the other party involved in a deal if they have the appropriate permissions
48
Attribute
Description
over that user (as defined in the User Administration Tool).
NeverBidHigherThanAsk
Indicates whether or not this instrument accepts orders with:

a bid price that is greater than or equal to the current best ask price

an ask price that is less than the current best bid price.
This instrument property is not considered for calculated orders. If the
best order on one side of the market is a calculated order, the instrument
will still accept orders that break these rules even if this property is set to
true.
TradeImpliedPrices
Indicates whether or not this instrument allows trading of orders that have
been automatically calculated based on other orders in the market
(subject to trading agreements and permissions on the underlying orders).
EnableAllOrNone
Specifies that orders for this instrument can be submitted on an all or
none basis.
FindBestSingleDeal
Specifies that if a single deal is submitted for this instrument, the deal will
actually take place using the best tradable order with the same quantity as
the one specified in the single deal command.
EnableHiddenQuantity
Indicates whether or not orders for this instrument can be submitted with
a hidden quantity (an order with a hidden quantity is sometimes referred
to as an iceberg order).
AllowChoiceMarket
Indicates whether an order for this instrument on one side of the market
can have a price value equal to the current best order on the other side of
the market. This property is only used in conjunction with
NeverBidHigherThanAsk, which would otherwise cause the server to
reject an order with a price value equal to the price value of the current
best order on the other side of the market.
DenyWorsePricesDespite
Quantity
Allows only the best order to be dealt during a single deal, by preventing
worse orders from being considered even if the quantity of the best order
is smaller than the quantity requested in the single deal command.
ShowDealVolumesTrade
SelectedVolumes
If this is set to true, users can select an option in the Deal Quantity dialog
box that indicates that they will only trade the volume displayed in the
Deal Quantity dialog box. This property is equivalent to the Show Deal
Volume's Trade Selected Volumes setting in the Instrument Administration
tool.
AllowGoodForDay
Indicates whether this instrument allows orders that expire at the end of
the current trading day.
AllowGoodTillDate
Indicates whether this instrument accepts orders that expire at a specified
date and time.
DefaultToAllOrNone
Specifies that the default setting for orders for this instrument is to deal
on an all or none basis.
FillOrKill
Indicates whether orders for this instrument can be submitted on a fill or
kill basis.
49
Attribute
Description
FillAndKill
Indicates whether orders for this instrument can be submitted on a fill and
kill basis.
PriceRangeMin
The minimum valid price value for this instrument. It will not be possible
to submit an order for this instrument with a price value that is less than
this setting.
PriceRangeMax
The maximum valid price value for this instrument. It will not be possible
to submit an order for this instrument with a price value that is greater
than this setting.
SanePriceRangeMin
The lowest realistic price value for this instrument. If a trader using the
GlobalVision Front-End attempts to submit an order with a price value
below this setting, but above the minimum valid price value, then the
trader will see a warning message. The trader will still be able to submit
the order, if he or she still wants to, after seeing the warning message.
SanePriceRangeMax
The highest realistic price value for this instrument. If a trader using the
GlobalVision Front-End attempts to submit an order with a price value
above this setting, but below the maximum valid price value, then the
trader will see a warning message. The trader will still be able to submit
the order, if he or she still wants to, after seeing the warning message.
QuantityRangeMin
The smallest quantity permitted for this instrument.
QuantityRangeMax
The largest quantity permitted for this instrument.
Note
For instruments on the Price Priority First In First Out transaction
engine, the maximum quantity setting applies to the visible quantity
plus any hidden quantity, and users cannot submit orders where the
total quantity exceeds the maximum quantity setting.
For instruments on other transaction engines, the maximum quantity
setting applies only to the visible quantity.
QuantityDecimalsMin
The minimum number of decimal places permitted for a valid quantity for
this instrument.
QuantityDecimalsMax
The maximum number of decimal places permitted for a valid quantity for
this instrument. The maximum number of decimal places permitted by the
API schema is 6.
QuantityStepping
The quantity stepping. For a quantity to be valid, it must be a multiple of
this value. For example, if the quantity stepping is 5, then only quantities
that are a multiple of 5 will be accepted.
DefaultQuantity
The default quantity for this instrument. This value is displayed by default
when a user opens the Order Entry dialog on the GlobalVision Front-End.
PriceDecimalsMin
The minimum number of decimal places permitted for a valid price for this
instrument.
PriceDecimalsMax
The maximum number of decimal places permitted for a valid price for this
instrument. The maximum number of decimal places permitted by the API
50
Attribute
Description
schema is 6.
PriceStates
A list of order types applicable to this instrument, separated by spaces.
The order types can include the following values:

Indicative

Withheld

Reference

Firm

Stop Order
SettlementPriceDecimals
Min
The minimum number of decimal places permitted for a valid Settlement
Price on this instrument.
SettlementPriceDecimals
Max
The maximum number of decimal places permitted for a valid Settlement
Price on this instrument.
AllowMarketOrder
If this is set to true, GlobalVision supports Market Orders for this
instrument. GlobalVision only supports market orders for instruments that
use the Price Priority FIFO Transaction Engine.
AllowTakeOverMarket
If this is set to true, users can right-click on an order and select the Take
Over Market option. For more information about this feature, please see
the Trader User Guide.
CashLimitInstrument
Configures this instrument to use the Risk API to check position limits on
an External Position System (EPS). IPTS will check with the EPS before
allowing any orders or deals to be submitted on this instrument. For more
information about using the Risk API, see the Risk API Guide.
VoiceDealsAreNotPNC
Specifies whether or not voice deals are considered Private and
Confidential. Deal confirmation messages on PNC deals are only sent to
the counter parties involved.
HasSettlementPrice
Configures GlobalVision to automatically calculate the Settlement Price for
orders on this instrument.
This is only relevant if GlobalVision has been specifically configured to
perform settlement price calculations. Please contact Trayport Support on
+44 (0) 20 7960 5555 or [email protected] for more information
about this feature.
NoVolumeWorkupForHidden
Quantities
If this is set to true, GlobalVision does not initiate volume workup on
orders with an associated hidden quantity. If this option is selected, and
an order with a hidden quantity is traded, the hidden quantity is
automatically added to the market as normal. Volume workup does not
take place, regardless of the volume workup settings specified for the
instrument.
ConfirmVoiceDeals
If this is set to true, GlobalVision requires the counter parties to confirm
voice deals. If this option is selected, and a deal is added to the system as
a voice deal (either through the GlobalVision Front-End, or using the Deal
Editor), the counter parties involved will be prompted to confirm or reject
the deal. The deal remains in a pending state until the counter parties
have confirmed it.
51
Attribute
Description
AllowBasketDealing
If this is set to true, GlobalVision allows users to add orders for this
instrument to the Deal Basket.
ShowDealConfirmPaidGiven
If this is set to true, GlobalVision adds either PAID or GIVEN to each
message in the Deal Confirmation Window to indicate whether the deal is
on the bid or the ask side. This setting only applies to deal confirmation
messages displayed as plain text using the Deals as Text option. When
confirmation messages are displayed in list form, using the Deals as List
option, you can configure the displayed columns using the options in the
GlobalVision Front-End.
DisableManualDeal
If this is set to true, GlobalVision prevents users from adding manual
deals for this instrument.
UseHiddenQuantityVolume
Dealing
If this is set to true, GlobalVision uses the hidden quantity volume dealing
algorithm, which allows users to deal into hidden quantity when using the
Deal Quantity option.
With this algorithm enabled, GlobalVision uses the following rules to
process automatically matching orders and fulfil volume deal requests:

In order to fill a requested quantity, the system first considers both
the visible and hidden quantity of any order with the best price value
that the aggressor has the right of first refusal over.

If there is no such order, or if that order does not have enough
quantity to fill the request, the system considers the visible quantity
for all the orders with the best price value (proceeding through the
orders according to their rank in the market).

If the visible quantity is not enough to satisfy the requested quantity,
then GlobalVision uses any hidden quantity associated with those
orders (proceeding through the orders according to their rank in the
market).

GlobalVision will only ever consider orders with the best price value in
the market, even if this means that there is not enough available
quantity to completely fulfil the volume deal request. In this case, the
deals will go through with whatever quantity (visible and hidden) is
available at the best price value.
UseSimpleDealVolume
Algorithm
If this is set to true, GlobalVision uses the simple volume dealing
algorithm for volume deals on this instrument. Simple volume dealing
calculates the composition of a volume deal using a different set of rules
to the standard volume dealing logic. Simple volume dealing provides fast
calculations, but does not guarantee the best price in certain situations.
AllowClientDealVolume
If this is set to true, users can select an option in the Deal Quantity dialog
box that indicates that they will only trade the volume displayed in the
Deal Quantity dialog. This property is equivalent to the Show Deal
Volume's Trade Selected Volumes setting in the Instrument Administration
tool.
RoFRTimeout
Specifies the time period (in seconds) to provide the right of first refusal
on new orders. For example, a timeout of 5 configures the system to make
new orders available only to the company with right of first refusal for 5
seconds. After the specified time period expires, if the order is still in the
market, it becomes tradable to all users (subject to the defined trading
52
Attribute
Description
agreement).
NegotiationRounds
Indicates how many rounds of volume workup will take place for this
instrument. This setting takes one of the following values:

None
No volume workup.

Single
One optional round of volume workup.

Multiple
Multiple optional rounds of volume workup (volume workup
continues until one of the traders no longer wants to deal additional
volume, or all the additional quantity has been dealt).
TimeoutFirstPhase
Specifies the initial timeout (in seconds) for the Volume Workup dialog
box. If a trader does not submit an additional volume within this period,
GlobalVision automatically terminates the volume workup session.
TimeoutOther
Specifies the timeout (in seconds) for each subsequent round of volume
workup. This setting is only used when multiple rounds of volume workup
are enabled.
ReasonabilityDelta
Specifies a limit that prevents market orders from trading at a price value
that is too far from the current best order. A market order will not trade
with any order that has a price value that is worse than the price value of
the current best order by more than the reasonability delta.
For example, if the reasonability delta is set to 1, and the current best ask
in the market has a price value of 8.50, then a market order to buy the
commodity will only be filled using orders whose price value is between
8.50 and 9.50 (inclusive). If there is not enough quantity available in the
market within that range of price values, the remaining quantity requested
in the market order will be dropped.
DealConfirmationTimeout
Enabled
If this is set to true, then GlobalVision has a timeout period for deal
confirmation requests. Any deals requiring confirmation that have not
been confirmed within the specified timeout will expire.
DealConfirmationTimeout
Minutes
The length of the timeout period for deal confirmation requests (in
minutes).
InstrumentDefinition
Specifies a link to somewhere users can find more information about the
instrument.
The link must be in the form of a URL. Users can access the link by
selecting the Product Description menu option from the right-click menu
in the GlobalVision Front-End. This feature is typically used to provide a
link to more information about the instrument, such as the trading
conditions.
This setting may include some numbers before the URL. These values set
the size and position of the window that opens to display the link. For
more information, see the description of the Instrument Administration
tool's Product Info URL field in the Administration Guide.
53
The following table describes the format of the <ORDERPRICESTEPPING> and <MANUALDEALPRICESTEPPING>
elements, which appear inside the <PROPERTIES> element to indicate the price steppings configured for orders
and manual deals.
Typically, the price stepping is a single value, but it is also possible to configure a set of different steppings that
apply depending on the current price value. If this instrument uses multiple steppings, then the
<ORDERPRICESTEPPING> and <MANUALDEALPRICESTEPPING> elements will contain a <RANGE> element
indicating each range of price values and the stepping that applies when the price value is within that range.
ORDERPRICESTEPPING and MANUALDEALPRICESTEPPING Attribute
Attribute
Description
Max
The price stepping. For a price value to be valid, it must be a multiple of this value. For
example, if the price stepping is 0.01, then only price values that are a multiple of 0.01
will be accepted.
If the <ORDERPRICESTEPPING> or <MANUALDEALPRICESTEPPING> element contains
one or more <RANGE> elements, then the instrument has a different stepping
depending on the current price value, as described in the following table below. When
there is at least one range defined, the Max stepping only applies if the price value is
above the highest threshold specified in a <RANGE> element.
RANGE Attributes
Attribute
Description
Threshold
The upper threshold limit for this stepping range. This stepping will apply if the price
value is between this value and the next lowest defined threshold value. If there is no
lower threshold value, then this stepping will apply for all price values up to this
threshold.
Stepping
The price stepping that applies for this range of price values.
B.4 Instrument Definition Records
The following is an example of the XML that might be returned by the API for an instrument definition record.
The <DERIVEDFROM> element indicates the instrument that this instrument has been derived from. For
example, if the instrument is a sequential instrument derived from an underlying atomic instrument, the
<DERIVEDFROM> element describes the atomic instrument. <INSTDEFINITION> and <DERIVEDFROM> have
the same attributes.
The <SEQUENCE> element identifies the sequences associated with this instrument. For more information
about the attributes associated with the <SEQUENCE> element, see Sequence Records.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<INSTDEFINITION InstID="233" InstType="Sequential Instrument"
InstCode="SEQ-APPLES" InstName="Apples" UnitCode="Lots" Unit="Lots"
Live="true" EngineID="1" TermFormatID="1000002">
<DERIVEDFROM InstID="230" InstType="Atomic Instrument"
InstCode="ATOM-APPLE" InstName="Atomic Apples"
UnitCode="Lots" Unit="Lots"
54
EngineID="1" TermFormatID="1"/>
<SEQUENCE SeqID="1" SeqName="Simple Monthly Sequence"/>
<SEQUENCE SeqID="2" SeqName="Simple Quarterly Sequence"/>
<SEQUENCE SeqID="3" SeqName="Simple Yearly Sequence"/>
</INSTDEFINITION>
</GV8APIDATA>
INSTDEFINITION and DERIVEDFROM Attributes
Attribute
Description
InstID
The instrument's ID.
InstType
The instrument's type. This attribute can have the following values:

Sequential Instrument

Combination Instrument

Atomic Instrument
InstCode
The instrument's code.
InstName
The instrument's name.
UnitCode
The code for the instrument's units. For example, MW.
Unit
The instrument's units. For example, Megawatts.
Live
The instrument's status. If this instrument has the Live Instrument flag
selected (in Instrument Creation), this attribute is set to true. Otherwise,
this attribute is set to false.
EngineID
The ID of the transaction engine associated with this instrument.
TermFormatID
The ID of the term formats associated with this instrument. Term formats
define the additional terms associated with an instrument.
PriceSorterID
The ID of the price sorters associated with this instrument.
AliasBundleID
The ID of the set of aliases associated with this instrument.
SeriesOfSessionsID
The ID of the Series of Sessions associated with this instrument.
B.5 Order Records
The following is an example of the XML that might be returned by the API for an order record. The table below
describes the attributes that may appear in an order record.
The <INSTSPECIFIER> and <TERM> elements indicate the instrument the order relates to, and any additional
terms associated with it. For more information about the attributes associated with these elements, see
Instrument Specifier and Terms.
If the order record is for a calculated order, it will also contain a <CONSTITUENTS> element indicating which
orders were used to construct the calculated order. For more information about the <CONSTITUENTS>
element, see Constituents.
55
Note
The ability to retrieve calculated orders through the API is subject to additional licensing. You will not be
able to retrieve details of calculated orders unless your server is appropriately licensed.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<ORDER Action="Query" EngineID="1" PersistentOrderID="4"
OrderID="7594" OldEngineID="1" OldOrderID="0"
DateTime="2006-05-08T15:23:56.000"
Price="8.50" Volume="15"
HiddenVolume="0" PriceDelta="0.00"
Side="Bid" Status="Firm"
Company="The Apple Company" CompanyID="108"
Broker="Mixed Fruits" BrokerID="0"
User="Louis Strether" UserID="14"
Trader="Louis Strether" TraderID="14"
OrderType="GoodTillCancelled"
AllOrNone="false"
CounterPartyOk="true">
<INSTSPECIFIER InstID="126" FirstSequenceID="1"
SeqSpan="Single" FirstSequenceItemID="31"
TermFormatID="1" InstName="Apples"
FirstSequenceItemName="Jun 2006"/>
<TERM Label="Strike" Desc="A strike price"
Type="double">30</TERM>
</ORDER>
</GV8APIDATA>
ORDER Record Attributes
Attribute
Description
EngineID
The ID of the transaction engine used by this order.
PersistentOrderID
A unique ID that represents this order throughout its lifetime in the system. This
ID remains the same throughout the order's lifetime.
This information is only returned if you have identify permission over the order.
OrderID
An ID representing this order. This ID changes every time the order is updated.
OldOrderID
The previous OrderID. This value is only returned if the Action is set to Update.
Otherwise, OldOrderID is set to 0.
If you have queried for orders, therefore, the old order ID is not returned in the
order record (because the Action in the returned order record is set to Query).
However, the old order ID is returned in records sent as a result of your
application subscribing to order updates.
Note
Sometimes an updated order record may be sent out with the same OrderID
and OldOrderID. One example of a situation where this occurs is if the order
record has been sent because the trading agreements have been updated on
the server. In this case, the order itself has not changed, and therefore it is
not assigned a new OrderID.
Action
56
The action that has caused the record to be returned. This attribute can have
Attribute
Description
the following values:

Query
The record has been returned as a result of a query.

Insert
A new order has been added to the system.

Update
An existing order has changed in some way. For example, the price value,
quantity, or status, have changed.

Remove
An existing order has been removed from the system.
DateTime
The date and time the order action took place (in UTC time, written in ISO 8601
format).
Price
The price value of the order.
SettlementPrice
The settlement price for this order. This is only relevant if GlobalVision has been
specifically configured to perform settlement price calculations. Please contact
Trayport Support on +44 (0) 20 7960 5555 or [email protected] for more
information about this feature.
Volume
The order's available quantity.
HiddenVolume
The amount of hidden quantity associated with the order.
PriceDelta
The amount to change the price value when adding the hidden quantity to the
order.
Side
The side of the market the order has been submitted on. This attribute can have
the following values:
Status

Bid

Ask
The type of order. This attribute can have the following values:

Firm

Withheld

Reference

Indicative

StopOrder
Company
The name of the trader company that owns the order.
CompanyID
The ID of the trader company that owns the order.
Broker
The name of the broker company the order was submitted to.
BrokerID
The ID of the broker company the order was submitted to.
User
The username of the user who added the order to the market. If the order was
submitted by a broker on behalf of a trader, this attribute contains the broker's
username.
57
Attribute
Description
UserID
The ID of the user who added the order to the market. If the order was
submitted by a broker on behalf of a trader, this attribute contains the broker's
ID.
Trader
The username of the trader who owns the order.
TraderID
The ID of the trader who owns the order.
OrderType
The type of order. This attribute can have the following values:

GoodTillCancelled
The order remains in the market until it is cancelled.

GoodForDay
The order remains in the market until the end of the day it was submitted.

GoodTillDate
The order remains in the market until the specified ExpiryTime.

FillOrKill
A type of order used in auto-matching. The order is only placed if it can be
matched in full.

FillAndKill
A type of order used in auto-matching. The system matches as much of the
order as possible, and does not place any remainder in the market.

MarketOrder
An order to buy or sell a commodity as soon as possible at the current
market price.
AllOrNone
The all or none status of the order. If the order has been submitted on an all or
none basis, this attribute is set to true. Otherwise, this attribute is set to false.
CounterPartyOk
The currently logged in user's counter party status in relation to this order. This
attribute is set to true if the currently logged in user is allowed to hit the order.
Otherwise, this attribute is set to false.
ExpiryTime
The date and time when the order will expire (in UTC time, written in ISO 8601
format). This attribute only applies to orders with an OrderType of
GoodTillDate.
Duration
The original expiry duration set by the user who inserted the order. This
attribute only applies to orders with an OrderType of GoodTillDate.
SystemRank
The system rank of the order. The system rank is used internally by GlobalVision
when sorting orders on the GlobalVision Front-End.
StopPrice
The order's stop price (if the order is a stop order).
ImpliedType
Indicates whether this order is a calculated order, and if so whether the order
has been generated by GlobalVision, or submitted to the market as an externally
generated calculated order. This attribute can have the following values:
58

Native
The order is a calculated order that has been generated by GlobalVision.

External
The order is a calculated order that has been generated externally.

None
Attribute
Description
The order is not a calculated order.
AccountID
The ID of the trading account associated with this order.
AccountName
The trading account associated with the order. Trading accounts are designed to
be used in markets with tightly controlled membership restrictions, such as
certain exchanges, by allowing traders with access to the market to act on
behalf of clients who do not have direct access to the market.
IsTradable
If the order is a calculated order, this attribute indicates whether the order is
tradable. This attribute can have the following values:
Quote

Yes
The order is a tradable calculated order.

No
The order is an untradable calculated order.

Unknown
The order is a calculated order with unknown tradability.
Indicates whether the order was submitted as part of a mass quote. If this order
was submitted by a market maker as part of a mass quote, this attribute is set to
true.
Mass quoting is only used in certain markets. For most orders, this attribute is
set to false.
Note
The information returned in a record is subject to permissions (and, in some cases, subject to the features
enabled on the server). For example, information such as the amount of hidden quantity associated with an
order, or counter parties involved in a trade, is only included in the record if the currently logged in user has
permission to see that information.
B.6 Instrument Specifier
The following is an example of the XML that might be returned by the API in an instrument specifier. The API
uses the instrument specifier to indicate the instrument that the XML record relates to. The following table
describes the attributes that may appear in an instrument specifier.
<INSTSPECIFIER InstID="121" FirstSequenceID="1" SeqSpan="Spread"
FirstSequenceItemID="31" SecondSequenceItemID="32" TermFormatID="1"
InstName="Coal" FirstSequenceItemName="May 2014"
SecondSequenceItemName="Jun 2014"/>
INSTSPECIFIER Attributes
Attribute
Description
InstID
The instrument's ID.
InstName
The instrument's name.
FirstSequenceID
The ID of the specific sequence on the instrument that this record relates
59
Attribute
Description
to.
SeqSpan
The type of instrument. This attribute can have the following values:

Single

Spread

Range

N/A
FirstSequenceItemID
The ID of the specific sequence item that this record relates to.
SecondSequenceItemID
The ID of the second sequence item that this record relates to. This
attribute only applies to spread or range instruments.
FirstSequenceItemName
The name of the specific sequence item that this record relates to.
SecondSequenceItemName
The name of the second sequence item that this record relates to. This
attribute only applies to spread or range instruments.
TermFormatID
The ID of the term formats associated with this instrument.
B.7 Constituents
The following is an example of the XML that might be returned by the API in a constituents element. The API
uses the constituents element to return the details of the constituent orders of an automatically calculated
order. An order record for a calculated order will contain a constituents element similar to the following.
The two constituent elements shown here identify the two legs used in the calculated order. The
<INSTSPECIFIER> elements indicate the instruments that the constituent orders relate to. For more
information about the attributes associated with the <INSTSPECIFIER> element, see Section, "The
Instrument Specifier".
The following table describes the attributes used in the constituent elements.
<CONSTITUENTS>
<CONSTITUENT EngineID="3" OrderID="246" DealVolume="0">
<INSTSPECIFIER InstID="126" FirstSequenceID="1" SeqSpan="Single"
FirstSequenceItemID="31" TermFormatID="1" InstName="Apples"
FirstSequenceItemName="Jun 2015"/>
</CONSTITUENT>
<CONSTITUENT EngineID="1" OrderID="62" DealVolume="0">
<INSTSPECIFIER InstID="126" FirstSequenceID="1" SeqSpan="Single"
FirstSequenceItemID="35" TermFormatID="1"
InstName="Apples" FirstSequenceItemName="Oct 2015"/>
</CONSTITUENT>
</CONSTITUENTS>
CONSTITUENT Attributes
Attribute
Description
EngineID
The ID of the transaction engine used by this constituent order.
60
Attribute
Description
OrderID
An ID representing the constituent order. This ID changes every time the order is updated.
DealVolume
The quantity to deal from this constituent.

If this calculated order has been generated by GlobalVision, this value is set to 0.

If this calculated order is externally generated, this value indicates the quantity to deal
from this constituent.
If this order is an externally generated calculated order, then a value of 0 indicates that
this order is for informational purposes only (an informational order will not be dealt).
B.8 Order Summary Records
The following is an example of the XML that might be returned by the API for an order summary record. The
table below describes the attributes that may appear in an order summary record.
The <INSTSPECIFIER> element indicates the instrument the order summary relates to. For more information
about the attributes associated with this element, see Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<INSTORDERSUMMARY BidBestPrice="1.95" BidBestQty="15"
BidTotalQty="30" BidBestTradablePrice="1.95"
BidBestTradableQty="15" BidTotalTradableQty="25"
AskBestPrice="2.05" AskBestQty="5" AskTotalQty="45"
AskBestTradablePrice="2.15"
AskBestTradableQty="5" AskTotalTradableQty="25">
<INSTSPECIFIER InstID="121" FirstSequenceID="1"
SeqSpan="Spread" FirstSequenceItemID="31"
SecondSequenceItemID="32" TermFormatID="1"
InstName="Apples" FirstSequenceItemName="May 2015"
SecondSequenceItemName="Jun 2015"/>
</INSTORDERSUMMARY>
</GV8APIDATA>
INSTORDERSUMMARY Record Attributes
Attribute
Description
BidBestPrice
The price value of the current best bid in the market.
BidBestQty
The quantity of the current best bid in the market.
BidTotalQty
The total quantity currently in the market on the bid side.
BidBestTradableQty
The best tradable price available in the market on the bid side
BidBestTradablePrice
The price value of the best bid that the currently logged in trader can trade.
BidTotalTradableQty
The total tradable quantity currently in the market on the bid side.
AskBestPrice
The price value of the current best ask in the market.
61
Attribute
Description
AskBestQty
The quantity of the current best ask in the market.
AskTotalQty
The total quantity currently in the market on the ask side.
AskBestTradablePrice
The price value of the best ask that the currently logged in trader can trade.
AskTotalTradableQty
The total tradable quantity currently in the market on the ask side.
AskBestTradableQty
The best tradable price available in the market on the ask side
B.9 Trade Records
The following is an example of the XML that might be returned by the API for a trade record. The following
table describes the attributes that may appear in a trade record.
The <INSTSPECIFIER>, <TERM> and <ANNOTATIONS> elements indicate the instrument the order relates to,
and any additional terms associated with it. For more information about the attributes associated with these
elements, see Terms and Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-Trayport-com">
<TRADE Action="Insert" TradeID="9" RelationshipID="2"
DateTime="2014-05-15T12:21:42.000" Price="8.50"
AggressorCompany="The Power Company" AggressorCompanyID="85"
AggressorTrader="Gas Trader 1" AggressorTraderID="3"
AggressorUser="Gas Trader 1" AggressorUserID="3"
AggressorAction="Sell" AggressorBroker="The Power Broker"
AggressorBrokerID="2" AggressorBrokerage="false"
GoldCode="Golden" InitiatorCompany="The UK Gas Company"
InitiatorCompanyID="108" InitiatorTrader="Gas Trader 2"
InitiatorTraderID="14" InitiatorUser="Gas Trader 2"
InitiatorUserID="14" InitiatorAction="Buy"
InitiatorBroker="The UK Gas Broker" InitiatorBrokerID="2"
InitiatorBrokerage="true" LastUpdate="2014-05-15T12:21:42.000"
ManualDeal="false" VoiceDeal="false" InitSleeve="false"
AggSleeve="false" PNC="false">
<INSTSPECIFIER InstID="126" FirstSequenceID="1" SeqSpan="Single"
FirstSequenceItemID="31" TermFormatID="1" InstName="API 2"
FirstSequenceItemName="Jun 2014" SecondSequenceItemName=""/>
<TERM Label="Strike" Desc="A strike price" Type="double">10</TERM>
<TERM Label="Vintage" Desc="The vintage" Type="string">vin02</TERM>
<ANNOTATIONS>
<NOTE Label="AGGRESSOR_CORPID_(Aggressor Company ID)">124</NOTE>
<NOTE Label="AGGRESSOR_USERID_(Aggressor User ID)">1235</NOTE>
<NOTE Label="AGGRESSOR_BROKERAGERATE">8.5</NOTE>
<NOTE Label="BROKER_AGGRESSOR_BROKERAGERATE">8.5</NOTE>
<NOTE Label="BROKER_AGGRESSOR_USER_DATA_(Aggressor User
Metadata)">Value2</NOTE>
<NOTE Label="BROKER_INITIATOR_USER_DATA_(Initiator User
Metadata)">Value3</NOTE>
62
<NOTE Label="BROKER_INITIATOR_BROKERAGERATE">8.0</NOTE>
<NOTE Label="BROKER_UniqueDealID">ca96c284-2cf1-48e1-a2539d50928fb922</NOTE>
<NOTE Label="CPTY_Calendar">UK Gas</NOTE>
<NOTE Label="CPTY_CalendarID">2bf4a5f2-0c51-4b4b-a086-c62017e6c6c7</NOTE>
<NOTE Label="CPTY_Commodity">Aluminium</NOTE>
<NOTE Label="CPTY_CommodityID">656506d6-f05d-4b2b-b77e-775685c99785</NOTE>
<NOTE Label="CPTY_ContractType">Future</NOTE>
<NOTE Label="CPTY_ContractTypeID">a8cb7900-bb2c-4dec-a1ff5ad03d4fb022</NOTE>
<NOTE Label="CPTY_CurrencyScale">1.00</NOTE>
<NOTE Label="CPTY_DeliverySchedule">Off Peak (Inc. Holidays)</NOTE>
<NOTE Label="CPTY_DeliveryScheduleID">62e53n42-5k3d-b1a525624a5c1be6</NOTE>
<NOTE Label="CPTY_DeliveryShape">Off Peak (Inc. Holidays)</NOTE>
<NOTE Label="CPTY_DeliveryShapeID">42b8be4e-7cfc-42b0-b2a360634b5c3eb5</NOTE>
<NOTE Label="CPTY_Region">Americas</NOTE>
<NOTE Label="CPTY_RegionID">2</NOTE>
<NOTE Label="CPTY_SettlementIndex">The Steel Index</NOTE>
<NOTE Label="CPTY_SettlementIndexID">3747gd23-aa5d-f3ff-5ad25f88ab4c</NOTE>
<NOTE Label="CPTY_SettlementType">Physical</NOTE>
<NOTE Label="CPTY_SettlementTypeID">a1be915c-c833-4592-83b7efb683898506</NOTE>
<NOTE Label="CPTY_Symbol">X</NOTE>
<NOTE Label="CPTY_SymbolIssuer">CME Group Inc.</NOTE>
<NOTE Label="CPTY_SymbolIssuerID">65277f68-317e-4e68-831c9504f19634cf</NOTE>
<NOTE Label="CommingledProduct">123</NOTE>
<NOTE Label="CommingledVenue">ICE</NOTE>
<NOTE Label="CommingledVenueID">b83720cb-3fe8-457c-8d2c-d57587167e8f</NOTE>
<NOTE Label="ContractSize">2.0</NOTE>
<NOTE Label="Currency">EUR</NOTE>
<NOTE Label="GoldCode">3714</NOTE>
<NOTE Label="INITIATOR_BROKERAGERATE">8.5</NOTE>
63
<NOTE Label="Initiator_Company_IDs">129</NOTE>
<NOTE Label="Initiator_User_IDs">2139</NOTE>
<NOTE Label="LotSize">0.0</NOTE>
<NOTE Label="Unit">KTherms</NOTE>
<NOTE Label="UnitGUID">a83520ad-3ad8-489c-2d6a-d24287167c2g</NOTE>
</ANNOTATIONS>
</TRADE></GV8APIDATA>
TRADE Record Attributes
Attribute
Description
TradeID
An ID representing this trade.
OrderID
The OrderID of the traded order. This value is only returned if the Action is
set to Insert.
Action
The action that has caused the record to be returned. This attribute can
have the following values:

Query
The record has been returned as a result of a query.

Insert
A new trade has taken place.

Update
The details for an existing trade have been changed.

Remove
An existing trade has been removed from the system.
RelationshipID
An ID identifying related trades. If a spread trade is broken, automatically
or manually, into its constituent legs then the resulting trades are assigned
the same RelationshipID. A RelationshipID can also be assigned to
deals which were dealt via Volume Dealing or Indirect Aggression. In all
other cases the RelationshipID is set to 0.
DateTime
The date and time the trade took place (in UTC time, written in ISO 8601
format).
Price
The price value of the trade.
SettlementPrice
The settlement price for this order. This is only relevant if GlobalVision has
been specifically configured to perform settlement price calculations.
Please contact Trayport Support on +44 (0) 20 7960 5555 or
[email protected] for more information about this feature.
Volume
The quantity traded.
LastUpdate
The date and time when the trade was last updated (in UTC time, written
in ISO 8601 format).
AggressorCompany
The name of the aggressor company involved in the trade.
64
Attribute
Description
AggressorCompanyID
The ID of the aggressor company involved in the trade.
AggressorTrader
The username of the aggressor trader involved in the trade.
AggressorTraderID
The ID of the aggressor trader involved in the trade.
AggressorUser
The username of the user who carried out the trade. If a broker traded the
order on behalf of a trader, this attribute contains the broker's username.
AggressorUserID
The ID of the user who carried out the trade. If a broker traded the order
on behalf of a trader, this attribute contains the broker's ID.
AggressorAction
The action of the aggressor in this trade. This attribute takes the following
values:

Buy

Sell
AggressorBroker
The name of the aggressor broker company.
AggressorBrokerage
The aggressor brokerage. If this is set to true, there is a fee for spread
deals. Otherwise, this attribute is set to false (this field is only available
to broker users).
AggressorBrokerID
The ID of the aggressor broker company.
AggressorAccount
The name of the trading account associated with the deal aggressor.
Trading accounts are designed to be used in markets with tightly controlled
membership restrictions, such as certain exchanges, by allowing traders
with access to the market to act on behalf of clients who do not have
direct access to the market.
AggressorAccountID
The ID of the trading account associated with the deal aggressor.
InitiatorCompany
The name of the initiator company involved in the trade.
InitiatorCompanyID
The ID of the initiator company involved in the trade.
InitiatorTrader
The username of the initiator trader involved in the trade.
InitiatorTraderID
The ID of the initiator trader involved in the trade.
InitiatorUser
The username of the user who added the order involved in the trade to the
market. If the order was submitted by a broker on behalf of a trader, this
attribute contains the broker's username.
InitiatorUserID
The ID of the user who carried out the trade. If the order was submitted by
a broker on behalf of a trader, this attribute contains the broker's ID.
InitiatorAction
The action of the initiator in this trade. This attribute takes the following
values:
InitiatorBroker

Buy

Sell
The name of the initiator broker company.
65
Attribute
Description
InitiatorBrokerage
The initiator brokerage. If this is set to true, there is a fee for spread deals.
Otherwise, this attribute is set to false (this field is only available to
broker users).
InitiatorBrokerageRate
The brokerage rate for the initiator. This is only returned if the 'Visible to
trader' flag is set in Deal Edtior for the deal.
InitiatorBrokerID
The ID of the initiator broker company.
InitiatorAccount
The name of the trading account associated with the deal initiator.
InitiatorAccountID
The ID of the trading account associated with the deal initiator.
ClearingStatus
The clearing status of the trade, if the trade uses clearing. This attribute
takes the following values:

N/A

Refused

Pending

Granted
ClearingID
The clearing ID associated with the trade.
ClearingIDString
The clearing ID string associated with the trade.
ClearingHouse
The clearing house that the trade has been sent to.
ManualDeal
The type of trade. If this was a result of a trade added to the system
manually, this attribute is set to true. Otherwise, this attribute is set to
false.
AuctionedDeal
The type of trade. If the trade took place during an auction, this attribute is
set to true. Otherwise, this attribute is set to false.
VoiceDeal
The type of trade. If this was a result of a trade added as a voice deal, this
attribute is set to true. Otherwise, this attribute is set to false.
InitSleeve
The type of trade. If this trade is a third-party trade where the initiator is
trading on behalf of a company that does not have a trading agreement
with the aggressor, this attribute is set to true. Otherwise, this attribute is
set to false.
AggSleeve
The type of trade. If this trade is a third-party trade where the aggressor is
trading on behalf of a company that does not have a trading agreement
with the initiator, this attribute is set to true. Otherwise, this attribute is
set to false.
PNC
The trade's confidentiality status. If the trade is marked "Private and
Confidential", this attribute is set to true. Otherwise, this attribute is set
to false.
PncTillCleared
If this attribute is set to true, the trade will have “Private and
Confidential” status until it has been cleared.
InitiatorOwnedSpread
The type of spread order involved in the trade. If this trade is a spread
66
Attribute
Description
order that was submitted to the market as an outright spread order (rather
than a spread order that was automatically generated by the system based
on other orders in the market), this attribute is set to true. Otherwise, this
attribute is set to false.
AggressorOwnedSpread
The type of spread order involved in the trade. If this trade is a spread
order that was submitted to the market as an outright spread order (rather
than a spread order that was automatically generated by the system based
on other orders in the market), and this trade took place as a consequence
of someone trading a generated leg order, this attribute is set to true.
Otherwise, this attribute is set to false.
FromBrokenSpread
The deal is from a spread deal that has been broken and consequently
deleted. If the deal came from breaking a spread, this attribute is set to
true. Otherwise, this attribute is set to false.
UnderInvestigation
The deal is under investigation. This setting is only used when GlobalVision
displays information from certain third-party trading systems.
PriceSetting
The type of trade. If this is a price-setting trade, this attribute is set to
true. Otherwise, this attribute is set to false.
Price-Setting Trades are only used in certain markets (where a trade is
considered to be "price setting" if it is on-market and above a certain
minimum size threshold).
AggressorVoiceDeal
ConfirmState
InitiatorVoiceDeal
ConfirmState
If the deal is a voice deal that requires the counter parties to confirm the
deal details, this attribute indicates whether the aggressor has confirmed
the deal. This attribute can have one of the following values:

Confirmed

Pending

Rejected

Timed Out
If the deal is a voice deal that requires the counter parties to confirm the
deal details, this attribute indicates whether the initiator has confirmed
the deal. This attribute can have one of the following values:

Confirmed

Pending

Rejected

Timed Out
EngineID
The ID of the engine that trade was executed on.
GroupID
The ID of the group executing the trade.
ContractSize
The size of the contract.
Synthetic
Indicates if the trade is synthetic.
JTT
Indicates if the trade was executed using a JTT session.
MatchingSession
Indicates if the trade was executed using a matching session.
67
Attribute
Description
OverrideCredit
Indicates if the trade's credit is overridden.
IsBlockTrade
Indicates if the trade is a block trade.
<ANNOTATIONS> Elements
Attribute
Description
AGGRESSOR_CORPID_(Aggressor Any Unique Identifier metadata specified for the aggressor company.
Company ID)
AGGRESSOR_USERID_(Aggressor Any Unique Identifier metadata specified for the aggressor.
User ID)
AGGRESSOR_BROKERAGERATE
The brokerage rate for the aggressor. This is only returned if the 'Visible
to trader' flag is set in Deal Editor for the deal.
BROKER_AGGRESSOR_USER_DATA_ Any additional metadata specified for the aggressor. Visible only to
(Aggressor User Metadata)
brokers.
BROKER_INITIATOR_USER_DATA_ Any additional metadata specified for the initiator. Visible only to
(Initiator User Metadata)
brokers.
BROKER_AGGRESSOR_BROKERAGER The brokerage rate for the aggressor. Visible only to brokers.
ATE
BROKER_INITIATOR_BROKERAGER The brokerage rate for the initiator. Visible only to brokers.
ATE
BROKER_UniqueDealID
The UniqueDealID on the broker side. Visible only to brokers.
CPTY_Calendar
The Calendar used by the instrument.
CPTY_CalendarID
The CalendarID used by the instrument.
CPTY_Commodity
The Commodity assigned to the instrument.
CPTY_CommodityID
The CommodityID assigned to the Commodity on the instrument.
CPTY_ContractType
The ContractType used by the instrument.
CPTY_ContractTypeID
The ContractTypeID used by the instrument.
CPTY_CurrencyScale
The CurrencyScale used by the instrument.
CPTY_DeliverySchedule
The delivery schedule used by the instrument.
CPTY_DeliveryScheduleID
The ID of the delivery schedule used by the instrument.
CPTY_DeliveryShape
The DeliveryShape used by the instrument.
CPTY_DeliveryShapeID
The DeliveryShapeID used by the instrument.
CPTY_Region
The region that the trade was carried out in, for example, Europe.
68
Attribute
Description
CPTY_RegionID
The region ID that the trade was carried out in, for example 1.
CPTY_SettlementIndex
The SettlementIndex used by the instrument.
CPTY_SettlementIndexID
The ID of the SettlementIndex used by the instrument.
CPTY_SettlementType
The SettlementType used by the instrument.
CPTY_SettlementTypeID
The SettlementTypeID used by the instrument.
CPTY_Symbol
The Symbol used by the instrument.
CPTY_SymbolIssuer
The Issuing Authority used by the instrument.
CPTY_SymbolIssuerID
The ID of the Issuing Authority used by the instrument.
CommingledProduct
The CommingledProduct used on the instrument.
CommingledVenue
The CommingledVenue used on the instrument.
CommingledVenueID
The CommingledVenueID used for the CommingledVenue on the
instrument.
ContractSize
The contract size of the trade.
Currency
The code for the currency used, for example, EUR for Euros, or GBP for
Great British Pounds.
GoldCode
The Gold code associated with the instrument.
INITIATOR_BROKERAGERATE
The brokerage rate for the initiator. This is only returned if the 'Visible to
trader' flag is set in Deal Editor for the deal.
INITIATOR_CORPID_(Initiator Any Unique Identifier metadata specified for the initiator company.
Company ID)
INITIATOR_USERID_(Initiator Any Unique Identifier metadata specified for the initiator user.
User ID)
Lot Size
The size of each lot.
Unit
The unit associated with the instrument.
UnitGUID
The GUID of the unit associated with the instrument.
UnitID
The ID of the unit associated with the instrument.
Note
The information returned in a record is subject to permissions (and, in some cases, subject to the features
enabled on the server). For example, information such as the amount of hidden quantity associated with an
order, or counter parties involved in a trade, is only included in the record if the currently logged in user has
permission to see that information.
69
B.10 Trade Summary Records
The following is an example of the XML that might be returned by the API for a trade summary record. The
following table describes the attributes that may appear in a trade summary record.
The <INSTSPECIFIER> element indicates the instrument the trade summary relates to. For more information
about the attributes associated with this element, see Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<INSTTRADESUMMARY LastTradedPrice="1.95" LastTradedQty="15"
LastTradedTime="2015-01-19T13:43:05.190" TotalQtyTradedToday="35"
AggressorAction="Buy">
<INSTSPECIFIER InstID="121" FirstSequenceID="1" SeqSpan="Spread"
FirstSequenceItemID="31" SecondSequenceItemID="32" TermFormatID="1"
InstName="Coal" FirstSequenceItemName="May 2015"
SecondSequenceItemName="Jun 2015"/>
</INSTTRADESUMMARY>
</GV8APIDATA>
INSTTRADESUMMARY Record Attributes
Attribute
Description
LastTradedPrice
The price value of the last trade.
LastTradedQty
The quantity of the last trade.
LastTradedTime
The date and time the last trade took place (in UTC time, written in ISO 8601
format).
TotalQtyTradedToday
The total quantity that has been traded so far during today's trading session.
LastTradedPricePS
The price value of the last price-setting trade.
LastTradedQtyPS
The quantity of the last price-setting trade.
LastTradedTimePS
The date and time the last price-setting trade took place (in UTC time, written
in ISO 8601
format).
TotalQtyTradedTodayPS
The total quantity that has been traded so far in price-setting trades during
today's trading session.
OpeningAuctionPrice
The auction price at which orders matched during the last opening auction. If
no orders matched during the last opening auction, this will be set to the
value of the ERP.
ClosingAuctionPrice
The auction price at which orders matched during the last closing auction.
AggressorAction
The action of the aggressor in this trade. This attribute takes the following
values:
70

Buy

Sell
Note
Price-Setting Trades are only used in certain markets (where a trade is considered to be "price setting" if it is
on-market and above a certain minimum size threshold).
The <INSTTRADESUMMARY> element includes a number of attributes that contain trade summary
information for price-setting trades. If price-setting trades are not used on your system, then both the
standard and price-setting versions of the attribute will contain the same information (for example,
LastTradedQty and LastTradedQtyPS will always contain the same value).
However, if price-setting trades are in use, then the non price-setting version will always contain the value
for the last trade regardless of whether it was price-setting or not, while the price-setting version will show
the value for the last price-setting trade, and not the value of any non price-setting trades that have
subsequently taken place.
B.11 Sequence Records
The following is an example of the XML that might be returned by the API for a sequence record. The following
table describes the attributes that may appear in a sequence record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<SEQUENCE SeqID="1" SeqName="Simple Monthly Sequence"/>
</GV8APIDATA>
SEQUENCE Record Attributes
Attribute
Description
SeqID
The sequence's ID.
SeqName
The sequence's name.
SeqDisplayName
The display name of the sequence.
B.12 Sequence Item Records
The following is an example of the XML that might be returned by the API for a sequence item record. The
following table describes the attributes that may appear in a sequence item record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<SEQUENCEITEM SeqID="100001" ItemID="21" OrderID="21" ItemName="Jun 2006"
TradingStart="2010-01-01T00:00:00.000"
TradingEnd="2015-05-31T23:59:59.000"
PeriodStart="2015-06-01T00:00:00.000"
PeriodEnd="2015-06-30T23:59:59.000"/>
</GV8APIDATA>
SEQUENCEITEM Record Attributes
Attribute
Description
SeqID
The ID of the sequence that this sequence item is associated with.
71
Attribute
Description
ItemID
A unique ID that identifies this sequence item.
OrderID
An ID indicating the position of this sequence item in the sequence.
ItemName
The name of this sequence item.
TradingStart
The start of the tradable period for the sequence item (in UTC time, written in ISO 8601
format).
TradingEnd
The end of the tradable period for the sequence item (in UTC time, written in ISO 8601
format).
PeriodStart
The start of the period represented by this sequence item (in UTC time, written in ISO
8601 format).
PeriodEnd
The end of the period represented by this sequence item (in UTC time, written in ISO
8601 format).
B.13 Terms
The following is an example of the XML that might be returned by the API in a term element. The API uses term
elements to show the additional terms for the instrument that the XML record relates to. The table below
describes the attributes that may appear in a term element.
<TERM Label="Strike Price" Desc="Strike Price" Default="8.50" Type="double"/>
<TERM Label="Premium" Desc="Premium" Default="1.50" Type="double"/>
TERM Attributes
Attribute
Description
Label
A label for the term.
Desc
A description for the term.
Default
The default value for this term.
Type
The data type of the term. This attribute can have the following values:
Phase

string

integer

double

dateTime

boolean

dateList

doubleList
The phase setting for this term. This attribute can have the following values:

72
price
This term is specified when the order is submitted.
Attribute
Description

deal
This term is specified when the order is dealt.

post-trade
This term is specified after a trade has taken place.

instrument
This term is specific to the instrument.

system
This term is specified by the system.
Note
The phase is not always returned. For example, if the term record is returned as part
of an <ORDER> record, then the phase setting is not returned, because it conveys no
useful information in this context.
The phase is usually returned when querying for the term format definition. If the
phase setting is not returned in a term format definition, then this means that the
phase is the default (price).
Counterparty
The counter party that this term applies to. This attribute can have the following
values:

common
The term is common to both counter parties.

both
The attribute is specific to both counter parties.

buyer
The attribute is specific to the buyer.

seller
The attribute is specific to the seller.
Note
By default, terms are common to both counter parties. If the Counterparty is not
returned in a term record, then the term is common to both counter parties.
B.14 Term Format Records
The following is an example of the XML that might be returned by the API for a term format record. Term
formats define the additional terms associated with an instrument. The following table describes the attributes
that may appear in a term format record.
The <TERM> element indicates the additional terms associated with this term format. For more information
about the attributes associated with the <TERM> element, see Terms.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<TERMFORMAT TermFormatID="1" Name="Option" Desc="A term format used in
options">
<TERM Label="Strike Price" Desc="Strike Price" Default="8.50"
Type="double"/>
<TERM Label="Premium" Desc="Premium" Default="1.50" Type="double"/>
</TERMFORMAT>
</GV8APIDATA>
73
TERMFORMAT Record Attributes
Attribute
Description
TermFormatID
The term format ID.
Name
The name of the term format.
Desc
A description of this term format.
Note
When term format information is returned as a result of a direct query (using a query string containing the
<TERMFORMATS> element) the information returned will be the term format settings defined in Instrument
Creation.
When term format information is returned as a result of an instrument properties query, it will return any
settings that have been overridden in the Instrument Administration tool.
You are therefore recommended to query for term format instrument properties as part of an instrument
properties query. This ensures that the returned information reflects the formats that are actually in use on
the system. For more information about instrument property queries, see Instrument Properties.
B.15 Trading Account Records
The following is an example of the XML that might be returned by the API for a trading account record. The
following two tables describe the attributes that may appear in a trading account record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<TRADINGACCOUNTS CompanyID="6">
<ACCOUNT AccountID="25" AccountName="Power Consortium"/>
<ACCOUNT AccountID="28" AccountName="Power Trading Limited"/>
</TRADINGACCOUNTS>
<TRADINGACCOUNTS CompanyID="8">
<ACCOUNT AccountID="22" AccountName="Small Power Broking"/>
</TRADINGACCOUNTS>
</GV8APIDATA>
TRADINGACCOUNTS Record Attributes
Attribute
Description
CompanyID
The ID of the company the accounts are defined for.
ACCOUNT Record Attributes
Attribute
Description
AccountID
The unique ID associated with the trading account.
AccountName
The name defined for the trading account.
74
B.16 Groups Record
The following is an example of the XML that might be returned when querying for instrument groups. The
following table describes the attributes that may appear in the record.
Each <INSTSPECIFIER> element identifies an instrument that is in the group. For more information about the
attributes associated with this element, see Instrument Specifier.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<GROUPS>
<GROUP Name="Instruments">
<GROUP Name="Coal">
<INSTSPECIFIER InstID="695" SeqSpan="N/A" FirstSequenceID="0"
FirstSequenceItemID="0" SecondSequenceItemID="0"
TermFormatID="1"
InstName="Atomic Coal" FirstSequenceItemName=""
SecondSequenceItemName="" InstCode="ATOM-Coal"/>
<INSTSPECIFIER InstID="696" SeqSpan="N/A" FirstSequenceID="0"
FirstSequenceItemID="0" SecondSequenceItemID="0"
TermFormatID="1" InstName="Atomic Gas" FirstSequenceItemName=""
SecondSequenceItemName="" InstCode="ATOM-International-Coal"/>
</GROUP>
<GROUP Name="Electricity">
<INSTSPECIFIER InstID="235" SeqSpan="N/A" FirstSequenceID="0"
FirstSequenceItemID="0" SecondSequenceItemID="0"
TermFormatID="0" InstName="Atomic Electricity"
FirstSequenceItemName="" SecondSequenceItemName=""
InstCode="ATOM-Electricity"/>
</GROUP>
</GROUP>
</GROUPS>
</GV8APIDATA>
GROUP Record Attributes
Attribute
Description
Name
The group’s name.
B.17 Market Event Records
The following is an example of the XML that might be returned by the API for a Market Event record. The table
MARKETEVENT Record Attributes describes the attributes that may appear in a Market Event record, and the
table MARKETEVENT Record Child Elements describes the child elements that may appear in a Market Event
record.
<?xml version="1.0" standalone='yes'?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<MARKETEVENT Action="Query" ID="25" Status="Expired" DateTime="2007-0504T10:00:05.000">
<ACTIONS>
<OVERRIDEINSTRUMENTSTATUS StatusString="Allow Trading">
<ALLOWORDERENTRY/>
<ALLOWMANUALDEAL/>
</OVERRIDEINSTRUMENTSTATUS>
<SENDMESSAGE Message="Trading Open"/>
</ACTIONS>
75
<INSTRUMENTS>
<INSTSPECIFIER
<INSTSPECIFIER
<INSTSPECIFIER
<INSTSPECIFIER
</INSTRUMENTS>
</MARKETEVENT>
</GV8APIDATA>
InstID="233"
InstID="233"
InstID="234"
InstID="234"
FirstSequenceID="1"/>
FirstSequenceID="2"/>
FirstSequenceID="1"/>
FirstSequenceID="2"/>
MARKETEVENT Record Attributes
Attribute
Description
Action
The action that has caused the record to be returned. This attribute is set to
Query in a record returned as a result of a query for Market Events.
ID
The ID of the Market Event. Market Event IDs are assigned automatically by
the system.
Name
The name assigned to the Market Event by the user who created it.
Status
The Market Event's status. This attribute can have the following values:
DateTime

Enabled
The Market Event is active and fires at the specified time.

Disabled
The Market Event has been disabled and will not fire.

Expired
The Market Event has already fired.

Template
The Market Event record is for a template Market Event to be used as a
basis for creating new Market Events.
The date and time that the Market Event was scheduled for (server time of
the machine hosting the API).
This attribute is not returned for template Market Events that are configured
as Run Now events.
DisplayDateTime
The display time of the Market Event (the publicly visible time of the Market
Event, which is the server time of the machine hosting the API).
This attribute is only returned to users who have permission to create Market
Events. These users receive both the DateTime and the DisplayDateTime
attributes, with the DateTime attribute containing the actual time the Market
Event was scheduled for, and the DisplayDateTime containing the time
specified as the publicly visible time of the Market Event.
Users without permission to create Market Events can only see the DateTime
attribute, but this attribute actually contains the DisplayDateTime (the
publicly visible time for the Market Event), rather than the actual time the
event was scheduled for.
76
MARKETEVENT Record Child Elements
Element
Description
ACTIONS
The actions specified on the Market Event. This element can contain the
following child elements:

STARTAUCTION
Indicates that this Market Event initiates an auction on the specified
instruments.
The value of the Action attribute is set to one of the following values to
indicate the type of auction that this Market Event starts:

OpeningAuction

IntradayAuction

ClosingAuction

SENDMESSAGE
A message sent as part of the Market Event. This element has a Message
attribute that contains the message itself.

OVERRIDEINSTRUMENTSTATUS
This element indicates the new status of the instruments after the
Market Event has fired. This element can contain any of the following
child elements, which correspond to the check boxes in the instrument
status section of the Market Events Dialog in the GlobalVision Front-End.
If a child element is present in the Market Event record, then it indicates
that the option is selected.

ALLOWORDERENTRY

ALLOWMANUALDEAL

ALLOWORDERVOLUMEREDUCTION

ALLOWTRADING

DISALLOWORDERWITHDRAWAL
This element also has a StatusStringattribute, which contains the
instrument status string that was specified when the Market Event
was created.
This element only applies if the GlobalVision server has been
specifically configured to enable this option. If the corresponding
setting (Disallow Order Withdrawal) does not appear when
configuring Market Events in the GlobalVision Front-End, then your
system has not been configured to allow this setting, and it does not
apply to you. If you would like to have this setting enabled on your
system, please contact Trayport Support.

ALLOWOPTIONEXERCISE
This element determines whether or not an option can be exercised
during a session.

REVERT
Indicates that the Market Event reverts the instruments to their default
settings (as defined by the series of sessions).

PRICEACTION
Indicates that a price action is carried out as part of the Market Event.
This element has an Action attribute, which is set to either
WithdrawPrices or DeletePrices, depending on the price action that was
set when the Market Event was created.
77
Element
Description
INSTRUMENTS
The instruments that this Market Event applies to, if the Market Event has
been configured to apply to one or more specific instruments. This element
contains an <INSTSPECIFIER> element for each instrument that the Market
Event applies to.
The Market Event record either contains an INSTRUMENTS child element or a
GROUPS element.
GROUPS
The instrument groups that this Market Event applies to, if the Market Event
has been configured to apply to one or more instrument groups. This element
contains a <GROUP> element for each instrument group that the Market
Event applies to.
The Market Event record either contains an INSTRUMENTS child element or a
GROUPS element.
B.18 Historical Orders Records
The following is an example of the XML that might be returned by the API for a Historical Orders record. The
table below describes the attributes that may appear in a Historical Orders record.
<?xml version="1.0" encoding="UTF-16"?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<ORDER PersistentOrderID="126" Action="Query"/>
<ORDER PersistentOrderID="127" Action="Query"/>
<ORDER PersistentOrderID="124" Action="Query"/>
<ORDER PersistentOrderID="125" Action="Query"/>
<ORDER PersistentOrderID="2" Action="Query"/>
</GV8APIDATA>
HISTORICALORDERS Record Attributes
Attribute
Description
PersistentOrderID
A unique ID that represents this order throughout its lifetime in the
system. This ID remains the same throughout the order's lifetime.
This information is only returned if you have identify permission over the
order.
Action
The action that has caused the record to be returned. This attribute will be
set to Query in a record returned as a result of a query for Historical
Orders.
B.19 Order History Records
The following is an example of the XML that might be returned by the API for an order history record. Order
history records contain <ACTIVITY> elements, which provide information about each activity carried out on
the order. For instance, the example below describes the order being inserted, updated and then dealt. The
attributes that may appear in an <ACTIVITY> element are described in a table following the XML example.
78
Order History records will contain an <INSPECIFIER> element, indicating the instrument that each order
relates to, and may also contain a <TRADE> element, describing any trades carried out on the order. See
Instrument Specifier and Trade Records for more information on these elements.
<?xml version="1.0" encoding="UTF-16"?>
<GV8APIDATA xmlns="gv8api-trayport-com">
<ACTIVITY Action="Query" EngineID="1" PersistentOrderID="1"
OrderID="1" OldEngineID="0" OldOrderID="0"
DateTime="2013-08-28T12:37:17.267" Price="10.00"
Volume="1" HiddenVolume="0" PriceDelta="0.00"
Side="Bid" Status="Firm" Company="Company A"
CompanyID="2" Broker="Broker Company" BrokerID="1"
User="Trayport Administrator" UserID="1"
Trader="Bdd_trader_A1" TraderID="41"
OrderType="GoodTillCancelled" SystemRank="1"
AllOrNone="false" Broadcast="false"
CurrentSessionOnly="false" CounterPartyOk="false"
UnderRightFirstRefusal="false" ImpliedType="None"
OrderAction="Inserted">
<INSTSPECIFIER InstID="145" SeqSpan="Single"
FirstSequenceID="1" FirstSequenceItemID="1"
SecondSequenceItemID="0" TermFormatID="1"
InstName="JTT_FixedYes_Sequential"
FirstSequenceItemName="Jan" SecondSequenceItemName=""/>
</ACTIVITY>
<ACTIVITY Action="Query" EngineID="1" PersistentOrderID="1"
OrderID="2" OldEngineID="0" OldOrderID="0"
DateTime="2013-08-28T12:37:44.407" Price="20.00"
Volume="1" HiddenVolume="0" PriceDelta="0.00"
Side="Bid" Status="Firm" Company="Company A"
CompanyID="2" Broker="Broker Company" BrokerID="1"
User="Trayport Administrator" UserID="1"
Trader="Bdd_trader_A1" TraderID="41"
OrderType="GoodTillCancelled" SystemRank="2"
AllOrNone="false" Broadcast="false"
CurrentSessionOnly="false" CounterPartyOk="false"
UnderRightFirstRefusal="false" ImpliedType="None"
OrderAction="UpdatedBySystem">
<INSTSPECIFIER InstID="145" SeqSpan="Single"
FirstSequenceID="1" FirstSequenceItemID="1"
SecondSequenceItemID="0" TermFormatID="1"
InstName="JTT_FixedYes_Sequential"
FirstSequenceItemName="Jan" SecondSequenceItemName=""/>
<TRADE Action="Query" TradeID="1" RelationshipID="0"
Price="20.00" Volume="1" DateTime="2013-08-28T12:37:57.130"
LastUpdate="2013-08-28T12:37:57.130"
AggressorCompany="Company B"
AggressorCompanyID="3" AggressorTrader="Bdd_trader_B1"
AggressorTraderID="42" AggressorUser="Trayport Administrator"
AggressorUserID="1" AggressorAction="Sell"
AggressorBroker ="Broker Company" AggressorBrokerID="1"
InitiatorCompany="Company A" InitiatorCompanyID="2"
InitiatorTrader="Bdd_trader_A1" InitiatorTraderID="41"
InitiatorUser="Trayport Administrator" InitiatorUserID="1"
InitiatorAction="Buy" InitiatorBroker ="Broker Company"
InitiatorBrokerID="1" ClearingStatus="N/A" ClearingID="0"
ClearingIDString="" ClearingHouse="" ManualDeal="false"
AuctionedDeal="false" VoiceDeal="false" InitSleeve="false"
AggSleeve="false" PNC="false" PncTillCleared="false"
Synthetic="false" InitiatorOwnedSpread="false"
AggressorOwnedSpread="false" UnderInvestigation="false"
79
PriceSetting="true" FromBrokenSpread="false" JTT="false"
MatchingSession="false" GroupID="1">
<INSTSPECIFIER InstID="145" SeqSpan="Single"
FirstSequenceID="1" FirstSequenceItemID="1"
SecondSequenceItemID="0" TermFormatID="1"
InstName="JTT_FixedYes_Sequential"
FirstSequenceItemName="Jan" SecondSequenceItemName=""/>
<ANNOTATIONS>
<NOTE Label="BROKER_UniqueDealID">94678eea-a510-463b-8cea-e98825d82670</NOTE>
<NOTE Label="CPTY_Commodity">POWER</NOTE>
<NOTE Label="CPTY_CommodityID">7a8525c0-8123-4e08-9421-1a8da0bb8054</NOTE>
<NOTE Label="CPTY_DealCreationDT">2013 08 28 12 37 57 139</NOTE>
<NOTE Label="CPTY_Region">Belgium</NOTE>
<NOTE Label="CPTY_RegionID">27b52f88-baff-43f7-ad5f-526134f8be9c</NOTE>
<NOTE Label="Unit">None</NOTE>
<NOTE Label="UnitGUID">00000000-0000-0000-0000-000000000000</NOTE>
<NOTE Label="UnitID">1</NOTE>
</ANNOTATIONS>
</TRADE>
</ACTIVITY>
<ACTIVITY Action="Query" EngineID="1" PersistentOrderID="1" OrderID="3"
OldEngineID="0" OldOrderID="0" DateTime="2013-08-28T12:37:57.137" Price="20.00"
Volume="0" HiddenVolume="0" PriceDelta="0.00" Side="Bid" Status="Firm"
Company="Company A" CompanyID="2" Broker="Broker Company" BrokerID="1"
User="Trayport Administrator" UserID="1" Trader="Bdd_trader_A1" TraderID="41"
OrderType="GoodTillCancelled" SystemRank="2" AllOrNone="false" Broadcast="false"
CurrentSessionOnly="false" CounterPartyOk="false" UnderRightFirstRefusal="false"
ImpliedType="None" OrderAction="Dealt">
<INSTSPECIFIER InstID="145" SeqSpan="Single" FirstSequenceID="1"
FirstSequenceItemID="1" SecondSequenceItemID="0" TermFormatID="1"
InstName="JTT_FixedYes_Sequential" FirstSequenceItemName="Jan"
SecondSequenceItemName=""/>
</ACTIVITY>
</GV8APIDATA>
ACTIVITY Record Attributes
Attribute
Description
Action
The action that has caused the record to be returned. This attribute will be
set to Query in a record returned as a result of a query for Historical
Orders.
80
Attribute
Description
EngineID
The ID of the engine that trade was executed on.
PersistentOrderID
The ID of each order returned by the <HISTORICALORDERS> query.
OrderID
An ID representing this order. This ID changes every time the order is
updated.
OldEngineID
The previous EngineID. This value is only returned if the Action is set to
Update. Otherwise, OldEngineID is set to 0.
OldOrderID
The previous OrderID. This value is only returned if the Action is set to
Update. Otherwise, OldOrderID is set to 0.
DateTime
The date and time the order action took place (in UTC time, written in ISO
8601 format).
LastUpdate
The date and time when the trade was last updated (in UTC time, written
in ISO 8601 format).
Price
The price value of the order.
Volume
The order’s available quantity.
HiddenVolume
The amount of hidden quantity associated with the order.
PriceDelta
The amount to change the price value when adding the hidden quantity to
the order.
Side
The side of the market the order has been submitted on. This attribute can
have the following values:
Status

Bid

Ask
The type of order. This attribute can have the following values:

Firm

Withheld

Reference

Indicative

StopOrder
Company
The name of the trader company that owns the order.
CompanyID
The ID of the trader company that owns the order.
Broker
The name of the broker company the order was submitted to.
BrokerID
The ID of the broker company the order was submitted to.
User
The username of the user who added the order to the market. If the order
was submitted by a broker on behalf of a trader, this attribute will contain
the broker's username.
81
Attribute
Description
UserID
The ID of the user who added the order to the market. If the order was
submitted by a broker on behalf of a trader, this attribute will contain the
broker's ID.
Trader
The username of the trader who owns the order.
TraderID
The ID of the trader who owns the order.
OrderType
The type of order. This attribute can have the following values:

GoodTillCancelled
The order will remain in the market until it is cancelled.

GoodForDay
The order will remain in the market until the end of the day it was
submitted.

GoodTillDate
The order will remain in the market until the specified ExpiryTime.

FillOrKill
A type of order used in auto-matching. The order is only placed if it can
be matched in full.

FillAndKill
A type of order used in auto-matching. The system matches as much of
the order as possible, and does not place any remainder in the market.

MarketOrder
An order to buy or sell a commodity as soon as possible at the current
market price.
SystemRank
The system rank of the order. The system rank is used internally by
GlobalVision when sorting orders on the GlobalVision Front-End.
AllOrNone
The all or none status of the order. If the order has been submitted on an
all or none basis, this attribute is set to true. Otherwise, this attribute is set
to false.
Broadcast
Indicates whether the order has been broadcast to other brokers on the
system. This is only used with Trayport’s Multi-Broker Trading System
(MBTS).
CurrentSessionOnly
Indicates if the order is valid only for the current session. If this attribute is
set to true, the order can only be traded during the current session (this is
indicated in the Front‐End by investigating the order). If the session status
changes, the order is withheld. Otherwise, this attribute is set to false.
CounterPartyOk
The currently logged in user's counter party status in relation to this order.
This attribute is set to true if the currently logged in user is allowed to hit
the order. Otherwise, this attribute is set to false.
UnderRightFirstRefusal
Indicates whether an order is subject to the right of first refusal feature.
82
Attribute
Description
ImpliedType
Indicates whether this order is a calculated order, and if so whether the
order has been generated by GlobalVision, or submitted to the market as
an externally generated calculated order. This attribute can have the
following values:

Native
The order is a calculated order that has been generated by
GlobalVision.

External
The order is a calculated order that has been generated externally.

None
The order is not a calculated order.
OrderAction
The trading action associated with a particular activity on an order. This
attribute can have the following values:

Inserted

UpdatedBySystem

UpdatedByUser

PartDealt

DealtHiddenQty

Expired

StopOrderActivated

Dealt

CancelledBySystem

CancelledByUser

Dropped

ExpiredByDelete

ExpiredBySystem
B.20 Annotations
Some trades executed on the Trayport platform carry trade meta data added at the point of execution.
The annotations element shows additional information about the trade. The following table describes some of
the attributes that may appear in an annotations element. Trade meta data on the BTS is automatically added
to the trade record and passed to the TGW API. It is then available programmatically in the <ANNOTATIONS>
node of the GV8 XML API Trade Record.
The following is an example of the XML that might be returned by the API in an annotations element. For a full
list of trade annotations available, see Trade Records.
<ANNOTATIONS>
<NOTE Label="LotSize">1</NOTE>
<NOTE Label="Unit">Lots</NOTE>
<NOTE Label="UnitGUID">133b2c67-0464-4b68-b930-c806d187d967</NOTE>
<NOTE Label="UnitID">33</NOTE></ANNOTATIONS></TRADE></GV8APIDATA>
</ANNOTATIONS>
83
Example ANNOTATIONS Attributes
Attribute
Description
LotSize
The size of each lot.
Unit
The quantity unit to be used for the instrument.
Unit GUID
The GUID of the unit. Stored by the static data XML file.
UnitID
The ID of the unit.
84
Appendix C: XML Action Format
This section describes the XML format used to submit actions to the API. You will need to construct XML strings
in this format in order to provide input to ExecuteAction.
All XML actions passed to the API must be in the following format:
<GV8APIACTIONS>
...
</GV8APIACTIONS>
Note
Use the <GV8APIACTIONS/> tag to enclose trade, and order actions.
C.1 Inserting, Updating, and Deleting Deals
This section describes how to use the <TRADE> element when inserting, updating, and deleting deals. In order
to insert, update, or delete deals through the API, you must be connected to a server that is specifically
licensed to allow either Trader or Broker users to insert deals (depending on your user type).
Additionally, in order to insert trades your user account must have been assigned the Enter Manual Deals and
Read-Only API permissions in the User Administration tool. In order to update or delete trades, your account
must also have been assigned the Deal Editor (read/write) permission.
When inserting a deal, you must include an <INSTSPECIFIER> element within the <TRADE> element to
indicate which instrument the deal applies to. If there are additional terms associated with the instrument, you
can also include some <TERM> elements to set their values for this deal. For more information about the
attributes associated with these elements, see Instrument Specifier and Terms.
Note
When specifying additional terms, you must include a <TERM> element for each of the instrument's terms.
Use the Label attribute to identify each term. For example, <TERM Label="Strike">8.50</TERM>
specifies a value of 8.50 for the term with the name "Strike".
When submitting a deal involving additional terms, you must specify all the terms for both the order entry and
deal phases. In addition, if there are terms that are counter party-specific, then you must explicitly specify
which counter party the terms apply to, using the Counterparty attribute. For example, <TERM
Label="Order Origin" Counterparty="buyer">V</TERM> indicates that the term is specific to the
buyer. If you do not specify the counter party, it will default to common.
Depending on the deal you are inserting, you may also need to include a <TRADECONFIRM> element, which you
can use to force the deal to be added to the system (even if it would otherwise fail, for example because the
counter parties do not have agreements to trade with each other) and to cause a confirmation message to be
displayed on the GlobalVision Front-End. For more information about the attributes associated with this
element, see the table TRADECONFIRM Element Attributes.
The TRADE Element Attributes
Attribute
Description
Action
The deal action to carry out. This attribute can have the following values:

Insert
85
Attribute
Description
Inserts a new deal.

Update
Updates an existing deal.
When you update a deal, you must specify the TradeID, but the only other
attributes that you need to specify are the ones you want to update. Any
attributes that you do not specify will keep their existing values.

Remove
Deletes an existing deal.
When you delete a deal, the only other attribute that you need to specify is
the TradeID.
TradeID
The ID of the deal to update or delete. You must specify this value if you are
updating or deleting a deal. If you are inserting a deal, you should not specify a
TradeID (any value that you do specify in this case will be ignored).
DateTime
The date and time the deal took place (in UTC time, written in ISO 8601 format).
If you do not specify a date and time for the deal, it will be added with the
current date and time.
Price
The price value that the deal took place at.
Volume
The quantity traded.
AggressorCompanyID
The ID of the aggressor company involved in the trade.
AggressorTraderID
The ID of the aggressor trader involved in the trade.
AggressorUserID
The ID of the user who carried out the trade. If you want the trade to indicate
that a broker traded the order on behalf of a trader, specify the broker's ID.
AggressorAction
The action of the aggressor in this trade. You must specify the aggressor action
when inserting a deal. This attribute takes the following values:

Buy

Sell
AggressorBrokerID
The ID of the aggressor broker company.
AggressorAccountID
The ID of the trading account associated with the deal aggressor (if applicable).
This is optional: you can specify the account either by its name (using the
AggressorAccount attribute) or by the account ID. It is not necessary to
specify both the ID and the name although if you do you must ensure that the
ID is the ID associated with the account of that name. If you specify an ID and a
name that do not match, then GlobalVision will return an error.
If you are updating a deal that previously had a trading account associated with
the aggressor, and you want to remove the trading account, then you can do so
by setting this attribute to 0.
AggressorAccount
The Name of the trading account associated with the deal aggressor (if
applicable).
This is optional: you can specify the account either by its ID (using the
AggressorAccountID attribute) or by the account name. It is not necessary to
86
Attribute
Description
specify both the ID and the name, although if you do you must ensure that the
ID is the ID associated with the account of that name. If you specify an ID and a
name that do not match, then GlobalVision will return an error.
If you are updating a deal that previously had a trading account associated with
the aggressor, and you want to remove the trading account, then you can do so
by setting this attribute to an empty string.
InitiatorCompanyID
The ID of the initiator company involved in the trade.
InitiatorTraderID
The ID of the initiator trader involved in the trade.
InitiatorUserID
The ID of the user who carried out the trade. If you want the trade to indicate
that a broker submitted the original order on behalf of a trader, specify the
broker's ID.
InitiatorAction
The action of the initiator in this trade. You must specify the initiator action
when inserting a deal. This attribute takes the following values:

Buy

Sell
InitiatorBrokerID
The ID of the initiator broker company.
InitiatorAccountID
The ID of the trading account associated with the deal initiator (if applicable).
This is optional: you can specify the account either by its name (using the
InitiatorAccount attribute) or by the account ID. It is not necessary to specify
both the ID and the name although if you do you must ensure that the ID is the
ID associated with the account of that name. If you specify an ID and a name
that do not match, then GlobalVision will return an error.
If you are updating a deal that previously had a trading account associated with
the initiator, and you want to remove the trading account, then you can do so
by setting this attribute to 0.
InitiatorAccount
The Name of the trading account associated with the deal initiator (if
applicable).
This is optional: you can specify the account either by its ID (using the
InitiatorAccountID attribute) or by the account name. It is not necessary to
specify both the ID and the name, although if you do you must ensure that the
ID is the ID associated with the account of that name. If you specify an ID and a
name that do not match, then GlobalVision will return an error.
If you are updating a deal that previously had a trading account associated with
the initiator, and you want to remove the trading account, then you can do so
by setting this attribute to an empty string.
VoiceDeal
If you want to indicate that this deal took place over the phone, you can set this
attribute to true. Otherwise, you can either omit this attribute, or set it to false.
InitSleeve
The type of trade. If this trade is a third-party trade where the initiator is trading
on behalf of a company that does not have a trading agreement with the
aggressor, set this attribute to true. Otherwise, you can either omit this
attribute, or set it to false.
87
Attribute
Description
AggSleeve
The type of trade. If this trade is a third-party trade where the aggressor is
trading on behalf of a company that does not have a trading agreement with
the initiator, set this attribute to true. Otherwise, you can either omit this
attribute, or set it to false.
PNC
The trade's confidentiality status. If you want to mark the trade "Private and
Confidential", set this attribute to true. Otherwise, you can either omit this
attribute, or set it to false.
ClearingStatus
The clearing status of the trade (if the instrument uses clearing to determine
whether the counter parties can trade). If the trade does not use clearing, you
can omit this attribute. Otherwise, set it to one of the following values:

N/A

Refused

Pending

Granted
ClearingID
The clearing ID associated with the trade, if applicable.
ClearingHouse
The clearing house that the trade has been sent to.
UnderInvestigation
If you want to indicate that the deal is currently under investigation, set this
attribute to true. Otherwise, you can either omit this attribute, or set it to false.
PostTradeNegotiating
The type of trade. If some of the quantity traded as a result of a period of
volume workup between the counter parties, set this attribute to true.
Otherwise, you can either omit this attribute, or set it to false.
The TRADECONFIRM Element Attributes
Attribute
Description
ForceTrade
If you want to force the deal to be inserted, even if it would otherwise fail (for
example because the counter parties do not have a trading agreement in place),
set this attribute to true. Otherwise, you can either omit this attribute, or set it to
false.
PopupTradeConfirm
If you want a confirmation message about the deal to be displayed on any
connected GlobalVision Front-Ends, set this attribute to true. Otherwise, you can
either omit this attribute, or set it to false.
IgnoreMinQuantity
If you want to override the configured minimum quantity setting for this
instrument, set this attribute to true. Otherwise, you can either omit this
attribute, or set it to false.
In order to override the configured minimum quantity, you must have been
assigned the Ignore Minimum Qty (Manual Deals) user permission. For more
information about user permissions, see the User Administration Tool section of
the Administration Guide.
When a deal is successfully inserted, the GlobalVision API returns a response in XML similar to the following:
<GV8APIREPLIES xmlns="gv8api-Trayport-com">
88
<REPLY Code="0" Message="Success." Reason="">
<RESULT EngineID="0">96</RESULT>
</REPLY>
</GV8APIREPLIES>
The returned XML indicates the TradeID of the inserted deal (in this example, the ID of the inserted deal is
96).
Example: Inserting a Deal
The following XML string inserts a deal for the instrument with ID 126.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<TRADE Action="Insert" DateTime="2006-05-15T12:21:42.000" Price="8.50"
Volume="25" AggressorCompanyID="85" AggressorTraderID="3" AggressorUserID="3"
AggressorAction="Sell" AggressorBrokerID="2" InitiatorCompanyID="108"
InitiatorTraderID="14" InitiatorUserID="14" InitiatorAction="Buy"
InitiatorBrokerID="2" VoiceDeal="true" InitSleeve="false" AggSleeve="false"
PNC="false">
<INSTSPECIFIER InstID="126" FirstSequenceID="1" SeqSpan="Single"
FirstSequenceItemID="31" TermFormatID="1" />
<TRADECONFIRM PopupTradeConfirm="true"/>
</TRADE>
</GV8APIACTIONS>
Example: Inserting a Deal with Additional Terms
The following example XML string inserts a deal for an instrument that has additional terms. In this case, the
instrument has an account reference that is specific to the counter parties, so the Counterparty attribute is
used to indicate which counter party each term applies to.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<TRADE Action="Insert" Price="8.50" Volume="100" AggressorCompanyID="85"
AggressorTraderID="3" AggressorAction="Sell" AggressorBrokerID="2"
InitiatorCompanyID="108" InitiatorTraderID="14" InitiatorAction="Buy"
InitiatorBrokerID="2" VoiceDeal="true" InitSleeve="false" AggSleeve="false"
PNC="false">
<INSTSPECIFIER InstID="136" FirstSequenceID="1" SeqSpan="Single"
FirstSequenceItemID="31" TermFormatID="1" />
<TERM Label="Account Reference"
Counterparty="buyer">1000121425</TERM>
<TERM Label="Account Reference"
Counterparty="seller">121245454512</TERM>
<TERM Label="Strike Price">1.50</TERM>
89
<TRADECONFIRM PopupTradeConfirm="true"/>
</TRADE>
</GV8APIACTIONS>
C.2 External Reference Prices
You can use the <EXTREFPRICE> element to set an instrument's External Reference Price (ERP). ERPs are
used in certain types of spread trading.
To set or remove an ERP, use the <EXTREFPRICE> element with the following attributes. In addition, the
<EXTREFPRICE> element must contain an <INSTSPECIFIER> element that identifies the instrument to set
the ERP on. For more information about the attributes associated with the <INSTSPECIFIER> element, see
Instrument Specifier.
The ORDER Element Attributes
Attribute
Description
Action
Either Set to set the ERP, or Remove to remove an existing ERP.
Price
The price value of the ERP. You must only specify a price if you are setting the ERP. It is an
error to specify a price value if Action is set to Remove.
Type
The type of ERP. This attribute takes values of either ExternalReferencePrice or
ExternalClosePrice, depending on the type of ERP that you are setting or removing.
This attribute is optional. If you do not specify a type, it will be set to the default
(ExternalReferencePrice).
When an ERP is successfully set, the GlobalVision API returns a response in XML similar to the following:
<GV8APIREPLIES xmlns="gv8api-Trayport-com">
<REPLY Code="0" Message="Success." Reason=""/>
</GV8APIREPLIES>
Note
Only users who have been assigned the Insert External Reference Prices permission in the User
Administration Tool will be able to use the API to set and remove ERPs.
In addition, any ERP that is set through the API will not be used in a spread calculation on this instrument
unless the instrument has been configured with the Use External Reference Price and Break Period Spread
Deals flags selected on the Sequence Adapter.
For more information about configuring user permissions and instrument settings, please refer to the
Administration Tools Guide.
Example: Setting the ERP
The following XML sets the ERP on the sequential spread instrument with ID 696. If there is currently an ERP set
on this instrument, it will be overridden with the new value.
90
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<EXTREFPRICE Action="Set" Price="8.55">
<INSTSPECIFIER InstID="696" SeqSpan="Single" FirstSequenceID="1"
FirstSequenceItemID="85"/>
</EXTREFPRICE>
</GV8APIACTIONS>
Example: Removing the ERP
The following XML removes any ERP that has been set on the sequential spread instrument with ID 696.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<EXTREFPRICE Action="Remove">
<INSTSPECIFIER InstID="696" SeqSpan="Single" FirstSequenceID="1"
FirstSequenceItemID="85"/>
</EXTREFPRICE>
</GV8APIACTIONS>
C.3 Market Events
The MARKET EVENT element creates, updates, or deletes a Market Event.
This section describes the format of the MARKET EVENT element, and its child elements, the <ACTIONS>,
<INSTRUMENTS>, and <GROUPS> elements.
MARKETEVENT Element Attributes
Attribute
Description
Action
The action that you are carrying out. This attribute can have the following values:
ID

Update
Updates an existing Market Event. The only aspect of a Market Event that you can update
is the status. In order to update the status, you must set the Action to Update, and specify
the event's ID and the new status (using the ID and Status attributes). Do not specify any
other settings.

Insert
Adds a new Market Event. In order to create a new event, you must include the ACTIONS
and INSTRUMENTS child elements to indicate the actions to carry out as part of this
Market Event, and the instruments that the event applies to.

Delete
Removes an existing Market Event. To remove a Market Event, set the Action to
Delete, and specify the event's ID. Do not specify any other settings.
The ID of the Market Event. You must specify the ID when updating or deleting an existing
91
Attribute
Description
Market Event, but you must not specify an ID when inserting a new event (when you create a
new event, an ID will be assigned automatically by the system).
Name
The name of the Market Event. This is optional.
Status
The Market Event's status. You can set this attribute to one of the following values:
DateTime

Enabled
The Market Event is active and will fire at the specified time (or immediately if no time is
specified). By default, all Market Events are enabled, so this does not need to be specified
when creating a new Market Event. However, you can specify this value if you are
updating the status of an existing event (for example to change the status from Disabled
to Enabled).

Disabled
The Market Event is disabled and will not fire unless the status is changed before the time
it is due to fire. You can only set the status to this value if the event has a scheduled time.

Template
The Market Event is a template to be used in the GlobalVision Front-End as a basis for
creating other Market Events.
The date and time that the Market Event is scheduled for (in server local time). You cannot
schedule a Market Event more than 28 days in the future.
Note
If you omit this value, or specify a time in the past, the Market Event will fire immediately
(this is referred to as a Run Now Market Event).
MARKETEVENT Child Elements
Element
Description
ACTIONS
The Market Event actions. This element can contain the following child elements:
STARTAUCTION
Indicates that this Market Event initiates an auction on the specified instruments.
You must set the Action attribute to one of the following values to indicate the type of
auction to start:

OpeningAuction

IntradayAuction

ClosingAuction

SENDMESSAGE
Specifies a message to send out as part of the Market Event. This element has a Message
attribute that contains the message itself.
The message will appear in Market Event records returned by the API.
OVERRIDEINSTRUMENTSTATUS or SETINSTRUMENTSTATUS
This element indicates the new status of the instruments after the Market Event has fired.
This element can contain any of the following child elements, which correspond to the
check boxes in the instrument status section of the Market Events Dialog in the
92
Element
Description
GlobalVision Front-End. To select the options, specify the child element. Omitting any of
these elements is equivalent to deselecting the option in the Market Events Dialog.

ALLOWORDERENTRY

ALLOWMANUALDEAL

ALLOWORDERVOLUMEREDUCTION

ALLOWTRADING

DISALLOWORDERWITHDRAWAL
This element also has a StatusString attribute, which you must use to set the
instrument status string if you are overriding or setting the instrument status. The status
string will be displayed on the Front-End, if the Work Sheet has been configured to show
either an Instrument Details Object or an Instrument Group Object that includes the
Current Instrument Status field.
The DISALLOWORDERWITHDRAWAL element only applies if the GlobalVision server has
been specifically configured to enable this option. If the corresponding setting (Disallow
Order Withdrawal) does not appear when configuring Market Events in the GlobalVision
Front-End, then your system has not been configured to allow this setting, and it does not
apply to you. If you would like to have this setting enabled on your system, please contact
Trayport Support.
Note
In some cases, the GlobalVision server is configured such that the series of sessions
functionality is controlled entirely by Market Events. If this is the case, then the system
does not use any of the series of sessions settings defined in Instrument Creation, but
instead applies the settings from special "session" Market Events, which can only be
created through the API.
If your GlobalVision server has been configured to use session Market Events, then you
can use the SETINSTRUMENTSTATUS element instead of the
OVERRIDEINSTRUMENTSTATUS element to create and update session Market Events.
Both elements have the same attributes and child elements.
When GlobalVision is configured to use session events, you can use the
OVERRIDEINSTRUMENTSTATUS element to temporarily override the settings from the
previous session event. You can subsequently use a REVERT element to revert to the
settings from the session event.
If your system has not been configured to use session events, then you will not be able to
use the SETINSTRUMENTSTATUS element. Please contact Trayport Support for assistance
configuring your server to use session Market Events.

REVERT
Reverts the instrument status to the session defaults (as defined by the series of
sessions, or the last session event, if your system is configured to use session events
rather than the Instrument Creation series of sessions functionality).

MARKET EVENT
Can include either an OVERRIDEINSTRUMENTSTATUS child element, or a REVERT
element, but not both.

PRICEACTION
Specifies a price action to carry out as part of the Market Event. This element has an
Action attribute, which can be set to either WithdrawPrices or DeletePrices. If
you do not want to withdraw or delete the orders in the market for this instrument,
then omit this element.
93
Element
Description
INSTRUMENTS
The instruments that this Market Event applies to. This element must contain an
<INSTSPECIFIER> element for each instrument that the Market Event applies to.
The <INSTSPECIFIER> must contain an InstID attribute (indicating the ID of the
instrument). If the instrument is a sequential instrument, it must also contain a
FirstSequenceID attribute (indicating the ID of the sequence on this instrument that
this Market Event applies to).
The Market Event action can contain either an INSTRUMENTS child element or a GROUPS
element, but not both.
GROUPS
The instrument groups that this Market Event applies to.
If you want to indicate that the event applies to all groups, you can use an empty
<GROUPS/> element. Alternatively, to specify that the event applies to one or more
specific instrument groups, include one or more child <GROUP> elements with the Name
attribute set to the name of the group that you want the event to apply to.
If your instrument group hierarchy includes nested groups, and you want to identify a
specific group or groups within this hierarchy, then you must replicate the hierarchy when
specifying the group by nesting <GROUP> elements within each other. For example, if your
instrument groups include a Coal group, which in turn contains an API2 group, an API4
group, and a API5 group, and you want to create an event that applies to the API2 group
and the API4 group but not the API5 group, then you would identify this group using the
following XML:
<GROUPS>
<GROUP Name="Coal">
<GROUP Name="API2"/>
<GROUP Name="API4"/>
</GROUP>
</GROUPS>
If you want the event to apply to all the sub-groups, you can instead specify just the
parent group, as follows:
<GROUPS>
<GROUP Name="Coal"/>
</GROUPS>
The Market Event action can contain either an INSTRUMENTS child element or a GROUPS
element, but not both.
When a Market Event is successfully inserted, the GlobalVision API returns a response in XML similar to the
following:
<GV8APIREPLIES xmlns="gv8api-Trayport-com">
94
<REPLY Code="0" Message="Success." Reason="Success.">
<MARKETEVENTRESULT ID="25"/>
</REPLY>
</GV8APIREPLIES>
The returned XML indicates the ID of the inserted Market Event (in this example, the ID of the Market Event is
25).
Example: Creating a new Market Event to Halt Trading
The following XML submits a new Market Event:

The Market Event overrides the instrument status, and does not specify any of the instrument settings, so
no market activity will be allowed once the event has run.

The Market Event does not specify a time, so it will run immediately.

The Market Event includes a message ("Market Halted").

The Market Event specifies the WithdrawPrices action, so all orders currently in the market for the
specified instruments will be withdrawn.

The Market Event applies to the sequences with IDs 1 and 2 on the instruments with IDs 233 and 234.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<MARKETEVENT Action="Insert" Name="Halt Trading">
<ACTIONS>
<SENDMESSAGE Message="Market Halted"/>
<OVERRIDEINSTRUMENTSTATUS StatusString="Market Halted"/>
<PRICEACTION Action="WithdrawPrices"/>
</ACTIONS>
<INSTRUMENTS>
<INSTSPECIFIER InstID="233" FirstSequenceID="1"/>
<INSTSPECIFIER InstID="233" FirstSequenceID="2"/>
<INSTSPECIFIER InstID="234" FirstSequenceID="1"/>
<INSTSPECIFIER InstID="234" FirstSequenceID="2"/>
</INSTRUMENTS>
</MARKETEVENT>
</GV8APIACTIONS>
Example: Creating a new Market Event to Allow Trading
The following XML submits a new Market Event:
95

The Market Event overrides the instrument status, so that order entry, trading, and manual deals are all
now permitted.

The Market Event does not specify a time, so it will run immediately.

The Market Event includes a message ("Start Trading").

The Market Event applies to the instrument group with the name "Coal" and the instrument group with
the name "Gas".
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<MARKETEVENT Action="Insert" Name="Start Trading">
<ACTIONS>
<SENDMESSAGE Message="Start Trading"/>
<OVERRIDEINSTRUMENTSTATUS StatusString="Start Trading">
<ALLOWORDERENTRY/>
<ALLOWTRADING/>
<ALLOWMANUALDEAL/>
</OVERRIDEINSTRUMENTSTATUS>
</ACTIONS>
<GROUPS>
<GROUP Name="Coal"/>
<GROUP Name="Gas"/>
</GROUPS>
</MARKETEVENT>
</GV8APIACTIONS>
Example: Updating a Market Event
The following XML updates the Market Event with IDs 25 and 26, setting the status of both events to Disabled.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<MARKETEVENT Action="Update" ID="25" Status="Disabled"/>
<MARKETEVENT Action="Update" ID="26" Status="Disabled"/>
</GV8APIACTIONS>
Example: Deleting a Market Event
The following XML deletes the Market Events with IDs 123, 124, and 125.
96
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<MARKETEVENT Action="Delete" ID="123"/>
<MARKETEVENT Action="Delete" ID="124"/>
<MARKETEVENT Action="Delete" ID="125"/>
</GV8APIACTIONS>
C.4 Starting a Matching Session
The <STARTMATCHINGSESSION> element creates a new Matching Session. This section describes the format
of the <STARTMATCHINGSESSION> element, and its attributes.
When starting a session, you must include an <INSTSPECIFIER> element within the
<STARTMATCHINGSESSION> element to indicate which instrument the session applies to.
For more information on Matching Sessions, see the Liquidity Sessions Guide.
STARTMATCHINSESSION Element Attributes
Attribute
Description
Price
The price for the instrument during the matching session.
Duration
The duration of the matching session. This should be specified in seconds.
Example: Starting a Matching Session
The following XML starts a Matching Session with a price of 10.00 and a duration of 20 seconds. The details of
the instrument that the session is applied to are specified within an <INSTSPECIFIER> element.
<?xml version="1.0" standalone='yes'?>
<GV8APIACTIONS>
<STARTMATCHINGSESSION Price="10.00" Duration="20">
<INSTSPECIFIER InstID="27" SeqSpan="N/A"/>
</STARTMATCHINGSESSION>
</GV8APIACTIONS>
97
Appendix D: Return Codes and Messages
The API uses return codes and messages to indicate the outcome of a function. This section describes the
possible return codes and explains what they mean.
API Return Codes and Messages
Code
Message
Explanation
0
Success
The operation has completed successfully.
1
The XML does not validate.
An XML string provided as input to the API functions must be well-formed
(it must contain elements that are properly delimited and nested) and valid
(it must conform to the rules defined in the schema). The API uses
Microsoft XML Parser to parse and validate XML strings. If you receive this
message, it indicates that your input has failed the validation process.
If the validation fails, the API returns any error messages from Microsoft
XML Parser in the Reason attribute of the return message. For example:
<GV8APIREPLIES xmlns="gv8api-Trayport-com">
<REPLY Code="1" Message="The XML does not validate."
Reason="The element: &apos;{gv8- Trayportcom}DISCONNECT_ACTION&apos; has an invalid value
according to its data type. Line:1 Row:101"/>
</GV8APIREPLIES>
2
Network Error.
The server did not reply in time to the request. By default, all requests are
subject to a timeout of two minutes.
3
COM Error.
An error associated with COM has occurred (this error is probably caused
by Microsoft XML Parser). Check that Microsoft XML Parser is correctly
installed, and try again.
4
MS XML DOM Error.
Microsoft XML Parser caused an error, or failed to load. Check that
Microsoft XML Parser is correctly installed, and try again.
5
Unknown error.
This type of error is generated when the API cannot determine the cause of
the error. Contact Trayport for assistance with this type of error.
6
Error deleting Market
Event.
There has been an error deleting the Market Event.
7
Error updating market
event.
There has been an error updating the Market Event.
8
Error inserting market
event.
There has been an error inserting the Market Event.
9
Client and Server version
mismatch.
The client and server versions of the software are different.
107
The order does not exist.
The order may have been deleted from the system. Therefore the actions
cannot be applied to the order.
108
The action was refused by
the server.
The server cannot process the requested transaction.
98
Code
Message
Explanation
110
This server does not
support this action.
The server cannot process the requested transaction.
116
Permission denied.
You may not have the permissions required to carry out the transaction.
118
Invalid term format for this
group/instrument.
The TERM data validation failed. Check the available term formats.
119
The trader ID could not be
found.
The request either did not specify a trader ID, or specified an invalid trader
ID.
120
The company ID could not
be found.
The request either did not specify a company ID, or specified an invalid
company ID.
121
Missing
This error refers to the BrokerID. If the BrokerID is not missing it could
indicate that the user does not have read permissions over the broker even
if it is specified (a default ID of 1 will apply if it is not specified).
BrokerCompanyID.
130
Invalid clearing state.
You have attempted to insert or update a deal without setting a valid
ClearingStatus for the deal.
131
Not a clearing instrument.
You have attempted to set the ClearingStatus or ClearingID of a
deal you are inserting or updating, but the instrument does not use
clearing.
132
The trade does not exist.
You have attempted to delete a deal that does not exist. Check that you
have specified the correct TradeID for the deal you are attempting to
delete.
133
The initiator company does
not exist.
You have attempted to insert or update a deal, but the initiator company
you have specified does not exist.
134
The initiator broker does
not exist.
You have attempted to insert or update a deal, but the initiator broker
company you have specified does not exist.
135
The initiator trader does not You have attempted to insert or update a deal, but the initiator trader you
exist.
have specified does not exist.
136
The initiator user does not
exist.
You have attempted to insert or update a deal, but the initiator user you
have specified does not exist.
137
The aggressor company
does not exist.
You have attempted to insert or update a deal, but the aggressor company
you have specified does not exist.
138
The aggressor broker does
not exist.
You have attempted to insert or update a deal, but the aggressor broker
company you have specified does not exist.
139
The aggressor trader does
not exist.
You have attempted to insert or update a deal, but the aggressor trader
you have specified does not exist.
140
The aggressor user does not You have attempted to insert or update a deal, but the aggressor user you
exist.
have specified does not exist.
141
Missing instrument
specifier.
You have attempted to insert or update a deal, but you have not provided
an instrument specifier to indicate what instrument the deal relates to.
99
Code
Message
Explanation
142
A required attribute is
missing.
You have attempted to insert or update a deal, but you have not specified a
required attribute.
143
Inconsistent initiator and
aggressor actions.
You have attempted to insert or update a deal, but have not correctly set
the AggressorAction and the InitiatorAction. You must specify both when
inserting or updating a deal.
160
The Trading Account does
not exist.
You have attempted to submit a trade with an associated trading account,
but the account information does not match any of the configured trading
accounts.
163
The record may not contain The record is not allowed both price and settlement price in its attributes.
both price and settlement
price.
164
Invalid value for PNC
specified.
You have attempted to submit a deal with the PNC attribute set to true, but
the Voice Deals are not PNC option has been selected for this instrument in
the Instrument Administration Tool. When this option is selected, manual
(voice) deals are not considered Private and Confidential (PNC).
201
Invalid disconnect action.
You have attempted to set the disconnect action using SetAPIOptions, but
you have specified an invalid disconnection action. For full details of the
valid options for setting the disconnect action, see SetAPIOptions.
202
Invalid connection option.
The attempt to connect has been rejected by the API.
203
Password could not be
changed.
The user's password could not be changed. This may be because the old
password specified was incorrect, or because the new password does not
meet the user ’s password policy.
If you receive this error on attempting to log in to the API, then this is
because you have previously initiated a failed password change request.
You must use SetAPIOptions either with an empty
<CONNECTIONOPTIONS/> string, or to successfully change the password
before you will be able to log in to the API again.
300
Not logged in.
Your application must login using a valid API user account in order to use
any of the API functions. Login to the API, using either Login or LoginGUI,
and try again.
301
Login failure.
The login request has failed. This may be due to problems with the
connection, problems with authentication, or problems with permissions.
302
Already logged in.
Your application has attempted to login with a user account that is already
logged in.
303
Password needs changing.
The password on this account must be changed before your application can
successfully log in. Your application should use SetAPIOptions to change the
password, and then attempt to log in again. Alternatively, you can change
the password manually by logging in to the GlobalVision Front-End.
304
Login aborted.
This message is generated when your application uses LoginGUI to attempt
to login, and the API user clicks cancel on the login window.
100
Code
Message
Explanation
305
Crypto failure.
Data could not be encrypted for transmission. Check that the API is installed
correctly, and check the Microsoft Windows login permissions, and try
again.
306
Connection Lost.
The function could not be completed because the connection to the server
was temporarily lost.
307
Invalid Engine ID.
You have attempted to submit an order with an engine specified that is not
valid for the type of order. For example, this error would be generated if
you attempted to submit a feed order for an instrument that does not have
a price feed engine.
309
The action rate has been
exceeded for this
connection.
This message indicates that too many actions have been received from this
application within a short space of time. Your application should wait for a
short period before resubmitting the action (the text in the message will
indicate how long it should wait). This is designed to prevent any particular
application from overloading the server by sending too many actions too
quickly.
318
Instrument code change
rejected. Too many
attributes supplied.
The instrument cannot be updated as the number of supplied attributes do
not match those that the instrument has.
343
Invalid Market Event ID
specified.
You have tried to update or delete a Market Event but the ID you have
specified for the Market Event is not valid.
344
The status is not valid for
the Market Event.
You have attempted to set the Market Event's status to a setting that is not
valid.
345
No actions specified on the
new Market Event.
You have tried to create a Market Event but have not specified any actions.
346
No targets specified on new You have tried to create a Market Event but have not specified any
Market Event.
instruments.
347
One of the specified targets One of the instruments or groups you have specified in your Market Event
does not exist.
does not exist.
348
Invalid target specified.
One of the instruments or groups you have specified in your Market Event
is not valid.
349
Internal Market Event
selected.
You have attempted to delete an internal Market Event. Internal Market
Events are created automatically by the system and cannot be deleted.
350
Set Instrument Status
Actions are not allowed on
this Server.
You have attempted to use the SETINSTRUMENTSTATUS child element
without first configuring the server not to use the default series of sessions
settings.
352
Revert cannot be specified
with override/set
instrument status for a
single event.
You have attempted to create a Market Event but have attempted to
include a REVERT element and either an OVERRIDEINSTRUMENTSTATUS or
SETINSTRUMENTSTATUS element. A Market Event can either set/override
the instrument status, or revert the instrument to the default. You cannot
include both types of element within the same ACTIONS element.
353
Status String must be
You have attempted to create a Market Event that changes the instrument
101
Code
Message
Explanation
specified with override/set
instrument status.
status, but have not specified a value for the StatusString attribute. The
status string is required when overriding or setting the instrument status.
354
You have exceeded the
maximum number of server
side instrument
subscriptions.
Your server uses the subscriptions feature to control the amount of
bandwidth used on the server, and you have attempted to subscribe to
updates on more instruments than your configured subscription limit
allows. You will need to unsubscribe to some of the instruments that you
are already subscribed to before you can make additional subscriptions.
355
The server rejected your
subscription changes.
The GlobalVision server has rejected your subscription changes. This is
probably because you have attempted to subscribe to more instruments
than you are permitted to subscribe to.
356
You do not have sufficient
permissions to subscribe to
all instruments at once. You
must specify which
instruments you are
interested in.
You have attempted to subscribe to more information than you are
permitted to subscribe to.
Could not load key files
There was a problem loading the public key file for connecting to the
GlobalVision server. Check that the correct key file is available in the same
directory as the API DLL, and try to connect again.
357
102
You should limit your subscription query to a smaller number of
instruments and submit the subscription request again.
Appendix E: GlobalVision 8 API Change History
This Appendix provides details of changes that have been made to the API in the different versions of
GlobalVision 8. If you have an application written against an earlier version of the API, you should check these
details to see what changes you need to make to your application (if any) to support the latest version of the
API.
Version
Change(s)
8.12.1
The <HISTORICALORDERS> and <ORDERHISTORY> query elements have been added.
8.12.0

The <INSTATTRIBUTESDATA> and <HISTORICALTRADES> query elements have been added.
You can also subscribe to the <INSTATTRIBUTESDATA> query.

The <INSTATTRIBUTES> element has been added.

Annotations have been added. These specify additional metadata for companies, users and
trades, including brokerage rates and instrument static reference data.

ContractSize is included for relevant <TRADE> elements.

CreationTime has been added to the <USER> element.

The <STARTMATCHINGSESSION> element has been added, allowing users to create matching
sessions.
8.6.8
8.6.2
8.6.0
8.5.8
A <JTTSETTINGS> element has been added allowing users to query instruments that are JTT
enabled.

It is now possible to query User Permission Group information in the API.

The FromBrokenSpread, InitiatorBrokerage, and AggressorBrokerage attributes
have been added to the trade record.

The OverrideCredit has been added to the <TRADECONFIRM> element.
For consistency, the AllowGoodTilDate attribute in the instrument properties record format
has been renamed to AllowGoodTillDate.

The <MARKETEVENTS> element was added to allow users to interact with Market Events
through the API.

The InstStatus attribute was added to the instrument properties record format.

The SettlementPrice attribute was added to order and trade records, and the
AuctionedDeal attribute was added to trade records.

The <SETTLEMENTSETTINGS> element was added, and the HasSettlementPrice
attribute was added to the <TRADINGFLAGS> element, to enable users to set the settlement
price properties through the API.

The "price-setting" and auction attributes were added to the <INSTTRADESUMMARY>
element.

The API has been modified as a result of changes to the way price steppings are defined in
GlobalVision. This change affects the record format used to represent price steppings.
103
Version
Change(s)
8.5.6

The <EXTREFPRICE> element was added to allow users to use the API to set an instrument's
External Reference Price (ERP).

The <TERM> element has been modified so that it is now possible to use the Label attribute
to identify the terms being specified.

In previous versions of the API, the terms had to be specified in exactly the same order as they
were defined. To provide backwards compatibility, the API continues to support the old
method, but you are recommended to use the new method in future.

The <TERM> element now has new Phase and Counterparty attributes to support the new
phase and counter party specific types of price format that were introduced in this release.
Prior to the introduction of the new price format functionality, price formats always had a
phase equivalent to order and a Counterparty equivalent to common. Therefore, for
backwards compatibility reasons, these settings are the defaults and the attributes can
therefore be omitted if the term is specified at order entry and common to both counter
parties.
8.5.4
8.5.2-1
The <GROUPS> element was added so that it is now possible to use the API to query for
information about instrument groups, and to modify the groups.

Subscribe and Unsubscribe to <INSTTRADESUMMARIES> and <INSTORDERSUMMARIES>
is fully supported as of 8.5.2.2706. This was first introduced in 8.3.0.

The <INSTPROPERTIES> element was added to make it possible to use the API to query for
instrument properties.

The <ORDERS> query format was updated so that it is now possible to query for details of a
specific order by specifying the order's ID and transaction engine ID (within the
<ORDERIDENTIFIER> child element).

The API was updated to add the ability to retrieve details of orders that have been
automatically generated based on other orders in the market. The ImpliedType attribute was
added to the ORDER record format to indicate whether or not an order is a calculated order.

The <ORDER> record format now also contains a <CONSTITUENTS> element that identifies
the individual orders that have been used to calculate the order.
Note
In order to configure whether or not the API should return calculated orders, you must use the
<CALCULATED_PRICES> element of the SetAPIOptions method.
Please note that this feature is subject to additional licensing. You will not be able to retrieve
details of calculated orders through the API unless your server is appropriately licensed.

The TRADINGACCOUNTS element was added. You can use this element to receive details about
the configured trading accounts.
The <ORDER> and <TRADE> record formats were also updated to show trading account
information.
<ORDER> records now have AccountID and AccountName attributes, and <TRADE> records
have AggressorAccount, AggressorAccountID, InitiatorAccount, and
InitiatorAccountID attributes.

104
The StopPrice attribute was added to the <ORDER> record format.
Version
Change(s)
8.4.0

The PersistentOrderID attribute of the <ORDER> record format was modified so that it is
only returned if the API user has identify permission over the order. This ensures that it is not
possible for users to track orders during periods when the user does not have the appropriate
permissions.

The AggressorVoiceDealConfirmState and InitiatorVoiceDealConfirmState
attributes were added to the <TRADE> record format to indicate whether the counter parties
have confirmed the deal details (when voice deals that require confirmation are added to the
system).

The OrderID attribute was added to the <TRADE> record format.
8.3.6
The UnderRightFirstRefusal attribute was added to the <ORDER> record format to indicate
whether an order is subject to the right of first refusal feature.
8.3.4
The Duration attribute was added to the <ORDER> element.
8.3.0

The <INSTTRADESUMMARIES> and <INSTORDERSUMMARIES> elements were added. You can
use these elements to retrieve summary information about orders and trades.

The (unused) <INSTRUMENTSUMMARY> element was removed.

The <ENGINEID> element was removed from the <TRADES> element.

As a result, <TRADE> information returned from queries and subscriptions no longer contains
the EngineID attribute.

The OrderType attribute of the <ORDER> element was changed to take the following
additional values:

GoodForDay

GoodTillDate

GoodTillCancelled (this replaces GoodUntilCancelled).

The ExpiryTime attribute was added to the <ORDER> element.

The InitiatorOwnedSpread and AggressorOwnedSpread attributes were added to the
<TRADE> record format.
105
Glossary
The following table provides definitions of the terms used in this document.
Term
Definition
Aggressor
Someone who hits a bid or lifts an offer in GlobalVision.
All or None
An order that is All or None can only be dealt if it is dealt in full. All or None orders in
GlobalVision are displayed with an asterisk next to the price value.
Ask
The ask price is the sell price.
The best ask price is the single lowest price. For example, if you want to buy 10 barrels
of oil and there is one potential seller who is asking £5 per barrel and another who is
asking £8 per barrel, your preference will be to buy from the seller who is offering the
lowest price as this as this is the price that benefits you the most.
On the trading screen, the best ask price is displayed as the lowest price.
Auto-Matching
In some markets it is appropriate for a deal to take place automatically when there is a
matching bid and ask for the same instrument and sequence. This process is referred to
as auto-matching.
Bid
The bid price is the buy price.
The best bid price is the single highest price. For example, if you want to sell 10 barrels
of oil and there is one potential buyer who is willing to pay £5 per barrel and another
who is willing to pay £8 per barrel, your preference will be to sell to the buyer who is
willing to offer the highest amount as you would stand to make a higher gain from the
second buyer.
On the trading screen, the best bid price is displayed as the highest price.
COM
Component Object Model.
An object-oriented programming model that defines how objects interact within an
application or between applications.
Counter party
One of the participants involved in a trade.
Domain Name
The internet name for a network or computer system. The name consists of a sequence
of characters separated by dots, for example server.company.com.
EPS
The External Position System (EPS), checks a user's position limits every time an order
or deal is submitted in GlobalVision. The EPS uses the Risk API in conjunction with
GlobalVision to inform IPTS whether or not to allow the action to take place, and IPTS
processes the deal or order accordingly.
Fill And Kill
A type of order that is used in some markets. A Fill and Kill order is submitted to the
market on the basis that as much as possible of the order should be filled, and the
remainder should be cancelled if it cannot be fulfilled in its entirety almost immediately.
Fill Or Kill
A type of order that is used in some markets. A Fill Or Kill order is submitted to the
market on the basis that it should be cancelled if it cannot be fulfilled in its entirety
almost immediately.
106
Term
Definition
Front-End
Traders who want to carry out deals with GlobalVision use a program called the
GlobalVision Front-End. The Front-End displays a Work Sheet into which orders can be
entered, and deals can be done.
Hidden Quantity
An order with hidden quantity (also referred to as an iceberg order) is used to divide a
large order into smaller portions. Only the first portion (the tip of the iceberg) is
displayed on screen. When the first portion is dealt, GlobalVision automatically submits
the next part of the order (the hidden quantity) until the full volume is traded.
GlobalVision can optionally change the price by a specified amount every time a portion
is dealt (referred to as the delta).
Initiator
A person who submits an order to the market.
IP Address
An IP (Internet Protocol) address is a special number used to uniquely identify all the
computers on a network, such as the internet. It takes the form of four numbers
separated by dots, for example 192.168.122.1.
ISO 8601
An international standard for the representation of dates and times.
Keep-Alive Messages
Messages sent between a server and a client to indicate that the connection is still
active. For example, the GlobalVision Front-End and the GlobalVision server send keepalive messages to each other at regular intervals. If either one stops receiving the
messages, it automatically drops the connection.
Market Order
An order to buy or sell a commodity as soon as possible at the current market price.
Period
The period by which a payment is to be made or received. Periods are usually displayed
on the left hand side of a Work Sheet. Periods are associated with sequence items in
GlobalVision.
Price-Setting Trades
Price-Setting trades are only used in certain markets. A trade is considered to be price
setting if it is on-market and above a certain minimum size threshold.
Proxy Server
A server that acts as an intermediary between a user's computer and a network, (such
as the Internet). When the user requests some information from the network, such as a
web page, the request is routed through the proxy server rather than being sent
directly. The proxy server retrieves the information on behalf of the user, and returns it
to the user's computer. Proxy servers are often used in corporate networks, where they
form an additional layer of security between the end user and the Internet.
Server
A computer that is designed to be accessed by many other computers to provide access
to shared files and data. For example, when you visit a web page on the Internet, your
computer sends a request to the server hosting that website. The server responds to
the request by returning the page to your computer where it is displayed in your web
browser.
The GlobalVision server is one of the central components of GlobalVision. The server is
a central resource that provides price and market information to the traders, and also
allows deals to take place.
107
Term
Definition
Spread
Either:

the difference between the bid and the offer, or the profit margin, or

the simultaneous purchase and sale of two instruments in a single on-screen
transaction. For example, NBP March 2014 x April 2014 would buy NBP March 2014
and sell NBP April 2014 at the same time. This strategy tries to transform outright
price risk into a basis or relationship risk position.
Stop Order
An order to buy or sell a commodity/stock when its market value reaches a certain price
(known as the stop price). When the stop price is reached, a stop order becomes a
market order.
URL (Uniform
Resource Locator)
Uniform Resource Locator.
The address of a specific web site or file on the internet. A URL cannot have spaces or
certain other characters and uses forward slashes to denote different directories
Volume Dealing
108
In GlobalVision, the term Volume Dealing refers to any deal where the volume
requested for a deal is created by the system by combining the available volume in a
number of individual orders. GlobalVision automatically calculates the best way to
create the required volume based on the orders currently available in the market.