dparlevliet / node.bittrex.api

Node Bittrex API is an asynchronous node.js library for the Bittrex API, the data can be received either via GET request or Stream.
MIT License
253 stars 100 forks source link

Will there be support for new ws api (beta) ? #157

Open ardabeyazoglu opened 6 years ago

ardabeyazoglu commented 6 years ago

Bittrex announced its new api in beta https://github.com/Bittrex/beta

dparlevliet commented 6 years ago

Thanks for letting me know. I'll take a look

mightymouse2045 commented 6 years ago

I know you only just got this, but do you have an eta at all for working with the beta api that doesn't appear to use cloudflare?

n0mad01 commented 6 years ago

i've added a sample as pull request: https://github.com/Bittrex/beta/pull/5

meanwhile you can checkout this gist: https://gist.github.com/n0mad01/6a582e803ab03c517841180a1844aecf

pdotmidge commented 6 years ago

@mightymouse2045 if you're connecting per the instructions in the readme, you should not be hitting CloudFlare.

mightymouse2045 commented 6 years ago

Hi there - I am just polling with the websockets and I thought that goes through cloudflare hence the 5 second delay in connecting? Am I doing something wrong - snippet below:

!/usr/bin/env node

/ jshint esversion: 6 / "use strict"; const bittrex = require("node-bittrex-api"),     fs = require('fs'),     request = require('request');

// Bittrex options bittrex.options({     "apikey": "fafdssds",     "apisecret": "fsfdsfsdfsdd",     "verbose": false,     "cleartext": false,     /    "baseUrl": "https://bittrex.com/api/v1", /     "baseUrlv2": "https://bittrex.com/Api/v2.0",     "headers": { "Referer": "https://www.google.com",         "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko)",         "cookie": "__cfduid=check_browser_console; cf_clearance=check_browser_console",         "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8",         "Accept-Encoding": "gzip, deflate, br",         "Accept-Language": "en-US;q=0.9,en;q=0.8",         "Cache-Control": "no-cache",         "Upgrade-Insecure-Requests": 1,         "Pragma": "no-cache" } }); bittrex.websockets.listen(function SubscribeToBittrex(data) {     if (data.M === "updateSummaryState") {         data.A.forEach(function (DataFor) {             DataFor.Deltas.forEach(function (marketsDelta) {                 console.log(marketsDelta);                 // assert.equal(null, err);             });         });     } });

On Tuesday, 3 April 2018, 2:58:01 am AWST, Paul Midgen <notifications@github.com> wrote:  

@mightymouse2045 if you're connecting per the instructions in the readme, you should not be hitting CloudFlare.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.