TradeBench 1.0.0
Algorithmic Trading Backtesting Platform
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
App\AnalysisClient Class Reference

Client for interacting with the C++ Analytical Core via gRPC. More...

Public Member Functions

 __construct (string $hostname='cpp-engine:50051')
 Constructs the AnalysisClient and establishes an insecure channel.
 
 requestAnalysis (string $userId, string $pair, string $strategy, string $taskId, array $dateRange=[], string $timeframe='1h')
 Sends an asynchronous backtesting request to the C++ core.
 

Private Attributes

AnalysisServiceClient $client
 

Detailed Description

Client for interacting with the C++ Analytical Core via gRPC.

Constructor & Destructor Documentation

◆ __construct()

App\AnalysisClient::__construct ( string $hostname = 'cpp-engine:50051')

Constructs the AnalysisClient and establishes an insecure channel.

Parameters
string$hostnameThe address of the C++ gRPC server.

Member Function Documentation

◆ requestAnalysis()

App\AnalysisClient::requestAnalysis ( string $userId,
string $pair,
string $strategy,
string $taskId,
array $dateRange = [],
string $timeframe = '1h' )

Sends an asynchronous backtesting request to the C++ core.

Parameters
string$userIdThe ID of the user requesting the analysis.
string$pairThe trading pair (e.g., BTCUSDT).
string$strategyThe strategy configuration payload.
string$taskIdUnique identifier for the analysis task.
array$dateRangeAssociative array with 'start' and 'end' UNIX timestamps.
string$timeframeThe trading timeframe (e.g., '1h', '15m').
Returns
array Associative array containing the success status and message/error.

Field Documentation

◆ $client

AnalysisServiceClient App\AnalysisClient::$client
private

The documentation for this class was generated from the following file: