Ejemplo n.º 1
0
 def test_top_movers(self):
     movers = r.get_top_movers()
     assert (movers)
     first = movers[0]
     assert ('ask_price' in first)
     assert ('ask_size' in first)
     assert ('bid_price' in first)
     assert ('bid_size' in first)
     assert ('last_trade_price' in first)
     assert ('last_extended_hours_trade_price' in first)
     assert ('previous_close' in first)
     assert ('adjusted_previous_close' in first)
     assert ('previous_close_date' in first)
     assert ('symbol' in first)
     assert ('trading_halted' in first)
     assert ('has_traded' in first)
     assert ('last_trade_price_source' in first)
     assert ('updated_at' in first)
     assert ('instrument' in first)
Ejemplo n.º 2
0
def finance_news():
    rh.login("email", "password", store_session=True)
    print("logging in ...")
    q = open('/Users/adarshbulusu/Desktop/Kivy_News/StockMovements.txt', 'w')
    q.write("THESE ARE THE STOCKS THAT HAD THE BIGGEST GAINS RECENTLY!!!\n")
    q.write("\n")

    for i in range(len(rh.get_top_movers('up'))):
        q.write('\n')
        q.writelines(rh.get_top_movers('up')[i].get('symbol'))
        q.writelines(rh.get_top_movers('up')[i].get('description'))
        q.writelines("\n")

    q.write(("THESE ARE THE STOCKS THAT HAD THE BIGGEST LOSSES RECENTLY\n"))
    for i in range(len(rh.get_top_movers('down'))):
        q.write('\n')
        q.writelines(rh.get_top_movers('down')[i].get('symbol'))
        q.writelines(rh.get_top_movers('down')[i].get('description'))
        q.write("\n")

    q.close()
Ejemplo n.º 3
0
def get_movers():
    movers = r.get_top_movers(direction="DOWN")
    return movers
Ejemplo n.º 4
0
 def getMovers(self, moveType: str):
     return self.masterFormat(robin_stocks.get_top_movers(moveType),
                              "mover")