Download OpenAPI specification:
This document describes Autochartist Trading Opportunities.
Our APIs require the following url parameters on every call:
in which secret_key is the secret key provided to you, not to be shared with the end-user.
Note the '|' (pipe) character before and after the account_type parameter.
<?php
$expire = time() + (3 * 24 * 60 * 60);
$userId = "myuserid";
$accountType = "0";
$secretKey = "secretkey";
$token = md5("{$userId}|{$accountType}|{$expire}{$secretKey}");
echo $token;
import hashlib
import time
expire = int(time.time()) + (3 * 24 * 60 * 60)
user_id = "myuserid"
account_type = "0"
secret_key = "secretkey"
token = hashlib.md5(
f"{user_id}|{account_type}|{expire}{secret_key}".encode("utf-8")
).hexdigest()
print(token)
Returns latest pattern results for the specified symbol group category.
This endpoint also accepts a POST request carrying an optional user-configuration JSON
body, used to override the stored user configuration for the pattern-results search.
User configuration is used to limit the pattern results search. The pattern search criteria include the following information:
Note that some of the fields below may not be applicable to all analysis types.
A valid request with an authorized MD5 token will be accepted.
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
| group | string Example: group=all The symbol group category to search (e.g. |
| locale | string Example: locale=en Locale for pattern/analysis text (e.g. |
| locales | string Example: locales=en,tr,ru Comma separated locales for multi-language results. |
| timezone | string Example: timezone=UTC Timezone applied to the returned date/time fields. |
| include_detail | boolean Example: include_detail=true Include the pattern |
| include_drawing | boolean Example: include_drawing=true Include the pattern |
| page_limit | integer Example: page_limit=20 Maximum number of items per page. |
| page_offset | integer Zero-based page offset. |
| since | string Example: since=2022-08-12T00:00:00Z Only return results identified since this ISO-8601 timestamp. |
<?php
$params = http_build_query([
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
"group" => "all",
"locale" => "en",
"include_detail" => "true",
"include_drawing" => "true",
"page_limit" => 20,
"page_offset" => 0,
]);
$url = "https://api.autochartist.com/to/resources/results?" . $params;
$results = json_decode(file_get_contents($url), true);
print_r($results);
{- "date": "2022-08-12T14:34:39.508Z",
- "query": {
- "pattern_types": [
- "KeyLevel",
- "Fibonacci",
- "ChartPattern"
], - "symbols": [
- "NZDUSD",
- "EURGBP",
- "EURJPY",
- "USDCHF",
- "EURCHF",
- "AUDUSD",
- "USDJPY",
- "EURUSD",
- "XAGUSD",
- "XAUUSD",
- "USDCAD",
- "GBPUSD"
], - "exchanges": [ ],
- "patterns": [ ],
- "intervals": [
- 240,
- 480,
- 1440,
- 120,
- 60,
- 30,
- 15
], - "types": [
- "breakout",
- "approach"
], - "candles": 0,
- "candles_delay": 0,
- "page_limit": 1000,
- "page_offset": 0,
- "relevant_only": true,
- "MaxPatternLength": 400,
- "require_pips": false,
- "use_old_result_uid": false
}, - "page": {
- "number": 1,
- "limit": 1000,
- "offset": 0,
- "total_items": 1,
- "total_pages": 1,
- "links": [
- {
- "rel": "first",
- "display": "<<",
- "enabled": false
}, - {
- "rel": "prev",
- "display": "<",
- "enabled": false
}, - {
- "rel": "pages[0]",
- "display": "1",
- "enabled": false,
- "active": true
}, - {
- "rel": "next",
- "display": ">",
- "enabled": false
}, - {
- "rel": "last",
- "display": ">>",
- "enabled": false
}
]
}, - "items": [
- {
- "new": false,
- "data": {
- "result_type": "ChartPattern",
- "result_uid": 600419071894599000,
- "direction": -1,
- "prediction_time_to": "2022-08-13T07:15:00.000Z",
- "prediction_price_from": 132.65,
- "prediction_price_to": 133.13,
- "pip": 0.01,
- "exchange": "FOREX",
- "group_name": "FX Majors",
- "symbol": "USDJPY",
- "symbol_name": "USDJPY",
- "symbol_id": 525055079641196100,
- "interval": 15,
- "pattern": "Rising Wedge",
- "pattern_list": [
- {
- "locale": "en",
- "text": "Rising Wedge"
}, - {
- "locale": "tr",
- "text": "Yükselen Kama"
}, - {
- "locale": "ru",
- "text": "Восходящий клин"
}
], - "analysis_text_list": [
- {
- "locale": "en",
- "text": "Rising Wedge has broken through the support line at 8/12 14:00. Possible bearish price movement forecast for the next 11 hours towards 133.13."
}, - {
- "locale": "tr",
- "text": "Yükselen Kama, 8/12 14:00 ile destek çizgisinden geçti. Sonraki 10 saat ila 133.13 için aşağı yönlü olabilecek fiyat hareketi tahmini."
}, - {
- "locale": "ru",
- "text": "Фигура Восходящий клин пробила линию поддержки 8/12 14:00. Возможно падение цены в следующие 11 часов к 133.13."
}
], - "target_period_list": [
- {
- "locale": "en",
- "text": "11 hours"
}, - {
- "locale": "tr",
- "text": "10 saat"
}, - {
- "locale": "ru",
- "text": "11 часов"
}
], - "complete": true,
- "identified": "2022-08-12T14:00:00.000Z",
- "age": 1,
- "length": 140,
- "found": "2022-08-12T14:11:47.530Z",
- "analysis_text": "Rising Wedge has broken through the support line at 8/12 14:00. Possible bearish price movement forecast for the next 11 hours towards 133.13.",
- "analysis_text_template": [
- {
- "locale": "en",
- "text": "Rising Wedge has broken through the support line at {identified}. Possible bearish price movement forecast for the next 11 hours towards 133.13."
}, - {
- "locale": "tr",
- "text": "Yükselen Kama, {identified} ile destek çizgisinden geçti. Sonraki 10 saat ila 133.13 için aşağı yönlü olabilecek fiyat hareketi tahmini."
}, - {
- "locale": "ru",
- "text": "Фигура Восходящий клин пробила линию поддержки {identified}. Возможно падение цены в следующие 11 часов к 133.13."
}
], - "expires_at": "2022-08-13T01:12:18.418Z",
- "detail": {
- "resistance_y0": 133.312,
- "resistance_y1": 133.893,
- "resistance_x0": "2022-08-11T02:45:00.000Z",
- "resistance_x1": "2022-08-12T11:30:00.000Z",
- "support_y0": 131.733,
- "support_y1": 133.169,
- "support_x0": "2022-08-11T12:30:00.000Z",
- "support_x1": "2022-08-12T08:45:00.000Z",
- "prediction_time_to": "2022-08-13T07:15:00.000Z",
- "trend_change": "Reversal",
- "quality": 0.43911563619112487,
- "volume": 1,
- "uniformity": 0.6748240730117049,
- "initial_trend": 0.09105749221361932,
- "prediction_price_from": 132.64796369254503,
- "prediction_price_to": 133.13331820522708,
- "clarity": 0.33647844089668744,
- "breakout": 0.6541025386424879,
- "pattern_start_price": 132.545,
- "pattern_end_price": 133.52356790123457,
- "stop_loss": 133.893,
- "take_profit": 133.13331820522708,
- "qty_tp": 5,
- "symbol": "USDJPY",
- "granularity": 15,
- "direction": -1,
- "length": 140,
- "complete": true,
- "exchange": "FOREX",
- "age": 1,
- "relevant": 1,
- "pattern_id": 64,
- "symbol_id": 525055079641196100,
- "long_name": "USDJPY",
- "short_name": "USDJPY",
- "pattern_end_time": "2022-08-12T13:45:00.000Z",
- "pattern_start_time": "2022-08-11T02:45:00.000Z",
- "pattern_name": "Rising Wedge",
- "result_uid": 600419071894599000,
- "is_new": false,
- "prediction_pip_profit": 0,
- "forecast_minutes": 699,
- "symbol_pip": "0.01"
}, - "drawing": {
- "symbol": "USDJPY",
- "arrow": [
- {
- "point2Name": null,
- "y1": 133.48,
- "name": "Arrow Line",
- "x1": 1660311900,
- "y2": 133.13332,
- "x2": 1660358700,
- "point1Name": null
}
], - "length": 140,
- "timeZone": "UTC",
- "forecast": [ ],
- "timeFrame": {
- "from": 1659996900,
- "to": 1660500900
}, - "originalLines": [
- {
- "point2Name": null,
- "y1": 133.312,
- "name": "Resistance original",
- "x1": 1660185900,
- "y2": 133.893,
- "x2": 1660303800,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 131.733,
- "name": "Support original",
- "x1": 1660221000,
- "y2": 133.169,
- "x2": 1660293900,
- "point1Name": null
}
], - "eventLine": {
- "point2Name": null,
- "y1": 129.40825,
- "name": "Event Line",
- "x1": 1660311900,
- "y2": 138.04825,
- "x2": 1660311900,
- "point1Name": null
}, - "chartType": "CHART_PATTERN",
- "interval": 15,
- "lines": [
- {
- "point2Name": null,
- "y1": 133.312,
- "name": "Resistance",
- "x1": 1660185900,
- "y2": 133.93292,
- "x2": 1660311900,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 131.04159,
- "name": "Support",
- "x1": 1660185900,
- "y2": 133.52357,
- "x2": 1660311900,
- "point1Name": null
}
], - "priceRange": {
- "low": 131.733,
- "to": 133.893
}, - "direction": "BEARISH",
- "predictionRectangle": [
- {
- "point2Name": null,
- "y1": 132.64796,
- "name": "Prediction Rectangle - Top Line",
- "x1": 1660313700,
- "y2": 132.64796,
- "x2": 1660374900,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 132.64796,
- "name": "Prediction Rectangle - Right Line",
- "x1": 1660374900,
- "y2": 133.13332,
- "x2": 1660374900,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 133.13332,
- "name": "Prediction Rectangle - Bottom Line",
- "x1": 1660374900,
- "y2": 133.13332,
- "x2": 1660313700,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 133.13332,
- "name": "Prediction Rectangle - Left Line",
- "x1": 1660313700,
- "y2": 132.64796,
- "x2": 1660313700,
- "point1Name": null
}, - {
- "point2Name": null,
- "y1": 132.64796,
- "name": "Prediction Rectangle",
- "x1": 1660313700,
- "y2": 133.13332,
- "x2": 1660374900,
- "point1Name": null
}
]
}, - "symbol_pip": "0.01"
}, - "links": [
]
}
], - "links": [
]
}Returns details of a pattern result item.
Below are the return fields. There are fields that are common to all analysis types, and some fields that are specific to each analysis type.
A valid request with an authorized MD5 token will be accepted.
| type required | string Example: KeyLevel The pattern result type (e.g. |
| uid required | integer <int64> Example: 600419182744698100 The unique identifier of the pattern result. |
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
<?php
$type = "KeyLevel";
$uid = "600419182744698103";
$params = http_build_query([
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
]);
$url = "https://api.autochartist.com/to/resources/results/detail/{$type}/{$uid}?" . $params;
print_r(json_decode(file_get_contents($url), true));
{- "new": false,
- "data": {
- "bandwidth": 7,
- "atBarIdentified": "2022-08-12T14:15:00.000Z",
- "x0": "2022-08-12T07:00:00.000Z",
- "x1": "2022-08-12T02:15:00.000Z",
- "x2": "2022-08-12T00:45:00.000Z",
- "x3": "2022-08-11T18:30:00.000Z",
- "x4": "2022-08-10T23:30:00.000Z",
- "x5": "1970-01-01T00:00:00.000Z",
- "x6": "1970-01-01T00:00:00.000Z",
- "x7": "1970-01-01T00:00:00.000Z",
- "x8": "1970-01-01T00:00:00.000Z",
- "x9": "1970-01-01T00:00:00.000Z",
- "approachingTime": "1970-01-01T00:00:00.000Z",
- "patternPrice": 0.9426900148391724,
- "approachingRegion": 0,
- "errorMargin": 0.000366,
- "qtyTP": 5,
- "priceE": 0.9430559873580933,
- "barsE": 378,
- "temporaryPattern": false,
- "predictionPriceFrom": 0.9457160234451294,
- "predictionPriceTo": 0.9493759870529175,
- "predictionTimeFrom": "2022-08-12T14:15:00.000Z",
- "predictionTimeBars": 378,
- "furthestPrice": 0.9414066,
- "atPriceIdentified": 0.94352,
- "symbol": "USDCHF",
- "granularity": 15,
- "direction": 1,
- "length": 155,
- "complete": true,
- "exchange": "FOREX",
- "age": 0,
- "pattern_id": 1,
- "symbol_id": 525055079706445100,
- "long_name": "USDCHF",
- "pattern_end_time": "2022-08-12T14:15:00.000Z",
- "pattern_start_time": "2022-08-10T23:30:00.000Z",
- "pattern_name": "Resistance",
- "result_uid": 600419182744698100,
- "is_new": false,
- "prediction_pip_profit": 0,
- "forecast_minutes": 581,
- "symbol_pip": "0.0001"
}, - "links": [
- {
- "rel": "drawing-data",
}
]
}Returns details of a pattern result item.
Status 200 - application/json - latest pattern results.
The JSON object includes the following keys:
Below are the return fields. There are fields that are common to all analysis types, and some fields that are specific to each analysis type.
A valid request with an authorized MD5 token will be accepted.
| type required | string Example: KeyLevel The pattern result type (e.g. |
| uid required | integer <int64> Example: 600419182744698100 The unique identifier of the pattern result. |
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
<?php
$type = "KeyLevel";
$uid = "600419182744698103";
$params = http_build_query([
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
]);
$url = "https://api.autochartist.com/to/resources/results/detail/drawing-data/{$type}/{$uid}?" . $params;
print_r(json_decode(file_get_contents($url), true));
{- "chartType": "KEY_LEVEL",
- "interval": 60,
- "length": 139,
- "direction": "BEARISH",
- "priceRange": {
- "low": 1.936,
- "to": 1.9565
}, - "timeFrame": {
- "from": 1631743200,
- "to": 1632416400
}, - "originalLines": [ ],
- "lines": [
- {
- "x1": 1631743200,
- "x2": 1632416400,
- "y1": 1.9392,
- "y2": 1.9392,
- "name": "Key Level Line",
- "point1Name": null,
- "point2Name": null
}
], - "forecast": [
- {
- "x1": 1632416400,
- "x2": 1632870000,
- "y1": 1.9392,
- "y2": 1.9392,
- "name": "Forecast",
- "point1Name": null,
- "point2Name": null
}
], - "eventLine": {
- "x1": 1632416400,
- "x2": 1632416400,
- "y1": 1.8982,
- "y2": 1.9802,
- "name": "Event Line",
- "point1Name": null,
- "point2Name": null
}, - "arrow": [
- {
- "x1": 1632416400,
- "x2": 1632567600,
- "y1": 1.9381,
- "y2": 1.93318,
- "name": "Arrow Line",
- "point1Name": null,
- "point2Name": null
}
], - "predictionRectangle": [
- {
- "x1": 1632416400,
- "x2": 1632715200,
- "y1": 1.92498,
- "y2": 1.92498,
- "name": "Prediction Rectangle - Top Line",
- "point1Name": null,
- "point2Name": null
}, - {
- "x1": 1632715200,
- "x2": 1632715200,
- "y1": 1.92498,
- "y2": 1.93318,
- "name": "Prediction Rectangle - Right Line",
- "point1Name": null,
- "point2Name": null
}, - {
- "x1": 1632715200,
- "x2": 1632416400,
- "y1": 1.93318,
- "y2": 1.93318,
- "name": "Prediction Rectangle - Bottom Line",
- "point1Name": null,
- "point2Name": null
}, - {
- "x1": 1632416400,
- "x2": 1632416400,
- "y1": 1.93318,
- "y2": 1.92498,
- "name": "Prediction Rectangle - Left Line",
- "point1Name": null,
- "point2Name": null
}
], - "timeZone": "America/New_York",
- "symbol": "GBPNZD"
}Returns latest group pattern results for a specific broker. The pattern results are cached at every 5 minutes interval.
Image in image/png format.
A valid request with an authorized MD5 token will be accepted.
| type_uid required | string Example: KeyLevel_600419182744698103 Combined pattern result type and uid (e.g. |
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
| locale | string Example: locale=en Locale language tag (e.g. |
| width | integer Example: width=320 Chart image width in px. Default is 320px. |
| height | integer Example: height=240 Chart image height in px. Default is 240px. |
<?php
$typeUid = "KeyLevel_600419182744698103";
$params = http_build_query([
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
"locale" => "en",
"width" => 320,
"height" => 240,
]);
$url = "https://api.autochartist.com/to/charts/{$typeUid}.png?" . $params;
file_put_contents("chart.png", file_get_contents($url));
Binary PNG image data - the rendered pattern chart.
Returns the plain-text market analysis for a single pattern result, identified by its
type and uid.
The analysis text is localized: pass a locale (for example en, fr, tr) to select the
language. When no locale is supplied it is resolved from the Accept-Language header,
falling back to en_US. Unsupported locales fall back to English.
A valid request with an authorized MD5 token will be accepted.
| type required | string Example: KeyLevel The pattern result type (e.g. |
| uid required | integer <int64> Example: 600419182744698100 The unique identifier of the pattern result. |
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
| locale | string Example: locale=en Locale for the analysis text (e.g. |
<?php
$type = "KeyLevel";
$uid = "600419182744698103";
$params = http_build_query([
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
"locale" => "en",
]);
$url = "https://api.autochartist.com/to/resources/results/analysis/{$type}/{$uid}?" . $params;
echo file_get_contents($url);
Rising Wedge has broken through the support line at 8/12 14:00. Possible bearish price movement forecast for the next 11 hours towards 133.13.
Returns the localized labels (translations) used to render pattern names, directions and interface strings for a given language.
Pass the required lang parameter (for example en, fr, tr) to select the language.
The response is a flat JSON object of translation keys mapped to their localized values.
key -> localized value pairs.A valid request with an authorized MD5 token will be accepted.
| lang required | string Example: lang=en Language to return translations for (e.g. |
| broker_id required | integer Example: broker_id=604 Your customer ID on our systems (provided to you). |
| user required | string Example: user=myuserid A unique ID of the end-user consuming the information. |
| account_type required | string Example: account_type=LIVE Account type: |
| expire required | integer Example: expire=1691193600 Unix timestamp of when the token will expire. |
| token required | string Example: token=<your-md5-token> MD5 token - see 'API Request Authentication'. |
<?php
$params = http_build_query([
"lang" => "en",
"broker_id" => 604,
"user" => "myuserid",
"account_type" => "LIVE",
"expire" => 1691193600,
"token" => $token, // see "API Request Authentication"
]);
$url = "https://api.autochartist.com/to/resources/translations?" . $params;
print_r(json_decode(file_get_contents($url), true));
{- "keylevel": "Key Level",
- "chartpattern": "Chart Pattern",
- "fibonacci": "Fibonacci",
- "direction.bullish": "Bullish",
- "direction.bearish": "Bearish",
- "trend_change.reversal": "Reversal",
- "trend_change.continuation": "Continuation",
- "interval.60": "1 hour",
- "interval.240": "4 hours",
- "interval.1440": "1 day"
}