# Fees

## API Gas fee structure

```json
{
    "gas_per_action": {"type": "int", "min": 0 },
    "fee_token": {"type": "str" },
    "max_gas_price": {"type": "int" },
    "conversion_rate": {"type": "list", "min_size": 2, "max_size": 2, "item_schema": {"type": "int", "min": 1} },
}
```

* **gas\_per\_action**: the gas price for the specific action

{% hint style="info" %}
when we perform the rollup and the transaction is settled on-chain, the actual gas cost may be less than what is specified here&#x20;
{% endhint %}

* **fee\_token**:  symbol of token in which the gas fee will be settled
* **max\_gas\_price**:  the maximum price per 1 quantity of gas the user is willing to spend

{% hint style="info" %}
at the time of on-chain settlement, the gas fee charged will be the *real gas price*
{% endhint %}

* **conversion\_rate \[base\_token, fee\_token]:**
  * shows how many base chain tokens a user can get for the **fee\_token** amount
  * if the ***fee\_token*** is the actual base currency of the chain then the conversion rate will be **\[1,1]**&#x20;
  * otherwise -> **\[base\_token, fee\_token]**

{% hint style="info" %}
Exchange provides dedicated endpoint that user can use to query a conversion rate. It is suggested to specify some small premium
{% endhint %}

{% hint style="info" %}
This fee incur only for orders that remove liquidity from the book
{% endhint %}

## API Fixed fee structure:

<pre class="language-json"><code class="lang-json"><strong>{
</strong><strong>  "recipient": {"type": "str"},
</strong>  "maker_pbips": {"type": "int", "min": 0},
  "taker_pbips": {"type": "int", "min": 0},
  "apply_to_receipt_amount": "bool"
}
</code></pre>

* **recipient**: Recipient address for the fee (Starknet address)
* **maker\_pbips**: The maker fee is 2bps of the notional size traded
* **taker\_pbips:** The taker fee is 10bps of the notional size traded
* **apply\_to\_receipt\_amount:** from what amount fixed fees would be taken:
  * received amount of the trade
  * spend amount of the trade


---

# 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://layer-akira.gitbook.io/layerakira-documentation/integration/trading/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.
