How to get Complete pip size!! using binary-live-api?
Hi, I want to get the pips history and I see that the information it returns is incomplete, why is it?
this is the request I made in the binary api:
{
"ticks_history": "R_50",
"adjust_start_time": 1,
"count": 10,
"end": "latest",
"start": 1,
"style": "ticks"
}
and it returns the following:
224.1247, 224.1231, 224.132, 224.1504, 224.1817
How can I make it return, the last digit of the complete pips including or rounded to zero, all pips with 4 decimals like this:
224.1247, 224.1231, 224.1320, 224.1504, 224.1817
in this link : https://github.com/binary-com/binary-live-api/blob/master/demos/advanced/demo.js
use there is an example of binary-live-api:
api.events.on('history', function(response) {
console.log(response);
});
api.getTickHistory({symbol: 'frxUSDJPY', end: 'latest', count: 10});
and the final big question, how can I force it to show all pip history to 4 decimal places:
example:
221.15 ======> 221.1500
223.234 =====> 223.2340
Comments
Hi @Emsus369 if you are using JavaScript you can use the
toFixed
method so something likequote.toFixed(pip_size)
as an example
I hope that helps
Mike
ok thank so much, and how would I do it here:
{
"ticks_history": "R_50",
"adjust_start_time": 1,
"count": 10,
"end": "latest",
"start": 1,
"style": "ticks"
}
or here with binary-live-api:
api.getTickHistory("R_75", {
end: "latest",
count: 14,
style: "ticks",
subscribe: 1,
});
because I want to get the last 1000 digits of each tick
Tick History returns a pip size so just need to use that and apply to the History results.