Homepage > Portfolio > Cryptocurrency Trading Process Optimization

Cryptocurrency Trading Process Optimization

Azati team helped the customer to develop a reliable business utility to optimize the cryptocurrency trading process.

CUSTOMER:

The cryptocurrency domain is among the most fast-growing and innovative industries of today. But even though it is incredibly tricky to find a proper solution that can cope with all the specific issues crypto trading addresses.

As the ecosystem is entirely decentralized, it is essential to buy a crypto asset from one broker and sell it to another within a second. Many different platforms can provide similar functionality, but all of them are lacking the crucial features that are truly important.

The Customer engaged in cryptocurrency trading on Bitfinex – a fully functional system for spot trading of the most used cryptocurrencies such as Bitcoin, Ethereum, EOS, Litecoin, Ripple, NEO, Monero and many others.

OBJECTIVE:

Before turning to Azati, the Customer had already created the utility which covered the basic needs. Still, it was hard to support and scale the application as it was quick-and-dirty development without considering future improvements. Also, the performance of the solution was still not satisfactory.

The existing application had no visual interface as it was a CLI tool. The Customer used it for such CRUD interactions with crypto exchanges like setting up trade orders, obtaining and receiving the necessary information and statistics.

The main objective of Azati was to improve application performance, optimize trading scripts, revamp basic features, and release a new version of CLI.

Challenges:

Releasing a CLI tool written with Ruby is not an easy thing. Even as our engineers are experienced with such projects before, there were several challenges the team faced.

01. Challenge

Since Ruby is known for the number of third-party GEMs that can cover almost all developer’s needs, the main challenge our team had was the impossibility of using external libraries, dependencies, and frameworks

One of the main requirements was to develop a project with Ruby as the Customer had an excellent knowledge of it and wanted to control the whole development process and review the code by themselves.

02. Challenge

Since the solution should be built without any third-party dependencies, our engineers had to re-create existing open-source modules to use them in the project. Only a small percent of modules can fit the needs of the customer.

Therefore, our team needed to rely on all of their professional experience to find new ways to facilitate and accelerate development while keeping the quality of the product and code.

PROCESS:

Before Azati joined the project, two developers from another vendor were already involved in the development workflow. After the completion of the technical interview, our engineers quickly joined the project and began to plan further activities and actions.

The Customer wanted Azati to complete previously unfinished tasks by the previous vendor. During the implementation of the assigned features, our engineers also received new tasks.

From the project start, the Customer used Trello, but a couple of months ahead, our developers took the initiative to move to Github Projects for more productive project management.

That was a successful move, and now the team members note everything they need in Github Project Boards: highlight bugs, write comments, mark and fix code issues, and so on. The engineers who don’t have any assignments take the new task from the list, accomplish them, submit the code for review, and then the testers or manager manually test the result.

There are about five different test sets in use, which helps the team to ensure the code quality and absence of minor bugs. As the solution is a CLI utility, there was no kind of interface created. Engineers also developed an advanced filtering system to simplify navigation across many CLI commands.

SCREENSHOTS:

TECHNOLOGIES:

 
 

SOLUTION:

As we already mentioned before, the engineers had to minimize the use of additional frameworks, libraries, and third-party dependencies. Ruby is not the best programming language to build sophisticated CLI tools.

That is why engineers decided to move the majority of the features to a small Docker container that should be launched alongside with the CLI.

CLI sends TCP requests to Docker instances where a small TCP-server (created by Azati from scratch) determines how to handle the incoming requests. It means that commands entered by the user are not processed on a client computer but are forwarded to a remote virtual machine.

REST application design also simplifies deployment and maintenance. Docker simplifies configuration management and application deployment for the customer, as they receive a Docker container, which can be launched in less than a minute without any technical knowledge – the user only needs to install Docker.

The user controls the solution from the console (which acts like a client) through a series of TCP requests sent to the Docker instance (which acts like a server).

Let’s have a closer look at the main components of the solution:

Request data handler

The first part of the application is the request data handler, which is responsible for the processing of incoming user queries.

String parser

The string parser handles the CLI requests to turn them in a more machine-readable form.

Trading Bots Connector

The app is enhanced with Trading Bots. Users can manage these bots to perform trading operations with cryptocurrencies: purchasing, selling or exchanging.

DB Connector

This part of the application is responsible for the database connection. Any operations with the database in any direction will pass through DB Connector.

Business Logic

Business Logic does the true magic and involves algorithms, data transformations, and price calculations, etc.

Requests Builder

Requests Builder simplifies the work with the external trading API’s.

Results:

01.

Up to 300% improvements after code optimization

02.

Moved project management to GitHub Boards

03.

Released new version of CLI

04.

Implemented filtering system

05.

Packed the solution inside a container

Now:

The further plan of the team is to minimize the number of dependencies, optimize the development process by using third-party frameworks to create a web user interface, and reduce the overall data processing duration.

Drop us a line

If you are interested in the development of a custom solution — send us the message and we'll schedule a talk about it.