API changes August 2019 - pip_size
Dear developers,
We'll be adding a new attribute called "pip_size" under Tick Stream and Tick History. This determines the number of decimal places that the prices should be displayed in. It is important to display ticks and candles precisely to avoid contract disputes.
For example:
If “pip_size” is set to “4”, the corresponding symbols should be displayed as “12.0000”.
If “pip_size” is set to “2”, the symbols should be displayed as “12.00”.
Please make the necessary changes to your platforms to ensure you are displaying the correct precision . Let us know if you have any questions.
Tick Stream
Before
{ "echo_req": { "subscribe": 1, "ticks": "R_50" }, "msg_type": "tick", "subscription": { "id": "13d349d5-d9c3-0d9b-3ce1-e41b6ee7e36e" }, "tick": { "ask": 7579.3057, "bid": 7578.3057, "epoch": 1565120056, "id": "13d349d5-d9c3-0d9b-3ce1-e41b6ee7e36e", "quote": 7578.8057, "symbol": "R_50" } }
After
{ "echo_req": { "subscribe": 1, "ticks": "R_50" }, "msg_type": "tick", "subscription": { "id": "13d349d5-d9c3-0d9b-3ce1-e41b6ee7e36e" }, "tick": { "ask": 7579.3057, "bid": 7578.3057, "epoch": 1565120056, "id": "13d349d5-d9c3-0d9b-3ce1-e41b6ee7e36e", "pip_size": 4, "quote": 7578.8057, "symbol": "R_50" } }
Tick History
Before
{ "echo_req": { "adjust_start_time": 1, "count": 3, "end": "latest", "start": 1, "style": "ticks", "ticks_history": "R_50" }, "history": { "prices": [ 7580.0594, 7579.2736, 7577.5459 ], "times": [ 1565120164, 1565120166, 1565120168 ] }, "msg_type": "history" }
After
{ "echo_req": { "adjust_start_time": 1, "count": 3, "end": "latest", "start": 1, "style": "ticks", "ticks_history": "R_50" }, "history": { "prices": [ 7580.0594, 7579.2736, 7577.5459 ], "times": [ 1565120164, 1565120166, 1565120168 ] }, "msg_type": "history", "pip_size": 4 }
Candle Style Tick History
Before
{ "echo_req": { "adjust_start_time": 1, "count": 3, "end": "latest", "granularity": 60, "start": 1, "style": "candles", "subscribe": 1, "ticks_history": "R_50" }, "msg_type": "ohlc", "ohlc": { "close": "7572.5264", "epoch": 1565120302, "granularity": 60, "high": "7576.3129", "id": "3fad8fec-8f94-d6f0-c318-7d8bfbed6d27", "low": "7572.3189", "open": "7575.2819", "open_time": 1565120280, "symbol": "R_50" }, "subscription": { "id": "3fad8fec-8f94-d6f0-c318-7d8bfbed6d27" } }
After
{ "echo_req": { "adjust_start_time": 1, "count": 3, "end": "latest", "granularity": 60, "start": 1, "style": "candles", "subscribe": 1, "ticks_history": "R_50" }, "msg_type": "ohlc", "ohlc": { "close": "7572.9390", "epoch": 1565120304, "granularity": 60, "high": "7576.3129", "id": "3fad8fec-8f94-d6f0-c318-7d8bfbed6d27", "low": "7572.3189", "open": "7575.2819", "open_time": 1565120280, "pip_size": 4, "symbol": "R_50" }, "subscription": { "id": "3fad8fec-8f94-d6f0-c318-7d8bfbed6d27" } }