Skip to content

Add MT4/MT5 demo accounts, expert advisors, quota, and MT servers resources#6

Merged
victorycodedev merged 2 commits into
mainfrom
feature/accountmanagement_more
Jun 18, 2026
Merged

Add MT4/MT5 demo accounts, expert advisors, quota, and MT servers resources#6
victorycodedev merged 2 commits into
mainfrom
feature/accountmanagement_more

Conversation

@victorycodedev

Copy link
Copy Markdown
Owner

New resources

Added 4 new resource classes to src/Resources/AccountManagement/:

  • DemoAccount — Create MT4 and MT5 demo accounts on a provisioning profile
  • ExpertAdvisor — List, read, update, upload file, and delete expert advisors
  • Quota — Get user quota, quota update requests, and request region quota updates
  • MtServer — Search known trading servers by MT version

Transaction ID auto-generation

Made transactionId optional on all create methods that require it
(Account::create(), AccountReplica::createReplica(), DemoAccount methods).
A 32-character hex ID is auto-generated via bin2hex(random_bytes(16)) when
none is provided. Users can still pass a custom ID for retry scenarios.

  • Account::create()transactionHeader() now always sends the header
  • AccountReplica::createReplica() — same pattern
  • DemoAccount::createMT4DemoAccount() / createMT5DemoAccount() — same pattern

MetaApiClient accessor methods

Added demoAccounts(), expertAdvisors(), quotas(), and mtServers()
accessors to MetaApiClient, following the existing pattern.

Tests

  • 5 new test files: DemoAccountTest.php, ExpertAdvisorTest.php,
    QuotaTest.php, MtServerTest.php — 14 tests total
  • 2 new auto-generation tests in AccountManagementTest.php
  • 4 type-check assertions in MetaApiClientTest.php

Documentation

Updated README with new sections for each resource and clarified the
optional transactionId behavior.

@victorycodedev
victorycodedev merged commit 6d19dc3 into main Jun 18, 2026
12 checks passed
@victorycodedev
victorycodedev deleted the feature/accountmanagement_more branch June 18, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant