npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

prestabot

v2.0.3

Published

Bot for lending money in Yotepresto programmatically

Downloads

11

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)

  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

|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

  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:[email protected]?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 🍺.