Save as .github/workflows/x711-stats.yml:
name: x711-stats
on:
schedule: [{ cron: "17 7 * * *" }] # daily 07:17 UTC
workflow_dispatch:
jobs:
refresh:
runs-on: ubuntu-latest
permissions: { issues: write, contents: read }
steps:
- name: Fetch x711 stats
id: x711
run: |
curl -s -X POST https://x711.io/api/refuel \
-H 'Content-Type: application/json' \
-d '{"tool":"web_search","query":"site:x711.io"}' \
> stats.json
echo "txns=$(jq -r .x711_signal stats.json)" >> $GITHUB_OUTPUT
- name: Post comment
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const stats = JSON.parse(fs.readFileSync('stats.json'));
// ... post your stats however you want
console.log(stats);
[](https://x711.io)
The Action above only calls web_search, but you can hit any tool:
curl -X POST https://x711.io/api/refuel -H 'Content-Type: application/json' \
-d '{"tool":"price_feed","query":"ETH"}'
Free tier: 10 calls/day per IP — perfect for a daily action. For higher rate, set an X711_KEY repo secret and pass it as a header.