def sign(self, payload):
        """
        Signature method which wraps signature and nonce parameters around a
        payload dictionary.
        :param payload:
        :return:
        """
        nonce = str(int(time.time() * 1000))
        package = {'apikey': self.key,
                   'message': {'nonce': nonce, 'payload': payload}}

        signature = hmac.new(self.secret, json.dumps(payload).hexdigest,
                             hashlib.sha512).hexdigest()
        package['signature'] = signature

        return json.dumps(package)
Signature method which wraps signature and nonce parameters around a
        payload dictionary.
        :param payload:
        :return: