Option trading example codes/syntax

Hi Everyone,
I’m trying to set up a basic MACD algo for option leaps. Where can I find the syntax needed to buy the option instead of the underlying? An example would be great!
Thanks in advance.

Check this out:


Thanks! I’m trying to backtest options on SPY, QQQ and DIA. Is the historic data on these available in C2?