> 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/binary-options/events.md).

# events

**Lighter only.**

Get events and registered order books, including scheduled events with no books. event\_ids and market\_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market\_ids returns each related event once with all its order books. Defaults to descending id. start\_at sorting uses (start\_at, event\_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator\_account\_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.

Use this endpoint to discover binary options markets and read their actual trading windows, decimals and market fees. Binary options are excluded from `orderBookDetails`. See [Discover markets](https://lighter-1.gitbook.io/all-docs/developers/binary-options/discover-markets) for examples, pagination and lifecycle statuses.

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"binary-options"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai","description":"Lighter mainnet"},{"url":"https://testnet.zklighter.elliot.ai","description":"Lighter testnet"}],"paths":{"/api/v1/events":{"get":{"summary":"events","operationId":"events","tags":["binary-options"],"description":"**Lighter only.**\n\nGet events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. start_at sorting uses (start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.\n\nUse this endpoint to discover binary options markets and read their actual trading windows, decimals and market fees. Binary options are excluded from `orderBookDetails`. See [Discover markets](https://lighter-1.gitbook.io/all-docs/developers/binary-options/discover-markets) for examples, pagination and lifecycle statuses.","parameters":[{"name":"event_ids","in":"query","description":" comma-separated positive IDs, max 50","required":false,"schema":{"type":"string"}},{"name":"market_ids","in":"query","description":" comma-separated positive IDs, max 50","required":false,"schema":{"type":"string"}},{"name":"creator_account_index","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"active","in":"query","description":" true: at least one outcome still tradeable; false: none","required":false,"schema":{"type":"boolean","format":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":100}},{"name":"tag","in":"query","description":" series tag; creator filter is optional","required":false,"schema":{"type":"string"}},{"name":"event_kind","in":"query","required":false,"schema":{"type":"string","enum":["one_off","recurrent"]}},{"name":"start_from","in":"query","description":" inclusive start_at, Unix milliseconds","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"start_before","in":"query","description":" exclusive start_at, Unix milliseconds","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["id","start_at"],"default":"id"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespGetEvents"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"RespGetEvents":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"next_cursor":{"type":"integer","format":"int64"},"events":{"type":"array","items":{"$ref":"#/components/schemas/EventDetail"}}},"title":"RespGetEvents","required":["code","events"]},"EventDetail":{"type":"object","properties":{"event_id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"creator_account_index":{"type":"integer","format":"int64"},"created_at":{"type":"integer","format":"int64"},"tag":{"type":"string"},"event_kind":{"type":"string","enum":["one_off","recurrent"]},"recurrence_period_seconds":{"type":"integer","format":"int32"},"start_at":{"type":"integer","format":"int64"},"end_at":{"type":"integer","format":"int64"},"metadata":{"type":"object","additionalProperties":true},"order_books":{"type":"array","items":{"$ref":"#/components/schemas/EventOrderBookEntry"}},"lifetime_quote_token_volume":{"type":"number","format":"double"}},"title":"EventDetail","required":["event_id","title","description","creator_account_index","created_at","tag","event_kind","recurrence_period_seconds","start_at","end_at","metadata","order_books","lifetime_quote_token_volume"]},"EventOrderBookEntry":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"market_type":{"type":"string","enum":["perp","spot","binary_options"]},"base_asset_id":{"type":"integer","format":"int16"},"quote_asset_id":{"type":"integer","format":"int16"},"status":{"type":"string","enum":["inactive","active","in-settlement","waiting-for-settlement","settled"],"description":" waiting-for-settlement and settled are binary options only"},"taker_fee":{"type":"string"},"is_taker_fee_enabled":{"type":"boolean","format":"boolean"},"maker_fee":{"type":"string"},"is_maker_fee_enabled":{"type":"boolean","format":"boolean"},"liquidation_fee":{"type":"string"},"min_base_amount":{"type":"string"},"min_quote_amount":{"type":"string"},"order_quote_limit":{"type":"string"},"supported_size_decimals":{"type":"integer","format":"uint8"},"supported_price_decimals":{"type":"integer","format":"uint8"},"supported_quote_decimals":{"type":"integer","format":"uint8"},"created_at":{"type":"string"},"multiplier":{"type":"string"},"start_timestamp":{"type":"integer","format":"int64"},"end_timestamp":{"type":"integer","format":"int64"},"open_interest":{"type":"string"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]},"operator_account_index":{"type":"integer","format":"int64"},"settlement_cap":{"type":"integer","format":"int32"},"settlement_type":{"type":"integer","format":"int32","enum":[0,1]},"settlement_price":{"type":"integer","format":"int32"},"default_price":{"type":"integer","format":"int32"},"is_frozen":{"type":"boolean","format":"boolean"},"size_decimals":{"type":"integer","format":"uint8"},"price_decimals":{"type":"integer","format":"uint8"},"stats":{"$ref":"#/components/schemas/BinaryOptionMarketStats"}},"title":"EventOrderBookEntry","required":["symbol","market_id","market_type","base_asset_id","quote_asset_id","status","taker_fee","is_taker_fee_enabled","maker_fee","is_maker_fee_enabled","liquidation_fee","min_base_amount","min_quote_amount","order_quote_limit","supported_size_decimals","supported_price_decimals","supported_quote_decimals","created_at","multiplier","start_timestamp","end_timestamp","open_interest","outcome","operator_account_index","settlement_cap","settlement_type","settlement_price","default_price","is_frozen","size_decimals","price_decimals","stats"]},"BinaryOptionMarketStats":{"type":"object","properties":{"symbol":{"type":"string"},"market_id":{"type":"integer","format":"int64"},"mid_price":{"type":"string"},"best_ask_price":{"type":"string"},"best_bid_price":{"type":"string"},"last_trade_price":{"type":"string"},"daily_base_token_volume":{"type":"number","format":"double"},"daily_quote_token_volume":{"type":"number","format":"double"},"daily_price_low":{"type":"number","format":"double"},"daily_price_high":{"type":"number","format":"double"},"daily_price_change":{"type":"number","format":"double"},"lifetime_quote_token_volume":{"type":"number","format":"double"},"lifetime_base_token_volume":{"type":"number","format":"double","description":" outcome shares traded over the market's life"},"open_interest":{"type":"string"},"status":{"type":"string","enum":["inactive","active","waiting-for-settlement","in-settlement","settled"],"description":" inactive before the trading window opens, waiting-for-settlement once it closes"},"outcome":{"type":"integer","format":"int32","enum":[0,1,2]}},"title":"BinaryOptionMarketStats","required":["symbol","market_id","mid_price","best_ask_price","best_bid_price","last_trade_price","daily_base_token_volume","daily_quote_token_volume","daily_price_low","daily_price_high","daily_price_change","lifetime_quote_token_volume","lifetime_base_token_volume","open_interest","status","outcome"]},"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/binary-options/events.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.
