---
title: "SetSubAccountPositionMarginConfig (signed message)"
description: "EIP-712 type SetSubAccountPositionMarginConfig: fields, type hash and how each field is built from the request JSON."
---

Signed by [`set_position_config`](../rpc/set_position_config.md). Step-by-step walkthrough: [Signing](../../guides/signing.md).

```text
SetSubAccountPositionMarginConfig(uint64 subAccountID,uint256 asset,uint8 marginType,int32 leverage,uint32 nonce,int64 expiration)
```

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

## Fields and where they come from

| EIP-712 field | Type | From request | Transform |
|---|---|---|---|
| `subAccountID` | `uint64` | `sub_account_id` | `copy` |
| `asset` | `uint256` | `instrument` | `assetKey`: the instrument's `instrument_hash` as uint256 |
| `marginType` | `uint8` | `margin_type` | `enumCode`: integer value of `PositionMarginType` |
| `leverage` | `int32` | `leverage` | `scaled`: decimal × 10^6 |
| `nonce` | `uint32` | `signature.nonce` | `sig.nonce` |
| `expiration` | `int64` | `signature.expiration` | `sig.expiration` |
| domain `chainId` | `uint256` | `signature.chain_id` | `sig.chainId` |

## Signing test cases

In [signing.json](../../downloads/signing.json), signed by the public test key:

- `set_position_config` — Isolated margin at 10x leverage on BTC_USDT_Perp; leverage has 6 decimals. Digest `0x33634cb8359ac37c5c6d24e8763dfd3c97a26cde9351ea384bbf45f1c0394cb0`.
