• 概要
  • レビュー (3)
  • コメント (2)
  • 最新情報

Easy websocket library for mql5

An easy to use websocket library for MQL5. It supports:

  • ws:// and wss:// (secure websocket)
  • text and binary data
  • automatic ping-pong handling on protocol level
    (keep-alive protocol hand shake)
  • automatic fragmented message handling on protocol level
    (large data transfer enabled)

==================================================
ATTENTION: 
PLEASE CONTACT SELLER BEFORE PURCHASE.
Due to the nature of this kind of library, 

FULL FEATURE DEMO VERSION CAN BE PROVIDED ON REQUEST
==================================================


This library requires:

Win64 OpenSSL v1.1.1g

    NOTE: Link might be outdated due to version update. Please visit https://slproweb.com/products/Win32OpenSSL.html and download Win64 OpenSSL Full Installer.

    and MSVC 14 runtime  (x64)

    which can be downloaded for free.

    TIPS:
    You can use this tool to troubleshoot DLL issue:
    https://www.dependencywalker.com/

    Sample code is as simple as following:

    #include <wsmql.mqh>
    
    
    void OnStart()
      {
       // ATTENTION: library initialization must be executed first
       wsInit();
    
       string url = "www.bitmex.com:443/realtime";
       string msg = "{ \"op\": \"subscribe\", \"args\" : [\"orderBookL2_25:XBTUSD\"] }";
    
       WSSHANDLE handle = wsConnect(url);
    
       int len;
       string resp;
       char recv_buffer[];
       ArrayResize(recv_buffer, 65536);
    
       if(handle!=0)
         {
          Sleep(1000);
          char buffer[];
          StringToCharArray(msg, buffer);
    
          wsSendBinary(handle, buffer, ArraySize(buffer)-1);
    
          int counter = 1;
          StringReserve(resp, 65536);
    
          while(!IsStopped())
            {
             len = 65535;
             counter = wsReceiveBinary(handle, recv_buffer, len);
             if(counter >= 0)
               {
                string r = CharArrayToString(recv_buffer,0, len);
                PrintFormat("+++ %d: %d [%s]", counter, len, r);
               }
             Sleep(100);
            }
          PrintFormat("*** disconnect");
          Sleep(1000);
          wsDisconnect(handle);
         }
       PrintFormat("*** DONE");
      }
    


    API provided:

    • Connection:
      • WSSHANDLE wsConnect(string wssURL)
      • void wsDisconnect(WSSHANDLE handle)
    • Text send and receive:
      • int wsReceive(WSSHANDLE handle, string& buffer, int limit)
      • int wsSend(WSSHANDLE handle, string buffer)
    • Binary send and receive:
      • int wsReceiveBinary(WSSHANDLE handle, char& buffer[], int& limit)
      • int wsSendBinary(WSSHANDLE handle, char& buffer[], int limit)
    • Status:
      • int wsReceived(WSSHANDLE handle)
      • int wsIsConnected(WSSHANDLE handle)
    Feel free to contact me for support and other options available.


    =====================================
    ATTENTION:

    PLEASE CONTACT SELLER BEFORE PURCHASE.
    =====================================


    レビュー 3
    helk3rn
    352
    helk3rn 2020.02.14 22:12 
     

    Bought it for my Bitmex projects, was very satisfied. Great product and support, thx

    おすすめの製品
    フィルタ:
    philikn
    50
    philikn 2020.07.18 03:31   

    Fast support, update and extra demo. 5 stars.

    JDPNZD
    25
    JDPNZD 2020.05.22 11:59   

    Bought this product for some development. Service and support from the developer is excellent and I am really satisfied with a great product that is actually working and easy to use. So well worth the price. Thanks.

    helk3rn
    352
    helk3rn 2020.02.14 22:12 
     

    Bought it for my Bitmex projects, was very satisfied. Great product and support, thx

    バージョン 191.200 2020.01.29
    added methods to support ws:// and wss://