• Stars
    star
    238
  • Rank 168,615 (Top 4 %)
  • Language
    Python
  • Created over 4 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Examples of generating HMAC and RSA signature for Binance API

Binance API signature examples

Binance API document has the details of how to hash the signature. However 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.

Code in this repository should NOT be used in production.

How it works

In each language, the script will try to hash following string and should return same signature

# hashing string
timestamp=1578963600000
# and return
d84e6641b1e328e7b418fff030caed655c266299c9355e36ce801ed14631eed4

# hashing string
symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000&timestamp=1499827319559
# and return
c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71

The secret is the same as NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j

Should I look into this repo

  • if you don't know what's signature
  • if you don't know how to do sha256 hashing in a language
  • if your signature can't pass the server's validation

Which language included

  • C++
  • Dotnet
  • Go
  • Java
  • NodeJS
  • PHP
  • Python
  • Ruby
  • Shell

License

MIT

More Repositories

1

binance-spot-api-docs

Official Documentation for the Binance Spot APIs and Streams
3,842
star
2

binance-connector-python

Simple connector to Binance Public API
Python
1,848
star
3

binance-public-data

Details on how to get Binance public data
Python
1,430
star
4

binance-api-postman

Postman collection for Binance Public API, including spot, margin, futures, etc.
1,307
star
5

binance-futures-connector-python

Python
762
star
6

binance-connector-node

A simple connector to Binance Public API
JavaScript
543
star
7

binance-connector-java

Java
375
star
8

binance-connector-dotnet

Lightweight connector for integration with Binance API
C#
204
star
9

binance-websocket-examples

Example code in Nodejs that demonstrate how to subscribe to Binance Websocket server.
JavaScript
151
star
10

binance-connector-go

Go
147
star
11

binance-api-swagger

Swagger for the Binance Public API
HTML
124
star
12

binance-futures-connector-java

Java
116
star
13

zkmerkle-proof-of-solvency

This is proof of solvency tool for Centralized exchanges built by Binance. Please raise bugs and security issues to https://bugcrowd.com/binance
Go
113
star
14

binance-spot-connector-rust

Rust
111
star
15

binance-toolbox-python

Some useful scripts that help users to validate
Python
95
star
16

asymmetric-key-generator

This simple tool can be used to generate an RSA PKCS#8 or Ed25519 key pairs.
JavaScript
75
star
17

binance-connector-php

This is a thin library that working as a connector to the Binance public API.
PHP
65
star
18

desktop

Binance desktop application release channel.
55
star
19

ai-trading-prototype

Free open source crypto AI trading bot prototype.
Python
50
star
20

binance-connector-typescript

TypeScript
47
star
21

binance-connector-ruby

a simple connector to Binance Public API
Ruby
34
star
22

websocket-demo

a live demo site for subscribing to websocket server
JavaScript
22
star
23

ai-trading-prototype-backtester

Headline Sentiment Analysis Backtester. Backtests trading strategy from ai-trading-prototype trading bot.
Python
21
star
24

binance-cli

JavaScript
20
star
25

ai-trading-prototype-headlines

News Headlines Fetcher. Outputs headlines intended for use with the ai-trading-prototype sentiment-based trading bot.
Python
17
star
26

binance-pay-signature-examples

Python
14
star
27

binance-pay-connector-python

A lightweight library that works as a connector to Binance pay public API
Python
14
star
28

binance-sbe-rust-sample-app

Rust
12
star
29

binance-pay-postman-collection

Postman collection for Binance Pay API
11
star
30

binance-toolbox-java

Java
10
star
31

binance-futures-connector-node

JavaScript
9
star
32

binance-mp-demo

JavaScript
9
star
33

binance-toolbox-go

Go
8
star
34

binance-toolbox-php

PHP
6
star
35

binance-sbe-java-sample-app

Sample app that decodes Binance "exchangeInfo" endpoint's SBE response to YAML.
Java
5
star
36

binance-sbe-cpp-sample-app

C++
4
star
37

binance-toolbox-ruby

Ruby
2
star
38

binance-toolbox-nodejs

JavaScript
1
star
39

binance-toolbox-typescript

TypeScript
1
star
40

binance-futures-java-toolbox

Java
1
star