@@ -28,44 +28,44 @@ def get_technical_indicator_data(self, api_token: str, ticker: str, function: st
2828 query_string = f'&order={ order } &splitadjusted_only={ splitadjusted_only } &period={ period } &function={ function } '
2929
3030 if date_to is not None :
31- query_string += "&to=" + date_to
31+ query_string += "&to=" + str ( date_to )
3232 if date_from is not None :
33- query_string += "&from=" + date_from
33+ query_string += "&from=" + str ( date_from )
3434
3535 if function == 'splitadjusted' :
3636 possible_agg_period = ['d' , 'w' , 'm' ]
3737 if agg_period is not None :
3838 if agg_period not in possible_agg_period :
3939 raise ValueError ("agg_period must be in ['d', 'w', 'm']" )
40- query_string += "&agg_period=" + agg_period
40+ query_string += "&agg_period=" + str ( agg_period )
4141
4242 if function == 'stochastic' :
4343 if fast_kperiod is not None :
44- query_string += "&fast_kperiod=" + fast_kperiod
44+ query_string += "&fast_kperiod=" + str ( fast_kperiod )
4545 if slow_kperiod is not None :
46- query_string += "&slow_kperiod=" + slow_kperiod
46+ query_string += "&slow_kperiod=" + str ( slow_kperiod )
4747 if slow_dperiod is not None :
48- query_string += "&slow_dperiod=" + slow_dperiod
48+ query_string += "&slow_dperiod=" + str ( slow_dperiod )
4949
5050 if function == 'stochrsi' :
5151 if fast_kperiod is not None :
52- query_string += "&fast_kperiod=" + fast_kperiod
52+ query_string += "&fast_kperiod=" + str ( fast_kperiod )
5353 if fast_dperiod is not None :
54- query_string += "&fast_dperiod=" + fast_dperiod
54+ query_string += "&fast_dperiod=" + str ( fast_dperiod )
5555
5656 if function == 'macd' :
5757 if fast_period is not None :
58- query_string += "&fast_period=" + fast_period
58+ query_string += "&fast_period=" + str ( fast_period )
5959 if slow_period is not None :
60- query_string += "&slow_period=" + slow_period
60+ query_string += "&slow_period=" + str ( slow_period )
6161 if signal_period is not None :
62- query_string += "&signal_period=" + signal_period
62+ query_string += "&signal_period=" + str ( signal_period )
6363
6464 if function == 'sar' :
6565 if acceleration is not None :
66- query_string += "&acceleration=" + acceleration
66+ query_string += "&acceleration=" + str ( acceleration )
6767 if maximum is not None :
68- query_string += "&maximum=" + maximum
68+ query_string += "&maximum=" + str ( maximum )
6969
7070 return self ._rest_get_method (api_key = api_token , endpoint = endpoint , uri = ticker , querystring = query_string )
7171
0 commit comments