Hola, trato de entender esta biblioteca y tengo una fuente de python aquí https://github.com/ig-python/ig-markets-api-python-library/blob/master/trading_ig/lightstreamer.py en la línea 187 I' Puedo agregar LS_op2 o configurar LS_container pero tengo problemas para hacer esto en la versión js.
el primer mensaje que quiero es:
LS_op2=create&LS_phase=5701&LS_cause=new.api&LS_polling=true&LS_polling_millis=0&LS_idle_millis=0&LS_cid=pcYgxn8m8 feOojy*****f3g2.pz479mDv&LS_adapter_set=DEMO&LS_container=lsc&pero solo obtengo
LS_phase=3201&LS_cause=new.nullresp&LS_polling=true&LS_polling_millis=0&LS_idle_millis=0&LS_cid=pcYgxn*** feOojyA1U661i3g2.pz47Af6k&LS_adapter_set=DEMO&Tal vez alguien tenga una idea, aquí está mi fuente, gracias.
<html> <head> <script src="https://unpkg.com/lightstreamer-client-web@8.0.3/lightstreamer.min.js"></script> <script> document.addEventListener("DOMContentLoaded", function(event) { var client = new LightstreamerClient("https://push.lightstreamer.com","DEMO"); client.connect(); var sub = new Subscription("MERGE",["item1","item2","item3"],["stock_name","last_price"]); sub.setDataAdapter("QUOTE_ADAPTER"); sub.setRequestedSnapshot("yes"); sub.addListener({ onItemUpdate: function(obj) { console.log(obj.getValue("stock_name") + ": " + obj.getValue("last_price")); } }); client.subscribe(sub); }); </script> </head> <body> </body> </html>Si la pregunta es por qué la biblioteca Lightstreamer javascript SDK 8.0.3 crea una solicitud diferente, es porque el código python proporcionado como referencia (que no se apoya en ninguna biblioteca SDK) usa una versión anterior del protocolo de comunicación. De todos modos, se supone que la solicitud emitida por la biblioteca de JavaScript funciona.