Trade Republic Coding Challenge

Related tags

Miscellaneous tr
Overview

Trade Republic Coding Challenge

Challenge

Your task is to build a system that enables users to view price histories. It will receive updates from a partner service, transform these updates and provide the aggregated data through an endpoint.

Intro and terminology

Instruments and Quotes

Every asset that can be traded is represented by an “instrument”, which has a unique identifier (ISIN). Each time the instrument price changes, an update message called “quote” is broadcasted for this instrument to inform about the change.

What is a candlestick?

A candlestick is a representation that describes the price movement for a given asset in a fixed amount of time chart

While a candlestick “contains” all prices where the timestamp of the price update is higher than the openTimestamp (timstamp >= openTimestamp) and lower than the closeTimestamp (timstamp < closeTimestamp) of the candle, the basic idea is that we don’t need to know about all price changes during that time. We are only interested in a few specific data points: the first price that was received (openPrice) during that duration, the last price that was received (closePrice) and the highest and lowest price that was observed.

Input data

The input data is received through a websocket stream from a partner service. The code provides handles connecting and consuming the stream (Streams.kt). There are two types of input messages:

  • Instrument additions/deletions, which adds or removes an instrument from our catalogue
  • Instrument price updates, giving the most recent price for a specific instrument

Output (Aggregated-Price History)

The output (and the main point of this challenge) is the aggregated price history endpoint. It should provide the history in form of candlesticks (check information below).

End-users of the service are interested in a specific instruments price history. They want to see the last 30 minutes in a form that is easy to read, hence we provide a candlestick chart.

To display this chart, the system needs to return the candlesticks for the last 30 minutes.

The endpoint for fetching candlesticks is already provided (Server.kt). Consumers of the endpoint need to provide the instrument id (ISIN) as a query parameter (e.g. http://localhost:9000/candlesticks?isin={ISIN}).

Your task is to implement a service that will consume the stream data and make it reachable through the API in the format mentioned above

Requirements

  JVM running on your local machine
  Gradle
  Any IDE

Running partner service

To run a partner service you can either use docker-compose

docker-compose up -d

or Java

java -jar partner-service-1.0-all.jar

Running the app

To run the app you can use the following gradle commands

./gradlew build -> compiles project 
./gradlew test -> run tests
./gradlew run -> run on port 8080

Once the server is running you can check the results at

http://localhost:9000/candlesticks?isin={ISIN}

Note: if you don't implement your service you might see the exception there

You might also like...
This is a practical project for Professional Android Developers that covers clean Architecture basics using the following: skills: Real-like coding with Kotlin, MVVM Design pattern, Kotlin Coroutines, Room database, Navigation Controller, Jetpack compose, Use cases, and Dependency injection using Dagger-Hilt.
Help users of coding platforms to create findable, well documented, secure and offering good quality projects

The Ambassador The Ambassador will help users of coding platforms to create findable, well documented and offering good quality projects. It measures

Source++ is an open-source live coding platform. Add breakpoints, logs, metrics, and tracing to live production applications
Source++ is an open-source live coding platform. Add breakpoints, logs, metrics, and tracing to live production applications

Source++ is an open-source live coding platform. Add breakpoints, logs, metrics, and distributed tracing to live production software in real-time on-d

Simple Android app during a coding night. Just Learning Firebase and Android
Simple Android app during a coding night. Just Learning Firebase and Android

KUI-App Simple Android app during a coding night. Just Learning Firebase and Android What we learned: Some basics of Android Basic setup of Firebase:

Android Clone Coding Project #11 알람
Android Clone Coding Project #11 알람

Android Clone Coding Project #11 알람 지정된 시간에 알람이 울리게 할 수 있음 지정된 시간 이후에는 매일 같은 시간에 반복되게 알람이 울리게 할 수 있음 결과화면 Screenshot1 Screenshot2 배운 내용 정리 AlarmManage

Flixbus-task - Android Coding Task from FlixBus
Flixbus-task - Android Coding Task from FlixBus

FlixBus Coding Task Features Fetch timetables from FlixBus service Show fetched

A Google coding competitions practice preparing to the hashcode competition
A Google coding competitions practice preparing to the hashcode competition

One Pizza This is a Google coding competitions practice preparing to the hashcode competition.

Live-coding a web server with Ktor

ktor-sample Live-coding a web server with Ktor Ktor is a Kotlin framework dedicated to building asynchronous servers and clients in connected systems.

Gallery application using Unsplash API, coding by Android Kotlin
Gallery application using Unsplash API, coding by Android Kotlin

Gallery App GalleryApp is application show image from Unsplash API, based on MVVM architecture. Download Go to the Releases to download the latest APK

Unsplash Gallery for a coding challange.

Important note: Secret key of Unsplash is not present in the public github repository, Utils Constants.SERVER_SECRET. Replace it with your key. Unsp

A coding examples project about Kotlin Programming language. 🇰
A coding examples project about Kotlin Programming language. 🇰

Kotlin Tutorial 👨🏻‍💻 What is Kotlin ❓ Kotlin is a new programming language, developed by JetBrains. Jetbrains is a popular software development com

Creative coding/generative art playground for Jetpack Compose

Creative Coding with Compose! Resources for the Creative Coding with Compose talk at DroidCon NY 2022. Resources Main resource https://github.com/terk

An Android app with many challenge modules and SOLID at all
An Android app with many challenge modules and SOLID at all

android-super-app An Android app with many challenge modules and SOLID at all. Features Kotlin Coroutines with Flow (State Flow) Kotlin Serialization

remote technical interview Android challenge app

Android challenge We would like to learn more about how you approach a challenge as an Android Engineer. There is a simple app that isn’t made with be

The code for the Congression App Challenge Webinar.

Getting-Started-with-Android-Studio-and-Kotlin-CAC-Webinar A webinar hosted by the Congressional App Challenge and theCoderSchool The code for the Con

code for the Mobiquity QA challenge assignment

MOBIQUITY QA CODE CHALLENGE This repository contains the code for Mobiquity code assignment for the Senior QA engineer position. Tech Stack the tools

Challenge RED LINK

PruebaOctubre Challenge RED LINK Prueba técnica Android Se requiere realizar una app nativa Android que cumpla con los siguientes requisitos: Consumir

Pragmateam code challenge server (Kotlin)

Pragmateam code challenge server (Kotlin) Please refer to the provided document for the code challenge requirements. Framework & languages This projec

Owner
Thanh Le
Software developer by day. Artist by night. Creative all the time. ;)
Thanh Le
TradeMap-Clone - Trade Map Clone with kotlin

TradeMap-Clone APP que simula atualização da bolsa de valores em tempo real para

Fernando Gomes 0 Feb 11, 2022
an android app to send private secret SMS while terrorist Islamic republic of Iran banned internet access in Iran.

Mahsa An android application which is designed to deliver safe and encrypted messages using SMS while Islamic republic of Iran banned Iranian people a

null 3 Sep 22, 2022
The coding challenge elbotola android test

Introduction The coding challenge(s) below will be used to assess your familiarity with the Android development environment, relevant Android related

Mohamed Elouamghari 1 Nov 2, 2021
Coding Challenge for ParadoxCat

WavDecoder Coding Challenge for ParadoxCat WavHeaderReader This class takes the ByteArray which supposed to be a 44 bytes length array from the very s

Alexander Styagov 0 Nov 5, 2021
An Android application sample for ClearScore coding challenge

ClearScoreChallenge An Android application sample for ClearScore coding challenge Libraries Coroutines for managing background threads. (A coroutine i

Ozan Topuz 1 Nov 18, 2021
Backend coding challenge using Kotlin and Ktor

Backend Coding Challenge We appreciate you taking the time to participate and su

Thermondo 0 Jan 4, 2022
UP42 backend coding challenge

UP42 backend coding challenge by Paweł Radecki Build and deploy locally ./gradle

Paweł Radecki 0 Jan 10, 2022
Crypto-candlestick-service - Crypto candlestick service Coding Challenge

Coding Challenge Your task is to build a system that enables users to view price

Moses Thomas 0 Feb 6, 2022
Nab-challenge - Take home challenge from NAB in partnership with Positive Thinking Company

nab-challenge Take home challenge from NAB in partnership with Positive Thinking

Hieu Vu 0 Dec 30, 2021
An open source application to make your own android applications without coding!

Stif An Open source project for building Android Application at a go both with and without coding. This project was inspired from Scratch and Sketchwa

Nethical org 5 Aug 28, 2021