API Specification Common Rules | Binance Open Platform (2024)

For Security Purpose, Binance and IPs will both ensure https-based call back endpoints. And signature checks for APIs.

Protocol Rules

The following specifies the rules for calling the API when accessing Binance payment.

RuleDescription
Transfer ModeUse HTTPS for secure transactions.
Submit ModePOST/GET, depends on the API.
Data Format (content-type)Data submitted and response are both in application/json format.
Char EncodingUse UTF-8 character encoding.
Signature AlgorithmHMAC-SHA512.
Signature RequirementSignature-checking is required for requesting and receiving data.
Logic JudgmentDetermine protocol field, service field and transaction status.

Request Header

AttributesTypeRequiredLimitationDescription
content-typestringYapplication/jsoncontent type
BinancePay-TimestamplongYBinance pay only process request within 1sUnixTimestamp in milliseconds that the requests send, guarantee the machine time is sync with the network
BinancePay-NoncestringYmust be 32 digitsA random string with 32 bytes, e.g. random ascii decimal within a-z and A-Z and loop 32 times to form a random string
BinancePay-Certificate-SNstringY-API identity key issued by Binance payment system
BinancePay-SignaturestringYthis should use SHA512, and be in upper casesignature, signature generation

Signature

Build the content

String payload = timestamp + "\n" + nonce + "\n" + body + "\n";

Sign the content

String signature = hex(hmac("sha512", payload, secretKey)).toUpperCase()

NOTE

  • ‘\n’ is LF, ASCII value is '0x0A'
  • Parameter names are case-sensitive;
  • When checking returned data or a push notification signature, the transferred sign parameter is excluded in this signature as it is compared with the created signature.
  • When post the Json body, carefully check the quote, ' is not same as "

Hosts

https://bpay.binanceapi.com

Common Business Errors

NameCodeReasonSolution
UNKNOW_ERROR400000An unknown error occurred while processing the request.Try again later
INVALID_REQUEST400001Parameter format is wrong or parameter transferring doesn't follow the rules.Please check whether the parameters are correct.
INVALID_SIGNATURE400002Incorrect signature resultCheck whether the signature parameter and method comply with signature algorithm requirements.
INVALID_TIMESTAMP400003Timestamp for this request is outside of the time window.Sync server clock
INVALID_API_KEY_OR_IP400004API identity key not found or invalid.Check API identity key
BAD_API_KEY_FMT400005API identity key format invalid.Check API identity key.
BAD_HTTP_METHOD400006Request method not supportedUse POST http method
MEDIA_TYPE_NOT_SUPPORTED400007Media type not supportedAdd header Content-Type: application/json
INVALID_REQUEST_BODY400008Request body is not a valid json objectCheck the request body format
MANDATORY_PARAM_EMPTY_OR_MALFORMED400100A parameter was missing/empty/null, or malformed.
INVALID_PARAM_WRONG_LENGTH400101A parameter was not valid, was empty/null, or too long/short, or wrong format.
INVALID_PARAM_WRONG_VALUE400102A parameter was not valid, the value is out of range.
INVALID_PARAM_ILLEGAL_CHAR400103A parameter was not valid, contains illegal characters
INVALID_REQUEST_TOO_LARGE400104Invalid request, content length too large
INVALID_MERCHANT_TRADE_NO400201merchantTradeNo is invalid or duplicated
ORDER_NOT_FOUND400202Order not found.
INVALID_ACCOUNT_STATUS400203Not support for this account, please check account status.
API Specification Common Rules | Binance Open Platform (2024)
Top Articles
Goodbudget Review: Pros, Cons, and More | The Motley Fool
Why is the Mint app shutting down? - LogRocket Blog
Evil Dead Movies In Order & Timeline
San Angelo, Texas: eine Oase für Kunstliebhaber
Readyset Ochsner.org
Top 10: Die besten italienischen Restaurants in Wien - Falstaff
Geodis Logistic Joliet/Topco
Pj Ferry Schedule
Paula Deen Italian Cream Cake
Delectable Birthday Dyes
Pittsburgh Ultra Advanced Stain And Sealant Color Chart
Elemental Showtimes Near Cinemark Flint West 14
Persona 4 Golden Taotie Fusion Calculator
Geometry Review Quiz 5 Answer Key
Selfservice Bright Lending
Beverage Lyons Funeral Home Obituaries
BMW K1600GT (2017-on) Review | Speed, Specs & Prices
Toyota Camry Hybrid Long Term Review: A Big Luxury Sedan With Hatchback Efficiency
Wisconsin Volleyball Team Boobs Uncensored
Naval Academy Baseball Roster
Troy Gamefarm Prices
48 Oz Equals How Many Quarts
Craigslist Dubuque Iowa Pets
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
January 8 Jesus Calling
Superhot Free Online Game Unblocked
Log in or sign up to view
Allegheny Clinic Primary Care North
Club Keno Drawings
Myhrconnect Kp
Moses Lake Rv Show
Consume Oakbrook Terrace Menu
Grapes And Hops Festival Jamestown Ny
Whitehall Preparatory And Fitness Academy Calendar
Telegram update adds quote formatting and new linking options
Streameast.xy2
Best Restaurant In Glendale Az
Boone County Sheriff 700 Report
Craigslist Pa Altoona
Uvalde Topic
Bartow Qpublic
Author's Purpose And Viewpoint In The Dark Game Part 3
3 Zodiac Signs Whose Wishes Come True After The Pisces Moon On September 16
18006548818
Backpage New York | massage in New York, New York
Cult Collectibles - True Crime, Cults, and Murderabilia
Aznchikz
Walmart Front Door Wreaths
Hughie Francis Foley – Marinermath
Gelato 47 Allbud
Shad Base Elevator
32 Easy Recipes That Start with Frozen Berries
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 5958

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.