- MQL5 51.3%
- C++ 31.3%
- Python 14.5%
- CMake 2.9%
| Имя файла | Текст последнего коммита | Дата последнего коммита |
|---|---|---|
| .forgejo/workflows | ||
| CppEx | ||
| Src | ||
| Workflows | ||
| .gitignore | ||
| CMakeLists.txt | ||
| CMakeSettings.json | ||
| dependencies.json | ||
| LICENSE | ||
| README.md | ||
| TbpWrraper.mqproj | ||
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) usesWebRequest+ JsonParserByLeo'sCJsonParser; C++ (Src/C++) uses libcurl through a smallCHttpClientwrapper + simdjson; Python (Src/Py) usesrequests+ its built-in.json(). Method names, parameters and behavior match across all three. CTbpBase: holds the api-key and timeout, exposesGetAllClients()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()andCheckJobDeliveryAccess(), 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 readyCAddtionalDataTbpAccountLogginthat resolves toAccountInfoInteger(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 (seevcpkg.json) - Python >= 3.10.9 — depends on
tsn_utils(CLoggerBase) andrequests(seerequirements.txt) - WebRequest / outbound HTTPS access to
europe-west2-thebotplace.cloudfunctions.netmust 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:
- PyPI: tbp-api-wraper-py
- Forge registry: tbp-api-wraper-py 2.5.0
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
- Platform: MQL5 Community
- Profile: https://www.mql5.com/es/users/nique_372
- Articles: https://www.mql5.com/es/users/nique_372/publications