Developers

SetDeriskToMaintenanceMarginRatio (signed message)

EIP-712 type SetDeriskToMaintenanceMarginRatio: fields, type hash and how each field is built from the request JSON.

On this page

Signed by set_derisk_mm_ratio. Step-by-step walkthrough: Signing.

SetDeriskToMaintenanceMarginRatio(uint64 subAccountID,uint32 deriskToMaintenanceMarginRatio,uint32 nonce,int64 expiration)

Type hash 0xacb6c1dcd395d10eb0681463bdc0d7dd0a0db302012781039cb1821ab326ed26. Domain {name: "GRVT Exchange", version: "0", chainId}.

Fields and where they come from

EIP-712 fieldTypeFrom requestTransform
subAccountIDuint64sub_account_idcopy
deriskToMaintenanceMarginRatiouint32ratioscaled: decimal × 10^6
nonceuint32signature.noncesig.nonce
expirationint64signature.expirationsig.expiration
domain chainIduint256signature.chain_idsig.chainId

Signing test cases

In signing.json, signed by the public test key:

  • set_derisk_mm_ratio — Derisk at 1.5x the maintenance margin; ratio has 6 decimals. Only risk checks this signature. Digest 0xcdf7cf83641d491b4bf66fe060fa7c308040762a7422ca26e7a78ada1c20c24b.
Sign the example in your browser
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers