{"id":23697984,"url":"https://github.com/rdhillbb/yahoowrapper","last_synced_at":"2026-04-29T22:32:41.423Z","repository":{"id":269817565,"uuid":"908548833","full_name":"rdhillbb/yahoowrapper","owner":"rdhillbb","description":"Wrapper for Yahoo Finance for Anthropic Function calling.","archived":false,"fork":false,"pushed_at":"2024-12-26T10:59:53.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T17:20:14.711Z","etag":null,"topics":["anthropic","anthropic-claude","function-call-anthropic","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdhillbb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-26T10:44:52.000Z","updated_at":"2024-12-26T11:02:01.000Z","dependencies_parsed_at":"2024-12-26T11:31:18.869Z","dependency_job_id":"50fb2b96-0410-42e5-a551-0016989822a2","html_url":"https://github.com/rdhillbb/yahoowrapper","commit_stats":null,"previous_names":["rdhillbb/yahoowrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rdhillbb/yahoowrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdhillbb%2Fyahoowrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdhillbb%2Fyahoowrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdhillbb%2Fyahoowrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdhillbb%2Fyahoowrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdhillbb","download_url":"https://codeload.github.com/rdhillbb/yahoowrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdhillbb%2Fyahoowrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32446600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","anthropic-claude","function-call-anthropic","golang"],"created_at":"2024-12-30T07:12:26.904Z","updated_at":"2026-04-29T22:32:41.405Z","avatar_url":"https://github.com/rdhillbb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stock Market Data Functions\n\n**IMPORTANT**: This implementation is not affiliated with or endorsed by Yahoo Finance. It is based on the open-source library [github.com/shoenig/yahoo-finance](https://github.com/shoenig/yahoo-finance).\n\n## Overview\n\nThis package provides a set of functions to retrieve real-time and historical stock market data. It wraps the functionality provided by the `github.com/shoenig/yahoo-finance` Go package into individual, easy-to-use functions.\n\n## Features\n\nThe package includes functions to retrieve:\n\n- Current stock prices\n- Previous closing prices\n- Price changes (absolute and percentage)\n- Exchange information\n- Currency information\n- Trading timestamps\n- Instrument types\n\n## Available Functions\n\n### Price Information\n\n- `YfStkPrice(sym string)` - Returns the current stock price\n- `YfStkPrevClose(sym string)` - Returns the previous day's closing price\n- `YfStkDelta(sym string)` - Returns the absolute price change\n- `YfStkDeltaPerc(sym string)` - Returns the percentage price change\n- `YfStkChange(sym string)` - Returns both absolute and percentage changes\n\n### Market Information\n\n- `YfStkSymbol(sym string)` - Returns the stock symbol\n- `YfStkExchange(sym string)` - Returns the full exchange name\n- `YfStkExchangeSymbol(sym string)` - Returns the exchange symbol\n- `YfStkCurrency(sym string)` - Returns the trading currency\n\n### Temporal Information\n\n- `YfStkFirstTrade(sym string)` - Returns the first trading date/time\n- `YfStkMarketTime(sym string)` - Returns the current market time\n\n### Other Information\n\n- `YfStkInstrument(sym string)` - Returns the instrument type (Note: Currently not implemented)\n\n## Return Formats\n\nAll functions return strings in the following formats:\n\n- Price values: `$XX.XX`\n- Percentage values: `XX.XX%`\n- Combined changes: `$XX.XX (XX.XX%)`\n- Dates: `YYYY-MM-DD HH:mm:ss`\n- Other values: Plain strings\n\n## Error Handling\n\nAll functions include error handling and will return an error message in string format if the request fails or the symbol is invalid.\n\n## Implementation Details\n\n- Uses a custom HTTP client with a 10-second timeout\n- All functions use the same client configuration through `getClient()`\n- Built on top of the `github.com/shoenig/yahoo-finance` package\n\n## Example Usage\n\n```go\nsymbol := \"AAPL\"\nfmt.Printf(\"Symbol: %s\\n\", YfStkSymbol(symbol))\nfmt.Printf(\"Price: %s\\n\", YfStkPrice(symbol))\nfmt.Printf(\"Previous Close: %s\\n\", YfStkPrevClose(symbol))\nfmt.Printf(\"Change: %s\\n\", YfStkChange(symbol))\n```\n\n## Function Definitions\n\nThe package includes a JSON configuration file (`anthropicfunc.json`) that provides detailed function definitions. This file includes:\n- Function names and descriptions\n- Parameter specifications\n- Return type information\n- Return format specifications\n\nExample JSON structure:\n```json\n{\n  \"functions\": [\n    {\n      \"name\": \"YfStkPrice\",\n      \"description\": \"Gets the current stock price for a given symbol\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"sym\": {\n            \"type\": \"string\",\n            \"description\": \"A valid stock market symbol (e.g., \\\"AAPL\\\" for Apple Inc.)\"\n          }\n        },\n        \"required\": [\"sym\"]\n      },\n      \"returnType\": \"string\",\n      \"returnFormat\": \"$XX.XX\"\n    }\n  ]\n}\n```\n\n## Dependencies\n\n- `github.com/shoenig/yahoo-finance`\n- Standard Go libraries (`fmt`, `net/http`, `time`)\n\n## Important Notes\n\n1. This is not an official Yahoo Finance product\n2. Data availability and accuracy depend on the underlying `github.com/shoenig/yahoo-finance` package\n3. Respect rate limits and terms of service when using this package\n4. The instrument type function is currently not implemented\n\n## License\n\nPlease refer to the license terms of the `github.com/shoenig/yahoo-finance` package for usage rights and restrictions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdhillbb%2Fyahoowrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdhillbb%2Fyahoowrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdhillbb%2Fyahoowrapper/lists"}