Giter VIP home page Giter VIP logo

gramsense's Introduction

GramSense

Listener for Telegram channels and extractor for trading plans.

Convert telegram channel message into trading plan JSON, example:

πŸ‡ΊπŸ‡Έ PAIR πŸ”˜1000BONK/USDT
- Direction: Short
- Mode: Cross 20x

βœ”οΈ Entry Targets:
0.008355

β˜‘οΈ Take Profits:
1)0.008271
2)0.008188
3)0.008104
4)0.008021
5)0.007937
6)0.007854
βž–βž–βž–βž–βž–βž–

βœ–οΈ Invalidation Price:
0.009190499999999999

Running

  1. Create .env file
OPENAI_API_KEY=<OpenAI API Key>
TELEGRAM_API_ID=<Telegram API ID>
TELEGRAM_API_HASH=<Telegram API Hash>
TELEGRAM_SESSION=<Session ID from first run>
TELEGRAM_OUR_CHANNEL_NAME=<Telegram Channel Name>
OPENAI_PROMPT_EXTRACT_TRADING_PLAN="Extract trading plan (entryPrice, targetPrice (array of number), stopLoss, and symbol, direction (LONG or SHORT), mode (CROSS or ISOLATED) if any, leverage ([number]x) if any. Return the result in json format (return all values in numeric except for symbol, direction and mode), do not return empty fields from the following text (thousands separator is ,):"
OPENAI_MODEL=gpt-3.5-turbo
AIRTABLE_API_KEY=<Airtable API Key>
AIRTABLE_BASE_ID=<Airtable Base ID>
MESSAGE_POOLING_CRON="0 */5 * * * *"
  1. Create AirTable table

a. Plans table

Source (Text)
Timestamp (Date)
Symbol (Text)	
Direction (Text)	
Entry (Number)
Stop Loss (Number)	
Target Price 1 (Number)	
Target Price 2 (Number)	
Target Price 3 (Number)	
Target Price 4 (Number)	
Original Content (Text)	

b. Channels table

Channel Name (Text)	
Channel ID (Text)
Channel Title (Text)
Plan Keywords (Multiline Text)	
All Keywords (Checkbox)	
Lookback (Number)		
Last Run (Date)
Last Message ID (Number)	
  1. Run
ts-node src/index.ts

gramsense's People

Contributors

jazarja avatar

Stargazers

 avatar

Watchers

 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.