Giter VIP home page Giter VIP logo

venmo-auto-cashout's Introduction

Venmo Auto Cashout

This is a small tool for automatically cashing out your Venmo balance such that each individual payment you receive will have an associated bank-transfer generated.

$ venmo-auto-cashout --token=XXX --allow-remaining
Your balance is $50
There are 3 transactions to cash-out

 -> Transfer: $15.00 -- Mako (Dia beacon museum tickets)
 -> Transfer: $15.00 -- David (Dia beacon museum tickets)
 -> Transfer: $20.00 -- Randolf (Dinner)

All money transfered out!

This can be used as a cron script to automatically cash out your Venmo for you.

Consistent tracking

By default the tool will only cashout amounts ammounts that add up to the most recent transactions. This is useful when the script is running on a cron-job and you want to be sure it never misses an individual payment cash out (This can happen when the tool runs immeidatley after a payment is recieved, but before the payment appears in the transaction list)

If you wish to cash-out everything use the --allow-remaining option. Otherwise the tool will exit when there is a remainder.

$ venmo-auto-cashout --token=XXX --allow-remaining
Your balance is $39.95
There are 3 transactions to cash-out

 -> Transfer: $15.00 -- Mako (Dia beacon museum tickets)
 -> Transfer: $24.95 of remaining balance

All money transfered out!

Lunchmoney integration

In addition to automatic-cashout, this script can also integrate with Lunchmoney.

The script will look for transactions in Lunch Money which are part of an arbitrary Venmo category, these transactions will be matched against previously tracked Venmo transactions by matching the exact amount.

The Lunch Money transaction will then be updated with the Payee and Note from the Venmo transction.

You will need to specify additional flags when running the script to do this. It is also highly recommended that the script run on as a cron job in this case.

$ venmo-auto-cashout --token=XXX --lunchmoney-token=XXX --lunchmoney-category=z-venmo
Your balance is $0.00
Waiting 5 seconds before querying transactions...
There are 0 income transactions to cash-out
There are 1 expense transactions to track

 -> Expense: -$28.29 -- Randolf Tjandra (Volcano curry)

Lunch Money Updates: 1 / 1 transactions matched

 -> Randolf Tjandra (Volcano curry) โ†’ LM: 242330937

All money transfered out!

My main use for this is to be able to better balance my bank account by associating Venmo transactions back to other charges in Lunchmoney. Typically an incoming Venmo is a reimbursement for some other transaction that I covered for friends. I split and then group the transaction that was to cover my friends such that my categories reflect my "true spend" (e.g., I don't have a bunch of $100+ restaurants transactions)

Getting your API token

Assuming you have PDM setup you can run the following commands to retrieve your token:

Important

You may disregard the device-id, we only need the token.

$ pdm run python
Python 3.9.6 (default, Aug 30 2021, 00:42:05)

>>> from venmo_api import Client
>>> Client.get_access_token(username='[email protected]', password='myPassword')

IMPORTANT: Take a note of your device-id to avoid 2-factor-authentication for your next login.
device-id: xxxx
IMPORTANT: Your Access Token will NEVER expire, unless you logout manually (client.log_out(token)).
Take a note of your token, so you don't have to login every time.

Successfully logged in. Note your token and device-id
access_token: xxxx
device-id: xxxx

ENV Variables

You can also set the following ENV variables instead of passing them as flags:

export VENMO_API_TOKEN=
export TRANSACTION_DB=
export LUNCHMONEY_TOKEN=
export LUNCHMONEY_CATEGORY=

venmo-auto-cashout's People

Contributors

evanpurkhiser avatar iloveitaly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

venmo-auto-cashout's Issues

Venmo API still available?

I'm getting:

venmo_api.models.exception.HttpCodeError: HTTP Status code is invalid. Could not make the request because -> 403 Forbidden.
Error: {'error': {'links': None, 'code': 240, 'title': 'Error', 'message': 'OAuth2 Exception: Unable to complete your request. Please try again later.'}}

On the call to Client.get_access_token()

Is it still possible to get a token or has Venmo closed this off?

Lunchmoney API key

is there a reason username + password + otp is used instead of an api key for lunch money?

Venmo API Key

What's the easiest way to get a venmo API key? Do you need to register an application and go through the oauth flow or can you generate a personal API key somewhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.