2.0.3 • Published 2 years ago

prestabot v2.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years ago

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)

  1. Download this project, install dependencies (npm install) and compress everything in a .zip file (prestabot.zip).
  2. Create an AWS Lambda function and upload the zipped code.
  3. Set the handler as: prestabot/src/controllers/aws-lambda-controller.handler
  4. Set the environment variables.
  5. 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

VariableTypeDescription
EMAILStringThe email of the account to be authenticated.
PASSWORDStringThe password of the account to be authenticated, in plain text.
OTP_SECRETStringThe secret hash used to generate OTPs. See the section below to learn how to get this value for your account.
MIN_INTERESTFloatThe minimum interest required on a requisition to lend money. For example: 15.9, 9.9 or 20.9
MIN_CREDIT_SCOREFloatThe minimum credit score required on a requisition to lend money. For example: 700.
MIN_TERMIntegerThe minimum payment term of the requisitions (in months). Possible values are 6, 12, 18, 24 or 30.
MAX_TERMIntegerThe maximum payment term of the requisitions (in months). Possible values are 12, 18, 24, 30 or 36.
LEND_AMOUNTIntegerThe 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

  1. Log into your Yotepresto account.
  2. Go to Settings -> Security.
  3. Under "Selecciona tu segundo factor de autenticación" (select your second authentication factor), select "App de autenticación" (Authentication app).
  4. When the QR code is prompted, take a screenshot of it (only the QR code).
  5. 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:user@example.com?secret=I3USKO0GA1BMHCIXY76QTQSU2AS6A2GI&issuer=YOTEPRESTO.
  6. Copy the parameter secret from the previous URL (I3USKO0GA1BMHCIXY76QTQSU2AS6A2GI in the example). This is the value for the OTP_SECRET environment variable.
  7. Now, follow the regular process: scan the QR code with Google Authenticator, Authy or similar; generate a code and enter it in Yotepresto.
  8. 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 🍺.

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago