{"id":24087972,"url":"https://github.com/tinybirdco/stock_prices","last_synced_at":"2026-05-15T19:33:17.080Z","repository":{"id":113973228,"uuid":"515176225","full_name":"tinybirdco/stock_prices","owner":"tinybirdco","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-18T13:47:34.000Z","size":262,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-20T19:24:44.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tinybirdco.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":"2022-07-18T12:31:49.000Z","updated_at":"2022-12-14T03:41:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5920dac-7398-4db2-809f-1da931ca1bfc","html_url":"https://github.com/tinybirdco/stock_prices","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinybirdco/stock_prices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fstock_prices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fstock_prices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fstock_prices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fstock_prices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinybirdco","download_url":"https://codeload.github.com/tinybirdco/stock_prices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fstock_prices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33076207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-01-10T03:56:43.220Z","updated_at":"2026-05-15T19:33:17.074Z","avatar_url":"https://github.com/tinybirdco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stock_prices\n\nThis repository contains the data project —[datasources](./datasources), and [endpoints](./endpoints)— and [data-generator](./data-generator) scripts for creating two charts —a line chart with the average price and a candlesitck one— based on stock prices using Tinybird.\n\nTo clone the repository:\n\n`git clone git@github.com:tinybirdco/stock_prices.git`\n\n`cd stock_prices`\n\n## Working with the Tinybird CLI\n\nTo start working with data projects as if they were software projects, let's install the Tinybird CLI in a virtual environment.\nCheck the [CLI documentation](https://docs.tinybird.co/cli.html) for other installation options and troubleshooting.\n\n```bash\nvirtualenv -p python3 .e\n. .e/bin/activate\npip install tinybird-cli\ntb auth --interactive\n```\n\nChoose your region: __1__ for _us-east_, __2__ for _eu_\n\nGo to your workspace, copy a token with admin rights and paste it. A new `.tinyb` file will be created.  \n\n## Project description\n\n```bash\n├── README.md\n├── data-generator\n│   └── gen_data.py\n├── datasources\n│   ├── fixtures\n│   │   ├── prices.ndjson\n│   │   └── symbol_currency.csv\n│   ├── prices.datasource\n│   ├── prices_5min_mv.datasource\n│   └── symbol_currency.datasource\n├── endpoints\n│   ├── avg_per_5mins.pipe\n│   ├── avg_per_5mins_from_MV.pipe\n│   ├── candlestick.pipe\n│   ├── candlestick_from_MV.pipe\n│   ├── last_price.pipe\n│   └── ui_filter_symbols.pipe\n└── pipes\n    └── mat_5_mins.pipe\n```\n\n## Pushing the data project to your Tinybird workspace\n\n### Pushing the simplest version, no MVs yet\n\nPush the data project —datasources, endpoints and fixtures— to your workspace.\n\n```bash\ntb push datasources/prices.datasource datasources/symbol_currency.datasource --fixtures\n```\n\n```bash\ntb push endpoints/candlestick.pipe endpoints/avg_per_5mins.pipe endpoints/ui_filter_symbols.pipe endpoints/last_price.pipe\n```\n  \nYour data project is ready for realtime analysis.\n\n### Pushing the MV to improve performance\n\nSee this [guide](https://www.tinybird.co/guide/materialized-views) to learn more about Materialized Views.\n\nLet's push the pipe that materilizes, and as we push deps, the _prices_5min_mv.datasource_ will be generated. We add the --populate flag to move the already existing data to the MV.\n\n```bash\ntb push --push-deps --populate --wait pipes/mat_5_mins.pipe\n```\n\nAnd now we can push the endpoints that get the same results from the MV.\n\n```bash\ntb push endpoints/avg_per_5mins_from_MV.pipe endpoints/candlestick_from_MV.pipe \n```\n\n## Check the values from a frontend\n\nGo to your workspace and copy the value of the __stock_prices_demo token__.\n\nVisit this page with your token:\n[https://pocs.tinybird.co/stockprices?token=\u003cYOUR_DEMO_TOKEN\u003e](https://pocs.tinybird.co/stockprices?token=)\n\n## Ingesting data using the /events endpoint\n\nLet's add some data through the [/events endpoint](https://www.tinybird.co/guide/high-frequency-ingestion).\n\nTo do that we have created a python script to generate and send dummy events.\n\n```bash\npython3 data-generator/gen_data.py\n```\n\nNote: Ctrl+C to stop ingestion.\n\n## Ask us any doubt\n\nThis project shows just some of the features of Tinybird. If you have any questions, come along and join our community [Slack](https://join.slack.com/t/tinybird-community/shared_invite/zt-yi4hb0ht-IXn9iVuewXIs3QXVqKS~NQ)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fstock_prices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybirdco%2Fstock_prices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fstock_prices/lists"}