{"id":18895648,"url":"https://github.com/binance/binance-signature-examples","last_synced_at":"2025-04-06T10:13:41.579Z","repository":{"id":40944153,"uuid":"270965996","full_name":"binance/binance-signature-examples","owner":"binance","description":"Examples of generating HMAC and RSA signature for Binance API","archived":false,"fork":false,"pushed_at":"2023-11-27T12:36:46.000Z","size":51,"stargazers_count":252,"open_issues_count":0,"forks_count":92,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T09:07:56.394Z","etag":null,"topics":["api","binance","crypto","exchange","hashing","signature"],"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/binance.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":"2020-06-09T09:57:48.000Z","updated_at":"2025-03-19T14:56:12.000Z","dependencies_parsed_at":"2024-11-08T08:30:39.022Z","dependency_job_id":"46af57c2-ad7d-466f-a5ee-587e4ccfc9e2","html_url":"https://github.com/binance/binance-signature-examples","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/binance%2Fbinance-signature-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binance%2Fbinance-signature-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binance%2Fbinance-signature-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binance%2Fbinance-signature-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binance","download_url":"https://codeload.github.com/binance/binance-signature-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464224,"owners_count":20942970,"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":["api","binance","crypto","exchange","hashing","signature"],"created_at":"2024-11-08T08:29:14.487Z","updated_at":"2025-04-06T10:13:41.557Z","avatar_url":"https://github.com/binance.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binance API signature examples\n\n[Binance API document](https://binance-docs.github.io/apidocs/spot/en/#signed-trade-user_data-and-margin-endpoint-security) has the details of how to hash the signature.\nHowever we are still seeing users spending hours to find out why server still complains about bad signatures. In this repo, we give the example script on how to do signature.\n\nCode in this repository should NOT be used in production.\n\n## How it works\nIn each language, the script will try to hash following string and should return same signature\n\n```bash\n# hashing string\ntimestamp=1578963600000\n# and return\nd84e6641b1e328e7b418fff030caed655c266299c9355e36ce801ed14631eed4\n\n# hashing string\nsymbol=LTCBTC\u0026side=BUY\u0026type=LIMIT\u0026timeInForce=GTC\u0026quantity=1\u0026price=0.1\u0026recvWindow=5000\u0026timestamp=1499827319559\n# and return\nc8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71\n\n```\n\nThe secret is the same as `NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j`\n\n## Should I look into this repo\n- if you don't know what's signature\n- if you don't know how to do sha256 hashing in a language\n- if your signature can't pass the server's validation\n\n## Which language included\n\n- C++ \n- Dotnet\n- Go\n- Java\n- NodeJS\n- PHP\n- Python\n- Ruby\n- Shell\n\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinance%2Fbinance-signature-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinance%2Fbinance-signature-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinance%2Fbinance-signature-examples/lists"}