{"id":23467517,"url":"https://github.com/charafzellou/tzkt-delegations-api","last_synced_at":"2025-06-10T22:04:38.694Z","repository":{"id":177837486,"uuid":"660971930","full_name":"charafzellou/tzkt-delegations-api","owner":"charafzellou","description":"A basic API that exposes Delegation Operations from TZKT.io using Go Fiber","archived":false,"fork":false,"pushed_at":"2024-07-09T15:51:58.000Z","size":182,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T19:40:26.899Z","etag":null,"topics":["fiber-go","golang","tezos","tzkt","tzkt-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/charafzellou.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":"2023-07-01T11:34:59.000Z","updated_at":"2024-07-09T15:51:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"2501501a-4993-4bd2-be5e-8ea2085f0dd9","html_url":"https://github.com/charafzellou/tzkt-delegations-api","commit_stats":null,"previous_names":["charafzellou/tzkt-delegator-tools"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charafzellou%2Ftzkt-delegations-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charafzellou%2Ftzkt-delegations-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charafzellou%2Ftzkt-delegations-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charafzellou%2Ftzkt-delegations-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charafzellou","download_url":"https://codeload.github.com/charafzellou/tzkt-delegations-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charafzellou%2Ftzkt-delegations-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259159655,"owners_count":22814492,"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":["fiber-go","golang","tezos","tzkt","tzkt-api"],"created_at":"2024-12-24T12:36:06.143Z","updated_at":"2025-06-10T22:04:38.674Z","avatar_url":"https://github.com/charafzellou.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TZKT DELEGATIONS API\n\n## Original assignement :\n\nBuild a service that :\n- gathers new [delegations](https://opentezos.com/baking/delegating/) made on the Tezos protocol,\n- exposes them through a public API. \n\nThe original assignement document can be viewed [here](./docs/ASSIGNEMENT.md).\n\n## Usage :\n### Using `Docker-compose` :\nUsing `Docker-compose`, you can execute the following commands :\n\n```bash\ndocker-compose up -d\n```\n\n\n### Using Go locally :\n- Using a local install of Go, you can execute the following commands :\n\n```bash\ncp .env.dist .env\n```\n\n- Set up your Environement Variables, then :\n\n```bash\ncd app/indexer\ngo build . -o indexer\n./indexer\n```\n```bash\ncd app/api\ngo build . -o api\n./api\n```\n\n## Checklist :\n\n- [X] The service will poll the new delegations from this Tzkt API endpoint: https://api.tzkt.io/#operation/Operations_GetDelegations\n- [X] For each delegation, save the following information: sender's address, timestamp, amount, and block.\n- [X] Expose the collected data through a public API at the endpoint `/xtz/delegations`.\n    - [X] The expected response format is:\n    \n        ```json\n        {\n        \"data\": [ \n            {\n                \"timestamp\": \"2022-05-05T06:29:14Z\",\n                \"amount\": \"125896\",\n                \"delegator\": \"tz1a1SAaXRt9yoGMx29rh9FsBF4UzmvojdTL\",\n                \"block\": \"2338084\"\n            },\n            {\n                \"timestamp\": \"2021-05-07T14:48:07Z\",\n                \"amount\": \"9856354\",\n                \"delegator\": \"KT1JejNYjmQYh8yw95u5kfQDRuxJcaUPjUnf\",\n                \"block\": \"1461334\"\n            }\n        ],\n        }\n        ```\n    \n    - [X] The sender’s address is the delegator.\n    - [X] The delegations must be listed most recent first.\n    - [X] The endpoint takes one optional query parameter `year` , which is specified in the format `YYYY` and will result in the data being filtered for that year only.\n- [ ] Ensure the service is production-ready, considering factors like performance, scalability, error handling, and reliability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharafzellou%2Ftzkt-delegations-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharafzellou%2Ftzkt-delegations-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharafzellou%2Ftzkt-delegations-api/lists"}