
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
talib-binding
Advanced tools
A synchronous [TA-Lib](http://ta-lib.org/) bindings for Node.js & TypeScript.
A synchronous TA-Lib bindings for Node.js & TypeScript.
var yarn:
yarn add talib-binding
var npm:
npm install talib-binding --save
Before install this module, you may need to install windows-build-tools by run:
npm install --global --production windows-build-tools
startIdx and endIdx is placed at the end of the function signature, and is optional.Record[] to extract its fields rather than input double array such as inHigh, inLow, etc. And if the input field is a implicit field of the records, you need to input a string to specifying which one field will be extract as it.TA-Lib:
import * as talib from 'talib-binding'
talib.SAR(
[2, 3, 4, 5], /* inHigh */
[1, 2, 3, 4], /* inLow */
0.02, /* optAcceleration_Factor, optional */
0.2, /* optAF_Maximum, optional */
0, /* startIdx, optional */
3 /* endIdx, optional */
)
Record array as the first parameter, the library will extract the field value automatically, if the function contains some implicit parameter name, you need to pass the name string to extract it. The implicit parameter means that the param is not one of High, Low, Open, Close, and Volume, just like inReal, more detailed information could be found in the TypeScript function signatures.
import * as talib from 'talib-binding'
const records = [
{Time: 0, Open: 1, High: 2, Low: 1, Close: 2, Volume: 1},
{Time: 0, Open: 2, High: 3, Low: 2, Close: 3, Volume: 1},
{Time: 0, Open: 3, High: 4, Low: 3, Close: 4, Volume: 1},
{Time: 0, Open: 4, High: 5, Low: 4, Close: 5, Volume: 1},
]
talib.SAR(records)
// The COS function contains implicit parameter name, you need to call it as follow:
talib.COS(records, 'Volume')
import * as talib from 'talib-binding'
const outReal = talib.SAR([2, 3, 4, 5], [1, 2, 3, 4])
console.log(outReal)
// [ 1, 1.04, 1.1584 ]
const [outUp, outMid, outLow] = talib.ACCBANDS([2, 3, 4, 5], [1, 2, 3, 4], [2, 3, 4, 5], 3)
console.log(outUp, outMid, outLow)
// [ 5.45079365079365, 6.302645502645503 ]
// [ 3, 4 ]
// [ 0.4507936507936508, 1.3026455026455028 ]
import * as talib from 'talib-binding'
talib.ACCBANDS([2, 3, 4, 5], [1, 2, 3, 4], [2, 3, 4, 5], 10)
// throw RangeError: `startIdx` or `endIdx` out of range
TA_MAType, which is exported as MATypes in the binding. For example:
import * as talib from 'talib-binding'
talib.MA([1, 2, 3], void 0, talib.MATypes.SMA)
Clone the repo at first:
git clone https://github.com/acrazing/talib-binding-node && cd talib-binding-node
All the files end with generated.* is generated by src/generate.ts. Maybe you need to view it
to get detailed information.
FAQs
A synchronous [TA-Lib](http://ta-lib.org/) bindings for Node.js & TypeScript.
The npm package talib-binding receives a total of 296 weekly downloads. As such, talib-binding popularity was classified as not popular.
We found that talib-binding 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.