Gloweet
    • Projects
    • Contact me
    • About me
    • Bio
    • Expertises
    • Stay updated
    • Blogs
    • Newsletter
Language
Language
New project
Antonin Marxer's portfolio
Trading Bot
Trading Bot

Trading Bot

[ MAR - DEC 2022 ]

Complete refactoring and improvement of a pre-existing trading application.

ROLE : Lead Java Developer

CLIENT : For Artacap UK

Last updated on August 8, 2025

As I began my adventure as a freelancer, I joined Etic Insa Technologies for this very mission. I was accompanied by Aymane Ghanam as a Java Developer, and the administrative part was managed by Floriane Rat and Lisa Colombarini.

What interested me in this project was to take a first step in the world of finance. It also became very clear that this would be a technical challenge as me and Aymane would have to continue a pre-existing project from Artacap, understand their code and refactor it, if necessary, which happened to be the case.

Moreover, succeeding in making two brokerage API co-exist while one is synchronous and the other asynchronous revealed itself to be as much exciting as difficult.

Concept

The main goal is to have an application that allows to subscribe to financial markets such as stocks, FOREX, indices and commodities, and trade CFDs on them. When the app opens a position on the subscription, if there's money loss, close the subscription. If there's money gain, automatically new positions. The supported brokerage platforms are IB and IG. The automation process is based on the computing of markets tendency at a frequency set by the user. Positions open on and on until the user stops the subscriptions manually.

A CFD is a “Contract for Difference”. With it you can bet up or down on a derivative. The advantage is that it’s possible to sell short and to multiply the gains by the leverage effect. Leverage means not paying the full price on financial instruments, but only a percentage of it. Hence you can amplify your gains, but there’s a risk of amplifying your losses as well.

Tech Stack

  • Java as programming language.
  • Java Swing as graphics library.
  • NetBeans GUI Builder as frames designer: https://youtu.be/YSpqHOwYrk4 In the application, it was decided to add listeners to the view from the controller. In this way, the view files only contain getters and setters.
  • The app uses two trading platforms:
    • IG: https://labs.ig.com/. This platform is used to trade CFDs. It provides 2 APIs:
      • The synchronous REST trading API, which allows standard HTTP operations, We use it to connect to IG, search for markets, open, update and cancel a subscription, etc. An API companion is available to check your queries: https://labs.ig.com/sample-apps/api-companion/index.html
      • The asynchronous Streaming API, which enables to stream real-time market prices, trade notifications and account status notifications. A streaming companion is available to check your queries: https://labs.ig.com/sample-apps/streaming-companion/index.html
    • IB (Interactive Brokers): https://interactivebrokers.github.io/tws-api/index.html. The application uses this platform to trade CFD on stocks (IB provides trading on stocks, options, futures, forex, bonds, and funds). The Java application doesn't send any HTTP request to communicate with IB. We use the asynchronous TWS API interface, which corresponds to calling functions in a Java library. The sent queries are then received in either TWS or IB Gateway, which manages the sending of orders and the reception of data. The application is based on the MVC architecture.

What are Trading-bot’s features?

With Trading-bot, you can:

  • Create a subscription that will open positions when a variation in points or percentage is met The subscription parameters are:
    • The direction (up/down/both)
    • The stop loss in points
    • The stop gains in points
    • The number of steps to reach the stop gain OR the number of points to buy per step until the stop gain is met
    • The quantity of contracts to buy or sell per step
    • The optional underlying markets the user would like to trigger a position opening on
  • Stop a subscription
  • Re-open a subscription that has been closed
  • Create a subscription from the history of subscriptions the user has created
  • Consult open/closed positions
  • Create sympathy groups
  • Perform historical prices analysis.

For confidential purposes, no image of the application is shown here.

Software DevelopmentJavaNetbeans GUI BuilderMVCTradingIG brokerIB brokermulti-broker

Table of contents

  • Concept
  • Tech Stack
  • What are Trading-bot’s features?

Offer

  • Contact
  • Skills

Resources

  • Blog
  • Newsletter
  • About

Legal

  • Privacy
  • Terms of service
  • Cookies policy
  • Update cookie consent
  • LinkedIn
  • GitHub

Gloweet © 2025. All rights reserved.

Smile, you're alive :)

2.0.0