Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A Node.js-based Implementation of Bitcoin Indonesia's Trade API
This implementation is compatible with Trade API v1.7. All API request methods are implemented using Request and Bluebird.
bignumber.js
. You know, JavaScript is bad at math and I am pretty sure you don't want to lose even only a small fraction of your precious digital golds.const btcid = require('btc-id');
const API = new btcid();
version
Get Trade API compatibility version. Example:
console.log(API.version); // '1.7'
baseUrl
Get/set base URL for API requests. Example:
console.log(API.baseUrl); // 'https://vip.bitcoin.co.id'
API.baseUrl = 'http://a-trading-proxy.com';
console.log(API.baseUrl); // 'http://a-trading-proxy.com'
key
Set API key. Example:
API.key = 'AAAAAAAA-BBBBBBBB-CCCCCCCC-DDDDDDDD-EEEEEEEE';
secret
Set secret key. Example:
API.secret = '1263e5a57b853024509bf94ff466ec6a2a733ad83a2aa6ceb5cc14301713b4a77f2bb154a66cde73';
pair(coinA, coinB)
An easy way to generate coin pair string for use with API requests. Example:
console.log(API.pair('BTC', 'IDR')); // 'btc_idr'
getTicker(pair)
Example:
API.getTicker(API.pair('BTC','IDR'))
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getTrades(pair)
Example:
API.getTrades(API.pair('BTC','IDR'))
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getDepth(pair)
Example:
API.getDepth(API.pair('BTC','IDR'))
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getInfo()
Example:
API.getInfo()
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getTransHistory()
Example:
API.getTransHistory()
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getTradeHistory({pair, [count, from_id, end_id, order, since, end]})
Example:
API.getTradeHistory({pair: API.pair('BTC', 'IDR'), count: 100, order: 'desc'})
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getOpenOrders({[pair]})
Example A (get all open orders of all pairs):
API.getOpenOrders({})
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
Example B (get open orders of specific pair):
API.getOpenOrders({pair: API.pair('BTC', 'IDR')})
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getOrderHistory({pair, [count, from]})
Example:
API.getOrderHistory({pair: API.pair('BTC', 'IDR'), count: 100})
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
getOrder({pair, order_id})
Example:
API.getOrder({pair: API.pair('BTC', 'IDR'), order_id: 94428})
.then(function(response) {
console.log(response);
})
.catch(function(err) {
console.error(err);
});
FAQs
A Node.js-based Implementation of Bitcoin Indonesia's Trade API
We found that btc-id demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.