HMAC-SHA256 with ISO timestamp and passphrase (OKX-style).
Used by: OKX, Coinbase, and ~10 other exchanges.
How it works
- Create ISO8601 timestamp
- Build payload:
timestamp + METHOD + path + body - Sign with HMAC-SHA256, encode as Base64
- Send signature, API key, timestamp, and passphrase in headers
Configuration
signing: %{
pattern: :hmac_sha256_iso_passphrase,
api_key_header: "OK-ACCESS-KEY",
timestamp_header: "OK-ACCESS-TIMESTAMP",
signature_header: "OK-ACCESS-SIGN",
passphrase_header: "OK-ACCESS-PASSPHRASE",
signature_encoding: :base64
}