- create telegram bot through BotFather
- create .env with these info
CHAT_ID=<TELEGRAM_CHAT_ID>
TOKEN_API=<TELEGRAM_BOT_API_TOKEN>
- in root folder,
go run main.go
- notification of crypto coin prices
- learning golang / sqlite3 database / net/http library / cron job
- Creates "foo.db"
- (sqlite3driver) Connects to "foo.db"
- (net/http) GET request to ftx futures endpoint
- (sql-insert) insert rows into db
- (sql-query) display some data
- repeat step3-5 using cron job
- cron job library not the same as standard cron
c := cron.New(cron.WithParser(cron.NewParser(
cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor,
)))
- "0-59/15 0-59/1 * * * *" equivalent to every 15second