All URIs are relative to https://enterprise.prediction.vc/api/
Method | HTTP request | Description |
---|---|---|
predictionsAccuracyGet | GET /predictions/accuracy | Accuracy |
predictionsGet | GET /predictions | Predictions |
predictionsTokensGet | GET /predictions/tokens | Tokens |
predictionsAccuracyGet(symbol, from, to, opts)
Accuracy
Returns a list of accuracies of our predictions, calculated daily. We measure prediction accuracy by analyzing whether or not our prediction target has been reached once within the time frame we assign; this simulates a limit order getting filled at our predicted price.
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.PredictionsApi()
const symbol = 'ETH' // String | token symbol, e.g. ETH
const from = '2018-09-01' // Date | predictions accuracy data from
const to = '2018-09-01' // Date | predictions accuracy data to
const opts = {
'limit': '10' // String | results limit, default 10
}
apiInstance.predictionsAccuracyGet(symbol, from, to, opts)
.then(data => {
console.log('API called successfully. Returned data: ')
console.log(data)
})
.catch(error => {
console.error(error)
})
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | token symbol, e.g. ETH | |
from | Date | predictions accuracty data from, e.g 2018-09-01. | |
to | Date | predictions accuracy data to, e.g 2018-09-05. | |
limit | String | results limit, default 10 | [optional] |
Object with key data
Name | Type | Description | Notes |
---|---|---|---|
accuracy | Float | Average accuracy over given tokens | [optional] |
tokens | String | Tokens the predictions were made on | [optional] |
timestamp | Datetime | time of the prediction accuracy calculation | [optional] |
- Content-Type: application/json
- Accept: application/json
predictionsGet(symbol, opts)
Predictions
Returns a list of predictions for the given symbol and given date.
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.PredictionsApi()
const symbol = 'ETH' // String | token symbol
const opts = {
'_date': '2018-09-01', // String | date of prediction. If not specified, predictions for today are returned.
'latest': true, // Boolean | Retrieve only the latest prediction for the given date, default false
'limit': '10' // String | results limit, default 10
}
apiInstance.predictionsGet(symbol, opts)
.then(data => {
console.log('API called successfully. Returned data: ')
console.log(data)
})
.catch(error => {
console.error(error)
})
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | token symbol, e.g. `ETH` | |
_date | Date | date of prediction, e.g `2018-09-01`. If not specified, predictions for today are returned. | [optional] |
latest | Boolean | Retrieve only the latest prediction for the given date, default false | [optional] |
limit | String | results limit, default 10 | [optional] |
Object with key data
Name | Type | Description | Notes |
---|---|---|---|
usdPrice | Float | token price at the moment of prediction in USD | [optional] |
direction | String | short or long | [optional] |
_3day | Float | 3 day prediction | [optional] |
target | Boolean | if the 3day prediction came true | [optional] |
_7day | Float | 7 day prediction | [optional] |
target7 | Boolean | if the 7day prediction came true | [optional] |
_14day | Float | 14 day prediction | [optional] |
timestamp | Datetime | time of the prediction | [optional] |
- Content-Type: application/json
- Accept: application/json
predictionsTokensGet()
Tokens
Returns an array of token symbols we are currently issuing predictions for.
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.PredictionsApi()
apiInstance.predictionsTokensGet()
.then(data => {
console.log('API called successfully. Returned data: ')
console.log(data)
})
.catch(error => {
console.error(error)
})
This endpoint does not need any parameter.
['String']
- Content-Type: application/json
- Accept: application/json