Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitstamp loadMarkets fails #5739

Closed
burzakovskiy opened this issue Aug 27, 2019 · 6 comments
Closed

bitstamp loadMarkets fails #5739

burzakovskiy opened this issue Aug 27, 2019 · 6 comments
Assignees

Comments

@burzakovskiy
Copy link

burzakovskiy commented Aug 27, 2019

MUST READ THIS BEFORE SUBMITTING ISSUES (read the link, then delete this message before submitting):

https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue

Please make sure your local version of ccxt is up to date with this repo. You can check by comparing the output of ccxt.version to https://github.com/ccxt/ccxt/blob/master/package.json#L3

  • OS: Ubuntu
  • Programming Language version: js
  • CCXT version: 1.18.1094
  • Exchange: bitstamp
  • Method: loadMarkets

Request fails only on production server (works fine on test) and only for bitstamp (works fine for polo, bittrex, huobipro, bitfinex, binance).
Also curl -X GET https://www.bitstamp.net/api/v2/trading-pairs-info/works fine

const ccxt = require('ccxt')
const bitstamp = new ccxt['bitstamp']
bitstamp.verbose=true
bitstamp.loadMarkets().then(()=>{
})
fetch:
 bitstamp GET https://www.bitstamp.net/api/v2/trading-pairs-info/ 
Request:
 {
  'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'
} 
 undefined 
(node:14732) UnhandledPromiseRejectionWarning: ExchangeNotAvailable: bitstamp GET https://www.bitstamp.net/api/v2/trading-pairs-info/ system request to https://www.
bitstamp.net/api/v2/trading-pairs-info/ failed, reason: Parse Error: Invalid header value char
    at /home/test/node_modules/ccxt/js/base/Exchange.js:409:35
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
(node:14732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch blo
ck, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14732) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the No
de.js process with a non-zero exit code.
@Ekliptor
Copy link

Ekliptor commented Oct 16, 2019

I am still getting this same error

ExchangeNotAvailable: bitstamp GET https://www.bitstamp.net/api/v2/trading-pairs-info/ system request to https://www.bitstamp.net/api/v2/trading-pairs-info/ failed, reason: Parse Error: Invalid header value char
    at /Volumes/untitled/Coding/NodeProjects/BitBrain/Sensor/node_modules/ccxt/js/base/Exchange.js:408:35
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at timeout (/Volumes/untitled/Coding/NodeProjects/BitBrain/Sensor/node_modules/ccxt/js/base/functions/time.js:176:24)
    at bitstamp.fetchMarkets (/Volumes/untitled/Coding/NodeProjects/BitBrain/Sensor/node_modules/ccxt/js/bitstamp.js:174:26)
    at bitstamp.loadMarkets (/Volumes/untitled/Coding/NodeProjects/BitBrain/Sensor/node_modules/ccxt/js/base/Exchange.js:687:25)

None of the fixes mentioned linked work

  • OS: OSX
  • Programming Language version: js
  • CCXT version: 1.18.1281
  • Exchange: bitstamp
  • Method: loadMarkets

@kroitor
Copy link
Member

kroitor commented Oct 16, 2019

@Ekliptor can you confirm that you have the most recent version of CCXT?

@Ekliptor
Copy link

Yes.
console.log(ccxt.version); ccxt prints 1.18.1281

nodeJS v12.11.1

@kroitor
Copy link
Member

kroitor commented Oct 17, 2019

@Ekliptor ok, thx! We will debug this and will get back to you ASAP.

@kroitor
Copy link
Member

kroitor commented Mar 25, 2020

Bitstamp has fixed this on their side, so it's now a proper HTTP rejection code if the user location is blocked, closing this for now. Feel free to reopen it or just ask further questions, if any.

@kroitor kroitor closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants