@predictionvc/prediction-api
Version:
Prediction Enterprise API sdk in Javascript
94 lines (70 loc) • 4.99 kB
Markdown
//enterprise.prediction.vc/api/*
Method | HTTP request | Description
------------- | ------------- | -------------
[**historicalGet**](HistoricalApi.md
<a name="historicalGet"></a>
> historicalGet(symbol, from, to, cols, opts)
Historical Data
```javascript
const PredictionApi = require('prediction_enterprise_api')
const defaultClient = PredictionApi.ApiClient.instance
// Configure API key authorization: Authorization
const Authorization = defaultClient.authentications['Authorization']
Authorization.apiKey = 'YOUR API KEY'
const apiInstance = new PredictionApi.HistoricalApi()
const symbol = 'ETH' // String | token symbol
const from = '2018-09-01' // Date | historical data from this date
const to = '2018-09-01' // Date | historical data till this date
const cols = 'usdPrice,marketCap,timeStamp' // String | Comma separted list of columns to return. Available columns are listed in the table below.
const opts = {
'limit': 100 // String | results limit, default 10
}
apiInstance.historicalGet(symbol, from, to, cols, opts)
.then(data => {
console.log('API called successfully. Returned data: ')
console.log(data)
})
.catch(error => {
console.error(error)
})
```
| Columns | Description |
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| usdPrice | token price in USD |
| marketCap | market capitalization at the time |
| volume | traded token volume in the past 24h |
| open | open interval value |
| high | high interval value |
| low | low interval value |
| close | close interval value |
| _twitter | twitter data: bio, follower, following, etc. |
| _github | github repo data: watchers, stargazers, fork_count, open_issues, activity, etc. |
| _facebook | likes |
| _metrics | alexaUsRank, alexaGlobalRank, employees, employeesRange, marketCap, raised, annualRevenue, estimatedAnnualRevenue, fiscalYearEnd |
| machineRatings | machineRatingTeam, machineRatingNews, machineRatingEngineering, machineRatingICO, machineRatingSocial |
| communityRatings | communityRatingTeam, communityRatingProduct, communityRatingVision, communityRatingMarketing, communityRatingTokenomics, communityRatingAverage |
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**symbol** | **String**| token symbol, e.g. &
**from** | **Date**| historical data from this date, e.g &
**to** | **Date**| historical data till this date, e.g &
**cols** | **String**| Comma separted list of columns to return. e.g. &
**limit** | **String**| results limit, default 10 | [optional]
Object with key `data`
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**usdPrice** | **Float** | token price in USD | [optional]
**volume** | **Float** | token volume for the past 24 hours | [optional]
**timestamp** | **Datetime** | datetime | [optional]
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
All URIs are relative to *https: