![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@equitysim/trkd-client
Advanced tools
Readme
REST Client for Thomson Reuters Knowledge Direct (TRKD) API
Requires module support
$ npm install @equitysim/trkd-client --save
import TRKDClient from '@equitysim/trkd-client'
TRKDClient.init({
application: TRKD_APP,
username: TRKD_USER,
password: TRKD_PASS
})
const trkdClient = new TRKDClient()
trkdClient.quotes.retrieveItem('AAPL.O').then(quote => {
console.log(quote)
})
trkdClient.fundamentals.getSnapshotReports(companyId, companyIdType = 'RIC')
trkdClient.quotes.retrieveItem(ric, fields = null)
trkdClient.search.all(queries = searchAllQueries, filters = {}, header = defaultHeader)
trkdClient.search.equityQuote(queries = equityQuoteQueries, filters = {}, header = defaultHeader)
trkdClient.search.fundQuote(queries = fundQuoteQueries, filters = {}, header = defaultHeader)
trkdClient.search.governmentAndCorporateBondInstruments(queries = bondInstrumentQueries, filters = {}, header = defaultHeader)
trkdClient.streetEvents.getEventHeadlines(eventType, startDate, endDate)
trkdClient.streetEvents.getEvent(eventId)
trkdClient.timeseries.getIntraday(ric, startTime, endTime, interval)
trkdClient.timeseries.getInterday(ric, startTime, endTime, interval)
trkdClient.timeseries.getExchangeData(ric)
trkdClient.timeseries.getTimezone()
Values may be booleans, strings, or objects. Booleans and strings are constructed into appropriate query objects, whereas objects are passed in as is.
Examples:
{
AssetCategory: true
}
becomes:
{
AssetCategory: {
Include: true
}
}
{
ExchangeCode: 'NSQ'
}
becomes:
{
ExchangeCode: {
Include: true,
StringValue: [{
Value: 'NSQ'
}]
}
}
{
ExchangeCode: '!NSQ'
}
becomes:
{
ExchangeCode: {
Include: true,
StringValue: [{
Value: 'NSQ',
Negated: true
}]
}
}
{
MaturityDate: {
Include: true,
DateValue: [{
Expression: 'GreaterThan',
Value: new Date()
}]
}
}
has no change
Name | Default | type | Notes |
---|---|---|---|
application | null | string | trkd provided |
username | null | string | trkd provided |
password | null | string | trkd provided |
redisConnection | null | object | redis or ioredis connection |
format | true | boolean | format responses into proper json |
A redis connection may be passed in the init options. Currently a redis or ioredis may be used. To be used you must set the expiration times (in seconds) per method or group as well.
TRKDClient.expiration.quotes.retrieveItem = 5
TRKDClient.expiration.timeSeries = {
getIntraday = 60, // one minute
getInterday = 60 * 60 * 24, // one day
getExchangeData = 60 * 60 * 24 * 7, // one week
getTimezone = 60 * 60 * 24 * 30, // one month
}
TR has rate limits on every route. It is recommended to use a rate limiter like bottleneck.
Contributions are very welcome and encouraged! Currently the client is very focused on EquitySim use case, but we are more than happy to expand on it.
To get started be sure you have node v10+ (12 LTS is recommended)
$ git clone https://github.com/equitysim/trkd-client.git
$ cd ./trkd-client
$ npm install
Submit Pull Requests or any Issues on Github.
Cheers!
FAQs
REST Client for TRKD API
The npm package @equitysim/trkd-client receives a total of 2 weekly downloads. As such, @equitysim/trkd-client popularity was classified as not popular.
We found that @equitysim/trkd-client 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 now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.