WsAuthKeyRequest

StockSharp.Ws

Client → server auth via API key. Used by programmatic clients (bots, SDKs) instead of the password flow. The Signature is HMAC-SHA256 over "${KeyId}\n${Timestamp}\n${Nonce}\n" with the API key secret — exchanges' standard wire shape. Reject if outside ±2 min skew or if (KeyId, Nonce) was seen recently (replay).

Properties

KeyId
public string KeyId { get; set; }
value = wsAuthKeyRequest.KeyId
wsAuthKeyRequest.KeyId = value

Wire field keyId — the public id (ak_…). Looks up the secret server-side.

Nonce
public string Nonce { get; set; }
value = wsAuthKeyRequest.Nonce
wsAuthKeyRequest.Nonce = value

Random per-request nonce. Server caches (keyId, nonce) for the skew window; duplicates are rejected as replays.

Signature
public string Signature { get; set; }
value = wsAuthKeyRequest.Signature
wsAuthKeyRequest.Signature = value

Hex HMAC-SHA256 signature of the canonical payload (lowercase).

Timestamp
public long Timestamp { get; set; }
value = wsAuthKeyRequest.Timestamp
wsAuthKeyRequest.Timestamp = value

Unix-seconds, UTC, when the request was signed.

Type
public string Type { get; set; }
value = wsAuthKeyRequest.Type
wsAuthKeyRequest.Type = value

Wire field type.