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

# positionFunding

Get accounts position fundings

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"account"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai","description":"Lighter mainnet"},{"url":"https://api.testnet.lighter.xyz","description":"Lighter testnet"},{"url":"https://api.rh.lighter.xyz","description":"Lighter on Robinhood Chain mainnet"},{"url":"https://api.rh-testnet.lighter.xyz","description":"Lighter on Robinhood Chain testnet"}],"paths":{"/api/v1/positionFunding":{"get":{"summary":"positionFunding","operationId":"positionFunding","tags":["account"],"description":"Get accounts position fundings","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Auth token in the Authorization header. Required for main accounts."},{"name":"account_index","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Account index to query."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor returned by the previous response; pass it unchanged."},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":100},"description":"Maximum number of records to return."},{"name":"side","in":"query","required":false,"schema":{"type":"string","enum":["long","short","all"],"default":"all"},"description":"Position or trade side filter."},{"name":"start_timestamp","in":"query","required":false,"schema":{"type":"integer","format":"int64"},"description":"Inclusive start of the requested time range, as a Unix timestamp in milliseconds."},{"name":"end_timestamp","in":"query","required":false,"schema":{"type":"integer","format":"int64"},"description":"End of the requested time range, as a Unix timestamp in milliseconds."},{"name":"market_ids","in":"query","required":false,"description":"comma-separated int64s, e.g. \"1,2\"","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},{"name":"market_id","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":255},"deprecated":true,"description":"Deprecated: use `market_ids`."}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionFundings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"PositionFundings":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"position_fundings":{"type":"array","items":{"$ref":"#/components/schemas/PositionFunding"}},"next_cursor":{"type":"string"}},"title":"PositionFundings","required":["code","position_fundings"]},"PositionFunding":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in seconds."},"market_id":{"type":"integer","format":"int16"},"funding_id":{"type":"integer","format":"int64"},"change":{"type":"string"},"discount":{"type":"string"},"rate":{"type":"string"},"position_size":{"type":"string"},"position_side":{"type":"string","enum":["long","short"]}},"title":"PositionFunding","required":["timestamp","market_id","funding_id","change","rate","position_size","position_side","discount"]},"ResultCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"ResultCode","required":["code"]}}}}
```


---

# 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.lighter.xyz/api/account/positionfunding.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.
