# Five brokers will take an order from an agent. None will take one on gold.

slug: agent-gold-execution-layer · https://miscsubjects.com/a/agent-gold-execution-layer · category: systems · tags: gold, mcp, brokers, prop-firms, execution · updated 2026-09-03T01:50:38.036Z

Five brokers will now take an order from an AI agent through a published protocol. None of them will let it near gold in the form gold traders actually use, and the one firm that funds gold traders shipped a connector that explicitly cannot trade. The gap between "an agent can trade" and "an agent can trade gold" turns out to be the whole story.

I installed every connector that exists for this and measured what each one actually permits.

## What is installed and what each one will do

| Connector | State | What it permits |
|---|---|---|
| Alpaca | connected, no credential needed | Exposes nothing until a key is attached; the handshake succeeds anyway |
| FundedNext | installed, awaits sign-in | Account data, payouts, rule breaches. No execution at any tier |
| Public.com | installed, awaits sign-in | Unattended execution on US equities and ETFs |
| Robinhood | installed, awaits sign-in | Execution from a separate agent account, equities and options |
| Interactive Brokers | installed, awaits sign-in | Read-only. Drafts an order a human submits from IBKR's own platform |

All five answered a protocol handshake, so none of them is vapour. Four returned `401` with a proper OAuth challenge; Alpaca returned a valid session and a tool list of length zero, which is the honest behaviour for a server that has authenticated nobody.

## MetaTrader will not run here, and the reason is not fixable by trying harder

Every MetaTrader MCP server on GitHub wraps the same thing: the `MetaTrader5` Python package. That package publishes no build for macOS on Apple silicon. The install fails at resolution, before any code runs:

```
ERROR: Could not find a version that satisfies the requirement MetaTrader5
       (from versions: none)
```

The best-maintained of those repositories says so itself in its own README — run it on a Windows VPS and connect back remotely. So MT4 and MT5 are reachable, but only through a Windows machine that does not exist yet. I have staged the server locally so that machine is the only missing piece.

This is worth stating plainly because MetaTrader is the platform every prop firm actually runs on. The route from an agent to a funded gold account passes through the one platform with no native support on this hardware.

## The firm that funds gold traders will not let an agent trade

FundedNext became the first proprietary trading firm to publish an MCP server, on 14 July 2026. It is a real server: OAuth 2.0, dynamic client registration, scopes `mcp:read` and `mcp:write`.

The `mcp:write` scope is declared and unused. FundedNext's own documentation is unambiguous — the connector has no trade execution capability at any tier, and write operations as small as editing a trade note are disabled during beta. An agent can ask why last month's reward was smaller than the profit. It cannot place the trade that earns the next one.

So the prop-firm route solves funding and solves instrument access, and stops one step short of the thing that would make it useful to a program.

## What a broker's overnight charge does to a gold strategy

FundedNext publishes a keyless calculator API, and one endpoint on it changed my mind about the strategy in the previous piece.

Swap points on XAUUSD, measured 2 September 2026: **−107.151 to hold long overnight, −46.917 to hold short.** Holding gold long costs more than twice what holding it short costs, every single night.

On one 100-ounce lot at roughly $4,400, that reads as something near 8.9% a year to carry a long gold position on a CFD account. The 63-day momentum rule I measured earlier returned 16.5% a year gross and spends most of its life long. Against a carry that size, buy and hold at 12.9% wins comfortably.

I am flagging that rather than asserting it. The raw figure is confirmed from the endpoint; the conversion from swap points to dollars depends on a point-value convention I have not verified with the broker. The number could be an order of magnitude smaller. But the direction is not in doubt, and neither is the lesson: a strategy validated on futures prices is not validated on the account you would actually run it in.

An ETF has no overnight financing charge. The same rule on GLD pays a 0.40% expense ratio a year and nothing else. That single line moves the recommended venue from a prop firm to a brokerage.

## The board that reads six venues at once

Six sources now fan out in parallel and land on one screen: a spot index, three tokenised-gold venues, a second tokenised claim, and a broker CFD quote. Bid, ask, spread in basis points, premium against spot, refreshed every twenty seconds, with a chart that reaches back ten years and switches between the futures contract, the two ETFs, the miners and silver.

The most useful thing on it is the failure behaviour. A venue that stops answering prints *not answering* in its own row rather than disappearing, because a board that silently drops a source is a board that lies about how many sources agree.

Reading it for a minute produced one number I had not expected. Dispersion across venues runs about 20 basis points against spreads of 0.5 to 4.4 — wide enough to look like an opportunity until you notice the venues are quoting different things. PAXG, XAUT and a broker CFD do not settle against each other, so the gap between them is not a trade. It is the price of the difference between three separate promises about the same metal.

## Where this actually leaves the question

The shortest path from this build to a real gold position is not the one the research pointed at.

Public.com or Robinhood, holding GLD or IAU, is the whole answer: a published protocol, execution permitted, US regulated, no evaluation to pass, no overnight carry, and an instrument whose ten-year series I already hold. It gives up leverage and it gives up trading somebody else's capital.

A prop firm gives back the capital and the leverage, and charges for it in three places — an evaluation to pass, a nightly financing charge that may exceed the strategy's edge, and a connector that cannot place the order anyway.

Interactive Brokers occupies a position I did not expect to find interesting. Its connector drafts the order and hands it to a human to submit. That is the correct shape for a system whose own measured reaction time is 2.2 seconds and whose strategy trades nine times a year. Nothing about that cadence needs unattended execution, and the review step costs nothing.

## Six things worth building next, in the order I would build them

**Log the board.** The six-venue snapshot is thrown away every twenty seconds. Writing each cycle to a row turns a live display into a dataset nobody else has: cross-venue gold dispersion at twenty-second resolution. Two weeks of it would answer whether the 20-basis-point gap is stable or drifts with volatility.

**Settle the swap question.** One message to FundedNext support fixes the point-value convention, and the answer decides whether a prop account can ever run a swing strategy on gold.

**Rent the Windows box.** A small Windows VPS makes MetaTrader reachable, and MetaTrader is what every prop firm runs. It is the single cheapest unlock on this list.

**Send the daily signal before trading it.** Compare gold's close to its close sixty-three days earlier, and mail the answer. No broker, no risk, no credential, and after a few months a record of whether the rule was worth trusting with money.

**Reprice the strategy on GLD.** Every measurement so far used the futures contract. The instrument that would actually be held is the ETF, and the tracking difference between them is exactly the kind of gap that quietly eats an edge.

**Watch the token premium.** Tokenised gold trades at a small, varying premium to spot. That premium is measurable now, once a minute, from sources already wired. Whether it mean-reverts is an empirical question nobody has to guess at.

## The verdict

An agent can trade gold today, through Public.com or Robinhood, in ETF form, in a US account, with no prop firm involved. Everything about that path is available and installed except the sign-in.

Every route that offers more — leverage, someone else's capital, the instrument professionals actually trade — is blocked by something specific and named: a Windows dependency, a beta flag on a write scope, or a financing charge that may be larger than the edge it would fund.



---

# The build can watch gold five ways and trade it zero ways

slug: gold-trading-build-assessment · https://miscsubjects.com/a/gold-trading-build-assessment · category: systems · tags: gold, markets, apis, backtest, build · updated 2026-09-03T01:04:38.774Z

The build can now watch gold from five independent venues, and it can decide about gold once a day. It cannot trade gold, because no broker key exists in the vault, and it will never trade gold quickly, because a round trip through its own dispatch route takes 2.2 seconds.

That is the whole answer. Twice, getting to it, the evidence contradicted what I expected.

## Eight gold sources went in, and two came straight back out

I wired eight gold capabilities into the build, dispatch-tested every one, and kept only the ones that answered from the build's own network rather than from my laptop. That distinction mattered more than I expected.

Two rows worked perfectly from my machine and failed from the build. CoinGecko and Coinbase Exchange both returned `HTTP 429` — rate limited — because the build's requests leave through a shared Cloudflare address that thousands of other requests also leave through. A public rate limit is not a per-key allowance; it is a per-address allowance, and the build does not own its address. I repointed those two rows at Bitfinex and Bitstamp, which do not throttle it.

This is the kind of failure that only appears if you test through the thing you are building rather than beside it.

| Build key | Source | What it returns |
|---|---|---|
| `GOLD_SPOT` | goldprice.dev | Spot reference, USD per troy ounce, with a staleness flag |
| `GOLD_FUTURES` | COMEX via Yahoo | GC=F daily bars, ten years in one call |
| `GOLD_ETF` | NYSE Arca via Yahoo | GLD, IAU, GLDM, SGOL, GDX — anything a US account can buy |
| `GOLD_KRAKEN_TICKER` | Kraken | Executable bid and ask for PAXG |
| `GOLD_KRAKEN_OHLC` | Kraken | Gold candles that include weekends |
| `GOLD_OKX_TICKER` | OKX | Third venue |
| `GOLD_COINBASE_TICKER` | Bitstamp | Fourth venue, widest spread |
| `GOLD_TOKEN_PRICES` | Bitfinex | Tether Gold, a second tokenised claim |

Three sources were rejected for reasons worth recording so nobody re-tests them. Binance geo-blocks the request outright. metals.dev, GoldAPI.io and MetalpriceAPI all work but want a paid key, and no gold key exists in the vault. And the instrument most retail gold traders actually name — the XAUUSD contract for difference at OANDA or IBKR — is not available to US retail at all. That last one quietly eliminates most of the internet's gold-trading advice.

## The tradeable instrument is not the one everybody writes about

If a US account wants gold exposure that a program can buy, there are two honest options and one popular fiction.

The fiction is spot XAUUSD. It is a CFD, US retail cannot hold it, and every tutorial built on it is unusable here.

The first real option is an ETF — GLD, IAU, GLDM. Liquid, boring, executable through any broker API, and closed nights and weekends.

The second is tokenised gold. One PAXG token is a claim on one troy ounce of allocated London Good Delivery bullion sitting in a Brink's vault, and it trades continuously on venues that expose a public order-placing API. That last property is the interesting one, because it means the execution path and the price path can be the same API.

It also carries a risk bullion does not: if the issuer fails, the token is a claim against a failed company rather than a bar of metal. That is a real cost, and it is the price of the 24/7 access.

## Five venues, one moment, no arbitrage

I priced gold on five sources within the same few seconds:

| Venue | Spread | Premium over spot |
|---|---|---|
| Kraken PAXG/USD | 0.7 bps | +0.20% |
| OKX PAXG/USDT | 1.6 bps | +0.24% |
| Bitfinex XAUT/USD | 2.0 bps | +0.12% |
| Bitstamp PAXG/USD | 4.3 bps | +0.22% |

Every venue sits within 12 basis points of every other. The tightest spread is under one basis point. There is no dispersion here worth harvesting — and even if there were, the build takes 2.2 seconds to notice it, by which time it is somebody else's.

I went looking for an arbitrage and found a well-arbitraged market instead. That is a finding, not a failure.

## The backtest disagreed with me twice

I expected the classic 50/200 moving-average crossover to be the answer, because it is the rule everybody reaches for and because gold trends. Over 2,512 trading days of COMEX futures, with 30 basis points deducted per round trip, it was not the answer. It was worse than doing nothing.

| Strategy | CAGR | Max drawdown | Sharpe |
|---|---|---|---|
| Buy and hold | 12.9% | −25.1% | 0.52 |
| SMA 50/200 | 9.6% | −25.0% | 0.36 |
| SMA 20/100 | 11.0% | −18.9% | 0.47 |
| 12-month momentum | 12.3% | −25.1% | 0.53 |
| **3-month momentum** | **16.5%** | **−17.3%** | **0.87** |

The crossover gave up three and a half points of annual return and kept the entire drawdown. It bought nothing.

The second surprise was that a much dumber rule worked. "Hold gold if it is higher than it was three months ago, otherwise hold cash" produced more return, a third less drawdown, and a Sharpe ratio two-thirds higher than simply owning the metal.

A rule that good, discovered on the fifth attempt, is exactly what a lucky parameter looks like. So I tried to break it.

## Testing whether the good result was luck

I swept the lookback window from 21 days to 252 and left everything else alone.

| Lookback | CAGR | Max drawdown | Sharpe |
|---|---|---|---|
| 21 days | 19.8% | −17.2% | 1.22 |
| 42 days | 19.2% | −16.2% | 1.10 |
| 63 days | 16.5% | −17.3% | 0.87 |
| 84 days | 14.9% | −17.7% | 0.73 |
| 126 days | 14.6% | −20.1% | 0.70 |
| 252 days | 12.3% | −25.1% | 0.53 |

Every window from three weeks to six months beats buy and hold on both Sharpe and drawdown, and performance decays smoothly as the window lengthens. Smooth decay across a whole parameter range is what a real effect looks like. A lucky pick shows up as one spike surrounded by mediocrity, and there is no spike here.

Then I checked what it costs to be wrong about costs. At zero cost the rule returns 19.8% a year. At 100 basis points per round trip it returns 9.2% and loses to buy and hold. At 200 basis points it returns nothing at all.

Kraken's real cost — a 0.7 basis point spread plus roughly 26 basis points of taker fee — lands at about 27, comfortably inside the survivable range but not by a margin worth being careless with. The edge is real and it is thin. Double the trading frequency and it is gone.

I should say plainly what this test cannot tell you: ten years of gold covers one long bull market and one drawdown. Momentum rules look good in trending markets, which is the market this sample contains. The sweep shows the result is not a parameter accident. It does not show that the next ten years will rhyme with the last ten.

## The number that decides everything

I timed eight consecutive round trips through the build's dispatch route. The median was 2,160 milliseconds. The worst was 5,331.

That single measurement settles the suitability question more cleanly than any backtest.

For a rule that looks at a closing price once a day and holds for weeks, two seconds is not a constraint in any meaningful sense — the decision window is twenty-four hours wide. The 63-day momentum rule traded 92 times in ten years, about nine times a year. The build could execute that comfortably with four orders of magnitude to spare.

For anything faster, two seconds is fatal, and no amount of tuning fixes it. There is no streaming socket, every quote is a fresh HTTP request, and the transport is a general-purpose dispatch route that was never built for market data. A strategy reacting to a one-second move would be acting on information that is already stale by the time it arrives.

The build is not slow at trading. It is fast enough for exactly one cadence and hopeless at every faster one, and it happens that the cadence it can serve is the one where the evidence says the edge actually lives.

## What is genuinely missing

Not the data. Not the analysis. A funded broker credential and nothing else.

The vault holds no Kraken key, no Alpaca key, no broker key of any kind. Every number on this page came from a public read-only endpoint. Kraken's private REST API would place the order, and it is the same venue already supplying the quote — but placing an order requires a funded account and a key that does not exist.

That is a decision, not an engineering gap. The reading half is built and tested; the writing half is one credential away.

## The verdict

The build is a competent daily gold research desk today. It reads five venues, it holds ten years of history, it backtests honestly enough to contradict me twice, and it reacts fast enough for the only strategy family the evidence supports.

It is not a trading system, because it cannot place an order. It will never be a fast trading system, because 2.2 seconds is 2.2 seconds.

If it ever should trade gold, the shape is already clear: read the close once a day, compare it to the close from sixty-three days ago, hold the metal or hold cash, and trade about nine times a year. Nothing about that requires speed. Everything about it requires being right about costs.


