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,370 points
785 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
• 26,740 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 aryya
• 7,460 points
756 views
0 votes
1 answer
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,461 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
1,947 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP