i want to use the poloniex API. https://poloniex.com/support/api/
So far i made Jawampa ( https://github.com/Matthias247/jawampa ) running with IntelliJ.
My first Question is, how to login successfuly? (The Docu of Jawampa doesnt help)
I got a API Key and a Secret. Which functions i have to use in the builder of Jawampa:
withRealm withRoles withConnectorProvider withConnectionConfiguration withSerializations withStrictUriValidation withAuthId withAuthMethod withObjectMapper
I have so far this code
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;
}
Is wss://api.poloniex.com correct or should i use wss://api.poloniex.com/returnTicker for that client?
Do I have to make always a new client for every URI?
Thank you so much in advance.
You don't have to authenticate to access Poloniex Push API via WAMP protocol. Push API methods are public, so you don't have to supply the API key and secret. Just connect to wss://api.poloniex.com and subscribe to a desired feed (Ticker, Order Book and Trades, Trollbox).
Btw, you need to supply the API Key only with Trading API methods. And the Secret is used to sign a POST data.
This is how you connect to the Push API:
Once your client is connected, you subscribe to a feed like this:
wss://api.poloniex.com is correct. Besides, returnTicker belongs to the Public API and is accessed via HTTP GET requests.
In respect to the Push API, once you connected a client to wss://api.poloniex.com, you can use this client to make subscriptions to multiple feeds. For example:
However, according to Jawampa Docs: