epam / ember-trade-connector-sample

Sample of trade connector (adapts ember data model to exchange-specific order entry API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ember Trade Connector Samples

This project illustrates how to build, test, debug, and deploy trading connector for Deltix Execution Server (Ember).
Execution Server is a container of trading algorithms that interface with market using market data and trading connectors.

Each Trading Connector adapts API of specific execution venue to normalized Deltix data model.
For more information see Trade Connector Developer's Guide and Trading Data Model.

Prerequisite

You need local installation of Deltix QuantServer.

Development Environment

How to create dev environment:

  • Create (if not exist) %USERPROFILE%\.gradle\gradle.properties and define properties like below:
    # Deltix Nexus repository credentials
    NEXUS_USER=username
    NEXUS_PASS=password
    
    # TimeBase serial number
    serialNumber=XXXX-17A45F8CBF0-XXXX
    
    # path to dev environment 
    devenvDir=D:/Projects/Deltix
    
    # path to TimeBase installation
    devenvDeltixHome=C:/Deltix/QuantServer
    
    # path to Java 11 JDK
    devenvJavaHome=C:/Program Files/Eclipse Temurin/jdk-11.0.15.10-hotspot
  • Execute Gradle task to create dev env:
    gradlew clean build gatherJars buildDevEnv

Configuration

  • Ember configuration: see <devenvDir>/ember-home/ember.conf
    See more about Ember Configuration
  • Logging configuration: see <devenvDir>/ember-home/gflog.xml
    See more about Garbage Free Log

Testing

  • Navigate to <devenvDir>
  • Open QuantServer Architect via qsadmin.bat
  • Launch TimeBase (via context menu on TimeBase bar)
  • Launch Ember via start-ember.bat
  • Launch Ember Monitor via start-monitor.bat
  • Open browser and follow link: http://localhost:8988

Build

To build all samples and update connectors in dev env - execute the command below:

gradlew clean build updateConnectors

Debug

One simple way to debug your connector is running entire Execution Server under debugger.

Create Run configuration inside IntelliJ/IDEA. It uses deltix.ember.app.EmberApp as a main class and ember.home system property that point to ember configuration home.
You can setup breakpoints in your connector and launch EmperApp under debugger.

Deltix FIX 4.4 Trade Connector

Deltix FIX connector sample demonstrates how build trade connector for FIX protocol-based API.
In particular this connector allows to connect to Ember FIX Gateway. See Deltix FIX API.

Sources

  • Common code for FIX trade connector:
    /fix/core/src/main/java/deltix/fix/*
  • Deltix FIX 4.4 trade connector:
    /fix/generic/src/main/java/deltix/fix/deltix/*

Deploy

To deploy your connector to actual server copy JAR files below under lib/custom/ directory of your Ember installation.

  • /common/build/libs/common-2.0.0.jar
  • /fix/core/build/libs/deltix-fix-core-2.0.0.jar
  • /fix/deltix/build/libs/deltix-fix-deltix-2.0.0.jar

The last step is to define your connector in server's ember.conf (see Dev Env).

REST+WS API Gemini Trade Connector

Gemini connector sample demonstrates how build trade connector for REST/Websocket-based API.
In particular this connector allows to connect to Gemini Exchange.

Sources

  • Gemini REST+WS trade connector:
    /gemini/src/main/java/deltix/crypto/gemini/*

Deploy

To deploy your connector to actual server copy JAR files below under lib/custom/ directory of your ES installation.

  • /common/build/libs/common-2.0.0.jar
  • /gemini/build/libs/deltix-crypto-gemini-2.0.0.jar

The last step is to define your connector in server's ember.conf (see Dev Env).


Please let us know if you have any questions: support@deltixlab.com

About

Sample of trade connector (adapts ember data model to exchange-specific order entry API)

License:Apache License 2.0


Languages

Language:Java 98.9%Language:PowerShell 0.6%Language:Batchfile 0.5%