Using the pre-request script
In Postman, the following code is pasted into the Pre-request Script tab of the collection. Postman runs this script before every request, so theepoch and checksum headers are always fresh.
Authorization: Bearer <API Key> header automatically.
On each request, two headers are added that read from the variables:
| Header | Value |
|---|---|
epoch | {{epoch}} |
checksum | {{checksum}} |
Why is a pre-request script needed? The signature is computed with HMAC-SHA512, which Postman cannot express declaratively. The pre-request script is the standard place to perform per-request crypto.