Wrong digits in ticks data in PROTO_OA_GET_TICKDATA_RES for JPY currencies

Created at 16 Sep 2024, 18:38
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
BE

bennn

Joined 06.03.2019

Wrong digits in ticks data in PROTO_OA_GET_TICKDATA_RES for JPY currencies
16 Sep 2024, 18:38


In JPY currencies, symbols have 3 digits, but the responses have bid and ask values as if it has 5.  I'm using JSON format with IC Markets'.

In the example below, the first tick response is 18604800 with 3 digits for the symbol. Which converts to 18604.800, not 186.048.

Symbol response

{
 "payloadType": 2117,
 "clientMsgId": "6",
 "payload": {
   "symbol": [
     {
       "symbolId": 7,
       "digits": 3,
       …
     }
   ]
 }
}

 

Ticks request

{
 "clientMsgId": "7",
 "payloadType": 2145,
 "payload": {
   "ctidTraderAccountId": …,
   "symbolId": 7,
   "type": 1,
   "fromTimestamp": 1726012800000,
   "toTimestamp": 1726012800500
 }
}

Ticks response

{
 "payloadType": 2146,
 "clientMsgId": "7",
 "payload": {
   "ctidTraderAccountId": …,
   "tickData": [
     {
       "timestamp": 1726012800489,
       "tick": 18604800
     },
     {
       "timestamp": -169,
       "tick": -100
     },
     {
       "timestamp": -167,
       "tick": -600
     }
   ],
   "hasMore": false
 }
}


@bennn