
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
twelvedata-ts
Advanced tools
This is a TypeScript wrapper for the TwelveData API. Supported endpoints are well-typed. The ultimate goal is 100% API coverage, that being said, this is still a work in progress.
BIG thanks to @jonnotjohn ❤️
Contributions welcome! 🥺👍
Many of the partial categories have all of their endpoints mapped and typed, but have not been exhaustively tested, so until then, they are listed as "partial."
npm install twelvedata-ts
import TwelveData from 'twelvedata-ts';
const client = new TwelveData({
apiKey: "demo",
creditsPerMinute: 1597, // Put your plan's credits per minute here for automatic rate limiting
});
If the creditsPerMinute option is provided, the client will rate limit requests to avoid exceeding your plan's per-minute limit. The client is also aware of each endpoint's credit cost and will intelligently attempt to maximize each minute's credit usage. Rate limiting is disabled by default.
Endpoints are organized by section as in the official TwelveData documentation. Endpoints are nested in the same hierarchy as they appear in the documentation.
const timeSeriesReq: TimeSeriesRequest = {
symbol: "AAPL",
interval: Interval.FiveMin,
outputSize: 30,
};
const res = await client.core.getTimeSeries(timeSeriesReq);
// Endpoints that have no required parameters can omit a request object.
const json: ETFsResponse = await client.reference.assetCatalogs.getEtfs();
// If an endpoint supports CSV format, a string will be returned.
const csv: string = await client.reference.assetCatalogs.getEtfs({}, "csv");
Each supported endpoint has a corresponding request and response interface defining the available request/response parameters. Endpoint functions that support either CSV or JSON output also have an optional argument.
FAQs
TypeScript TwelveData API wrapper
The npm package twelvedata-ts receives a total of 143 weekly downloads. As such, twelvedata-ts popularity was classified as not popular.
We found that twelvedata-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.