A set of wrapper classes that make using TheBotPlace API easier.
  • MQL5 51.3%
  • C++ 31.3%
  • Python 14.5%
  • CMake 2.9%
Vai al file
Repository files (latest commit first)
Nome del file Ultimo messaggio di commit Ultima data di commit
Nique_372 7fb5d53259
2026-08-01 18:19:11 -05:00
.forgejo/workflows 2026-05-08 13:55:45 -05:00
CppEx 2026-05-09 12:06:57 -05:00
Src 2026-07-21 07:45:54 -05:00
Workflows Correct workflows 2026-07-27 09:08:56 -05:00
.gitignore 2026-05-08 13:55:45 -05:00
CMakeLists.txt new files added 2026-05-08 17:13:52 -05:00
CMakeSettings.json new files added 2026-05-08 17:13:57 -05:00
dependencies.json 2026-05-08 17:13:29 -05:00
LICENSE 2026-05-08 09:43:28 -05:00
README.md 2026-08-01 18:19:11 -05:00
TbpWrraper.mqproj 2026-05-08 09:43:28 -05:00

A set of wrapper classes that make using The Bot Place API easier — licensing, customers and job-delivery checks for MT5 bots.
The same CTbpBase / CTbpCustomers / CTbpJobs surface is implemented three times: MQL5, C++ and Python, each using the native HTTP/JSON stack of its ecosystem.


Main Features

  • Three parallel implementations, one API shape: MQL5 (Src/MQL5) uses WebRequest + JsonParserByLeo's CJsonParser; C++ (Src/C++) uses libcurl through a small CHttpClient wrapper + simdjson; Python (Src/Py) uses requests + its built-in .json(). Method names, parameters and behavior match across all three.
  • CTbpBase: holds the api-key and timeout, exposes GetAllClients() and the last parsed JSON response (GetLastJson() / m_json, depending on language).
  • CTbpCustomers: license and customer checks — GetCustomersSotfware(), UserHasSoftware() (with additional-data binding, e.g. account login), UserHastSoftwareNoaAdditionalData() (resale-friendly, no additional-data check), UserHastSoftwareTelegram(), FirstDemoDowlandSoftware().
  • CTbpJobs: GetJobSoftwareAccess() and CheckJobDeliveryAccess(), for validating access to marketplace job deliveries.
  • ITbpAdditionalData: small interface to plug in whatever "additional data" your license check binds to (account login, machine id, etc). MQL5 ships a ready CAddtionalDataTbpAccountLoggin that resolves to AccountInfoInteger(ACCOUNT_LOGIN).
  • Wraps every documented endpoint from thebotplace.com/documentation: job delivery access, all customers, customers of a software, user-has-software (with/without additional data, and the Telegram variant), and first demo download.

Usage examples

MQL5:

#include <TSN\\TbpWrraper\\Src\\MQL5\\Customers.mqh>

TSN::CTbpCustomers tbp;
tbp.ApyKey("YOUR_API_KEY");
tbp.SoftwareId("YOUR_SOFTWARE_ID");
tbp.AdditionalData(new TSN::CAddtionalDataTbpAccountLoggin(), true);

bool has_license = false;
if(tbp.UserHasSoftware(InpUserId, has_license) && has_license)
 {
  Print("Licencia activa");
 }

C++:

#include "tbp_api_warper_cpp/Customers.hpp"

TSN::CTbpCustomers tbp;
tbp.ApyKey("YOUR_API_KEY");
tbp.SoftwareId("YOUR_SOFTWARE_ID");

bool has_license = false;
if (tbp.UserHastSoftwareNoaAdditionalData("user-id", has_license) && has_license)
{
    // licencia activa
}

Python:

from tbp_api_wraper_py import CTbpCustomers

tbp = CTbpCustomers()
tbp.m_api_key = "YOUR_API_KEY"
tbp.m_software_id = "YOUR_SOFTWARE_ID"

ok, has_license = tbp.UserHastSoftwareNoaAdditionalData("user-id")
if ok and has_license:
    print("Licencia activa")

Repository Structure

TbpWrraper/
├── Src/       # MQL5, C++ and Py implementations (one folder per language)
├── CppEx/     # Standalone C++ usage example
└── Workflows/ # MQL5 test scripts and CI workflow entry (EA.mq5)

Requirements

See dependencies.json for the full list.

  • MetaTrader 5, build 5430+ (MQL5) — depends on JsonParserByLeo and MQLArticles (CLoggerBase)
  • C++17+ — depends on CppBases (CLoggerBase), libcurl and simdjson (see vcpkg.json)
  • Python >= 3.10.9 — depends on tsn_utils (CLoggerBase) and requests (see requirements.txt)
  • WebRequest / outbound HTTPS access to europe-west2-thebotplace.cloudfunctions.net must be allowed (MT5: add to the WebRequest whitelist)

Installation

cd "C:\Users\YOUR_USER\AppData\Roaming\MetaQuotes\Terminal\YOUR_ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/TbpWrraper.git"

Requires the tsndep package, available on PyPI. It automatically installs the MQL5 dependencies and runs the Python/C++ hooks declared in dependencies.json (pip install -r requirements.txt, vcpkg install).

Python package (standalone)

The Python implementation is also published as its own package, without needing tsndep or the rest of the repo:

pip install tbp-api-wraper-py

Quick Start

1. Get your api-key from The Bot Place and your software id from your bot's dashboard.

2. Include/import the wrapper for your language (see usage examples above).

3. Call the endpoint you need — results come back either as a return value (bool/out params) or in the last parsed JSON document, depending on the call (see inline comments in each Customers/Jobs file — every method states where its result lives).


License

Read Full License By downloading or using this repository, you accept the license terms.


Contact