# Building a Go Bitcoin Balance Client for AI Agents A small Go HTTP client can isolate the wallet credential from model-generated tool arguments. The fixed balance route uses the documented net and type fields. Save as main.go and review the code. With Go installed and a restored Testnet wallet on the local engine, set WAB_BTC_KEY privately and run `go run main.go`. This makes a real balance query only if you choose to run it. HTTP success alone is not wallet success: inspect the JSON envelope and reject missing results. The example deliberately does not expose raw balances to a model. A timeout is not a zero balance. Educational reference; not live-tested. See [article](https://thamer.org/learn/go-bitcoin-balance-client) and [API](https://thamer.org/api).