{"id":44244514,"url":"https://github.com/button-tech/blockchain-fee-service","last_synced_at":"2026-02-10T12:02:34.683Z","repository":{"id":79943609,"uuid":"192827366","full_name":"button-tech/blockchain-fee-service","owner":"button-tech","description":"The calculation of fees in different blockchains","archived":false,"fork":false,"pushed_at":"2023-02-09T20:32:30.000Z","size":65,"stargazers_count":0,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T09:52:15.725Z","etag":null,"topics":["bitcoin","bitcoincash","blcokchain","erc20","ethereum","ethereumclassic","fee","litecoin","miner","stellar","token","waves"],"latest_commit_sha":null,"homepage":"","language":"Go","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/button-tech.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":"2019-06-20T01:27:29.000Z","updated_at":"2019-11-08T05:10:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"34b72b00-65ce-4746-8d55-77a7b3bdb7a7","html_url":"https://github.com/button-tech/blockchain-fee-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/button-tech/blockchain-fee-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/button-tech%2Fblockchain-fee-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/button-tech%2Fblockchain-fee-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/button-tech%2Fblockchain-fee-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/button-tech%2Fblockchain-fee-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/button-tech","download_url":"https://codeload.github.com/button-tech/blockchain-fee-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/button-tech%2Fblockchain-fee-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29298525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T10:40:02.018Z","status":"ssl_error","status_checked_at":"2026-02-10T10:38:28.459Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["bitcoin","bitcoincash","blcokchain","erc20","ethereum","ethereumclassic","fee","litecoin","miner","stellar","token","waves"],"created_at":"2026-02-10T12:02:24.061Z","updated_at":"2026-02-10T12:02:34.675Z","avatar_url":"https://github.com/button-tech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockchain Fee Service\nRest api for:\n1. Calculating actual fee\n2. Getting maximal sending amount\n3. Getting maximal sending amount with optimal fee\n4. Getting balance\n\n**Supported currencies**\n- Bitcoin\n- BitcoinCash\n- Litecoin\n- Ethereum\n- EthereumClassic\n- Waves\n- Stellar\n- Ethereum ERC20 tokens.  \n\n## Navigation\n- [Installation](#installation)\n- [Run](#run)\n- [Run Docker container](#run-docker-container)\n- [Docker build locally](#docker-build-locally)\n- [Usage](#usage-feecryptocurrency)\n  - [Bitcoin](#bitcoin-post-feebitcoin)\n  - [BitcoinCash](#bitcoincashpost-feebitcoincash)\n  - [Litecoin](#litecoin-post-feelitecoin)\n  - [Ethereum](#ethereum-post-feeethereum)\n  - [EthereumClassic](#ethereumclassic-post-feeethereumclassic)\n  - [Token](#token-post-feetoken)\n  - [Waves](#waves-post-feewaves)\n  - [Stellar](#stellar-post-feestellar)\n\n## Getting Started\n### Installation\n\n```\ngo get github.com/button-tech/blockchain-fee-service\ncd  ~/go/src/github.com/button-tech/blockchain-fee-service\n```\nOR\n```\ngit clone https://github.com/button-tech/blockchain-fee-service.git\ncd blockchain-fee-service\nGO111MODULE=on go mod tidy\n```\n### Run\n```\ngo run main.go\n```\n## Run Docker container\n```\ndocker run -d -p 8080:8080 buttonwallet/blockchain-fee-service\n```\n## Docker build locally\n```\nchmod +x build.sh\nacc=nickname ./build.sh\n```\nOR\n```\nsudo docker build -t blockchain-fee-service\n```\n## Usage `/fee/{cryptocurrency}`\n#### Bitcoin `POST /fee/bitcoin`\n**Request body**\n```\n{\n\t\"fromAddress\": \"1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2\",\n\t\"amount\": \"0.34007244\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 226728,\n    \"balance\": 65911084,\n    \"maxAmountWithOptimalFee\": 34007244,\n    \"maxAmount\": 65413013,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"input\": 16,\n    \"output\": 1\n}\n```\n\n#### BitcoinCash`POST /fee/bitcoinCash`\n**Request body**\n```\n{\n\t\"fromAddress\": \"bitcoincash:qqhsxzztfhntg8srupvxu2wtuxh3rykdrchfuc6ekj\",\n\t\"amount\": \"0.002583021\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 678,\n    \"balance\": 2584101,\n    \"maxAmountWithOptimalFee\": 2577738,\n    \"maxAmount\": 2583021,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"input\": 1,\n    \"output\": 2\n}\n```\n\n#### Litecoin `POST /fee/litecoin`\n**Request body**\n```\n{\n\t\"fromAddress\": \"LZnXf5KUQTaPFZe2Bb3YW3Li1kWdL4s6gX\",\n\t\"amount\": \"0.002583021\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 2034,\n    \"balance\": 4825099,\n    \"maxAmountWithOptimalFee\": 4779731,\n    \"maxAmount\": 4808203,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"input\": 1,\n    \"output\": 2\n}\n```\n\n#### Ethereum `POST /fee/ethereum`\n**Request body**\n```\n{\n\t\"fromAddress\": \"0x1E1b3f95c992901f9ba898140E46965DF67a1F2a\",\n\t\"amount\": \"0.002583021\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 378000000000000,\n    \"balance\": 563155068262885000,\n    \"maxAmountWithOptimalFee\": 562777068262885000,\n    \"maxAmount\": 562840068262885000,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"gasPrice\": 18000000000,\n    \"gas\": 21000\n}\n```\n\n#### EthereumClassic `POST /fee/ethereumClassic`\n**Request body**\n```\n{\n\t\"fromAddress\": \"0x9EAb4b0fC468A7f5D46228bf5a76cB52370d068D\",\n\t\"amount\": \"0.002583021\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 504000000000000,\n    \"balance\": 15967035509449030793,\n    \"maxAmountWithOptimalFee\": 15966531509449030793,\n    \"maxAmount\": 15966615509449030793,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"gasPrice\": 24000000000,\n    \"gas\": 21000\n}\n```\n\n#### Token `POST /fee/token`\n**Request body**\n```\n{\n\t\"fromAddress\": \"0x9ae49c0d7f8f9ef4b864e004fe86ac8294e20950\",\n\t\"tokenAddress\": \"0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359\",\n\t\"amount\": \"0.12928069852065452\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 378000000000000,\n    \"balance\": 289655836120696853,\n    \"maxAmountWithOptimalFee\": 17510668875340780548,\n    \"maxAmount\": 0,\n    \"isEnough\": true,\n    \"isBadFee\": false,\n    \"gasPrice\": 18000000000,\n    \"gas\": 36914,\n    \"tokenBalance\": 17510668875340780548\n}\n```\n\n#### Waves `POST /fee/waves`\n**Request body**\n```\n{\n\t\"fromAddress\": \"3P9cCF2czAVDyfAxCEVc1Y3WHRLA57xZaua\",\n\t\"amount\": \"0.11773\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 300000,\n    \"balance\": 11773300000,\n    \"maxAmountWithOptimalFee\": 11773000000,\n    \"maxAmount\": 11773000000,\n    \"isEnough\": true,\n    \"isBadFee\": false\n}\n```\n\n#### Stellar `POST /fee/stellar`\n**Request body**\n```\n{\n\t\"fromAddress\": \"GC7ONLMFZIWLGKWC5THMOCLQER7E63UHOTFJ3RFS6JYLMHIU32CFWGPV\",\n\t\"amount\": \"23.23\"\n}\n```\n**Response**\n```\n{\n    \"fee\": 100,\n    \"balance\": 13499000000,\n    \"maxAmountWithOptimalFee\": 13398999900,\n    \"maxAmount\": 13398999900,\n    \"isEnough\": true,\n    \"isBadFee\": false\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutton-tech%2Fblockchain-fee-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbutton-tech%2Fblockchain-fee-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbutton-tech%2Fblockchain-fee-service/lists"}