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

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

```text
Order(uint64 subAccountID,bool isMarket,uint8 timeInForce,bool postOnly,bool reduceOnly,OrderLeg[] legs,uint32 nonce,int64 expiration)OrderLeg(uint256 assetID,uint64 contractSize,uint64 limitPrice,bool isBuyingContract)
```

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

## Fields and where they come from

| EIP-712 field | Type | From request | Transform |
|---|---|---|---|
| `subAccountID` | `uint64` | `order.sub_account_id` | `copy` |
| `isMarket` | `bool` | `order.is_market` | `copy`; absent = `false` |
| `timeInForce` | `uint8` | `order.time_in_force` | `enumCode`: integer value of `TimeInForce` |
| `postOnly` | `bool` | `order.post_only` | `copy`; absent = `false` |
| `reduceOnly` | `bool` | `order.reduce_only` | `copy`; absent = `false` |
| `legs` | `OrderLeg[]` | `order.legs` | `each`: map every element as `OrderLeg` |
| `nonce` | `uint32` | `order.signature.nonce` | `sig.nonce` |
| `expiration` | `int64` | `order.signature.expiration` | `sig.expiration` |
| domain `chainId` | `uint256` | `order.signature.chain_id` | `sig.chainId` |

Nested `OrderLeg` (paths relative to each list element):

| EIP-712 field | Type | From element | Transform |
|---|---|---|---|
| `assetID` | `uint256` | `instrument` | `assetKey`: the instrument's `instrument_hash` as uint256 |
| `contractSize` | `uint64` | `size` | `scaled`: decimal × 10^`base_decimals` of the instrument |
| `limitPrice` | `uint64` | `limit_price` | `scaled`: decimal × 10^9; absent = `0` |
| `isBuyingContract` | `bool` | `is_buying_asset` | `copy`; absent = `false` |

## Signing test cases

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

- `limit_order` — The standard first order: post-only GTT limit buy of 0.01 BTC_USDT_Perp at 60000 (600 USDT notional), Order type. Digest `0x7f8fecb8997024f85a5a9a44730f79d2cef290688d6a022d8e98e95ccc1f98c9`.
- `market_order` — IOC market sell without limit_price (signed as 0). Digest `0xad740bcaef463a9de8c758bd333046188a986979fd9e05594d97d3c699ea28ce`.
- `multi_leg_order` — Two legs on different instruments; legs keep their order. Digest `0xb0ae02ef544b7dbccedb1cbb177f99a3803c4d496cde5c29357027e5b8970999`.
- `order_max_precision` — size uses all 9 base decimals of BTC and limit_price all 9 price decimals. Digest `0x2cb9842d6774c5a0a8bb183670b06f7fec2ce1376071f6f3d3128f303dc151c4`.
- `bulk_orders`, `orders[0]` — Two orders in one bulk call, each signed on its own with its own nonce: a plain Order and an OrderWithBuilderFee, both on BTC_USDT_Perp (the server requires one asset per bulk call). The cancel list and time_to_live_ms are not signed. Digest `0x25418b3c70ba5f56b8756c1fad4d58be1bc1e09f2f57d7c97170b5320a6b9c06`.
