---
title: "OrderWithBuilderFee (signed message)"
description: "EIP-712 type OrderWithBuilderFee: 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
OrderWithBuilderFee(uint64 subAccountID,bool isMarket,uint8 timeInForce,bool postOnly,bool reduceOnly,OrderLeg[] legs,address builder,uint32 builderFee,uint32 nonce,int64 expiration)OrderLeg(uint256 assetID,uint64 contractSize,uint64 limitPrice,bool isBuyingContract)
```

Type hash `0x6a59e4932070a97495ccc9de30b7309ec82b07156f8cfcbe516d28d226d11028`. 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` |
| `builder` | `address` | `order.builder` | `address` |
| `builderFee` | `uint32` | `order.builder_fee` | `scaled`: decimal × 10^4; absent = `0` |
| `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:

- `order_with_builder_fee` — builder set, so the server verifies OrderWithBuilderFee. builder_fee is scaled with 4 decimals. Digest `0x09b6c3c367b5641f38ab3750d2f5dc45325f3e46c15a3b6fe03e92b3ca7942af`.
- `bulk_orders`, `orders[1]` — 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 `0xd37d1ca9d12be0de22990d2a0e74fce73e6c4fb47b2a262b259208acc9dd6481`.
