antirez / stonky Goto Github PK
View Code? Open in Web Editor NEWStock market Telegram bot
License: BSD 3-Clause "New" or "Revised" License
Stock market Telegram bot
License: BSD 3-Clause "New" or "Revised" License
For a direct message to the bot, the message
in the json payload is in a field called "message", but for a message posted to a watched channel, the message
in the json payload is in a field called "channel_post". See the jq
expressions below.
#chan_post.json is the json payload returned when a channel post is detected
(36) bmcqueen-mn2:stonky bmcqueen$ cat chan_post.json | jq .result[0].channel_post.text
"$dldld"
#dm_post.json is the json payload returned when a direct message to the bot is detected
(36) bmcqueen-mn2:stonky bmcqueen$ cat dm_post.json | jq .result[0].message.text
"$helpq"
(36) bmcqueen-mn2:stonky bmcqueen$
PR incoming
Hello!
I'm really enjoying the project!
I tried to compile the stonky on Pi3 B and had some problems:
Raspberry Pi 3 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
armv7l
cc -g -ggdb -O2 -Wall -W -std=c11 \
canvas.c cJSON.c sds.c stonky.c \
-o stonky -lpthread -lcurl -lsqlite3
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `fortuneThread':
/home/stonky/stonky/stonky.c:3058: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:3059: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `cvThread':
/home/stonky/stonky/stonky.c:2874: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowPortfolioRequest':
/home/stonky/stonky/stonky.c:2250: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2251: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowProfitLossRequest':
/home/stonky/stonky/stonky.c:2402: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botUpdateActiveChannels':
/home/stonky/stonky/stonky.c:2586: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2589: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2594: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2595: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `broadcastBigMovers':
/home/stonky/stonky/stonky.c:2957: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: stonky] Error 1```
I managed to solve the problem by installing:
apt install libatomic-ops-dev
And adding the flag to the compilation:
-latomic
Thanks!
I have cloned the code and when i try to run make command i'm getting below error
cc -g -ggdb -O2 -Wall -W -std=c11
canvas.c cJSON.c sds.c stonky.c
-o stonky -lpthread -lcurl -lsqlite3
stonky.c:46:10: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>
^~~~~~~~~~~~~
compilation terminated.
Makefile:4: recipe for target 'stonky' failed
make: *** [stonky] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.