> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsidemax.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# updateFeeSetting: Override Fee Rates per Market Deployer

> Set per-user taker and maker fee rate overrides within a market deployer. User-level overrides take the highest priority in the three-tier fee hierarchy.

The `updateFeeSetting` action lets you configure per-user fee rate overrides for your account within a specific market deployer. User-level fee settings take the highest priority in the three-tier hierarchy — they override both the market deployer's default rates and any contract-level defaults.

Maker fees can be negative to represent rebates, but the absolute value of the maker rate must not exceed the taker rate (`|makerBps| ≤ takerBps`). Omitting `takerBps` or `makerBps` clears that override entirely, causing your account to fall back to the owner or contract default for that rate. Explicitly passing `0` sets the fee to exactly 0% rather than clearing the override.

## Endpoint

```
POST https://dev.upsidemax.xyz/exchange
```

## Request

All requests must include an ECDSA signature and a millisecond-precision nonce.

```json theme={"system"}
{
  "action": {
    "type": "updateFeeSetting",
    "marketDeployerId": 1,
    "takerBps": 5,
    "makerBps": -2
  },
  "signature": { "r": "0x...", "s": "0x...", "v": 28 },
  "nonce": 1778858500000
}
```

### Action fields

<ParamField body="type" type="string" required>
  Fixed value: `"updateFeeSetting"`.
</ParamField>

<ParamField body="marketDeployerId" type="int32" required>
  The ID of the market deployer whose fee settings you are overriding for your account.
</ParamField>

<ParamField body="takerBps" type="int16">
  Your taker fee rate override, expressed in basis points (1 bps = 0.01%). Omit this field to clear any existing taker override and fall back to the default. Pass `0` to explicitly set a 0% taker fee.
</ParamField>

<ParamField body="makerBps" type="int16">
  Your maker fee rate override, expressed in basis points. Can be negative to represent a maker rebate. Omit this field to clear any existing maker override and fall back to the default. The constraint `|makerBps| ≤ takerBps` must hold.
</ParamField>

## Response

### Success

```json theme={"system"}
{
  "status": "ok",
  "response": {
    "type": "updateFeeSetting",
    "data": {
      "takerBefore": 10,
      "makerBefore": 2,
      "takerAfter": 5,
      "makerAfter": -2
    }
  }
}
```

### Response fields

<ResponseField name="takerBefore" type="int16">
  Your previous taker fee override in basis points. Returns `-32768` if no user-level taker override was previously set.
</ResponseField>

<ResponseField name="makerBefore" type="int16">
  Your previous maker fee override in basis points. Returns `-32768` if no user-level maker override was previously set.
</ResponseField>

<ResponseField name="takerAfter" type="int16">
  Your new taker fee override in basis points, as stored after this request.
</ResponseField>

<ResponseField name="makerAfter" type="int16">
  Your new maker fee override in basis points, as stored after this request.
</ResponseField>

<Note>
  A `takerBefore` or `makerBefore` value of `-32768` (the minimum value for an int16) signals that no user-level override was previously configured for that rate — it is a sentinel, not a fee value.
</Note>
