π‘API
Explore the power of the MetaCopier API! Our RESTful API offers scalable and secure access to accounts, projects, and more. Get started quickly with authentication, explore endpoints, and access code samples in various languages. Have questions or need assistance? Contact our support team -we're here to help you succeed!
Our API adheres to the OpenAPI specification, ensuring clear documentation and interoperability with various development tools and platforms.
For authentication, we utilize API keys, which can be generated on our website under the 'API keys' section in the project settings.
You have the opportunity to try out our API directly on the Swagger webpage and README webpage.
If you are looking to generate client stubs for your application, take a look at the SDK section.
OpenAPI Spec
Here, you will find the OpenAPI Specification file:
Swagger
SwaggerReadme
Readme.iocTrader Token Generation
cTrader requires an OAuth access token to communicate with broker accounts. Currently, the simplest and only supported way to generate this token is manually through the MetaCopier.io Web App.
How to Generate a cTrader Token
Go to your project in the MetaCopier.io Web App.
Add a new account and select cTrader as the account type.
Click Get token.
A new window will open where you can select the cTrader accounts to authorize.
After confirming your selection, the window will close and the generated access token and refresh token will be displayed.
Using the Token with the REST API
cTrader uses OAuth authentication. When adding a cTrader account via the REST API, you must provide the previously generated tokens.
Combine the values in the following format:
Pass this combined value in the
loginAccountPasswordfield when creating or updating the account via the REST API.
Important Notes
Direct token generation via the REST API is not supported.
The browser-based authorization flow in the MetaCopier.io frontend is currently required to generate both the access token and refresh token.
Once generated, the tokens can be reused programmatically via the REST API.
If you have a use case that requires end users (for example, customers of your own web application) to add cTrader accounts directly through an API-driven flow, please contact us so we can better understand your requirements.
Last updated
Was this helpful?