Skip to main content

Trayport .NET Trade Connector

Features

custom-trayportConnector Key
Instruments
FUTURE
Request Types
SUBMITCANCELREPLACE
Order Types
MARKETLIMIT
Time In Force
GTCIOCFOK
Order ID Mapper
CUSTOM
Order Status Request
Cancel On Disconnect
Commission
Post Only
Fast Cancel
Fast Replace

Notes

Description

Trayport Connector is Windows console application running under .NET Framework 4.7.
It accepts incoming orders by FIX (Deltix FIX Dialect) and sends them further to Trayport via GV API.
On Ember side you should use Ember (ES5) Trade Connector to communicate with Trayport Connector app.

Communication

graph LR
subgraph Ember
Algo-->TC[Ember TC]
end
subgraph TR[Trayport Connector]
FG[FIX Gateway]-->C[GV Connector]
end
TC==FIX==>FG
C==GV API==>Exchange

Shutdown

For graceful shutdown press Ctrl+Q

Time In Force

Unfortunately Trayport does not reject orders with wrong TIF.
For example, if instrument does not support IOC/FOK Time In Force order is silently open as GTC.

Rate Limits

A rate limiter prevents more than 25 trades per second for each provider. If more than 25 private order updates are received, the "Private quotes rate limit exceeded" error will be displayed. After one second, more order updates can be submitted.

TradeOrder Action

To use trade order action instead of order you need to fill quoteID in new order request. Supported two formats:

  • engineId#brokerId#orderId
  • orderId (in this case engId and brokerId will be set to 0)

Also supported MiFID attributes like for Order action

Trayport Connector Deployment

Prerequisites

  • Add NEXUS_USER and NEXUS_PASS to env variables
  • Start PowerShell as Administrator
    # update ExecutionPolicy if needed
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Download and Deploy Trayport connector

Define connector home, download and extract connector via script below:

PowerShell Script
$TrayportConnectorHome = "C:\TrayportConnector"
$TrayportConnectorVersion = "3.0.20"

$NexusPath = "https://nexus.deltixhub.com/repository/epm-rtc-public/QuantServer/Trade"

$DistributionArchive = "TrayportConnector-$TrayportConnectorVersion.zip"
$DistributionUrl = "$NexusPath/TrayportConnector/$TrayportConnectorVersion/$DistributionArchive"

# Nexus credentials - assuming that NEXUS_USER and NEXUS_PASS env variables are defined
$NexusPath = ConvertTo-SecureString $env:NEXUS_PASS -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential($env:NEXUS_USER, $NexusPath)

# create directory if not exist
New-Item -ItemType Directory -Force -Path $TrayportConnectorHome

# download connector distribution archive
Invoke-WebRequest -Uri $DistributionUrl `
-OutFile $home\Downloads\$DistributionArchive -Credential $Credential

# unzip downloaded connector distribution
Expand-Archive -Path $home\Downloads\$DistributionArchive -DestinationPath $TrayportConnectorHome

# create copy of appsettings.json
Copy-Item "$TrayportConnectorHome\config\appsettings.json" `
-Destination "$TrayportConnectorHome\config\appsettings.Production.json"

# setting-up client-side logging for GVAPI
$RegPath = 'HKCU:\Software\Trayport\GV8API1.0'
New-Item $RegPath -Force
New-ItemProperty -Path $RegPath -Name LogEnable -Value 1 -PropertyType DWORD -Force
New-ItemProperty -Path $RegPath -Name LogPath `
-Value $TrayportConnectorHome\gvlog -PropertyType String -Force

Configure Trayport Connector

Define valid settings in /config/appsettings.Production.json

Configure Ember Trade Connector

Add the Ember TC configuration to ember.conf

Symbology

Trayport connector expects symbol as instrument attributes concatenated with #:
<InstID>#<SeqSpan>#<FirstSequenceID>#<FirstSequenceItemID>#<SecondSequenceItemID>

Symbology for TradeOrder Action

For some brokers information for instrument is ignored.

Term Labels

Trayport connector support sending terms for Instrument Identifiers via 7000 custom attribute or via SMD column with column name <attributeKey>7000.

Terms should be in following format: Label#Default#Type,Label#Default#Type

<TERM> Attributes

AttributeDescription
LabelA label for the term.
DefaultThe default value for this term.
TypeThe data type of the term. This attribute can have the following values: string, integer, double, dateTime, boolean

NOTE: To avoid unexpected behavior please use one of the proposed method when set tag 7000

Schedule

FIX schedule is weekly and should be the same both in Ember TC config and in /config/QuickFix.cfg

ParameterValue
Time ZoneAmerica/New_York
Start DaySunday
Start Time17:30:00
End DaySunday
End Time17:00:00
Daily Session?No

Configuration

Connector settings

The default connector settings are defined in appsettings.json file under /config folder.
Yor can override defaults in separate config file: appsettings.Production.json.

Settings option to generate info about instruments: SecurityDefinitionFolder: "path"

Timebase settings

ParameterValue
HostTimebase host
PortTimebase port
UsernameTimebase username
PasswordTimebase password
AttributeKeyValue that is prefix for “Symbol”, “Tradable” columns in timebase
SkipTradableFieldIf tradable column is not present or should be skipped value should be set to true.
ListOfSpecificBrokersAccepted array of broker ids where we should generate synthetix MLEG trade report. Use only if broker report only legs as executions
SecurityTypeIf specified during connection will be used specified security connection. Supported only "SSO" value

SSO settings

ParameterValue
URIBase URL
ScopeScope

Supported order attributes

NameCustom tagDescription
Terms for Instrument Identifiers7000See Symbology section for details.
AccountName7001The name of the trading account associated with this order, if applicable.
DecisionMaker7010Code used to identify the person or algorithm within the company who is responsible for the investment decision.
ExecutionMaker7011Code used to identify the person or algorithm within the company who is responsible for the execution.
DerivativeIndicator7012Specify true if the transaction reduces risk in an objectively measurable way.
DEA7013Specify true if the order is being submitted to the trading venue using Direct Electronic Access (DEA)
DEAClientID7014If DEA is used, the code of the DEA user must be specified in this field.
LiquidityProvision7015Specify true if the order is submitted to a trading venue as part of a market making strategy.
TradingCapacity7016Specifies whether the order results from the counterparty carrying out matched principal trading
Status7020The type of order. Valid values are: Firm, Withheld, Reference
CompanyID7021The ID of the company. This is an integer and must be a valid company ID.
BrokerID7022The ID of the broker to which you are submitting this order. This is an integer and must be a valid broker ID.
AllOrNone7023The all or none status of the order. To submit the order on an all or none basis, set this attribute to true
JDMemo7123Value that will reflect back to sender in trades and orders. Only for TradeOrder.
SkipPrice7124True or False. Price will be skipped. Only for TradeOrder.

GUI

Joule.application

Ember Trade Connector config

connectors {
TRAYPORT: ${template.connector.fix.es5} {
settings: {
attributeKey = trayport

host = localhost
port = 9021

senderCompId = DELTIX
targetCompId = TRAYPORT

resetSeqNums = true

schedule = {
zoneId = "America/New_York"

intervals = [
{
startTime = "17:30:00",
startDay = SUNDAY,
endTime = "17:00:00",
endDay = SUNDAY
}
]
}
}
}
}