Signature Components and Metadata (v6)
To calculate the signature value for the request, the caller must prepare the signature base string and generate a signature of it with one of the supported signing algorithms.
Signature Base String
The signature base string consists of several components, each of which is defined as a key-value pair. For each component, key and value are separated by a colon followed by a space (:
). All components are separated by newline characters (\n
, i.e. ASCII 0x0a).
Example
component-key: component-value
Please note that for version v6, Upvest does not enclose the component-key in double quotes, in contrast to the IETF draft v6.
This is a bug which we can not fix in order to stay backwards-compatible with early adopters.
Signature Components
To calculate the signature for a request to the Investment API, use the following list of components:
Please note that the order of the component keys in the signature base string must be the same as the order in the @signature-params
component itself, and in the signature
header.
The component @signature-params
contains several pieces of signature metadata, separated by semicolons (;
).
Example
@signature-params: ("@method" "@path" "@query" "accept" "authorization" "content-length" "content-type" "digest" "idempotency-key" "upvest-client-id");keyid="8d4997a8-cf7a-4e51-adbb-401656a3e5c2";created=1633529659;expires=1633529664;nonce="o085M4cMgpbicuOL"
The signature metadata consists of the following parts:
Although the @signature-params
component itself is a mandatory part of the
signature base string, it is not included in the list of components keys,
as mentioned in the IETF draft.
Was this page helpful?