Coinbase.getSellPrice()

Total price to sell some amount of bitcoin.

The price is broken down as follows: >btc - this is the total amount of bitcoin you would deducted from your account >subtotal - this is the current market price to sell this quantity of bitcoin, we integrate with a number of exchanges on the backend to calculate this price >fees - an array of fees you will pay if you wish to sell at this price through Coinbase >total - the subtotal minus fees, this is the total amount you will receive if you wish to sell this quantity on Coinbase

Usage

Hover over inputs/exits for more info.

var Coinbase = require('machinepack-coinbase');


// Total price to sell some amount of bitcoin.

Coinbase.getSellPrice({

quantity: '10',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

quantity

The quantity of bitcoin you would like to sell (default is 1).

'10'

Exits

error

An unexpected error occurred.

success

OK.

{ subtotal: { amount: '9.90', currency: 'USD' },
  fees: 
   [ { coinbase: { amount: '0.10', currency: 'USD' } },
     { bank: { amount: '0.15', currency: 'USD' } } ],
  total: { amount: '9.65', currency: 'USD' },
  amount: '9.65',
  currency: 'USD' }