Missing information on insider transactions

Hi, I am trying to replicate the insider transactions data for a stock with python, but it seems like I am missing many informations. Only a few lines are showing and I am trying to get all the lines. Have I done someting wrong in the code?

symbols = ['aapl.o']
insider_trades, err = ek.get_data(symbols,["TR.TransactionDate","TR.InsiderFullName","TR.InsiderRole","TR.AdjSharesTraded","TR.TransactionType","TR.TransactionPrice",], debug=True)

image

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    @legaultjp
    You need to add the time range for the insider transaction history to your request. Try adding SDate and EDate parameters to the request. If you need to retrieve all transactions, then specifying a wide time range (say the last 30 years) is the way to achieve it:

    insider_trades, err = ek.get_data(symbols,["TR.TransactionDate","TR.InsiderFullName","TR.InsiderRole","TR.AdjSharesTraded","TR.TransactionType","TR.TransactionPrice",], {'SDate':'0D', 'EDate':'-30AY'})

Answers