Logon(A) must be the first message sent by the client to initiate a session. If
authentication succeeds, the exchange should echo the message back to the
client. If authentication fails, the exchange will respond with a
LogOut(5) message with an appropriate reason.
Arguments
The
RawData(96) tag contains a timestamp and a nonce, separated by an
ASCII period (.). The timestamp needs to be a strictly increasing integer.
We recommend using a timestamp in milliseconds. The nonce is composed of
base64-encoded randomly chosen bytes. For safety reasons, it is important that
the nonce is sufficiently long and sourced from a cryptographically secure
random number generator. We recommend at least 32 bytes, but the nonce can be
up to 512 bytes.
The Password(554) tag contains a base64 encoded SHA256 hash of the
concatenation of the RawData(96) content and the client secret:
base64(sha256(RawData ++ access_secret)), here ++ denotes operation of the
concatenation.
Optional custom tag DeribitAppSig(9005) contains a base64 encoded SHA256
hash of the concatenation of the RawData(96) content and the Application
secret: base64(sha256(RawData ++ application_secret)), here ++ denotes
operation of the concatenation. This tag is used for registered applications
only.
CancelOnDisconnect(9001) controls “Close on Disconnect”. If this tag is not
provided, the default setting from the account is used.
Response
When the login is successful, the server will echo back the request. If the login was not successful, the server will respond with aLogout(5) message, and close the connection.