All use cases
Trading bots13 min readPrediction market and research bot teams

How AI bots can pay for news before trading prediction markets

NewsEdge is an AI market bot that buys fresh evidence from news APIs, scraping agents, and human analysts before changing its view on a prediction market.

What NewsEdge integrates

Prediction market bots are only as good as their evidence. NewsEdge connects a market watcher, a scraping provider, a news API, and a human review queue. Viaclave handles the USDC payments between those services.

The bot can pay per article, per crawl, per verified source, or per human-reviewed summary. That makes research costs variable instead of a fixed subscription.

The ROI argument

News and scraping costs are hard to justify when they are fixed subscriptions. A market bot might need deep research for only a few markets per day. Paying per source bundle or per verified summary turns research into a variable cost tied to actual opportunities.

A simple threshold model works well. If a market move is too small, do not buy research. If liquidity is thin, do not buy research. If the potential decision size is 1000 USDC and the bot needs better evidence, paying 0.75 USDC for a source bundle can be rational. The research budget should scale with the value of the decision.

When the bot should buy information

  • A market probability moves faster than normal.
  • A new source appears but has not been summarized.
  • The bot detects conflicting claims across social or news sources.
  • A market is close to an execution threshold and better evidence could change the decision.
  • A scheduled event is approaching and the bot needs fresh context.

Research purchase flow

  • A market moves or crosses a threshold.
  • NewsEdge requests fresh evidence from a scraping or news provider.
  • The provider returns a price and expected output.
  • NewsEdge pays with USDC through Viaclave if the request is inside budget.
  • The provider returns the source bundle and NewsEdge updates its market view.

Research job schema

The bot should define exactly what it is buying. Otherwise providers return generic summaries that are hard to evaluate. Tie every research job to a market and a decision.

type ResearchJob = {
  jobId: string;
  marketId: string;
  question: string;
  maxPaymentMicroUsdc: number;
  requiredSources: number;
  deadlineSeconds: number;
};

Pay a scraping provider

Pay only when the provider accepts the job or after the result passes validation, depending on your trust model. For early pilots, approve results manually and then call the payout function.

async function payForResearchBundle(jobId: string) {
  const response = await fetch("https://api.viaclave.com/v1/payments/send", {
    method: "POST",
    headers: {
      "Authorization": "Bearer vc_test_YOUR_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from_wallet_id: "wal_newsedge",
      to_handle: "crawl-provider",
      amount: 750000,
      token: "USDC",
      memo: "Research bundle for market job " + jobId,
      idempotency_key: "research-" + jobId,
    }),
  });

  return response.json();
}

Add budget controls before production

Information markets can spike during breaking news. Use wallet limits so the bot cannot spend more than the research budget even if a prompt, scheduler, or provider loop misbehaves.

await fetch("https://api.viaclave.com/v1/wallets/wal_newsedge/limits", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer vc_test_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    daily_limit: 25000000,
    per_tx_limit: 1000000,
  }),
});

Good first markets

  • Crypto protocol events where on-chain data matters.
  • Sports markets where injury and lineup news moves prices.
  • Election and policy markets where primary sources matter.
  • Macro markets tied to official reports and scheduled announcements.
  • Company, product, or lawsuit markets where filings and news wires matter.

How to judge research quality

Do not measure a research provider only by whether the bot made money after receiving the bundle. Markets are noisy. Instead, track source freshness, duplicate rate, time to response, number of useful sources, and whether the research changed or confirmed the bot's decision.

Over time, route more jobs to providers with fast, original, decision-changing research. Reduce or pause payments to providers that send duplicates, stale links, or summaries that do not answer the market question.

Production rollout

  • Begin with one provider and one market category.
  • Use manual approval for payouts until quality is predictable.
  • Set a low daily research budget.
  • Log every research job, payment, result, and downstream decision.
  • Only automate payouts after you know which validation rules catch bad results.

Build this workflow in test mode

Create a test API key, connect the MCP server, or call the REST API directly. Viaclave's test mode lets you try wallet creation and test stablecoin payments without real funds.