prestabot
v2.0.3
Published
Bot for lending money in Yotepresto programmatically
Downloads
13
Readme
Prestabot
Bot for lending money in yotepresto.com programmatically.
Usage
On console
Set the environment variables and run the command:
$ node ./src/controllers/console-controller.js
On AWS Lambda (recommended)
- Download this project, install dependencies (
npm install
) and compress everything in a .zip file (prestabot.zip
). - Create an AWS Lambda function and upload the zipped code.
- Set the handler as:
prestabot/src/controllers/aws-lambda-controller.handler
- Set the environment variables.
- Configure a Cloudwatch time trigger to run the handler every X minutes (5 to 30 minutes, depending on your judgement and amount to lend).
Required environment variables
|Variable|Type|Description|
|--------|----|-----------|
|EMAIL
|String|The email of the account to be authenticated.|
|PASSWORD
|String|The password of the account to be authenticated, in plain text.|
|OTP_SECRET
|String|The secret hash used to generate OTPs. See the section below to learn how to get this value for your account.|
|MIN_INTEREST
|Float|The minimum interest required on a requisition to lend money. For example: 15.9
, 9.9
or 20.9
|
|MIN_CREDIT_SCORE
|Float|The minimum credit score required on a requisition to lend money. For example: 700
.|
|MIN_TERM
|Integer|The minimum payment term of the requisitions (in months). Possible values are 6
, 12
, 18
, 24
or 30
.|
|MAX_TERM
|Integer|The maximum payment term of the requisitions (in months). Possible values are 12
, 18
, 24
, 30
or 36
.|
|LEND_AMOUNT
|Integer|The amount in MXN to lend each on each requisition that passed the filters. Must $200 or more and be a multiple of $100. For example: 300
,500
or 1000
.|
Getting the OTP Secret
- Log into your Yotepresto account.
- Go to Settings -> Security.
- Under "Selecciona tu segundo factor de autenticación" (select your second authentication factor), select "App de autenticación" (Authentication app).
- When the QR code is prompted, take a screenshot of it (only the QR code).
- To go XZing Decoder or any other service to read a QR's content, and upload it. This will output a link like this:
otpauth://totp/YOTEPRESTO:[email protected]?secret=I3USKO0GA1BMHCIXY76QTQSU2AS6A2GI&issuer=YOTEPRESTO
. - Copy the parameter
secret
from the previous URL (I3USKO0GA1BMHCIXY76QTQSU2AS6A2GI
in the example). This is the value for theOTP_SECRET
environment variable. - Now, follow the regular process: scan the QR code with Google Authenticator, Authy or similar; generate a code and enter it in Yotepresto.
- The second factor must be enabled and you are ready to go. For security, don't forget to delete your QR code image.
FAQ
Is it safe?
Yes, the only known issue is: if you change your password manually or set the PASSWORD
env variable wrong, the bot may lock your account after the 3rd login attempt. In that case, you'll need to unlock your account manually by opening a link you should have received by email.
What happens if I active Autoinvest in my account along with this bot?
Autoinvest is the native "programmatic bot" provided by Yotepresto once your account reaches $20,000 mxn.
If is is active along with Prestabot, it may happen one of two things for requisitions that matches both filters for Autoinvest AND Prestabot:
A. If Autoinvest lends to a requisition first, Prestabot will be aware and will skip it. B. If Prestabot lends to a requisition first, Autoinvest may lend to this requisition again. So, you'll end up lending twice to some people.
Support
You like this project? support it by buying me a beer 🍺.