simulate rsi indicator

hi
i need simulate of rsi indicator in my programmm
I implemented the program based on the existing formulas But the value of the RSI index is different
my calculate : RSI 35
tradng viwe calculate RSI :38.73

formula for first row rs : average(gaine)/avarage(loss) ,=100-100/(1+rs)

Check the data you get from binance. In my case, the open,close,high,low data that binance api provides does not match the one in website.

You should analyze your formula well, sometimes we have errors in the calculation that we do not find easily, in the case of the rsi I do not remember that it has given me so much trouble to program it where if I had many problems it was with the parabolic sar