myfxbook api results are different than the website

May 02, 2017 at 11:06
544 Angesehen
1 Replies
Mitglied seit May 23, 2016   32 Posts
May 02, 2017 at 11:06 (bearbeitet May 02, 2017 at 11:09)
if i request the daily gains via API .. the results are different than the ones are shown on the portfolio pages of the strategy.

is there somethings i need to ajust based on timezones ?
o do not submit a time on the 'get-data-daily' request.


also does anyone know how i can get the profability number and the Lenght of trade without sooling trough all trades ?
Professional Canned-Tuna Eater
Mitglied seit May 23, 2016   32 Posts
May 02, 2017 at 11:10
here is a exmple on how i do this

[code]
$span = 'now';
$start = date('Y-m-d', strtotime($span));
$m = $this->doCurl($api.'get-data-daily.json?session=$session&id=$account&start=$start&end='.date('Y-m-d', strtotime('+1 day')));
[/code]

end date is in the future so i will get the full day
start is just the date (no time) of today
Professional Canned-Tuna Eater
Anmelden / Registrieren to comment
You must be connected to Myfxbook in order to leave a comment
*Kommerzielle Nutzung und Spam werden nicht toleriert und können zur Kündigung des Kontos führen.
Tipp: Wenn Sie ein Bild/eine Youtube-Url posten, wird diese automatisch in Ihren Beitrag eingebettet!
Tipp: Tippen Sie das @-Zeichen ein, um einen an dieser Diskussion teilnehmenden Benutzernamen automatisch zu vervollständigen.