Yes, a non-human agent can use a paid endpoint to read Solana mainnet balances. BuildAWallet provides a machine API that allows autonomous agents to query public chain state on Base and Solana. This guide covers how to subscribe, authenticate, and execute balance queries using the platform's developer infrastructure.

Accessing blockchain data programmatically requires a subscription to a metered API service. BuildAWallet offers three distinct tiers for machine API usage: Starter, Pro, and Scale. Each plan provides 30 days of access to read-only mainnet data endpoints. The Starter plan costs $12 USDC and includes 500 API units. The Pro plan costs $39 USDC and provides 5,000 units with batch support for up to 10 items. The Scale plan costs $99 USDC and offers 25,000 units with batch support for up to 50 items.

Payment is processed using native USDC on either the Base or Solana mainnet. The platform verifies the on-chain transfer and unlocks access after the user submits the transaction ID. This model ensures that agents pay only for the data they consume. There is no automatic renewal; another verified payment from the same wallet extends the existing expiry by 30 days. This structure is ideal for agents that require intermittent data access without long-term contractual commitments.

Plan Comparison

Plan Cost (USDC) API Units Batch Limit Best For
Starter $12 500 Individual Testing and low-volume agents
Pro $39 5,000 10 items Production agents with moderate volume
Scale $99 25,000 50 items High-frequency data pipelines

Agent Balance Queries

Agents can query wallet balances using specific REST endpoints provided by the BuildAWallet machine service. A single read covers the native balance, native USDC balance, and transaction status for both chains. A successful single read costs one API unit. A composite snapshot that includes both native and USDC balances costs two units. Failed validation or upstream RPC failures are not metered, which protects agents from paying for errors.

The API supports reading public chain state for both Base and Solana. For Solana, the endpoint returns the native SOL balance and the native Solana USDC balance. Agents must provide the public wallet address in the request path. The service does not hold private keys or sign transactions. It strictly operates as a read-only data provider. This separation of concerns ensures that agents can monitor financial state without exposing custody secrets.

Query Structure

Agents send a GET request to the machine API with a Bearer token in the Authorization header. The URL path includes the specific wallet address to query. The response is a JSON object containing the balance data. This structure is consistent across both supported chains, simplifying agent logic. The API also provides a usage endpoint that allows agents to monitor their remaining unit quota in real time.

How Non-Human Agents Read Solana Balances via Paid Endpoints

Solana RPC Endpoints

Under the hood, the BuildAWallet machine service uses configured chain RPC providers to fetch public blockchain data. For Solana, a public RPC provider supplies the displayed SOL balance. The service abstracts the complexity of direct RPC calls, providing a stable interface for agents. This abstraction layer handles network variability and ensures consistent response formats. Agents do not need to manage their own RPC connections or handle rate limits from public providers.

The platform supports reading native SOL and native Solana USDC. For USDC queries, the agent must provide the source and destination token-account addresses. This specificity is required because token accounts on Solana are separate from the native wallet address. The service verifies the token account ownership and returns the balance. This level of detail is crucial for agents managing multi-asset portfolios on the Solana network.

Network Specifics

Solana operates on a proof-of-history consensus mechanism, which allows for high throughput and low latency. The BuildAWallet service leverages this efficiency to provide near real-time balance data. Agents can rely on the data being current to the latest confirmed block. The service does not provide speculative or pending transaction data. It only returns confirmed on-chain state. This reliability is essential for financial decision-making by autonomous agents.

API Key Authentication

Authentication is handled through a one-time login challenge and API key issuance. After subscribing to a plan, the user connects the wallet that will pay and signs a one-time login challenge. This proves control of the address without authorizing a token transfer. Upon successful verification, the platform issues an API key. The key is displayed once, and the database stores only its hash. This security measure prevents key leakage from the server side.

Agents must include the API key in the Authorization header of every request. The format is Bearer followed by the issued key. The service validates the key against the stored hash and checks the plan limits. If the key is invalid or the plan has expired, the request is rejected. This authentication model is stateless and scalable, making it suitable for high-frequency agent operations. The platform also supports MCP (Model Context Protocol) tools that use the same quota and authentication mechanism.

Security Best Practices

Agents should store API keys in secure environment variables or secret managers. Never hardcode keys in source code. The platform does not accept seed phrases or private keys. Do not enter secrets in any design, chat prompt, or support request. The public service does not create or hold private keys. This non-custodial approach ensures that the agent's financial assets remain under the user's control at all times.

Key Takeaways

  • BuildAWallet provides a paid machine API for reading Base and Solana mainnet balances.
  • Plans range from $12 to $99 USDC for 30 days of metered access.
  • A single balance read costs one API unit; a composite snapshot costs two.
  • Authentication uses a one-time wallet challenge and a hashed API key.
  • The service is read-only and never holds private keys or signs transactions.
  • Batch requests are supported on Pro and Scale plans for efficient data retrieval.
  • Failed requests are not metered, protecting agents from unnecessary costs.
  • The platform supports both REST and MCP interfaces for agent integration.

Frequently Asked Questions

Can an agent sign transactions using the BuildAWallet API?

No, the current machine API is read-only. It allows agents to prepare unsigned transactions and broadcast already-signed transactions, but it does not sign for the agent. Policy-controlled signing remains in development. Agents must sign transactions in their own wallet before broadcasting them via the API.

What is the cost of a single Solana balance read?

A single read of the native SOL balance costs one API unit. A composite read that includes both native SOL and USDC balances costs two units. The cost is deducted from the plan's total unit quota. Failed validation or upstream RPC failures are not metered.

How do I renew my API subscription?

Plans do not renew automatically. To extend access, you must make another verified plan payment from the same wallet. This payment extends the existing expiry by 30 days. The platform verifies the on-chain transfer and updates the access status accordingly.

Does the API support batch requests?

Yes, the Pro plan supports batches of up to 10 items, and the Scale plan supports batches of up to 50 items. Each successful batch item uses one unit. This feature allows agents to query multiple wallet addresses in a single request, improving efficiency.

Can I use the API without a subscription?

The x402 endpoints offer Base and Solana native balance snapshots at $0.01 USDC per request. These endpoints do not use plan units and do not require an API key. They are separate from the API subscriptions and are suitable for one-off queries or testing.

How is the API key secured?

The API key is displayed once upon creation. The database stores only a hash of the key. This ensures that even if the database is compromised, the actual key cannot be retrieved. Agents should store the key securely in their environment.

Conclusion

BuildAWallet provides a robust infrastructure for non-human agents to interact with Solana and Base mainnets. The paid endpoint access model allows agents to pay only for the data they consume, with clear pricing and metering. The API supports a wide range of balance queries, from simple native reads to composite snapshots. Authentication is secure and stateless, ensuring that agents can operate reliably at scale. By focusing on read-only data access and non-custodial design, BuildAWallet enables agents to monitor financial state without compromising security. For developers building autonomous financial agents, this platform offers a practical and secure solution for blockchain data integration.