original_docstring: 
          generates headers for general api post request
          :param data: data to be included into headers
          :param req: part of url after endpoint, like '/0/private/OpenOrders'
          :return: dictionary with headers containing api key and sign
          
docstring: generates headers for general api post request
docstring_tokens: generates headers for general api post request
code: def _get_headers(self, data, req):
          """
          generates headers for general api post request
          :param data: data to be included into headers
          :param req: part of url after endpoint, like '/0/private/OpenOrders'
          :return: dictionary with headers containing api key and sign
          """
          postdata = urllib.parse.urlencode(data)
          encoded = (str(data['nonce']) + postdata).encode()
          msg = req.encode() + hashlib.sha256(encoded).digest()
          H = hmac.new(base64.b64decode(self.api_secret), msg, hashlib.sha512)
          sign = (base64.b64encode(H.digest())).decode()
  
          headers = {
              'API-key': self.api_key,
              'API-sign': sign
          }
  
          return headers
code_tokens: def _get_headers ( self , data , req ) : postdata = urllib . parse . urlencode ( data ) encoded = ( str ( data [ 'nonce' ] ) + postdata ) . encode ( ) msg = req . encode ( ) + hashlib . sha256 ( encoded ) . digest ( ) H = hmac . new ( base64 . b64decode ( self . api_secret ) , msg , hashlib . sha512 ) sign = ( base64 . b64encode ( H . digest ( ) ) ) . decode ( ) headers = { 'API-key' : self . api_key , 'API-sign' : sign } return headers
short_docstring: generates headers for general api post request
short_docstring_tokens: generates headers for general api post request
comment: """
          generates headers for general api post request
          :param data: data to be included into headers
          :param req: part of url after endpoint, like '/0/private/OpenOrders'
          :return: dictionary with headers containing api key and sign
          """