Financial Market Analysis APIs

Authentication

How to authenticate API calls

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

<?php
$expiryDate = time() + (3 * 24 * 60 * 60);
$userid = “myuserid”;
$accountType = “0”;
$secretKey = “secretkey”;
$token = md5(“${userid}|${accountType}|${expiryDate}${secretKey }”);
echo $token;
?>