Open tomeroto opened 6 years ago
Hi @tomeroto We just published a new version 1.2.1 of our npm package: https://www.npmjs.com/package/bitcoinaverage There is an example on connecting to websocket v2 in the documentation on the same link. Basically you just need to use the new method: connectToTickerWebsocketV2.
Hope this helps and let us know if you run into any trouble.
Best regards, Darko, Lead developer at BitcoinAverage.
Hi @KolevDarko
Thank you for your response. I was update the package to version 1.2.1, but still get response below:
Error in BA response. Status Code: 502 body: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
Do you have sample implementation or step to go with enterprise api key?
Same here. Is there any update?
@tachiba Did the steps in @KolevDarko 's post not work?
Hey guys @tachiba @tomeroto , here is a full working example.
const ba = require('bitcoinaverage');
symbols = ['BTCUSD', 'ETHEUR'];
var pub = <public_key>
var secret = <secret_key>
function connect_ticker_v2(market, symbols) {
var ws = ba.websocketClient(pub, secret);
ws.connectToTickerWebsocketV2(market, symbols, function (response) {
console.log("BTCUSD");
console.log(response.data[market].BTCUSD);
console.log("ETHEUR");
console.log(response.data[market].ETHEUR);
}, function (error) {
console.log(error)
},
function () {
console.log("Closed")
}
)
}
connect_ticker_v2('global', symbols);
In the future you can also email us directly at: info@bitcoinaverage.com or create an Jira issue here: https://support.bitcoinaverage.com/servicedesk/customer/portal/1
Hi all,
I try to use bitcoinaverage from NPM to using V2 method. When I call API for get ticket by this URL: https://apiv2.bitcoinaverage.com/websocket/v2/get_ticket
and set header according to this docs https://apiv2.bitcoinaverage.com/?shell#requests
but it just take response to long and get bad gateway.
I read some notes from the docs for V2, it says:
After I follow the instruction, and test run, it just get same response (BAD GATEWAY).
Please help.