Coinbase spot price SSL Error: does not support SSL at Request

0 votes

I am making ab API call to coinbase using the example coinbase supplied but I get Error: SSL Error: https://api.coinbase.com/v2/prices/BTC-USD/spot does not support SSL at Request

npm install coinbase var Client = require('coinbase').Client;

var btcClient = new Client({
  'apiKey': '...',
  'apiSecret': '...',
  'version': '2010-04-20'
});

var currencyCode = 'USD';

btcClient.getSpotPrice({
  'currency': currencyCode
}, function(err, price) {
  console.log('Current bitcoin price in ' + currencyCode + ': ' + price.data.amount);
});

Can someone help me with this?

Sep 6, 2018 in Blockchain by slayer
• 29,050 points
38 views

1 answer to this question.

0 votes

Add 'strictSSL': false to the new client:

var btcClient = new Client({
  'apiKey': '...',
  'apiSecret': '...',
  'version': '2010-04-20',
  'strictSSL': false
});

This should work

answered Sep 6, 2018 by digger
• 27,640 points

Related Questions In Blockchain

0 votes
1 answer

Is it possible to claim Bitcoin Cash from an exchange that does not support it?

You can't claim BCH without knowing private ...READ MORE

answered Jul 17, 2018 in Blockchain by ariaholic
• 7,340 points
38 views
0 votes
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
75 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
140 views
0 votes
1 answer