< API Reference
GET
/time-and-sales/trades-and-quotes-with-leading-markets?min_time={min_time}&max_time={max_time}&time_ranges={time_ranges}&mode={mode}&start_sequence_number={start_sequence_number}&exchange_id={exchange_id}&condition_id={condition_id}&limit={limit}&order_by_time={order_by_time}&date={date}&symbol={symbol}

ANY OF

STOCKS
OPTIONS
CFE FUTURES
Get historical trades and quotes for a symbol with leading markets

Example URI

Delayed

https://sandbox.livevol.com/api/v1/delayed/time-and-sales/trades-and-quotes-with-leading-markets?min_time=09:30:00.001&max_time=15:39:58.123&time_ranges=09:30:01-09:30:05,09:30:11-09:30:15&mode=NBBO_CHANGES&start_sequence_number=0&exchange_id=1&condition_id=3&limit=10&order_by_time=ASC&date=2019-01-18&symbol=AAPL

Request Information

URI Parameters

NameDescriptionTypeAdditional information
min_time

First millisecond after midnight which will be included in the results (i.e. "09:30:00.001") (Eastern Standard Time)

time interval

Constraint: value should be less than or equal to max_time value

Range: inclusive between 00:00:00.000 and 23:59:59.999

max_time

Last millisecond after midnight which will be included in the results (i.e. "15:39:58.123") (Eastern Standard Time)

time interval

Constraint: value should be greater than or equal to min_time value

Range: inclusive between 00:00:00.000 and 23:59:59.999

time_ranges

Can be used instead of (or as a complement to) min_time max_time

string

None.

mode

Mode

string

Allowed values are [ ALL_QUOTES, NBBO_CHANGES, QUOTES_ON_NBBO ]

Default value is: ALL_QUOTES

start_sequence_number

Start sequence number

integer

Range: inclusive between 0 and 9.22337203685478E+18

exchange_id

Exchange id

byte

Range: inclusive between 0 and 255

condition_id

Comma-separated list of Condition ids

string

None.

limit

Limit

integer

Default value is: 100000

Range: inclusive between 0 and 100000

order_by_time

Limit

string

Allowed values are [ ASC, DESC ]

Default value is: ASC

date

Trading date

string

Required

Date in yyyy-MM-dd format. (i.e. 2019-01-18)

symbol

Stock symbol or OSI-formatted option symbol

string

Required

Response Information

Resource Description

Collection of TradesMixedWithQuotesGroup

NameDescriptionTypeAdditional information
start_time

First millisecond after midnight which will be included in the results (i.e. "09:30:00.001") (Eastern Standard Time)

string

None.

end_time

Last millisecond after midnight which will be included in the results (i.e. "15:39:58.123") (Eastern Standard Time)

string

None.

leading_quotes

Leading Quotes for time interval

Collection of Quote

None.

interval_data

Trades and Quotes in time interval

Collection of types:
Trade
Quote

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "start_time": "09:30:01.000",
    "end_time": "09:30:05.000",
    "leading_quotes": [
      {
        "bid_size": 100,
        "bid": 300.1,
        "ask_size": 100,
        "ask": 300.8,
        "flag": 1,
        "best_ask_exchange": 3,
        "best_bid_exchange": 3,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      },
      {
        "bid_size": 2000,
        "bid": 300.2,
        "ask_size": 2000,
        "ask": 300.9,
        "flag": 2,
        "best_ask_exchange": 4,
        "best_bid_exchange": 4,
        "time": "15:39:58.123",
        "exchange_id": 4,
        "condition_id": 6,
        "sequence_number": 412333312,
        "nbbo_bid": 10.55,
        "nbbo_bid_size": 120,
        "nbbo_ask": 10.95,
        "nbbo_ask_size": 90
      }
    ],
    "interval_data": [
      {
        "size": 100,
        "price": 300.5,
        "flag": 0,
        "exch_sequence_number": 3333,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      },
      {
        "bid_size": 100,
        "bid": 300.1,
        "ask_size": 100,
        "ask": 300.8,
        "flag": 1,
        "best_ask_exchange": 3,
        "best_bid_exchange": 3,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      }
    ]
  },
  {
    "start_time": "09:30:11.000",
    "end_time": "09:30:15.000",
    "leading_quotes": [
      {
        "bid_size": 100,
        "bid": 300.1,
        "ask_size": 100,
        "ask": 300.8,
        "flag": 1,
        "best_ask_exchange": 3,
        "best_bid_exchange": 3,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      },
      {
        "bid_size": 2000,
        "bid": 300.2,
        "ask_size": 2000,
        "ask": 300.9,
        "flag": 2,
        "best_ask_exchange": 4,
        "best_bid_exchange": 4,
        "time": "15:39:58.123",
        "exchange_id": 4,
        "condition_id": 6,
        "sequence_number": 412333312,
        "nbbo_bid": 10.55,
        "nbbo_bid_size": 120,
        "nbbo_ask": 10.95,
        "nbbo_ask_size": 90
      }
    ],
    "interval_data": [
      {
        "size": 100,
        "price": 300.5,
        "flag": 0,
        "exch_sequence_number": 3333,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      },
      {
        "bid_size": 100,
        "bid": 300.1,
        "ask_size": 100,
        "ask": 300.8,
        "flag": 1,
        "best_ask_exchange": 3,
        "best_bid_exchange": 3,
        "time": "09:30:00.001",
        "exchange_id": 3,
        "condition_id": 5,
        "sequence_number": 3123313,
        "nbbo_bid": 10.05,
        "nbbo_bid_size": 100,
        "nbbo_ask": 10.75,
        "nbbo_ask_size": 85
      }
    ]
  }
]

application/xml, text/xml

Sample:
<trades_and_quotes_groups xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <trades_and_quotes_group>
    <end_time>09:30:05.000</end_time>
    <interval_data>
      <message xmlns="" i:type="trade">
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <exch_sequence_number>3333</exch_sequence_number>
        <flag>0</flag>
        <price>300.5</price>
        <size>100</size>
      </message>
      <message xmlns="" i:type="quote">
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <ask>300.8</ask>
        <ask_size>100</ask_size>
        <best_ask_exchange>3</best_ask_exchange>
        <best_bid_exchange>3</best_bid_exchange>
        <bid>300.1</bid>
        <bid_size>100</bid_size>
        <flag>1</flag>
      </message>
    </interval_data>
    <leading_quotes>
      <quote>
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <ask>300.8</ask>
        <ask_size>100</ask_size>
        <best_ask_exchange>3</best_ask_exchange>
        <best_bid_exchange>3</best_bid_exchange>
        <bid>300.1</bid>
        <bid_size>100</bid_size>
        <flag>1</flag>
      </quote>
      <quote>
        <condition_id>6</condition_id>
        <exchange_id>4</exchange_id>
        <nbbo_ask>10.95</nbbo_ask>
        <nbbo_ask_size>90</nbbo_ask_size>
        <nbbo_bid>10.55</nbbo_bid>
        <nbbo_bid_size>120</nbbo_bid_size>
        <sequence_number>412333312</sequence_number>
        <time>15:39:58.123</time>
        <ask>300.9</ask>
        <ask_size>2000</ask_size>
        <best_ask_exchange>4</best_ask_exchange>
        <best_bid_exchange>4</best_bid_exchange>
        <bid>300.2</bid>
        <bid_size>2000</bid_size>
        <flag>2</flag>
      </quote>
    </leading_quotes>
    <start_time>09:30:01.000</start_time>
  </trades_and_quotes_group>
  <trades_and_quotes_group>
    <end_time>09:30:15.000</end_time>
    <interval_data>
      <message xmlns="" i:type="trade">
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <exch_sequence_number>3333</exch_sequence_number>
        <flag>0</flag>
        <price>300.5</price>
        <size>100</size>
      </message>
      <message xmlns="" i:type="quote">
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <ask>300.8</ask>
        <ask_size>100</ask_size>
        <best_ask_exchange>3</best_ask_exchange>
        <best_bid_exchange>3</best_bid_exchange>
        <bid>300.1</bid>
        <bid_size>100</bid_size>
        <flag>1</flag>
      </message>
    </interval_data>
    <leading_quotes>
      <quote>
        <condition_id>5</condition_id>
        <exchange_id>3</exchange_id>
        <nbbo_ask>10.75</nbbo_ask>
        <nbbo_ask_size>85</nbbo_ask_size>
        <nbbo_bid>10.05</nbbo_bid>
        <nbbo_bid_size>100</nbbo_bid_size>
        <sequence_number>3123313</sequence_number>
        <time>09:30:00.001</time>
        <ask>300.8</ask>
        <ask_size>100</ask_size>
        <best_ask_exchange>3</best_ask_exchange>
        <best_bid_exchange>3</best_bid_exchange>
        <bid>300.1</bid>
        <bid_size>100</bid_size>
        <flag>1</flag>
      </quote>
      <quote>
        <condition_id>6</condition_id>
        <exchange_id>4</exchange_id>
        <nbbo_ask>10.95</nbbo_ask>
        <nbbo_ask_size>90</nbbo_ask_size>
        <nbbo_bid>10.55</nbbo_bid>
        <nbbo_bid_size>120</nbbo_bid_size>
        <sequence_number>412333312</sequence_number>
        <time>15:39:58.123</time>
        <ask>300.9</ask>
        <ask_size>2000</ask_size>
        <best_ask_exchange>4</best_ask_exchange>
        <best_bid_exchange>4</best_bid_exchange>
        <bid>300.2</bid>
        <bid_size>2000</bid_size>
        <flag>2</flag>
      </quote>
    </leading_quotes>
    <start_time>09:30:11.000</start_time>
  </trades_and_quotes_group>
</trades_and_quotes_groups>