time.sleep(2) button.click() time.sleep(2) tickers = driver.find_elements_by_tag_name("td") i = 0 while i < 20: print(tickers[i].text) client = ... # See "Authentication and Client Creation" client.place_order( 1000, # account_id equity_buy_limit('GOOG', 1, 1250.0) .set_duration(Duration.GOOD_TILL_CANCEL) .set_session(Session.SEAMLESS) .build()) i+=10 # for ticker in tickers: # print(ticker.text) # print(ticker.tag_name) # print(ticker.parent) # print(ticker.location) # print(ticker.size) # time.sleep(2) driver.quit() # [0]: Ticker, [1]: Price, [2]: Rating, [3]: Score, [4]:Rating Change Date, [5]:Price Change %
'span[data-sort-name="stock_score_normalized"]' ) time.sleep(2) button.click() time.sleep(2) tickers = driver.find_elements_by_tag_name("td") i = 0 while i < 20: print(tickers[i].text) client.place_order( 1000, # account_id equity_buy_market(tickers[i].text, 1) .set_duration(Duration.GOOD_TILL_CANCEL) .set_session(Session.SEAMLESS) .build())i+=10 # for ticker in tickers: # print(ticker.text) # print(ticker.tag_name) # print(ticker.parent) # print(ticker.location) # print(ticker.size) # time.sleep(2) driver.quit() # [0]: Ticker, [1]: Price, [2]: Rating, [3]: Score, [4]:Rating Change Date, [5]:Price Change % # SVM # 6.70
button.click() time.sleep(2) tickers = driver.find_elements_by_tag_name("td") i = 0 while i < 10: print(tickers[i].text) c.place_order( config.tda_acct_num, # account_id print(equity_buy_market(str(tickers[i].text), 1) .set_duration(Duration.GOOD_TILL_CANCEL) .set_session(Session.SEAMLESS) .build())) response = client.place_order() print(response.status_code) i+=10 # for ticker in tickers: # print(ticker.text) # print(ticker.tag_name) # print(ticker.parent) # print(ticker.location) # print(ticker.size) # time.sleep(2) driver.quit() # [0]: Ticker, [1]: Price, [2]: Rating, [3]: Score, [4]:Rating Change Date, [5]:Price Change % # SVM # 6.70