> 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.

# GetInstrument()

## Definition

Returns an **Instrument** object by the master instrument name configured in the database.

This method does NOT add additional data for real-time or historical processing. For adding additional data to your script, please see the **AddDataSeries()** method.

## Method Return Value

An **Instrument** object

## Syntax

`Instrument.GetInstrument(string instrumentName)`

## Parameters

| Parameter          | Description                                             |
| ------------------ | ------------------------------------------------------- |
| **instrumentName** | A **string** value representing a name of an instrument |

## Examples

```csharp
protected override void OnStateChange()
{
    if (State == State.Historical)
    {
        Instrument myInstrument = Instrument.GetInstrument("AAPL");

        Print("AAPL's tick size is " + myInstrument.MasterInstrument.TickSize.ToString());
    }
}
```