1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "marketA": {
12 "platform": "Polymarket",
13 "title": "Will Bitcoin reach $150,000 by December 31, 2027?",
14 "resolutionRules": "This market will resolve to Yes if any Binance 1 minute candle for BTC/USDT between Jan 1, 2027 00:00 and Dec 31, 2027 23:59 ET has a final High price of $150,000 or higher. Otherwise it resolves to No. The resolution source is Binance BTC/USDT with the 1m candle selected.",
15 "yesPrice": 0.31,
16 "noPrice": 0.7,
17 "feeBps": 0,
18 "endDate": "2027-12-31T23:59:00-05:00"
19 },
20 "marketB": {
21 "platform": "Kalshi",
22 "title": "Bitcoin price at the end of 2027: above $150,000?",
23 "resolutionRules": "If the CF Benchmarks BRTI price at 5:00 PM EST on December 31, 2027 is above $150,000, then the market resolves to Yes. Otherwise it resolves to No. The Source Agency is CF Benchmarks; the value is the average BRTI over the 60 seconds before the expiration time.",
24 "yesPrice": 0.22,
25 "noPrice": 0.79,
26 "yesFeeBps": 546,
27 "noFeeBps": 147,
28 "endDate": "2027-12-31T17:00:00-05:00"
29 },
30 "minEdgeBps": "100",
31 "bankrollUsd": "10000"
32};
33
34
35const run = await client.actor("davidcondrey/wl-arbitrage-lawyer").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45