Access to public price feeds on the test environment

Added by Morten about 2 years ago

Hi

I need access to public price feeds in the test enrivronment


Replies (7)

RE: Access to public price feeds on the test environment - Added by Morten about 2 years ago

Any news ? There seems to be a fairly big responsetime on the forum.

RE: Access to public price feeds on the test environment - Added by Morten about 2 years ago

The code i am working with is the following:

I am getting the session_key from a post to $URL='https://api.test.nordnet.se';
The session key works for doing regular GET/POST's to api.test.nordnet.se, but not pub/priv.api.test.nordnet.se

$session_file ="nextsession.key";
$file = fopen($session_file, 'r');
$session_key = fread($file,filesize($session_file));
$fp = stream_socket_client("ssl://pub.api.test.nordnet.se:443", $errno, $errstr, 120,STREAM_CLIENT_ASYNC_CONNECT);
stream_set_blocking($fp,false);
if(!$fp) {
echo "$errstr ($errno)<br />\n";
}
else {
stream_set_timeout($fp,120);
$arr = array('cmd' => "login", 'args' => array('session_key' => "$session_key", 'service' => 'NEXTAPI'));
$cmd = json_encode($arr);
fwrite($fp,"$cmd\n");
while (!feof($fp)){
echo fgets($fp,1024);
}

}
fclose($fp);
?>

Am i doing something wrong?

RE: Access to public price feeds on the test environment - Added by Morten about 2 years ago

Oh, and the command i am sending is formed like the following: {"cmd":"login","args":{"session_key":"ZTgxZmUwMGYyMDdhZTJjYWQ2YTA2MGRiMDRiM2IxNjJjZmMwN2RjYzplODFmZTAwZjIwN2FlMmNhZDZhMDYwZGIwNGIzYjE2MmNmYzA3ZGNj","service":"NEXTAPI"}}

RE: Access to public price feeds on the test environment - Added by Magnus about 2 years ago

Did you get it to work? Is you problem the same as mine?
https://api.test.nordnet.se/boards/2/topics/2493

/Magnus

RE: Access to public price feeds on the test environment - Added by Morten about 2 years ago

No, i am paintenly waiting for a nordnet person to reply.

RE: Access to public price feeds on the test environment - Added by Björn about 2 years ago

I only get heartbeats... so I am also waiting for some attention on this thread

RE: Access to public price feeds on the test environment - Added by Morten about 2 years ago

So, as i understood it. when you get heartbeats, you have access. Lucky you!

(1-7/7)