Is it possible to use CURL requests etc?
-
Is it possible to use CURL requests etc?
I am trying to make a trading bot for crypt exchanges. It must work via API.
For example
https://api.hitbtc.com/#trading
curl -X GET -u "ff20f250a7b3a414781d1abe11cd8cee:fb453577d11294359058a9ae13c94713"
"https://api.hitbtc.com/api/2/trading/balance"
The above command returns JSON structured like this:[ { "currency": "ETH", "available": "10.000000000", "reserved": "0.560000000" }, { "currency": "BTC", "available": "0.010205869", "reserved": "0" } ]Is there ant way to do it? To send this kind of requests?
-
Perhaps this will help ...
-
There is a function to send requests, but even then MetaTrader cannot read JSON... I believe... at least not natively.
-
Curl is an external executable, accessible with the ShellExecute function and dll. Usually comes with other good tools. Python will probably do the rest of what you need or Perl, etc.
Not sure what the latency will be, but you can probably make things work with those tools.
Using fxD's 'Write to file' to shoot your data outside of MT. Lots of tools for looking inside CVS files after that.
Various MT functions that go both ways too, accessible through fxD's 'Custom MQL code' block.Done this with other platforms and tools in the past. Usually not that hard.