> For the complete documentation index, see [llms.txt](https://docs.tradecraft.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradecraft.fi/api/routes/fees.md).

# Fees

Fee information.

## Get fee amounts

> Returns the liquidity provider fee and operator fee percentages for the pool.

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.29.0"},"tags":[{"name":"Fees","description":"Fee information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/feeAmount/{tokenA}/{tokenB}":{"get":{"summary":"Get fee amounts","description":"Returns the liquidity provider fee and operator fee percentages for the pool.","operationId":"getFeeAmount","tags":["Fees"],"parameters":[{"$ref":"#/components/parameters/tokenA"},{"$ref":"#/components/parameters/tokenB"}],"responses":{"200":{"description":"Fee amounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeAmountResponse"}}}},"400":{"description":"Liquidity pool fees contract not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"parameters":{"tokenA":{"name":"tokenA","in":"path","required":true,"description":"The name/symbol of the first token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}},"tokenB":{"name":"tokenB","in":"path","required":true,"description":"The name/symbol of the second token (URL encoded).","schema":{"type":"string","enum":["CC","USDCx","CBTC","cETH","HANDL","EDELx","SBC"]}}},"schemas":{"FeeAmountResponse":{"type":"object","required":["fee_amount","operator_fee_amount"],"properties":{"fee_amount":{"type":"number","format":"double","description":"Liquidity provider fee percentage."},"operator_fee_amount":{"type":"number","format":"double","description":"Operator fee percentage."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```

## Get the Trade Discount Cap

> Returns the Trade Discount Cap in USD. Trades whose USD size is at or\
> below this value qualify for the reduced swap fee. Integrations\
> can poll this endpoint to dynamically size their trades so they always\
> qualify for the fee rebate. See <https://docs.tradecraft.fi/fees-and-pricing>.<br>

```json
{"openapi":"3.0.3","info":{"title":"Tradecraft AMM HTTP API","version":"1.29.0"},"tags":[{"name":"Fees","description":"Fee information."}],"servers":[{"url":"https://api.tradecraft.fi/v1","description":"Mainnet"},{"url":"https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api","description":"Testnet"},{"url":"https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api","description":"Devnet"}],"paths":{"/tradeDiscountCap":{"get":{"summary":"Get the Trade Discount Cap","description":"Returns the Trade Discount Cap in USD. Trades whose USD size is at or\nbelow this value qualify for the reduced swap fee. Integrations\ncan poll this endpoint to dynamically size their trades so they always\nqualify for the fee rebate. See https://docs.tradecraft.fi/fees-and-pricing.\n","operationId":"getTradeDiscountCap","tags":["Fees"],"responses":{"200":{"description":"The Trade Discount Cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeDiscountCapResponse"}}}},"404":{"description":"Trade Discount Cap is not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"TradeDiscountCapResponse":{"type":"object","required":["trade_discount_cap_usd"],"properties":{"trade_discount_cap_usd":{"type":"number","format":"double","description":"Maximum trade size, in USD, that still qualifies for the\nfee discount. Trades at or below this size receive the reduced swap fee.\n"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tradecraft.fi/api/routes/fees.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
