Warning
RIP FTX 🪦
It was fun while it lasted. This project will be archived.
Automatically reinvest margin lending revenues into the same cycle shortly after payout.
-
Runs every hour at minute 2 (since FTX pays out every full hour) and performs the following steps via API calls.
-
Lends the desired coin in your wallet (default "USD and Stablecoins").
-
Uses all available funds as lending offer ("MAX" button), sets the hourly rate as low as possible, then submits the offer.
git clone https://github.com/atthakasem/margin-lending-reinvestor.git
or download the zip package and extract the only necessary files: index.js
and .env.example
.
- Switch into the project directory:
cd margin-lending-reinvestor
- Copy
.env.example
to.env
:cp .env.example .env
- Edit
.env
and enter your API key credentials. - Run the script:
or run it detached in the background:
node index.js
nohup node index.js &
Outputs are stored in margin_lending.log
:
The source code has been bundled using esbuild even though Node can run the source files as is, after installing the dependencies using npm install
. If you make changes to the source code, consider rebuilding index.js:
npm run build
The lending currency (default "USD") can be changed within index.js
.
Please see the changelog for more information on what has changed recently.
MIT