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

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

```text
AddIsolatedPositionMargin(uint64 subAccountID,uint256 asset,int64 amount,uint32 nonce,int64 expiration)
```

Type hash `0xb6e7c8dc8d7d9fb71fb62ec71807f9a293291545d20d0123cba70b443af79010`. 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 |
| `amount` | `int64` | `amount` | `scaled`: decimal × 10^`quote_decimals` of the instrument |
| `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:

- `add_position_margin` — Add 250.5 USDT of isolated margin to the BTC_USDT_Perp position; amount uses the quote currency's decimals. Digest `0xb777923ee34033655e0f98d30dc6b5c2813235be0173fd88561c7be0b2a14c50`.
- `remove_position_margin` — A negative amount removes margin: -100.25 is signed as the int64 -100250000. Digest `0x36780cb75505d0bfdafa27bd962f0436ba813f8f6705a1b53f870f2014225358`.
