def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
    query = self.omit(params, self.extract_params(path))
    url = ((('/' + self.version) + '/') + self.implode_params(path, params))
    getOrDelete = ((method == 'GET') or (method == 'DELETE'))
    if getOrDelete:
        if query:
            url += ('?' + self.urlencode(query))
    if (api == 'private'):
        self.check_required_credentials()
        payload = ''
        if (not getOrDelete):
            if query:
                body = self.json(query)
                payload = body
        timestamp = str(self.milliseconds())
        auth = (((timestamp + method) + url) + payload)
        signature = self.hmac(self.encode(auth), self.encode(self.secret))
        accessWindow = self.safe_string(self.options, 'BITVAVO-ACCESS-WINDOW', '10000')
        headers = {'BITVAVO-ACCESS-KEY': self.apiKey, 'BITVAVO-ACCESS-SIGNATURE': signature, 'BITVAVO-ACCESS-TIMESTAMP': timestamp, 'BITVAVO-ACCESS-WINDOW': accessWindow}
        if (not getOrDelete):
            headers['Content-Type'] = 'application/json'
    url = (self.urls['api'][api] + url)
    return {'url': url, 'method': method, 'body': body, 'headers': headers}
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
    query = self.omit(params, self.extract_params(path))
    url = ((('/' + self.version) + '/') + self.implode_params(path, params))
    getOrDelete = ((method == 'GET') or (method == 'DELETE'))
    if getOrDelete:
        if query:
            url += ('?' + self.urlencode(query))
    if (api == 'private'):
        self.check_required_credentials()
        payload = 
        if (not getOrDelete):
            if query:
                body = self.json(query)
                payload = body
        timestamp = str(self.milliseconds())
        auth = (((timestamp + method) + url) + payload)
        signature = self.hmac(self.encode(auth), self.encode(self.secret))
        accessWindow = self.safe_string(self.options, 'BITVAVO-ACCESS-WINDOW', '10000')
        headers = {'BITVAVO-ACCESS-KEY': self.apiKey, 'BITVAVO-ACCESS-SIGNATURE': signature, 'BITVAVO-ACCESS-TIMESTAMP': timestamp, 'BITVAVO-ACCESS-WINDOW': accessWindow}
        if (not getOrDelete):
            headers['Content-Type'] = 'application/json'
    url = (self.urls['api'][api] + url)
    return {'url': url, 'method': method, 'body': body, 'headers': headers}