> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Expiry

## Definition

Indicates the expiration month of a futures contract.

## Property Value

A **DateTime** structure representing the expiration month of a futures contract.

## Syntax

`Instrument.Expiry`

## Examples

```csharp
protected override void OnBarUpdate()
{
   // Print the expiry of the currently configured futures instrument
   Print(String.Format("You are viewing the {0} contract", Instrument.Expiry));
}
```

## Additional Access Information

This property can be accessed without a null reference check in the **OnBarUpdate()** event handler. When the **OnBarUpdate()** event is triggered, there will always be an **Instrument** object. Should you wish to access this property elsewhere, check for null reference first. e.g. if (**Instrument** != null)