Clicky

  • Welcome to P2P Lending / NFT Lending Forum.
 

ETH.LOAN

News:

This was the original Lend Academy peer-to-peer lending forum, since forensically restored by deBanked and now reintroduced to eth.loan.

To restore access to your user account, email [email protected]. We apologize for errors you may experience during the recovery.

Main Menu
NEW LOANS:   | 804.eth 2.500 Ξ | remoraid.eth 0.299 Ξ | remoraid.eth 0.299 Ξ | ALL

Need Help Writing Automation Script

Started by Peter, July 13, 2019, 11:00:00 PM

Previous topic - Next topic

jz451

Hi All,

Been a while since last posting as I haven't been as active investing, but have lurked from time to time.

For those of you have have written scripts for automating loan selection using the API I need some of your assistance. My script will select loans using a model I have backtested to classify which new loans will "Pay in Full". So far I am able to get the cash balance and have written the code for transforming the data, but need help with how to retrieve the data and for placing an order. Here's some questions I have:

1. What platform did you use to run the script? I'm planning to use AWS but wanted to see what others have used.

2. I'm new to web scraping using Python, so running Get/Post calls using Requests isn't intuitive to me when there's no examples in the LC API documentation. For those willing may I see your script sans selection filters/models to get a better idea of the structure for writing a script that functions properly?

3. For retrieving the data, is there a way to get a subset of the variables or am I only able to retrieve all variables? Also, I noticed when trying to convert the JSON to a dataframe, it's formatted as an overall dictionary with a list of loans and each loan is a dictionary of the data as you can see in the attached image. What's the best way to properly turn it into a dataframe so each loan is a separate row with the variables as columns?

Thanks for the help.




TravelingPennies

Yes I did, tried the different flavors of converting to dataframe and got the same output as using pd.Dataframe()

Edit: After only selecting the "loans" column it correctly put it into a dataframe.

Also, is there a way to retrieve specific variables instead of all 119 variables when retrieving data for new loans?


TravelingPennies

That was my assumption. Not a big deal but makes the list of datafame column names a little long to write out in a specific order. Seems like I answered my own questions for the most part after some trial and error. Last step is to figure out how to pickle the final model into the script file and setup the AWS modules.

NEW LOANS:   | 804.eth 2.500 Ξ | remoraid.eth 0.299 Ξ | remoraid.eth 0.299 Ξ | ALL