Economic Event Forecast API (1.0.0)

Download OpenAPI specification: [Economic_Event_Forecast_API.yaml]

This document describes Autochartist's Economic Event Forecast API.

This API provides the following information:

  1. On-event forecasts - forecasts of projected movements once the value of the economic event is released

  2. Pre-event forecast - forecasts of projected movements prior to the value of the economic events being released.

API Request Authentication

Our APIs require the following url parameters on every call:

brokerid – your customer ID on our systems (provided to you)
user – a unique ID of the end-user consuming the information. For server-2-Server integrations this would typically be your company name
accounttype – 0 = LIVE, 1 = DEMO
expiry – Unix timestamp of when this token will expire________token – a token generated by MD5(user|[accounttype]|[expiry][secretkey])

in which secretkey is the secret key provided to you, not to be shared with the end-user

Note the ‘|’ (Pipe) character before and after the AccountType parameter

$expiryDate = time() + (3 * 24 * 60 * 60);
$userid = “myuserid”;
$accountType =0;
$secretKey = “secretkey”;
$token = md5(${userid}|${accountType}|${expiryDate}${secretKey });
echo $token;
?>
import hashlib
import time
expiry_date = int(time.time()) + (3 * 24 * 60 * 60)
userid = "myuserid"
account_type = "0"
secret_key = "secretkey"
token = hashlib.md5(f"{userid}|{account_type}|{expiry_date}{secret_key}".encode("utf-8")).hexdigest()
print(token)

Economic Event Forecast

Economic event setups

Returns high impact economic events for the next week along with price projections based on deltas between consensus and actual economic numbers.

Includes events that are coming up in the next week as well as those that have been released in the last 2 hours.

Return format

* Status 200 - application/json - latest pattern results.
* The JSON object includes the following keys:
* page - pagination configuration for pagination links.
* items - a list of pattern result items.
* new - indicate whether the data has been updated since the last request if any.
* data - pattern result item - see "Fields" below
* links - an array of HATEOAS links
* flag-icon – a small icon of the country’s flag
* item-history-{symbolId} – the history for this event for a specific symbol
* item-forecast-{symbolId} – the price graph for this event for a specific symbol

Fields

The following are the fields contained in the data section of the returned results.

* country – the country code
* country_name – the full country name
* name – event name
* event_type_code – unique id for the event type
* released_at – the event time in UTC
* value - the actual value of the economic event. If this value exists it means that the event has already occurred in the last 2 hours.
* event_uid – unique id for this event
* items – a list of available opportunities for this event
* sample_size – the amount of history events taken into consideration
* time_frame – the length of the trend in minutes
* symbol – details on the symbol for this opportunity
* id – unique identifier for the symbol
* name
* interval – candle length
* exchange
* delta_gt_up – probability that the trend is positive if actual > consensus
* delta_lt_up – probability that the trend is positive if actual < consensus
* delta_eq_up – probability that the trend is positive if actual = consensus
* delta_gt_down – probability that the trend is negative if actual > consensus
* delta_lt_down – probability that the trend is negative if actual < consensus
* delta_eq_down – probability that the trend is negative if actual > consensus

query Parameters
broker_id
string
Example: broker_id={{broker_id}}

the brokerid from Autochartist

token
expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

user
string
Example: user={{user}}

Username

locale
string
Example: locale={{locale}}

Locale language tag. This parameter to be used for one locale. To specify more than one locale, use the "locales" parameter

Responses

Response samples

Content type
application/json
[]

Economic event trend history

Shows the last 12 history trends for a specified item with links to charts.

Return format

  • Status 200 - application/json - latest pattern results.
  • an array of 12 items corresponding to the last 12 event releases:
    • date - the release date
    • expected - the expected value
    • actual - the actual value
    • delta - different between the actual and expected
    • delta_float - the delta as a floating point value
    • trend - the trend for the selected time period
    • trend_direction - -1 = negative trend, +1 = positive trend
    • delta_sign - "<" / ">" / "'=" - representing the difference between the actual and consensus

URL params:

[itemid] - the itemid field received from the "economic event setup" endpoint

path Parameters
itemid
required
string
query Parameters
locale
string
Example: locale={{locale}}

Locale language tag. This parameter to be used for one locale. To specify more than one locale, use the "locales" parameter

tz
string
Example: tz={{timezone}}

the timezone for the result

broker_id
string
Example: broker_id={{broker_id}}

the brokerid from Autochartist

token
expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

user
string
Example: user={{user}}

username

Responses

Response samples

Content type
application/json
[]

Past economic event setups - last 10

Shows trend analysis for the last 10 high impact economic events that have been released

Return format

See GET Economic Event Setups

query Parameters
broker_id
string
Example: broker_id={{broker_id}}

the brokerid from Autochartist

token
expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

user
string
Example: user={{user}}

Username

locale
string
Example: locale={{locale}}

Locale language tag. This parameter to be used for one locale. To specify more than one locale, use the "locales" parameter

Responses

Response samples

Content type
application/json
[]

Upcoming economic event setups - next 10

Shows trend analysis for the next 10 high impact economic events that will be released.

This call excludes events released in the last 2 hours.

Return format

See GET Economic Event Setups

query Parameters
broker_id
string
Example: broker_id={{broker_id}}

the brokerid from Autochartist

token
expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

user
string
Example: user={{user}}

Username

locale
string
Example: locale={{locale}}

Locale language tag. This parameter to be used for one locale. To specify more than one locale, use the "locales" parameter

Responses

Response samples

Content type
application/json
[]

Content for economic event setups

Returns text for the economic event forecast for the selected condition.

Return format

  • Status 200 - application/json - latest pattern results.
  • The JSON object includes the following keys:
    • email_body - medium length text
    • article_body - long form text
    • footer - text for the footer
    • title - title text
    • teaser - teaser text
    • full - long text format
    • call_to_action - text for a call to action button

URL params:

[eventuid] - the eventuid field received from the "eceonomic event setup" endpoint

[itemid] - the itemid field received from the "eceonomic event setup" endpoint

[oppid] - the opportunity id from the "eceonomic event setup" endpoint. possible values are: delta_gt_down, delta_gt_up, delta_lt_down, delta_lt_up

path Parameters
eventuid
required
string
itemid
required
string
oppid
required
string
query Parameters
locale
string
Example: locale={{locale}}

Locale language tag. This parameter to be used for one locale. To specify more than one locale, use the "locales" parameter

tz
string
Example: tz={{timezone}}

the timezone for the result

broker_id
string
Example: broker_id={{broker_id}}

the brokerid from Autochartist

token
expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

user
string
Example: user={{user}}

username

Responses

Response samples

Content type
application/json
{
  • "email_body": "There is a 80% chance of USDCHF trending downwards",
  • "article_body": "Based on past Germany Ifo Business Climate news events there is a 80% chance of USDCHF trending downwards. We expect this to happen because the released value is > 94.7. A price movement of 49 pips is expected.<br/><br/><strong>Historical events that allowed us to draw this conclusion</strong><br/><table class=delkoshistoryimages><tr><td>24 Jun 08:00 +00:00<br/><img src=\"https://eia.delkos.com/eia/resources/v3/graph/900795_202106240800_48.png?tz=UTC&broker_id=604&expire=1833113794&locale=en&user=demo@autochartist.com\"/></td></tr><tr><td>26 Mar 09:00 +00:00<br/><img src=\"https://eia.delkos.com/eia/resources/v3/graph/900795_202103260900_48.png?tz=UTC&broker_id=604&expire=1833113794&locale=en&user=demo@autochartist.com\"/></td></tr><tr><td>22 Feb 09:00 +00:00<br/><img src=\"https://eia.delkos.com/eia/resources/v3/graph/900795_202102220900_48.png?tz=UTC&broker_id=604&expire=1833113794&locale=en&user=demo@autochartist.com\"/></td></tr><tr><td>18 Dec 09:00 +00:00<br/><img src=\"https://eia.delkos.com/eia/resources/v3/graph/900795_202012180900_48.png?tz=UTC&broker_id=604&expire=1833113794&locale=en&user=demo@autochartist.com\"/></td></tr></table>",
  • "footer": "All references to movement sizes are expressed assuming a lot size of 100,000 units (\"standard account\").",
  • "title": "Trade with an edge around todays Germany Ifo Business Climate news event",
  • "teaser": "There is a 80% chance of USDCHF trending downwards",
  • "full": "Based on past Germany Ifo Business Climate news events there is a 80% chance of USDCHF trending downwards. We expect this to happen because the released value is > 94.7. A price movement of 49 pips is expected.",
  • "call_to_action": "When and why?"
}