Registry / finance / bitstamp

bitstamp

JSON →
library1.0.6jsnpmunverified

Bitstamp is a basic JavaScript API wrapper for the Bitstamp REST API (both public and private endpoints). Current stable version is 1.0.6, last updated in June 2016. It supports market data (ticker, transactions, order book) and private trading functions (balance, orders, buy/sell). Key differentiator: simple callback-based API with minimal dependencies. However, the library is unmaintained, uses old API v2, and lacks TypeScript types. For new projects, consider using the official Bitstamp API or a modern alternative.

npm install bitstamp
INSTALL
IMPORT
SIG · BITSTAMP
B
bitstamp
financejavascriptv1.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bitstamp
const Bitstamp = require('bitstamp')
import Bitstamp from 'bitstamp'
The package only provides a CommonJS export. ESM import will fail.
bitstamp instance
const bitstamp = new Bitstamp('key', 'secret', 'clientId')
const bitstamp = new Bitstamp()
Private API calls require key, secret, and client ID. Missing them causes authentication errors.
transactions
bitstamp.transactions('btcusd', callback)
bitstamp.transactions(callback)
Since v0.3.0 (June 2016), the first argument must be the market pair (e.g., 'btcusd'). Omitting it will return undefined.

Shows how to require the library, instantiate with optional auth, and call public transactions endpoint.

const Bitstamp = require('bitstamp'); const bitstamp = new Bitstamp(); // Public API: get transactions for btcusd bitstamp.transactions('btcusd', (err, trades) => { if (err) { console.error(err); } else { console.log(trades); } }); // Private API: get account balance (requires key/secret/clientId) // const bitstampAuth = new Bitstamp('key', 'secret', 'clientId'); // bitstampAuth.balance((err, balance) => { // if (err) console.error(err); // else console.log(balance); // });
Debug
Known issues
breakingSince v0.3.0 (June 2016), API v2 endpoints require a market parameter (e.g., 'btcusd') for public calls like transactions and order book.
fix
Update calls to include market pair as first argument: bitstamp.transactions('btcusd', callback).
affects: >=0.3.0
deprecatedThe package is unmaintained and uses old Bitstamp API v2. Bitstamp may have deprecated or changed endpoints.
fix
Consider migrating to a maintained library or direct HTTP requests.
affects: >=0.0.0
gotchaPrivate API authentication requires three parameters: API key, secret, and client ID (your Bitstamp user ID). Many users forget the client ID.
fix
Provide all three: new Bitstamp('key', 'secret', '12345') where 12345 is your user ID.
affects: >=0.1.0
gotchaThe library uses callbacks, not Promises. Mixing with async/await requires promisification.
fix
Wrap calls in Promise: new Promise((res, rej) => bitstamp.transactions('btcusd', (e, d) => e ? rej(e) : res(d))).
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: bitstamp.transactions is not a function
Instantiated without `new` keyword, or forgot to require the module.
fix
Use `const bitstamp = new Bitstamp()` after requiring.
Error: missing key, secret and clientId
Called private API method without providing authentication credentials.
fix
Instantiate with credentials: `new Bitstamp('key', 'secret', 'clientId')`.
Cannot find module 'bitstamp'
Package not installed or not in node_modules.
fix
Run `npm install bitstamp` in your project directory.
Upgrade
Version history
1.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
56 hits · last 30 days
node
46
Perplexity
1
OpenAI (training)
1
Resources
bitstamp — npm install bitstamp · libregistry