I ran into an issue when placing limit order with Oanda. Despite rounding price to 5 digits like
var price = Math.Round(1.091m, 5, MidpointRounding.ToZero);
I'm getting this weird reject reason:
{"orderRejectTransaction":{"id":"29","accountID":"","userID":,"batchID":"29","requestID":"43166213175599794","time":"2023-12-04T12:23:38.923778870Z","type":"LIMIT_ORDER_REJECT","instrument":"EUR_USD","units":"10","price":"1.09099999999999","timeInForce":"GTC","triggerCondition":"DEFAULT","partialFill":"DEFAULT","positionFill":"REDUCE_ONLY","reason":"CLIENT_ORDER","rejectReason":"PRICE_PRECISION_EXCEEDED"},"relatedTransactionIDs":["29"],"lastTransactionID":"29","errorMessage":"The price specified contains more precision than is allowed for the instrument","errorCode":"PRICE_PRECISION_EXCEEDED"}
Thanks a lot!
googled, searched stackoverflow