> For the complete documentation index, see [llms.txt](https://docs.afx.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.afx.xyz/api-reference/info/funding-rate.md).

# Funding Rate

## GET /info/fundingRate/current

> Query Current Funding Rates

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/fundingRate/current":{"get":{"operationId":"getFundingRateCurrent","summary":"Query Current Funding Rates","tags":["Funding Rate"],"parameters":[{"name":"symbol","in":"query","schema":{"type":"integer","format":"int64"},"description":"Symbol code. Omit for all symbols."}],"responses":{"200":{"description":"Current funding rate(s)"}}}}}}
```

## GET /info/fundingRate/history

> Query Funding Rate History

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/fundingRate/history":{"get":{"operationId":"getFundingRateHistory","summary":"Query Funding Rate History","tags":["Funding Rate"],"parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":20}},{"name":"startTime","in":"query","schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Paginated funding rate history"}}}}}}
```

## Query User Funding History

> Query a user's funding fee settlement history.

```json
{"openapi":"3.0.3","info":{"title":"AFX DEX Info API","version":"1.0.0"},"servers":[{"url":"https://api.afx.xyz","description":"Mainnet"},{"url":"https://api-testnet.afx.xyz","description":"Testnet"}],"paths":{"/info/funding/history":{"get":{"operationId":"queryUserFundingHistory","summary":"Query User Funding History","tags":["Funding Rate"],"description":"Query a user's funding fee settlement history.","parameters":[{"name":"userAddr","in":"query","required":true,"schema":{"type":"string"}},{"name":"symbol","in":"query","schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","default":20}},{"name":"startTime","in":"query","schema":{"type":"integer","format":"int64"}},{"name":"endTime","in":"query","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Paginated user funding history"}}}}}}
```


---

# 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 dynamically by asking a question.

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

```
GET https://docs.afx.xyz/api-reference/info/funding-rate.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.
