> For the complete documentation index, see [llms.txt](https://layer-akira.gitbook.io/layerakira-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://layer-akira.gitbook.io/layerakira-documentation/integration/trading/fees.md).

# 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
