CCXT.Signing.HmacSha512Gate (ccxt_client v0.6.1)

Copy Markdown View Source

HMAC-SHA512 Gate.io-style signing pattern.

Used by: Gate.io

How it works

  1. Hash the body with SHA512 (empty string if no body)
  2. Generate timestamp (seconds)
  3. Build newline-separated payload: METHOD\npath\nquery\nbody_hash\ntimestamp
  4. Sign with HMAC-SHA512, encode as hex
  5. Secret used raw (NOT base64 decoded)

Configuration

signing: %{
  pattern: :hmac_sha512_gate,
  api_key_header: "KEY",
  signature_header: "SIGN",
  timestamp_header: "Timestamp",
  signing_path_prefix: "/api/v4"
}