> 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/orders/accountorderfills.md).

# accountOrderFills

Get an account's fills in one market and time range, newest first: filled orders (TWAP parent orders excluded) plus deleverage and market-settlement trades. Only filled orders are paged by `limit` and `next_cursor`; each page also returns the deleverage and market-settlement fills in its time span. `auth` can be generated using the SDK.

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"orders"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai"}],"paths":{"/api/v1/accountOrderFills":{"get":{"summary":"accountOrderFills","operationId":"accountOrderFills","tags":["orders"],"description":"Get an account's fills in one market and time range, newest first: filled orders (TWAP parent orders excluded) plus deleverage and market-settlement trades. Only filled orders are paged by `limit` and `next_cursor`; each page also returns the deleverage and market-settlement fills in its time span. `auth` can be generated using the SDK.","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Auth token in the Authorization header."},{"name":"account_index","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Account index to query."},{"name":"market_id","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Public market identifier returned by orderBooks or events."},{"name":"between_timestamps","in":"query","required":true,"schema":{"type":"string"},"description":"Start and end Unix timestamps in seconds, separated by a hyphen: 1792627200-1792713600. The start must be before the end."},{"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":1000},"description":"Maximum number of filled orders to return."}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderFills"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"OrderFills":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"next_cursor":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"fills":{"type":"array","items":{"$ref":"#/components/schemas/OrderFill"}}},"title":"OrderFills","required":["code","market_id","fills"]},"OrderFill":{"type":"object","properties":{"market_id":{"type":"integer","format":"int64"},"timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in milliseconds."},"is_ask":{"type":"boolean"},"base_amount":{"type":"string"},"quote_amount":{"type":"string"},"type":{"type":"string","enum":["order","deleverage","market-settlement"]},"order_id":{"type":"string","description":"Order index of the filled order; \"0\" for deleverage and market-settlement fills."},"trade_id":{"type":"string","description":"Trade ID of the deleverage or market-settlement trade; \"0\" for order fills."}},"title":"OrderFill","required":["market_id","timestamp","is_ask","base_amount","quote_amount","type","order_id","trade_id"]},"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/orders/accountorderfills.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.
