This is a basic paper trading bot using market prices from Binance Futures.
- Create a Telegram bot using BotFather
- Note down the token
- Create a DynamoDB table with the following params:
- Partition key: "pk"
- Sort key: "sk"
- Create a index for the table with the following params:
- Partition key: "sk"
- Sort key: "is_open"
- Create an API on API Gateway that links to a Lambda
- Add the following environment variables to the Lambda
- BOT_NAME: The bot's Telegram username
- BOT_TOKEN: The bot's token
- TABLE_NAME: Name of the DynamoDB table
- IS_OPEN_INDEX_NAME: Name of the index created in step 2.
- Publish the API
- Use the
setWebhook
API to set the webhook to the URL underStages > default > Invoke URL
- Ensure you have a virtual environment set up (preferable under
.venv
) - Install the requirements using
pip install -r requirements.txt
. Installawscli
if you do not have it. - Run
FUNCTION_NAME=<name of the lambda> make