fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Is it possible to use CURL requests etc?

    Questions & Answers
    3
    4
    1136
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GSMtricks last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • R
        richard96816 last edited by

        Perhaps this will help ...

        https://www.mql5.com/en/forum/119063

        1 Reply Last reply Reply Quote 0
        • fxDreema
          fxDreema last edited by

          There is a function to send requests, but even then MetaTrader cannot read JSON... I believe... at least not natively.

          1 Reply Last reply Reply Quote 0
          • R
            richard96816 last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            B
            A
            J
            D
            E

            17
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors