Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

lemon-markets/content-dollar-cost-average

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dollar-Cost Averaging Strategy with lemon.markets API 🍋

This is a public lemon.markets repository that outlines a dollar-cost averaging (DCA) strategy using our API. To get a general understanding of the API, please refer to our documentation.

Instructions for Use

This script can be used as a starting point to implement your own dollar-cost averaging strategy and to set up Telegram notifications. If implemented as is, the script will trade one share of the Xtrackers MSCI World Swap ETF 1C weekly.

A walk-through of this script can be found in this blog-post.

Environment Variables

You'll notice that the script uses several environment variables. Please define the following in an .env file or within your IDE:

ENV Variable Explanation
DATA_API_KEY Your market data API key
TRADING_API_KEY Your paper/money trading API key
MIC Market Identifier Code of Trading Venue

Telegram Bot

In this repository, we're using send-telegram to send messages using Telegram. Install Telegram on your smartphone and message /newbot to @BotFather to get started. BotFather will give you a token, which can be used to interact with your bot.

send-telegram can be installed in your terminal using pip as follows:

pip install telegram-send

It can be configured with:

telegram-send --configure 

You will be prompted to fill in the token you received, at which point you will receive a password. Upon sending this password to your bot using the Telegram app, your script will be configured with your bot. Full installation instructions for send-telegram can be found here.

You can now use send-telegram with the command:

telegram_send.send(messages=["Hello!"])

Interested in contributing?

This (and all lemon.markets open source projects) is work in progress. If you are interested in contributing to this repository, simply create a PR and/or contact us at support@lemon.markets.

Looking forward to building lemon.markets with you 🍋

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages