{"id":20093927,"url":"https://github.com/api3dao/beacons-api","last_synced_at":"2025-05-06T04:32:21.970Z","repository":{"id":37565823,"uuid":"471378946","full_name":"api3dao/beacons-api","owner":"api3dao","description":"An API to power beacons-related frontend services","archived":true,"fork":false,"pushed_at":"2023-02-04T11:45:09.000Z","size":291,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-02T16:16:06.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/api3dao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-03-18T13:29:05.000Z","updated_at":"2023-08-08T14:30:52.000Z","dependencies_parsed_at":"2023-02-15T05:45:49.596Z","dependency_job_id":null,"html_url":"https://github.com/api3dao/beacons-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api3dao%2Fbeacons-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api3dao%2Fbeacons-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api3dao%2Fbeacons-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api3dao%2Fbeacons-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/api3dao","download_url":"https://codeload.github.com/api3dao/beacons-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252622425,"owners_count":21777988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-13T16:48:50.045Z","updated_at":"2025-05-06T04:32:21.583Z","avatar_url":"https://github.com/api3dao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beacons API\n\n\u003e A set of Lambda handlers to serve data required by Beacons-related frontends\n\n## Overview\n\nBeacon data feeds ideally require frontend UIs to visualise them for the purposes of marketing and assessment. These UIs\nwill often have the need to display the last updates associated with a beacon and the current on-chain price, among\nother requirements not yet defined.\n\nThis repository contains a set of serverless handler functions that provide backing services to these frontends.\n\n## Installation\n\n```shell\nyarn install\n```\n\n## Deployment\n\nStart by copying the example files and modifying them with real values:\n\n```shell\ncp telemetryConfig.example.json telemetryConfig.json\ncp serverless.example.yml serverless.yml\n```\n\nTest your potential deployment:\n\nThe best way to test the Lambdas is to deploy them to your personal AWS account and then call them using the default\nURLs generated by AWS after deployment.\n\nYou can also test them locally, but this is not the ultimate indicator of success.\n\nAny testing and/or execution of the functions requires access to a suitable database. Refer to\n`telemetryConfig.example.json` and `serverless.example.json` for an example of the credentials required to be set to\nenable database access.\n\nTo deploy to AWS,\n[ensure your AWS credentials are accessible](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)\nand then run:\n\n```shell\nrm -rf .build .serverless; # Sometimes serverless caches build artifacts that can confound testing\nyarn sls deploy\n```\n\nTo test locally:\n\n```shell\nrm -rf .build .serverless; # Sometimes serverless caches build artifacts that can confound testing\nyarn sls invoke local --function \u003cfunction_name\u003e --data \u003cendpoint_data\u003e\n```\n\nExamples:\n\n```shell\nrm -rf .build .serverless \u0026\u0026 yarn sls invoke local --function last_transactions --data '{ \"queryStringParameters\": {\"beaconId\":\"0x5237b1d9dbbb7fcfabf646bcad0054abda328cee9d9d1fe2488cbed3a33cd47e\", \"chainId\":\"80001\"}}'\nrm -rf .build .serverless \u0026\u0026 yarn sls invoke local --function chain_value_data_point --data '{ \"queryStringParameters\": {\"dapiName\":\"AVAX/USD\", \"chainId\":\"80001\"}}'\nrm -rf .build .serverless \u0026\u0026 yarn sls invoke local --function coin_value --data '{ \"queryStringParameters\": {\"symbol\":\"AVAX\"}}'\nrm -rf .build .serverless \u0026\u0026 yarn sls invoke local --function volatility --data '{ \"queryStringParameters\": {\"beaconId\":\"0x8dd297503e6e8b95c979677e9e6aecfee08ee5426bea72adff2d7a797f7bd69d\", \"chainId\":\"137\"}}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi3dao%2Fbeacons-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapi3dao%2Fbeacons-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi3dao%2Fbeacons-api/lists"}