CLI usage
Run the agent on its own to print live prices to stdout:Python usage
analyze_market()
The analyze_market function takes no parameters. It fetches the spot price for BTCUSDT, ETHUSDT, and SOLUSDT from the Binance /api/v3/ticker/price endpoint and returns the results as a plain dictionary.
Signature
Parameters
This function accepts no parameters.Return value
Returnsdict[str, str]. Each key is an asset ticker and each value is the current price as a USDT-denominated string, preserving the precision returned by Binance.
Current BTC/USDT spot price as a decimal string (e.g.
"67234.50000000").Current ETH/USDT spot price as a decimal string (e.g.
"3421.20000000").Current SOL/USDT spot price as a decimal string (e.g.
"180.45000000").Example response
Error handling
The agent raises arequests.RequestException for network timeouts or connectivity issues, and an HTTP error for API-level failures. Wrap the call if you need fault-tolerant behavior:
No API key is required. Binance’s
/ticker/price endpoint is publicly accessible without authentication.