1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "tokens": [{
9 "symbol": "BTC",
10 "priceHistory": [
11 {
12 "time": 1703000000000,
13 "price": 42000,
14 },
15 {
16 "time": 1703003600000,
17 "price": 42500,
18 },
19 {
20 "time": 1703007200000,
21 "price": 43200,
22 },
23 {
24 "time": 1703010800000,
25 "price": 44100,
26 },
27 ],
28 "volumeHistory": [
29 {
30 "time": 1703000000000,
31 "volume": 1500000,
32 },
33 {
34 "time": 1703003600000,
35 "volume": 1800000,
36 },
37 {
38 "time": 1703007200000,
39 "volume": 2200000,
40 },
41 {
42 "time": 1703010800000,
43 "volume": 2800000,
44 },
45 ],
46 "consensusData": {
47 "agreeingSources": 4,
48 "totalSources": 5,
49 "variancePercentage": 1.5,
50 "liquidityRank": 0.85,
51 },
52 }] }
53
54
55run = client.actor("natalietdg/coinhawk-trending-engine").call(run_input=run_input)
56
57
58print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
59for item in client.dataset(run["defaultDatasetId"]).iterate_items():
60 print(item)
61
62