Skip to main content

Module sign

Module sign 

Source
Expand description

The signature of a request: HMAC-SHA256, written as lower case hex.

A REST request signs timestamp + api_key + recv_window + payload, where the payload is the query string of a GET or the JSON body of a POST, exactly as sent. The WebSocket login signs GET/realtime plus the expires time.

Functions§

rest_payload
The string a REST request signs.
sign
HMAC-SHA256 of payload with secret, as lower case hex.
ws_auth_args
The args of the WebSocket login: the key, the expires time (milliseconds, in the future) and the signature of GET/realtime{expires}.