Skip to content

Error in docu  #1

Open
Open
@martende

Description

@martende

I am trying to implement SIGN requests from your api

https://www.btcc.com/apidocs/usd-spot-exchange-websocket-api-json#appendix-1-how-to-generate-signature-for-request-json-messages

acording your docu step 2

2. Calculate a hash key by inputing your secret key using SHA1 algorithm. Then convert it to BASE64 string.

With Private Key 'TestSecretKey' Must produce from string TestAccessKeyTestCRID20170110750600CancelAllOrdersRequest1BTCUSD
string
OJ9oUnQEYKnaM5bI61ubsJwx420=
but I am receiving
qaqLGhjqXPz1GpfvgVvvBCn/5BA=

my python code to reproduce this behaviour:

>>> import base64,hmac, hashlib
>>> hmac.new('TestSecretKey','TestAccessKeyTestCRID20170110750600CancelAllOrdersRequest1BTCUSD' , hashlib.sha1).digest().encode('base64')
'qaqLGhjqXPz1GpfvgVvvBCn/5BA=\n'

Is it mistake in docu string or in docu description ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions