# Maker taker fees

## Maker taker fees

In the context of liquidity and <mark style="color:blue;">marketplaces</mark>, maker and taker fees refer to the fees charged by the exchange or trading platform to users who participate in buying and selling assets.

A maker is a user who places an order on the exchange that does not immediately fill, but instead rests on the order book waiting for a counterparty to take the other side of the trade. In this scenario, the maker is adding liquidity to the market by creating an order that can be executed in the future. Maker fees are usually lower than taker fees, or in some cases, may be charged at a discount, to incentivize users to add liquidity to the market.

On the other hand, a taker is a user who places an order that immediately matches with an existing order on the order book, thereby "taking" liquidity from the market. Taker fees are usually higher than maker fees, as they represent the cost of executing an order immediately and thereby reducing the available liquidity in the market.

Maker and taker fees are a common mechanism used by exchanges to generate revenue, while also incentivizing users to act in ways that promote market liquidity, increase trading volume and ensure a robust market.

### Maker taker fees in the orders API v3:[​](https://docs.x.immutable.com/docs/x/maker-taker-fees#maker-taker-fees-in-the-orders-api-v3) <a href="#maker-taker-fees-in-the-orders-api-v3" id="maker-taker-fees-in-the-orders-api-v3"></a>

In the v1 endpoints of IMX Order Book, buyers were traditionally required to pay all fees (including both the maker and taker fees).

However, this behavior has now changed on the v3 API /trade for IMX Order Book, each corresponding maker and taker will pay for their respective fees. This change has been implemented to make the fee structure more fair and transparent, as it ensures that buyers are only paying taker fees when they are actually removing liquidity from the market, while makers are only paying maker fees when they are adding liquidity to the market.

Overall, this change to the fee structure helps to promote market efficiency by incentivizing users to add liquidity to the market, which can help to reduce spreads and increase trading volume. It also ensures that buyers are only paying for the service they are actually receiving, which helps to increase transparency and build trust between users and their marketplaces.

Maker taker fees information and breakdowns on order are now available as their own separate fields in the new <mark style="color:blue;">getOrder(s) v3 endpoints</mark>.

When retrieving orders using the v3 endpoints, marketplace fees are no longer returned as `ecosystem` type fees in array of fees. The fee charged by the maker's marketplace will be a `maker` type fee, and the fee charged by the taker's marketplace will be a `taker` type fee. This will be reflected on all orders created in the platform. For orders that don't split the fees between maker and taker, where the taker pays or paid for all fees, the `maker` fee will be reported under the `taker_fees` field.

**Here is an example of what a listing order, with split fees, would look like in the v3 endpoint:**

```
{
  ...,
  "sell": {
    "type": "ERC721",
    "data": {
      "quantity": "1",
      // DEPRECATED "quantity_with_fees": "",
      ...
    }
  },
  "buy": {
    "type": "ETH",
    "data": {
      "token_address": "ETH",
      "quantity": "10000000000",
      // DEPRECATED "quantity_with_fees": "",
      ...
    }
  },
  // DEPRECATED "fees": [],
  "maker_taker_type": "maker",
  "maker_fees": {
    "quantity_with_fees": "9900000000",
    "token_type": "ETH",
    "decimals": 18,
    "symbol": "ETH",
    "fees": [ // array of fees, e.g. seller marketplace fee
      {
        "type": "maker",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      }
    ]
  },
  "taker_fees": {
    "quantity_with_fees": "10400000000",
    "token_type": "ETH",
    "decimals": 18,
    "symbol": "ETH",
    "fees": [ // array of fees, e.g. protocol, royalty, and buyer marketplace fees
      {
        "type": "protocol",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "200000000"
      },
      {
        "type": "royalty",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      },
      {
        "type": "taker",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      }
    ]
  }
}
```

**Here is an example of what a listing order, without split fees, would look like in the v3 endpoint:**

```
{
  ...,
  "sell": {
    "type": "ERC721",
    "data": {
      "quantity": "1",
      // DEPRECATED "quantity_with_fees": "",
      ...
    }
  },
  "buy": {
    "type": "ETH",
    "data": {
      "token_address": "ETH",
      "quantity": "10000000000",
      // DEPRECATED "quantity_with_fees": "",
      ...
    }
  },
  // DEPRECATED "fees": [],
  "maker_taker_type": "maker",
  "maker_fees": {
    "quantity_with_fees": "10000000000",
    "token_type": "ETH",
    "decimals": 18,
    "symbol": "ETH",
    "fees": [] // array of fees, e.g. seller marketplace fee
  },
  "taker_fees": {
    "quantity_with_fees": "10500000000",
    "token_type": "ETH",
    "decimals": 18,
    "symbol": "ETH",
    "fees": [ // array of fees, e.g. protocol, royalty, and buyer marketplace fees
      {
        "type": "maker",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      },
      {
        "type": "protocol",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "200000000"
      },
      {
        "type": "royalty",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      },
      {
        "type": "taker",
        "address": "0x123",
        "token": {
          "type": "ETH",
          "data": {
            "decimals": 18
          }
        },
        "amount": "100000000"
      }
    ]
  }
}
```

### New maker taker fields and the deprecation of quantity\_with\_fees in buy and sell[​](https://docs.x.immutable.com/docs/x/maker-taker-fees#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell) <a href="#new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell" id="new-maker-taker-fields-and-the-deprecation-of-quantity_with_fees-in-buy-and-sell"></a>

The introduction of maker fees and taker fees `quantity_with_fees` fields means that `buy.data.quantity_with_fees` as well as `sell.data.quantity_with_fees` will be deprecated in favour of `taker_fees.quantity_with_fees` and `maker_fees.quantity_with_fees` .

Marketplaces will now have to use the combination of `quantity_with_fees` from `taker_fees` and `maker_fees` to display their listing and/or bid price breakdowns.

`maker_fees.quantity_with_fees` represents the fee adjusted amount of fungible (e.g ETH or ERC20 token) the maker would transfer or receive when the trade is executed.

`taker_fees.quantity_with_fees` represents the fee adjusted amount of fungible (e.g ETH or ERC20 token) the taker would transfer or receive when the trade is executed.

We've also added a new field `maker_taker_type` which can be read to determine whether an order is a ***listing*** or a ***bid***.

A listing is a ***maker sell order*** (selling nft for fungible) and a bid is a ***maker buy order*** (selling fungible for nft).

Depending on whether an order is a ***listing*** or a ***bid***, price can be calculated with the below formulas:

```
listing_price = taker_fees.quantity_with_fees of maker_sell_order
bid_amount = maker_fees.quantity_with_fees of maker_buy_order
```

#### Example of calculating a listing price from an API response:[​](https://docs.x.immutable.com/docs/x/maker-taker-fees#example-of-calculating-a-listing-price-from-an-api-response) <a href="#example-of-calculating-a-listing-price-from-an-api-response" id="example-of-calculating-a-listing-price-from-an-api-response"></a>

```
{
   "sell":{
      "type":"ERC721",
      "data":{
          "quantity": "1",
          ...
      }
   },
   "buy":{
      "type":"ERC20",
      "data":{
          "quantity": "500000000000000000",
          ...
      }
   },
   "maker_taker_type": "maker",
   "maker_fees":{
      "quantity_with_fees":"495000000000000000",
      "token_type":"ETH",
      "decimals":18,
      "symbol":"ETH",
      "fees":[
         {
            "type":"maker",
            "address":"0x1111",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         }
      ]
   },
   "taker_fees":{
      "quantity_with_fees":"520000000000000000",
      "token_type":"ETH",
      "decimals":18,
      "symbol":"ETH",
      "fees":[
         {
            "type":"taker",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         },
         {
            "type":"royalty",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         },
         {
            "type":"protocol",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"10000000000000000"
         }
      ]
   }
}
```

So, the listing price can be broken down into:

```
base_price = 0.5 Eth

# (2% protocol, 1% royalty and 1% taker marketplace fee)
taker_fees = 0.005 Eth + 0.005 Eth + 0.01 Eth = 0.02 Eth
# taker_fees.quantity_with_fees of the sell order
listing_price = base_price + taker_fees = 0.5 Eth + 0.02 Eth = 0.52 Eth
```

However, the amount that the seller would receive is ***0.495 Eth*** (*0.5 Eth - 1% maker marketplace fee*) which is what is displayed under `taker_fees.quantity_with_fees.`

#### Example of calculating a bid amount from an API response:[​](https://docs.x.immutable.com/docs/x/maker-taker-fees#example-of-calculating-a-bid-amount-from-an-api-response) <a href="#example-of-calculating-a-bid-amount-from-an-api-response" id="example-of-calculating-a-bid-amount-from-an-api-response"></a>

```
{
   "sell":{
      "type":"ERC20",
      "data":{
          "quantity": "500000000000000000",
          ...
      }
   },
   "buy":{
      "type":"ERC721",
      "data":{
          "quantity": "1",
          ...
      }
   },
   "maker_taker_type": "maker",
   "taker_fees":{
      "quantity_with_fees":"495000000000000000",
      "token_type":"ETH",
      "decimals":18,
      "symbol":"ETH",
      "fees":[
         {
            "type":"taker",
            "address":"0x1111",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         }
      ]
   },
   "maker_fees":{
      "quantity_with_fees":"520000000000000000",
      "token_type":"ETH",
      "decimals":18,
      "symbol":"ETH",
      "fees":[
         {
            "type":"maker",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         },
         {
            "type":"royalty",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"5000000000000000"
         },
         {
            "type":"protocol",
            "address":"0x2222",
            "token":{
               "type":"ETH",
               "data":{
                  "decimals":18
               }
            },
            "amount":"10000000000000000"
         }
      ]
   }
}
```

In conjunction, the bid amount can be broken down into:

```
base_price = 0.5 Eth

# (2% protocol, 1% royalty and 1% maker marketplace fee)
maker_fees = 0.005 Eth + 0.005 Eth + 0.01 Eth = = 0.02 Eth
# maker_fees.quantity_with_fees of this buy order
bid_amount = base_price + maker_fees = 0.5 Eth + 0.02 Eth = 0.52 Eth
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xpansionchain-1.gitbook.io/xpansionchain/advanced-guides/maker-taker-fees.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
