1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "m1",
12 "symbol": "NVDA",
13 "sentiment": "Bullish",
14 "body": "NVDA breakout and strong upside, bullish long setup",
15 "likes": 12,
16 "replies": 3,
17 },
18 {
19 "id": "m2",
20 "symbol": "NVDA",
21 "sentiment": "Bullish",
22 "body": "NVDA momentum",
23 "likes": 8,
24 },
25 {
26 "id": "m3",
27 "symbol": "TSLA",
28 "sentiment": "Bearish",
29 "body": "TSLA downside risk and bearish breakdown, short pressure",
30 "likes": 10,
31 "replies": 2,
32 },
33 {
34 "id": "m4",
35 "symbol": "AAPL",
36 "sentiment": "Bullish",
37 "body": "AAPL constructive",
38 "likes": 2,
39 },
40 ],
41 "previousItems": [
42 {
43 "id": "p1",
44 "symbol": "NVDA",
45 "sentiment": "Bearish",
46 "body": "NVDA bearish",
47 "likes": 3,
48 },
49 {
50 "id": "p2",
51 "symbol": "TSLA",
52 "sentiment": "Bullish",
53 "body": "TSLA bullish",
54 "likes": 4,
55 },
56 ],
57}
58
59
60run = client.actor("quanmatrix/stocktwits-sentiment-flow-intelligence").call(run_input=run_input)
61
62
63print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
64for item in client.dataset(run.default_dataset_id).iterate_items():
65 print(item)
66
67