Skip to content

Bohdan17-bit/Trading-Platform

Repository files navigation

Trading-Platform

About

Desktop application that provides opportunities to work out trading strategies and analyze the situation on the cryptocurrency market in "online" mode using a demo account. All market data on available cryptocurrencies is received using the Poloniex API (Public Endpoints).

The platform provides:

  • 3 time frames for building chart (15 min / 30 min / 2 hours);
  • 2 languages to switch (English, Ukrainian);
  • 10 cryptocurrencies (BTC, XRP, ETH, DASH, DOGE, LTC, BNB, SOL, UNI, TRX).
  • 40 thousands dollars on a Demo Account.

Compatibility

  • Versions of Windows 7, 10, 11;
  • Architecture ×32, ×64;
  • Responsive interface with resolution 1366 × 768 up to 2560 × 1600.
  • Microsoft Visual C++ 2015-2022 Redistributable.

Features and Functionality

Login Form

Create an unlimited number of demo accounts!

Trading Form

  • Scale your Candlestick chart!

  • Freely move the graph!

  • Buy as many coins as you need!

  • Sell coins as much as you have!

  • Wait for internet connection with animation!

  • Change localization in second!

Portfolio Form

  • Your portfolio when it's empty:

  • Your complete portfolio:

Piechart Form

Your portfolio is a pie chart!

You need to participate in the development!

  1. Do you have a new idea for a crypto exchange?
  2. Do you know what is missing from the project description?
  3. Are you a novice tester and want to test your first great app?
  4. Would you like to gain team development experience?

In this case, you should:

  • give this project a star! (strongest support for promotion!)
  • create an issue or new discussion for further communication!

Next update - Customization of application

  1. The ini file already exists but will contain more settings in the future.
  2. The file will save sound, candle colors, and theme settings.
  3. Currently, only the selected language is saved.
  4. To edit this file it is important to create a simple editor (a new project).

Sending requests

  1. To get a request string of a specific price of a crypto pair, you can use the method:
QString ApiAddressBuilder::getPriceCryptoPair(QString pair)
{
    return base_api + pair + QString("/markPrice");
}
  1. Next, you will send the request and receive a response in QJsonDocument format:
QJsonDocument ApiService::MakeRequest(QString requestStr)
{
    ApiService& service = getInstance();
    QNetworkRequest request((QUrl(requestStr)));
    request.setTransferTimeout(3000);
    request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
    QNetworkReply *reply = service.accessManager->get(request);
    QEventLoop eventLoop;
    QObject::connect(reply, &QNetworkReply::finished, &eventLoop, &QEventLoop::quit);
    eventLoop.exec();
    QByteArray response_data = reply->readAll();
    reply->deleteLater();
    return QJsonDocument::fromJson(response_data);
}
  1. After all, you get the following answer, which you can use and display in the price Label:
{
  "symbol" : "BTC_USDT",
  "markPrice" : "27066.07",
  "time" : "1684654973165"
}

OpenSSL

The OpenSSL library has been included to make and send API requests, various dlls have been added to the pro file:

INCLUDEPATH += ../dlls/openssl_x32
INCLUDEPATH += ../dlls/openssl_x64

How its looks like:

├── dlls
|   ├── openssl_x32
|     ├── libcrypto-1_1.dll
|     ├── libeay32.dll
|     ├── libgcc_s_dw2-1.dll
|     └── libssl-1_1.dll
|   ├── openssl_x64
|     ├── libcrypto-1_1-x64.dll
|     ├── libgcc_s_seh-1.dll
|     └── libssl-1_1-x64.dll

Links

  1. OpenSSL - https://www.openssl.org/source/
  2. Poloniex API - https://docs.poloniex.com/
  3. Redistributable packages - https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170