Our Favorites API (1.0.0)

Download OpenAPI specification: [Our_Favorites_API.yaml]

This document describes Autochartist's Our Favorites feature that filters technical opportunities based on highest probability of success based on the last 12 months of results.

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)

Our Favorites

Groups

Returns a list of group names for which Our Favorites are available.

Return format

  • Status 200 - application/json
  • The JSON object includes the following keys:
    • items - a list of groups.
      • new - indicate whether the data has been updated since the last request if any.
      • data -
        • defaultGroupId - the default group used for GET Best Trade Setups
        • symbolGroups - a list of groups available
      • links - an array of HATEOAS links for every group.

Requires authentication

A valid request with an authorized MD5 token will be accepted

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

Broker ID.

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

token
user
string
Example: user={{user}}

Username

expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

account_type
string
Example: account_type={{account_type}}

DEMO or LIVE

Responses

Response samples

Content type
application/json
{}

Best Trade Setups

Returns latest pattern results for the specified symbol group category.

User configuration is used to limit the pattern results search. The pattern search criteria include the following information:

  • patterns
  • pattern results
  • symbols
  • intervals
  • exchanges
  • age - number of candles
  • candles delay - For demo accounts, any pattern result with age less than 5 is excluded from the results.

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 for chart pattern images of different sizes displaying the price graph for the pattern result.

Fields

Note that some of the fields below may not be applicable to all analysis types.

  • result_type - The type of trade setup
  • result_uid - Internal unique identification numbers
  • direction - The direction of the forecast
  • prediction_price_from - The start of the forecast range
  • prediction_price_to - The end of the forecast range
  • pip - The size of a pip for this instrument
  • exchange - The exchange to which this symbol belongs
  • group_name - The logical group to which this symbol belongs
  • symbol - The TICKER
  • symbol_name - The long name of the symbol
  • symbol_id - Internal symbolID (ignore)
  • interval - The data interval on which this trade setup was identified
  • pattern - The name of the trade setup. If multiple locales are specified then this field will be an array
  • pattern_list - If multiple locales are specified then this field will be an array of language specific pattern names
  • complete - false when this trade setup is not yet fully formed. otherwise True.
  • identified - Date/Time when this trade setup was identified
  • age - The age in candles of the trade setup (difference between the current date and the identified date, divided by the 'interval')
  • length - The number of candles forming this trade setup
  • found - Internal timestamp. Ignore.
  • analysis_text - Text that describes the identified trade setup.
  • analysis_text_list - If multiple locales are specified then this field will be an array of language specific analysis_text
  • analysis_text_template - Text that describes the identified trade setup but the date portion of the text will be replaced be the {identified} identifier. This allows developers to customize the text for different timezones. If multiple locales are specified then this field will be an array
  • expires_at - A maximum date/time when this setup should be expired
  • signal_levels
    • entry_level - Entry for the signal
    • stop_loss - Stop Loss for the signal
    • target_level - Target price
    • target_period - Period within which the target price could hit

Requires authentication

A valid request with an authorized MD5 token will be accepted

path Parameters
group
required
string
query Parameters
broker_id
string
Example: broker_id={{broker_id}}

Broker ID.

timezone
string
Example: timezone={{timezone}}

User timezone.

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

token
user
string
Example: user={{user}}

Username

expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp

account_type
string
Example: account_type={{account_type}}

DEMO or LIVE

result_limit
string
Example: result_limit={{result_limit}}

Limit number of items to display in a page. Default is 25.

probability_percentage
string
Example: probability_percentage={{probability_percentage}}

(optional) Return pattern result items with probability percentage greater or equal to the value specified. Default is 60. Probability percentage ranges are: 60, 65, 70, 75 and 80.

Responses

Response samples

Content type
application/json
{}

Chart Image

Returns a png image of the specified type and uid.

[type] - the type from the GET Best Trade Setups result set

[uid] - the result uid from the GET Best Trade setup result set

Return format

Image in image/png format.

Requires authentication

A valid request with an authorized MD5 token will be accepted.

path Parameters
type
required
string
uid
required
string
query Parameters
account_type
string
Example: account_type={{account_type}}

DEMO or LIVE

broker_id
string
Example: broker_id={{broker_id}}

Broker ID.

expire
string
Example: expire={{expire}}

Expiry of this link as a unix timestamp.

locale
string
Example: locale={{locale}}

Locale language tag.

user
string
Example: user={{user}}

Username

token
width
string
Example: width={{width}}

Chart image width in px. Default is 320px.

height
string
Example: height={{height}}

Chart image height in px. Default is 240px.

Responses