coinbase/coinbase-pro-node is tracked by TopGit as an open-source project, with 882 stars on GitHub, written primarily in JavaScript. DEPRECATED — The official Node.js library for Coinbase Pro
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
error: contains an error message (string), or null if no error was
encountered
response: a generic HTTP response abstraction created by the request
library
data: contains data returned by the Coinbase Pro API, or undefined if an error was
encountered
publicClient.getProducts((error, response, data) => {
if (error) {
// handle the error
} else {
// work with data
}
});
NOTE: if you supply a callback, no promise will be returned. This is to
prevent potential UnhandledPromiseRejectionWarnings, which will cause future
versions of Node to terminate.
const publicClient = new CoinbasePro.PublicClient(endpoint);
productIDoptional - defaults to 'BTC-USD' if not specified.
endpointoptional - defaults to 'https://api.pro.coinbase.com' if not specified.
Public API Methods
getProducts
publicClient.getProducts(callback);
getProductOrderBook
// Get the order book at the default level of detail.
publicClient.getProductOrderBook('BTC-USD', callback);
// Get the order book at a specific level of detail.
publicClient.getProductOrderBook('LTC-USD', { level: 3 }, callback);
publicClient.getProductTrades('BTC-USD', callback);
// To make paginated requests, include page parameters
publicClient.getProductTrades('BTC-USD', { after: 1000 }, callback);
getProductTradeStream
Wraps around getProductTrades, fetches all trades with IDs >= tradesFrom and
<= tradesTo. Handles pagination and rate limits.
const trades = publicClient.getProductTradeStream('BTC-USD', 8408000, 8409000);
// tradesTo can also be a function
const trades = publicClient.getProductTradeStream(
'BTC-USD',
8408000,
trade => Date.parse(trade.time) >= 1463068e6
);
getProductHistoricRates
publicClient.getProductHistoricRates('BTC-USD', callback);
// To include extra parameters:
publicClient.getProductHistoricRates(
'BTC-USD',
{ granularity: 3600 },
callback
);
The private exchange API endpoints require you
to authenticate with a Coinbase Pro API key. You can create a new API key in your
exchange account's settings. You can also specify
the API URI (defaults to https://api.pro.coinbase.com).
Like PublicClient, all API methods can be used with either callbacks or will
return promises.
AuthenticatedClient inherits all of the API methods from
PublicClient, so if you're hitting both public and private API endpoints you
only need to create a single client.
const accountID = '7d0f7d8e-dd34-4d9c-a846-06f431c381ba';
authedClient.getAccountHistory(accountID, callback);
// For pagination, you can include extra page arguments
authedClient.getAccountHistory(accountID, { before: 3000 }, callback);
getAccountTransfers
const accountID = '7d0f7d8e-dd34-4d9c-a846-06f431c381ba';
authedClient.getAccountTransfers(accountID, callback);
// For pagination, you can include extra page arguments
authedClient.getAccountTransfers(accountID, { before: 3000 }, callback);
getAccountHolds
const accountID = '7d0f7d8e-dd34-4d9c-a846-06f431c381ba';
authedClient.getAccountHolds(accountID, callback);
// For pagination, you can include extra page arguments
authedClient.getAccountHolds(accountID, { before: 3000 }, callback);
// `cancelOrders` may require you to make the request multiple times until
// all of the "open" orders are deleted.
// `cancelAllOrders` will handle making these requests for you asynchronously.
// Also, you can add a `product_id` param to only delete orders of that product.
// The data will be an array of the order IDs of all orders which were cancelled
authedClient.cancelAllOrders({ product_id: 'BTC-USD' }, callback);
getOrders
authedClient.getOrders(callback);
// For pagination, you can include extra page arguments
// Get all orders of 'open' status
authedClient.getOrders({ after: 3000, status: 'open' }, callback);
const params = {
product_id: 'LTC-USD',
};
authedClient.getFills(params, callback);
// For pagination, you can include extra page arguments
authedClient.getFills({ before: 3000 }, callback);
// Deposit to your Exchange USD account from your Coinbase USD account.
const depositParamsUSD = {
amount: '100.00',
currency: 'USD',
coinbase_account_id: '60680c98bfe96c2601f27e9c', // USD Coinbase Account ID
};
authedClient.deposit(depositParamsUSD, callback);
// Withdraw from your Exchange USD account to your Coinbase USD account.
const withdrawParamsUSD = {
amount: '100.00',
currency: 'USD',
coinbase_account_id: '60680c98bfe96c2601f27e9c', // USD Coinbase Account ID
};
authedClient.withdraw(withdrawParamsUSD, callback);
// Deposit to your Exchange BTC account from your Coinbase BTC account.
const depositParamsBTC = {
amount: '2.0',
currency: 'BTC',
coinbase_account_id: '536a541fa9393bb3c7000023', // BTC Coinbase Account ID
};
authedClient.deposit(depositParamsBTC, callback);
// Withdraw from your Exchange BTC account to your Coinbase BTC account.
const withdrawParamsBTC = {
amount: '2.0',
currency: 'BTC',
coinbase_account_id: '536a541fa9393bb3c7000023', // BTC Coinbase Account ID
};
authedClient.withdraw(withdrawParamsBTC, callback);
// Fetch a deposit address from your Exchange BTC account.
const depositAddressParams = {
currency: 'BTC',
};
authedClient.depositCrypto(depositAddressParams, callback);
// Withdraw from your Exchange BTC account to another BTC address.
const withdrawAddressParams = {
amount: 10.0,
currency: 'BTC',
crypto_address: '15USXR6S4DhSWVHUxXRCuTkD1SA6qAdy',
};
authedClient.withdrawCrypto(withdrawAddressParams, callback);
depositPayment
// Schedule Deposit to your Exchange USD account from a configured payment method.
const depositPaymentParamsUSD = {
amount: '100.00',
currency: 'USD',
payment_method_id: 'bc6d7162-d984-5ffa-963c-a493b1c1370b', // ach_bank_account
};
authedClient.depositPayment(depositPaymentParamsUSD, callback);
withdrawPayment
// Withdraw from your Exchange USD account to a configured payment method.
const withdrawPaymentParamsUSD = {
amount: '100.00',
currency: 'USD',
payment_method_id: 'bc6d7162-d984-5ffa-963c-a493b1c1370b', // ach_bank_account
};
authedClient.withdrawPayment(withdrawPaymentParamsUSD, callback);
getTrailingVolume
// Get your 30 day trailing volumes
authedClient.getTrailingVolume(callback);
Websocket Client
The WebsocketClient allows you to connect and listen to the exchange
websocket messages.
const websocket = new CoinbasePro.WebsocketClient(['BTC-USD', 'ETH-USD']);
websocket.on('message', data => {
/* work with data */
});
websocket.on('error', err => {
/* handle error */
});
websocket.on('close', () => {
/* ... */
});
The client will automatically subscribe to the heartbeat channel. By
default, the full channel will be subscribed to unless other channels are
requested.
Does coinbase/coinbase-pro-node have a project website?
No homepage URL was recorded for coinbase/coinbase-pro-node in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Is coinbase/coinbase-pro-node open source?
Yes — coinbase/coinbase-pro-node ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/coinbase/coinbase-pro-node.
What is coinbase/coinbase-pro-node?
coinbase/coinbase-pro-node (coinbase/coinbase-pro-node) is a JavaScript project on GitHub. From the project's own README: DEPRECATED — The official Node.js library for Coinbase Pro
What license does coinbase/coinbase-pro-node use?
coinbase/coinbase-pro-node is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about coinbase/coinbase-pro-node?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/coinbase/coinbase-pro-node is the definitive source.
Read full README in the tab above.
Still deciding about coinbase-pro-node?
One click hands the question to an AI along with this page — see what it says about coinbase-pro-node.