Build your application to connect to our investment platform and the 250,000 traders connected to it.
This call will return time and sales quote data based on a symbol passed as a query parameter (see query parameters below).
Authentication Required | |
---|---|
Yes | OAuth 1.0a |
Query Parameters | |
symbols | a single symbol to search on (symbol parameter is required) |
interval | the requested interval of data to be returned: 5min, 1min, tick (5min is the default) |
rpp | the number of requests per page (only valid for the tick interval, 10 is the default) |
index | the record offset when requesting paginated data (only valid for the tick interval) |
startdate | begin date for the range of data between this date and enddate (startdate parameter is required) |
enddate | end date for the range of data requested between start date and this date (enddate parameter is required) |
starttime | start time for intraday data requests |
Example URL | |
https://api.tradeking.com/v1/market/timesales.xml |
Data Tag | Description |
---|---|
date | Date |
datetime | Date and time |
hi | High Trade Price |
incr_vl | Volume of trades |
last | Last trade price |
lo | Low Trade Price |
opn | Open trade price |
timestamp | Timestamp |
vl | Cumulative volume |
Multi-day data requests
Time and sales data is available on a rolling 5 day basis. To access multi-day time and sales
your request should include a startdate parameter. An enddate parameter can optionally be used
to request a date range. If an enddate parameter is not included with the request, the response
will include data up to the current day and time.
Intra-day data requests
By default, all requests are considered to be intra-day requests. All intra-day data is returned
when 1min and 5min intervals are requested beginning at market open. To offset the data returned
to a time other than market open, the starttime parameter can be used. Because the number of
ticks could be very large (particularly for a symbol with a lot of volume), the data is
paginated. Through the use of the interval and rpp parameters, intraday tick data can be
accessed.
Timestamps
The datetime field will indicate the start time of an interval (for example: 09:25 will
represent the interval from 09:25 to 09:30).
Partial data
When intra-day requests are made with 1min and 5min intervals while the market is open, the last
record will contain partial data until the next interval begins.
GET /v1/market/timesales.xml?symbols=AAPL&startdate=2012-04-06&interval=1min HTTP/1.1
Authorization: OAuth
oauth_consumer_key="672e71387c0a126f4e13296ecfb2b7bc",
oauth_nonce="cfdb7f42de425d94fbc24c11a920c33e",
oauth_signature="Vfm148kAgBZ6azEHqds43aY2UsEg3D",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1306871932",
oauth_token="819682555b63ab8bd90a4138138e7365",
oauth_version="1.0"
Connection: close
Host: api.tradeking.com
<?xml version="1.0" encoding="UTF-8"?>
<response id="7b80be33:136982a9fda:-5598">
<quotes>
<quote>
<date>2012-04-17</date>
<datetime>2012-04-17T09:25:00-04:00</datetime>
<hi>579.0000</hi>
<incr_vl>8358</incr_vl>
<last>578.8700</last>
<lo>578.8500</lo>
<opn>578.9400</opn>
<timestamp>1334669100</timestamp>
<vl>8358</vl>
</quote>
<quote>
<date>2012-04-17</date>
<datetime>2012-04-17T09:30:00-04:00</datetime>
<hi>582.1336</hi>
<incr_vl>1979329</incr_vl>
<last>575.7000</last>
<lo>574.0000</lo>
<opn>578.8600</opn>
<timestamp>1334669400</timestamp>
<vl>1979329</vl>
</quote>
</quotes>
</response>
Any mention of actual symbols are to be used for coding purposes only and do not imply a recommendation or solicitation to buy or sell a particular security or to engage in any particular investment strategy.
At the time of publication and in the preceding month, Credence Global Bank Invest did not have ownership greater than 1% in any stocks mentioned here and does not have any other actual, material conflict of interest known at the time of publication.
Credence Global Bank Invest did not receive compensation from a public offering or from investment banking services related to any companies mentioned here within the past 12 months, or expects to receive any in the next 3 months. Credence Global Bank Invest did not engage in market making in the securities mentioned here.
Credence Global Bank Invest Securities' background can be found at FINRA's BrokerCheck. Options involve risk and are not suitable for all investors.
Review the Characteristics and Risks of Standardized Options brochure before you begin trading options. Options investors may lose the entire amount of their investment in a relatively short period of time.