Tag: wamp protocol

如何使用Jawampa(Java WAMP实现)来订阅事件

我想使用poloniex API。 https://poloniex.com/support/api/ 到目前为止,我使用IntelliJ运行Jawampa( https://github.com/Matthias247/jawampa )。 我的第一个问题是,如何成功登录? (Jawampa的文件没有帮助) 我有一个API密钥和一个秘密。 我必须在Jawampa的建造者中使用哪些function: withRealm withRoles withConnectorProvider withConnectionConfiguration withSerializations withStrictUriValidation withAuthId withAuthMethod withObjectMapper 我到目前为止这个代码 try { WampClientBuilder builder = new WampClientBuilder(); builder.withConnectorProvider(connectorProvider) .withUri(“wss://api.poloniex.com”) .withAuthId(“APIKEY”) .withRealm(“realm2”) .withInfiniteReconnects() .withReconnectInterval(1, TimeUnit.SECONDS); client1 = builder.build(); } catch (Exception e) { e.printStackTrace(); return; } wss://api.poloniex.com是正确的还是我应该使用wss://api.poloniex.com/returnTicker为该客户端? 我是否必须为每个URI创建一个新的客户端? 非常感谢你提前。