Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
TAAPI.IO is an API that calculates Technical Analysis Indicator values.
This NPM package is a wrapper and a client for communicating with the TAAPI.IO API
Using this service requires registration. Please check TAAPI.IO. We offer free and paid plans.
Using this client supports all exchanges / markets / timeframes. This client will take care of fetching candles from the exchanges and passing them on to https://api.taapi.io for indicator calculation. This means that you yourself are responsible for staying under the exchanges rate-limits! A list of exchangeId's will come soon.
Get started quickly with NodeJS and calculate indicator values with 3 lines of code.
// Require taapi
const taapi = require("taapi");
// Setup client with authentication
const client = taapi.client("MY_SECRET");
// Get the BTCUSDT RSI value on the 1 minute timeframe from binance
client.getIndicator("rsi", "binance", "BTC/USDT", "1m").then(function(result) {
console.log("Result: ", result);
});
// CMF 10 minutes ago from kucoin
client.getIndicator("cmf", "kucoin", "BTC/USDT", "1m", null, 10).then(function(result) {
console.log("Result: ", result);
});
// Current 200 Moving Average
client.getIndicator("ma", "binance", "BTC/USDT", "1m", {optInTimePeriod: 200}).then(function(result) {
console.log("Result: ", result);
});
// 50 Moving Average 20 minutes ago
client.getIndicator("ma", "binance", "BTC/USDT", "1m", {optInTimePeriod: 50}, 20).then(function(result) {
console.log("Result: ", result);
});
You can use this package as a server, which will take care of fetching candle data from the exchanges and passing it on TAAPI.IO for calculation. Then use your favorite programming language to build your robot. Starting the server will setup a local REST API, that you can then query.
// Require taapi
const taapi = require("taapi");
// Setup client with authentication
const server = taapi.server("MY_SECRET");
// Define port - Optional and defaults to 4101
// server.setServerPort(3000);
// Start the server
server.start();
Fetching data from a PHP script:
// Define query
$query = http_build_query(array(
'indicator' => 'rsi',
'exchange' => 'binance',
'symbol' => 'BTC/USDT',
'interval' => '1h'
));
// Define endpoint. Change the port if you changed it when setting up the server
$url = "http://localhost:4101/indicator?{$query}";
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $url);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
// View result
print_r(json_decode($output));
// Require taapi
const taapi = require("taapi");
// Init
const exchangeData = taapi.exchangeData();
// Get the last 100 candles from Binance for the BTCUSDT 1m
exchangeData.getCandles("binance", "BTC/USDT", "1m", 100).then(function(result) {
console.log("Result: ", result);
});
// Get last candle from Binance for the BTCUSDT 1m
exchangeData.getCandles("binance", "BTC/USDT", "1m", 1).then(function(result) {
console.log("Result: ", result);
});
// Get 1 candle 10 minutes ago from Kucoin for the BTCUSDT 1m
exchangeData.getCandles("kucoin", "BTC/USDT", "1m", 1, 10).then(function(result) {
console.log("Result: ", result);
});
More examples to come!
TODO: Error handling
FAQs
A wrapper and a client for the TAAPI.IO API
The npm package taapi receives a total of 8 weekly downloads. As such, taapi popularity was classified as not popular.
We found that taapi 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.