{"id":42254601,"url":"https://github.com/bandprotocol/pds-gateway","last_synced_at":"2026-01-27T05:18:34.893Z","repository":{"id":153361898,"uuid":"472322104","full_name":"bandprotocol/pds-gateway","owner":"bandprotocol","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-08T07:00:09.000Z","size":330,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-13T19:00:28.530Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bandprotocol.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}},"created_at":"2022-03-21T12:13:47.000Z","updated_at":"2023-05-08T21:32:41.000Z","dependencies_parsed_at":"2024-03-06T17:18:01.589Z","dependency_job_id":"a05efd1c-8fde-4034-9bc9-bdb0adbde02c","html_url":"https://github.com/bandprotocol/pds-gateway","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bandprotocol/pds-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fpds-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fpds-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fpds-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fpds-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bandprotocol","download_url":"https://codeload.github.com/bandprotocol/pds-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fpds-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28803650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"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":[],"created_at":"2026-01-27T05:18:34.811Z","updated_at":"2026-01-27T05:18:34.868Z","avatar_url":"https://github.com/bandprotocol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Premium Data Sources Gateway\n\nThe gateway for data sources on BandChain that require an API key for access. However, to prevent exposing the key on the chain, our solution allows secure access to the API without revealing the key. Only validators assigned to retrieve data for BandChain requests have the capability to obtain price data from these data sources.\n\n## Requirements\n\n### Environment Variables\n\nUtilize the `.env` file by running:\n\n```bash\ncp .env.example .env\n```\n\nEnsure to update the environment variables for the Gateway and your chosen adapter.\n\n## Running the Application\n\n\u003e Note: You have the option to set the environment variable `MODE=development` to facilitate testing your API locally. This allows you to make requests without the necessity of verifying that the requests originate from validators assigned to retrieve data for BandChain.\n\n### Docker Compose\n\nTo run the application using Docker Compose:\n\n```bash\ndocker-compose up\n```\n\n## Testing\n\nExecute tests with:\n\n```bash\npytest\n```\n\n## Supported Adapters\n\n### StandardCryptoPrice\n\nThis adapter type retrieves the current price of each cryptocurrency symbol. Below are the specifications for the request, response, adapter input, and adapter output.\n\n#### [GET] Request\n\nParameters:\n\n- `symbols`: str (e.g., \"BAND,ALPHA\")\n\n#### Response\n\n```python\nprices: []{symbol: str, price: float, timestamp: integer}\n```\n\nExample:\n\n```python\n[{symbol: \"BAND\", price: 99999, timestamp: 161111111111}, {symbol: \"ALPHA\", price: 99999, timestamp: 161111111111}]\n```\n\n#### Set Environment Valuables\n\n- CoinMarketCap:\n\n  - `ADAPTER_TYPE = \"standard_crypto_price\"`\n  - `ADAPTER_NAME = \"coin_market_cap\"`\n  - `API_KEY = \u003cYOUR_COIN_MARKET_CAP_API_KEY\u003e`\n\n- CryptoCompare:\n\n  - `ADAPTER_TYPE = \"standard_crypto_price\"`\n  - `ADAPTER_NAME = \"crypto_compare\"`\n  - `API_KEY = \u003cYOUR_CRYPTO_COMPARE_API_KEY\u003e`\n\n- CoinGecko:\n  - `ADAPTER_TYPE = \"standard_crypto_price\"`\n  - `ADAPTER_NAME = \"coin_gecko\"`\n  - `API_KEY = \u003cYOUR_COIN_GECKO_API_KEY\u003e`\n\n## VerifiableAI\n\nThis VerifiableAI adapter type is used to request the AI API.\n\n### OpenAI\n\n#### [POST] Request\n\nBody:\n\n```json\n{\n  \"model\": \"gpt-3.5-turbo\",\n  \"messages\": [\n    { \"role\": \"user\", \"content\": \"What is the best French cheese?\" }\n  ],\n  \"temperature\": 0.7,\n  \"top_p\": 1,\n  \"max_tokens\": 25,\n  \"stream\": false,\n  \"seed\": 1\n}\n```\n\n#### Response\n\n```json\n{\n  \"answer\": \"It is subjective and depends on personal preference, but some popular French cheeses include Brie, Camembert, Roquefort\"\n}\n```\n\n#### Set Environment Valuables\n\n- `ADAPTER_TYPE = \"verifiable_ai\"`\n- `ADAPTER_NAME = \"openai\"`\n- `API_KEY = \u003cYOUR_OPEN_AI_API_KEY\u003e`\n\n### Mistral\n\n#### [POST] Request\n\nBody:\n\n```json\n{\n  \"model\": \"mistral-tiny\",\n  \"messages\": [\n    { \"role\": \"user\", \"content\": \"What is the best French cheese?\" }\n  ],\n  \"temperature\": 0.7,\n  \"top_p\": 1,\n  \"max_tokens\": 16,\n  \"stream\": false,\n  \"safe_prompt\": false,\n  \"random_seed\": 1\n}\n```\n\n#### Response\n\n```json\n{\n  \"answer\": \"It is subjective and depends on personal preference, but some popular French cheeses include B\"\n}\n```\n\n#### Set Environment Valuables\n\n- `ADAPTER_TYPE = \"verifiable_ai\"`\n- `ADAPTER_NAME = \"mistral\"`\n- `API_KEY = \u003cYOUR_MISTRAL_API_KEY\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Fpds-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandprotocol%2Fpds-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Fpds-gateway/lists"}