I am trying to understand options data from CBOE and I am confused about determining if the contract was in fact bought or sold. Here's just a sample:
[
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 156.99,
"underlying_ask": 157.05,
"sequence_number": 290264,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "09:30:56.883",
"nbbo_bid": 3.7,
"nbbo_ask": 3.85,
"size": 25,
"price": 3.85,
"flag": 0,
"exch_sequence_number": 1290250,
"trade_iv": 30.1924
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.47,
"underlying_ask": 157.48,
"sequence_number": 122857,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "10:16:11.127",
"nbbo_bid": 3.95,
"nbbo_ask": 4,
"size": 10,
"price": 4,
"flag": 0,
"exch_sequence_number": 44957099,
"trade_iv": 30.2057
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.5,
"underlying_ask": 157.51,
"sequence_number": 123005,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "10:16:13.433",
"nbbo_bid": 3.95,
"nbbo_ask": 4,
"size": 30,
"price": 4,
"flag": 0,
"exch_sequence_number": 44993630,
"trade_iv": 30.2218
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.06,
"underlying_ask": 157.08,
"sequence_number": 151912,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "11:11:53.387",
"nbbo_bid": 3.7,
"nbbo_ask": 3.8,
"size": 5,
"price": 3.75,
"flag": 0,
"exch_sequence_number": 82603415,
"trade_iv": 29.5737
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.55,
"underlying_ask": 157.57,
"sequence_number": 210379,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "13:08:38.963",
"nbbo_bid": 3.95,
"nbbo_ask": 4,
"size": 13,
"price": 4,
"flag": 0,
"exch_sequence_number": 145195955,
"trade_iv": 30.0988
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.55,
"underlying_ask": 157.57,
"sequence_number": 210380,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "13:08:38.963",
"nbbo_bid": 3.95,
"nbbo_ask": 4,
"size": 7,
"price": 4,
"flag": 0,
"exch_sequence_number": 145195959,
"trade_iv": 30.0988
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 157.16,
"underlying_ask": 157.17,
"sequence_number": 220826,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "13:34:36.883",
"nbbo_bid": 3.8,
"nbbo_ask": 3.9,
"size": 6,
"price": 3.85,
"flag": 0,
"exch_sequence_number": 157533600,
"trade_iv": 30.1084
},
{
"exchange_id": 5,
"condition_id": 0,
"underlying_bid": 156.41,
"underlying_ask": 156.43,
"sequence_number": 246611,
"root": "AAPL ",
"expiry": "2019-02-15",
"strike": 160,
"option_type": "c",
"time": "14:42:48.733",
"nbbo_bid": 3.45,
"nbbo_ask": 3.55,
"size": 5,
"price": 3.5,
"flag": 0,
"exch_sequence_number": 189140399,
"trade_iv": 29.8157
}
]
How can you tell from this data if the person bought or sold the contract. I thought you could use bid/ask but some prices are right in the middle.