Download the PHP package javierfernandez93/metaapi-cloud-php-sdk without Composer
On this page you can find all versions of the php package javierfernandez93/metaapi-cloud-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download javierfernandez93/metaapi-cloud-php-sdk
More information about javierfernandez93/metaapi-cloud-php-sdk
Files in javierfernandez93/metaapi-cloud-php-sdk
Package metaapi-cloud-php-sdk
Short Description PHP SDK for MetaApi, a professional cloud forex API
License MIT
Homepage https://github.com/javierfernandez93/metaapi-cloud-php-sdk
Informations about the package metaapi-cloud-php-sdk
Metaapi PHP sdk
A PHP Package that let you seamlessly perform api call to Metapapi https://metaapi.cloud/ NOTE: This package does not include all api calls in Metapi. You can do CopyTrade, Account Managment and Metrics.
Installation
To install the SDK in your project you need to install the package via composer:
Usage
Account Management
You can create an instance of the SDK like so for Account Management:
All methods throws exceptions when the request is not successful, so be sure to put your code in a try and catch block.
You can add a trading account and starts a cloud API server for the trading account like so:
if the request was successful , you will get the the account id and state, else an Exception will be thrown
You can read an account by the id
You can read all trading accounts in your metaapi account
You can update an account
Undeploy an account
Deploy an account
Redeploy an account
Delete an account
CopyFactory
You can create an instance of the SDK like so for Copyfactory:
To generate a strategy id
To get all your strategies
To get a single strategy
To update a strategy
To remove a strategy
To get all your subscribers
To get a subscriber
To update a subscriber data
To remove a subscriber
To delete a subscription
Copy Trade
To Copy a trade from provider to subscriber. I recommend you create a strategy before hand and save to your database before you perform a copy trade, but its not compulsory as the package will create one for you. You can always read all your strategies in your account with the " $copyfactory->strategies()".
To Copy trade do:
Note: copying a trade will take some seconds to finish, you you can have a loading indicator as feedback.
MetaStats
You can get metrics for you account
You can create an instance of the SDK like so for MetaStats:
To get metrics:
To get open trades for MetaApi account:
Testing
API Reference
All API references can be found on Metaapi documentation website. https://metaapi.cloud/
Security
If you discover any security related issues, please open an issue.
Contributing
Pull requests are welcome.
How can I thank you?
Why not star the github repo? I'd love the attention! you can share the link for this repository on Twitter or HackerNews?
Don't forget to follow me on twitter!
Thanks! Efekpogua Victory.
License
The MIT License (MIT). Please see License File or more information.