pandas-ta
pandas-ta copied to clipboard
Tradeogre with pandas-ta
Hi how to apply it to the tradeogre ?? here I have a code for a simple bot for this exchange, but I would like to add indicators like Rsi, Macd Ema etc. to it. It is possible at all with this exchange. here is my channel with code https://github.com/RAPER200X/TO-TRADER
Hello @RAPER200X,
Once you get your data from TradeOgre/Binance, you need to ideally convert (it seems you have JSON, so you need to make a Pandas DataFrame) it to a Pandas DataFrame and then use the examples on the README to add indicators. Also I do not have a TradeOgre account so I can not test your code.
Kind Regards, KJ
Hi twopirllc what examples could you give an outline of such a code ??
@RAPER200X,
Have you tried converting the json to a Pandas DataFrame yet?
@twopirllc
Like this???
import requests
import pandas as pd
r = requests.get('https://tradeogre.com/api/v1/markets')
j = r.json()
df = pd.DataFrame.from_dict(j)
print(df)
i don't understand :|
@RAPER200X,
No. That call doesn't return historical data... it returns quotes for multiple tickers. You need historical data for one asset in order to calculate TA or you need to aggregate the quotes yourself to build a historical sample of data.
KJ