MCPcopy Create free account
hub / github.com/ccxt/ccxt / hmac

Method hmac

python/ccxt/base/exchange.py:1391–1398  ·  view source on GitHub ↗
(request, secret, algorithm=hashlib.sha256, digest='hex')

Source from the content-addressed store, hash-verified

1389
1390 @staticmethod
1391 def hmac(request, secret, algorithm=hashlib.sha256, digest='hex'):
1392 h = hmac.new(secret, request, algorithm)
1393 binary = h.digest()
1394 if digest == 'hex':
1395 return Exchange.binary_to_base16(binary)
1396 elif digest == 'base64':
1397 return Exchange.binary_to_base64(binary)
1398 return binary
1399
1400 @staticmethod
1401 def string_to_binary(buff: str) -> bytes:

Callers 15

signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45

Calls 2

binary_to_base16Method · 0.80
binary_to_base64Method · 0.80

Tested by

no test coverage detected