Feature/modernize sdk#4
Merged
Merged
Conversation
…nce error handling with MetaApiException, and implement new AccountManagement resources - Converted Configuration and CopyTrade from traits to classes for better structure and encapsulation. - Introduced MetaApiException for structured error handling across API calls. - Added AccountReplica and ProvisioningProfile resources for managing account replicas and provisioning profiles. - Updated HTTP request methods to return nullable types for improved type safety. - Removed deprecated test files and added new tests for AccountApi and ProvisioningProfile. - Implemented mock HTTP client for testing API interactions.
feat: refactor MetaStats to use Metrics class and add new metric methods feat: implement new portfolio strategy endpoints in Configuration class feat: add CopyTrade class enhancements for configuring copy trading feat: introduce History, Logs, Trading, and Webhooks resources for CopyFactory refactor: convert Metrics trait to class and add historical trades and reset metrics methods test: add tests for new portfolio strategy, webhook, history, trading, and metrics endpoints
- Removed AccountApiTest and migrated tests to AccountManagementTest for better organization. - Introduced TerminalApi with resources for managing trading state, market data, margin calculations, and trading operations. - Added new resources: Credits, History, Margin, MarketData, State, and Trading to encapsulate terminal functionalities. - Updated tests to cover new terminal functionalities including state retrieval, historical data access, market data queries, and margin calculations. - Improved mock HTTP client setup for better test isolation and clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes the SDK around a single
MetaApiCliententry point and replaces the older v1-style API usage with focused resource classes.Changes
MetaApiClientas the main SDK entry pointcopyFactory(region: 'london')andterminal(region: 'london')MetaApiExceptionAccountApiusageValidation
composer testcomposer validate --strictphp -lacross all PHP filesgit diff --checkNotes
This release focuses on the stable REST-based SDK surface. Risk Management, MT Manager, and real-time streaming/WebSocket support are planned for future versions.