GithubHelp home page GithubHelp logo

butterball04 / transferwisely Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anuragdhingra/transferwisely

0.0 0.0 0.0 514 KB

Batch process using transfer-wise API to automatically track, detect and book transfers for you at better rates.

License: MIT License

Go 95.79% Dockerfile 4.21%

transferwisely's Introduction

transferwisely GitHub license Release version

Batch process using transfer-wise API to automatically track, detect and book transfers for you at better rates.

transferwisely-logs.png

Why do we need this?

Transferwise is a leading online money transfer service. One can book a quote at live mid-market rate that further can be used to create a transfer. This transfer is a payment order to recipient account based on a quote. Once created, a transfer needs to be funded within the next five working days. Otherwise, it will be automatically canceled. Its very easy to miss the best rates and kinda difficult to keep checking for them all the time if you are planning to make a transfer or if you do it too often, thus this was my naive attempt at solving this problem.

Features

  • Auto track, detect and book transfers from your exisiting transfers, no additional info required.
  • Auto cancels the older transfer, only when creating the new transfer was successful. Thus not exceeding your quota of three guaranteed rate tranfers provided by transferwise.
  • Mail reminder when your existing best booked quote is about to expire within next 36 hours.
  • Compact multi-stage built binary easy to manage and self-deploy.

Steps to follow

docker pull anuragdhingra/transferwisely:latest
  • Run the image passing the following env variables:
docker run \
--name transferwisely-sandbox \
-d \
-e ENV=production \
-e API_TOKEN=<YOUR API TOKEN> \
-e MARGIN=0.001 \
-e INTERVAL=1 \
-e [email protected] \
-e [email protected] \
-e MAIL_PASS=dummypassword \
anuragdhingra/transferwisely:latest

Required env vars -

ENV: sandbox or production

API_TOKEN: Generate it from here. Note: Sandbox and production environment have different API Tokens. Also, make sure you use the all_access API token provided by transferwise. Whitelisting your server IP while creating the token is also recommended.

Optional env vars -

MARGIN (defaults to 0): Currency margin at which you want to book a new transfer, value defaults to 0 i.e any higher rate. (Please set it according to your respective currency rate change in absolute terms) For example when MARGINis set as 0.01-

Current booked transfer : JPY --> INR : Rate --> 0.691
Live Rate --> 0.695 : NO ACTION NEEDED
Live Rate --> 0.711 : NEW TRANSFER BOOKED, cancelling the old one

INTERVAL (defaults to 1): Time(in minutes) interval at which you want to query transferwise to check for better rates

TO_MAIL : Mail address to send booked quote expiry reminder mail to i.e your email address.

FROM_MAIL: Mail address to send booked quote expiry reminder mail from.

MAIL_PASS : Password for mail address used to send booked quote expiry reminder mail.

Note: Please check additional info here on how to get FROM_MAIL and MAIL_PASS.

Other things to note before using this on production:

  • Currently, it doesnt supports creating a quote/transfer if there is no existing transfer at the moment. The reason to this being all the info regarding the new transfer to be made like recipient account,amount etc. is taken from the existing transfer.
  • At the moment, as transferwise at maximum blocks live rate for first three of all your transfers booked. Thus, the batch also gets only the first three or less existing transfers you have to compare for better rates.

Sending quote expiry reminder mail

The batch also checks every 12 hours if your existing best booked quote is about to expire within next 36 hours. Why 36 hours? Just because it should be enough time for us to decide on it. Currently, the batch uses the free tier SMTP server provided by gmail. We strongly recommend to create a new gmail account that will be used to send these mails to your original email account and just pass the newly created gmail as FROM_MAIL and its password as MAIL_PASS. Also, to start receiving mails you'd need to enable access to less secure app on your newly created gmail account.

transferwisely-reminder-mail-sample.png

Improvements

  • Add testing
  • Support creating a new transfer if no current transfer is present.
  • Enable support for multi-source-amount, multi-currency quote tracking and booking from the same account.
  • Alert user via notifications/SMS if a new transfer is booked on a better rate.
  • Status on price prediction, thus helping you decide if its a good time to go ahead with your transfer.

Contributing

We welcome issues to and pull requests against this repository! For further info regarding transferwise APIs checkout TransferWise API docs.

License

This project is licensed under the MIT License - read LICENSE file for details.

Star and watch

Watch this repository for updates and please give a star if you are using it or find it useful.

transferwisely's People

Contributors

anuragdhingra avatar butterball04 avatar

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.