Is there an API for using Demo Servers outside the MT4/5 platform ?

 

Hi all, 


I would like to ask if there is an API for using Demo Servers outside the MT4/5 platform ? 
I can't find any valid information about that question.

I saw the fix protocol but i am not sure what this protocol can be used for the demo account too.

The goal is to build a custom solution like mobile app which it will use order execution like MT4/5.
Is there any way to achieve that using metaquotes or any broker server ? 

 

Thanks in advance!

 
I do not think that API is available.
But in case of Services and Applications so we can create them in thje near future:
you can see the Services in MetaEditor and in MT5 (and Application in profile).
 

There is no API available yet.

But you can make one.

Please see: https://www.mql5.com/files/pdf/mql5.pdf

 
Sergey Golubev:
I do not think that API is available.
But in case of Services and Applications so we can create them in thje near future:
you can see the Services in MetaEditor and in MT5 (and Application in profile).

Thank you for your reply.

What do you mean about Services in MetaEditor ? Where do i found these services ?

 
Marco vd Heijden:

There is no API available yet.

But you can make one.

Please see: https://www.mql5.com/files/pdf/mql5.pdf

Thank you.

I have a couple questions.

1) What do you mean that i can make one ? How can i create a new demo account programmatically ?
I can imagine creating a type of server which can handle the execution but are there any function on MT4/5 to allow me creating account instead of using the terminal manually ?

2)  In the mql5.pdf i saw some Network Functions like SocketCreate, SocketRead... which i can not use them in the MetaEditor of mql5(Build version : 1940).     

 
D3nn1s:

Thank you for your reply.

What do you mean about Services in MetaEditor ? Where do i found these services ?

In MetaEditor - 

In mql5 forum profile

----------------

Because I was reading one post in rus part of the forum (i can not find this post now) where MQ was explaining about applications (they will allow to create it using the Services and so on).
I hope they will announce it in the near future.
 
Sergey Golubev:

In MetaEditor - 

In mql5 forum profile

----------------

Because I was reading one post in rus part of the forum (i can not find this post now) where MQ was explaining about applications (they will allow to create it using the Services and so on).
I hope they will announce it in the near future.

Thank you for your accurate response. 

At mql5 site in the tab Apps has indeed some functionality. You can add an application and start use it.
However i can't find any MQL documentation about that. Only general staff about OAuth which it is needed to implement OAuth protocol in order to access the MQL5 through your app.   

Do you have any example of how does it work? 


Thanks

 
D3nn1s:

Thank you for your accurate response. 

At mql5 site in the tab Apps has indeed some functionality. You can add an application and start use it.
However i can't find any MQL documentation about that. Only general staff about OAuth which it is needed to implement OAuth protocol in order to access the MQL5 through your app.   

Do you have any example of how does it work? 


Thanks

No sorry.
As far as I know - MQ will develop this feature, and after that - we all will know about it.
It is not ready yet.

 
D3nn1s:

Thank you for your accurate response. 

At mql5 site in the tab Apps has indeed some functionality. You can add an application and start use it.
However i can't find any MQL documentation about that. Only general staff about OAuth which it is needed to implement OAuth protocol in order to access the MQL5 through your app.   

Do you have any example of how does it work? 


Thanks

That's not what you want... that is just a means of MQL5 community (this website) auth for 3rd party web-apps; kinda like how you can sign into other sites using your facebook account. This option will not give you API access directly to any broker server, be it live, demo, or otherwise. There are only two ways to communicate with MT broker servers. 1) MT web-terminal. 2)MT (windows) client-terminal.


You can, however, turn your client terminal into a server using this project. https://github.com/dingmaotu/mt4-server

 
nicholi shen:

That's not what you want... that is just a means of MQL5 community (this website) auth for 3rd party web-apps; kinda like how you can sign into other sites using your facebook account. This option will not give you API access directly to any broker server, be it live, demo, or otherwise. There are only two ways to communicate with MT broker servers. 1) MT web-terminal. 2)MT (windows) client-terminal.


You can, however, turn your client terminal into a server using this project. https://github.com/dingmaotu/mt4-server

Thank you for your response.

I think i don't have any problem to implement a server for MT4 in order to achieve execution. The issue that i am facing is that i can't find any solution to implement the creation of new account for any broker or for metaquotes's demo server programmatically. 
What i am trying to accomplish is to give the ability to a user to create a demo/live account through my app. So the app not only communicate with MT broker for execution(which is achievable) but communicate with MT broker/Metaquotes to create accounts too. 

Regards

 

When you start it for the first time, a new demo account is automatically created.

You can set a flag specifically for that purpose:

<iframe src="https://trade.mql5.com/trade?demo_all_servers=1&amp;startup_mode=open_demo&amp;lang=en&amp;save_password=off" allowfullscreen="allowfullscreen" style="width: 100%; height: 100%; border: none;"></iframe>

So if you use that, then it will do exactly what you are describing.

Even if you set it to false there is the ability to open a new account manually.
Reason: