{"id":18163740,"url":"https://github.com/chuckb/sgb-ftso-contracts","last_synced_at":"2025-10-07T06:29:17.228Z","repository":{"id":54079900,"uuid":"521739510","full_name":"chuckb/sgb-ftso-contracts","owner":"chuckb","description":"A small python library to ease instantiating Songbird FTSO contracts","archived":false,"fork":false,"pushed_at":"2022-08-09T14:01:39.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T09:51:41.151Z","etag":null,"topics":["blockchain","contract","flare","ftso","python","smart","songbird"],"latest_commit_sha":null,"homepage":"","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/chuckb.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}},"created_at":"2022-08-05T18:27:46.000Z","updated_at":"2023-03-01T01:28:22.000Z","dependencies_parsed_at":"2022-08-13T06:31:24.740Z","dependency_job_id":null,"html_url":"https://github.com/chuckb/sgb-ftso-contracts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Fsgb-ftso-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Fsgb-ftso-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Fsgb-ftso-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chuckb%2Fsgb-ftso-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chuckb","download_url":"https://codeload.github.com/chuckb/sgb-ftso-contracts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601478,"owners_count":20964863,"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":["blockchain","contract","flare","ftso","python","smart","songbird"],"created_at":"2024-11-02T11:06:02.460Z","updated_at":"2025-10-07T06:29:12.184Z","avatar_url":"https://github.com/chuckb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Songbird FTSO Contract Factory\nA small library to quickly instantiate Flare Time Series Oracle (FTSO) contracts on the Songbird network.\n\n## Installation\npip install sgb-ftso-contracts\n\n## Get Started\nHow to get prices of crypto assets tracked by the Songbird network:\n\n```python\nfrom sgb_ftso_contracts import Ftso\nfrom web3 import Web3\n\n# Songbird network RPC endpoint\n# This is a free, rate-limited API node.\nrpcurl = \"https://songbird-api.flare.network/ext/bc/C/rpc\"\n\n# Init web3 with REST HTTP provider.\nweb3 = Web3(Web3.HTTPProvider(rpcurl))\n\n# Create an FTSO contract instance with factory library.\nbtcFtso = Ftso(\"BTC\").contract(web3)\n\n# Fetch the latest price for Bitcoin from the FTSO.\nbtcDecimals = btcFtso.functions.ASSET_PRICE_USD_DECIMALS().call()\nbtcPriceData = btcFtso.functions.getCurrentPrice().call()\n\n# Prices are recorded as integers. Convert to decimal format.\nprint(btcPriceData[0] / pow(10, btcDecimals))\n```\n\n## More\n\n### Documentation\nDocumentation can be found [here](http://sgb-ftso-contracts.readthedocs.io/).\n\n### Source code\nThe source code for the FTSO smart contract system, for the Songbird network can be found [here](https://gitlab.com/flarenetwork/flare-smart-contracts/-/tree/songbird-network).\n\n### White paper\nMore information about the Flare Network, concepts, etc. can be found [here](https://flare.xyz/the-flare-network/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckb%2Fsgb-ftso-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchuckb%2Fsgb-ftso-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuckb%2Fsgb-ftso-contracts/lists"}