Skip to content

Rest API Signature Certification (English)

Bitker-API edited this page Oct 15, 2018 · 1 revision

REST_authentication

  • For apikey applications and modifications, please process it on the account-API administration page. Where apikey is the API access key, and SecretKey is the user's key to sign the request.
  • Important: these two keys are closely related to account security, dont disclose to others at any time.

  • Based on security considerations, all API requests must be signed except quote API.
  • For example:

    https://api.bitker.com/v1/orders/place?amount=11&price=0.2&symbol=usdt_btc&consignType=1&consignDirection=2&apikey=value&signature=476a5a08129dd1012b9c56136a75f082fg

     

    Signature operation

    API requests are most likely to be tampered with in the process of being sent via Internet. To ensure that the request has not been changed, we will require the user to sign each request (other than the quote API) to verify whether the parameter or parameter value has changed during transmission.

    Here is an example of an order request from this website

    http:// market.bitker.com:3008/v1/orders/place

    ?amount=11

    &price=0.2

    &symbol=usdt_btc

    &consignType=1

    &consignDirection=2

    &apikey=value

     

  • The parameter names are sorted in the order of the ASCII code, and the parameter order is adjusted to:
  • ?amount=11

    &apikey=value

    &consignDirection=2

    &consignType=1

    &price=0.2

    &symbol=usdt_btc

     

  • Get the parameter values to form the encryption string
  • 11value210.2usdt_btc

     

  • Encrypt using key SecretKey and encrypted string with HmacSHA256 function, and then encrypt and generate signature signature. with MD5 algorithm.
  •  

     

    For example753a5a08129dd10fb9c56136a75f088e

     

     

  • Finally, the API request sent to the server should be
  • http:// market.bitker.com:3008/v1/orders/place

    ?amount=11

    &price=0.2

    &symbol=usdt_btc

    &consignType=1

    &consignDirection=2

    &apikey=value

    &signature=753a5a08129dd10fb9c56136a75f088e

    Clone this wiki locally