Request protocol
|
function |
function parameters |
example |
quoteData
|
symbol |
SYM1+SYM2+ ... + SYMn |
quoteField |
Field1+Field2+ ... + Fieldn |
|
http://localhost:5000/quoteData?symbol=GOOG+AAPL&field=4+10+11
|
quoteStream
|
symbol |
SYM1+SYM2+ ... + SYMn |
|
http://localhost:5000/quoteStream?symbol=GOOG+AAPL
|
barData
|
symbol |
SYMBOL |
historyType |
0=Intrday, 1=Daily, 2=Weekly |
intradayMinutes |
1-60 |
beginTime |
YYYYMMDDHHMMSS |
endTime |
YYYYMMDDHHMMSS |
|
http://localhost:5000/barData?symbol=MSFT&historyType=0&intradayMinutes=10&beginTime=20101103093000&endTime=20101103160000
|
tickData
|
symbol |
SYMBOL |
trades |
1=select, 0=skip |
quotes |
1=select, 0=skip |
beginTime |
YYYYMMDDHHMMSSmmm |
endTime |
YYYYMMDDHHMMSSmmm |
|
http://localhost:5000/tickData?symbol=MSFT&trades=1"es=0&beginTime=20101103153000&endTime=20101103160000
|
optionChain
|
|
http://localhost:5000/optionChain?symbol=MSFT
|
|
Symbology
Equity symbols are passed unmodified with exception
of '/' character. All '/' characters must be replaced with '-'. For example, BRK/A should be BRK-A
Index symbols are passed with INDEX: prefix. For example INDEX:DJI
Currency symbols are passed with CURRENCY: prefix. For example CURRECNY:EUR-JPY
Option symbols are passed with OPTION: prefix using OSI format.
OSI symbol consists of: underlying symbol (6 char) + date (6 char) + option type (1 char) + strike price (5 char) + strike decimals (3 char)
* Any empty spaces inside underlying symbol must be replaced with '-' characters.
* Strike price and strike decimal are filled with left-justified zeros.
* Option type is a single character, 'P' representing a Put contract, and 'C' representing a call contract.
For example: option contract for AAPL Call $440 expiring on 03/08/2013 can be entered as OPTION:AAPL--130308C00440000
|
quoteData responses
|
quote data records are separated by \r\n |
record type |
example |
symbol |
symbol status |
quote field |
data item status |
data item type |
data |
|
request:
http://localhost:5000/quoteData?symbol=MSFT&field=2+3+4+5+6+7+8+9+10+33
response: MSFT,1,2,1,7,27.400000 ,3,1,7,27.400000 ,4,1,7,0.000000 ,5,1,7,27.106000 ,6,1,7,27.100000 ,7,1,7,27.110000 ,8,1,7,27.490000 ,9,1,7,26.960000 ,10,1,7,27.490000 ,33,1,8,Microsoft Corporation - Common Stock |
|
symbolStatus definitions
|
symbolStatus name |
numerical value |
SymbolStatusSuccess |
1 |
SymbolStatusInvalid |
2 |
SymbolStatusUnavailable |
3 |
SymbolStatusNoPermission |
4 |
|
quoteField definitions
|
quoteField name |
numerical value |
QuoteFieldSymbol |
1 |
QuoteFieldOpenPrice |
2 |
QuoteFieldPreviousClosePrice |
3 |
QuoteFieldClosePrice |
4 |
QuoteFieldLastPrice |
5 |
QuoteFieldBidPrice |
6 |
QuoteFieldAskPrice |
7 |
QuoteFieldHighPrice |
8 |
QuoteFieldLowPrice |
9 |
QuoteFieldDayHighPrice |
10 |
QuoteFieldDayLowPrice |
11 |
QuoteFieldPreMarketOpenPrice |
12 |
QuoteFieldExtendedHoursLastPrice |
13 |
QuoteFieldAfterMarketClosePrice |
14 |
QuoteFieldBidExchange |
15 |
QuoteFieldAskExchange |
16 |
QuoteFieldLastExchange |
17 |
QuoteFieldLastCondition |
18 |
QuoteFieldQuoteCondition |
19 |
QuoteFieldLastTradeDateTime |
20 |
QuoteFieldLastQuoteDateTime |
21 |
QuoteFieldDayHighDateTime |
22 |
QuoteFieldDayLowDateTime |
23 |
QuoteFieldLastSize |
24 |
QuoteFieldBidSize |
25 |
QuoteFieldAskSize |
26 |
QuoteFieldVolume |
27 |
QuoteFieldPreMarketVolume |
28 |
QuoteFieldAfterMarketVolume |
29 |
QuoteFieldTradeCount |
30 |
QuoteFieldPreMarketTradeCount |
31 |
QuoteFieldAfterMarketTradeCount |
32 |
QuoteFieldFundamentalEquityName |
33 |
QuoteFieldFundamentalEquityPrimaryExchange |
34 |
|
dataItem type definitions
|
dataItem name |
numerical value |
DataByte |
1 |
DataByteArray |
2 |
DataUInteger32 |
3 |
DataUInteger64 |
4 |
DataInteger32 |
5 |
DataInteger64 |
6 |
DataPrice |
7 |
DataString |
8 |
DataUnicodeString |
9 |
DataDateTime |
10 |
DataDouble |
11 |
|
barData responses
|
bar data records are separated by \r\n |
record type |
example
datetime |
open price |
high price |
low price |
close price |
volume |
|
request:
http://localhost:5000/barData?symbol=MSFT&historyType=0&intradayMinutes=1&beginTime=20101101093000&endTime=20101103160000
response:
20101101093000,26.880000,26.900000,26.860000,26.890000,1175094
20101101093100,26.890000,26.910000,26.870000,26.870000,283043
20101101093200,26.880000,26.900000,26.870000,26.900000,179128
20101101093300,26.892500,26.900000,26.850000,26.850000,346005
20101101093400,26.858000,26.880000,26.850000,26.870000,200785
20101101093500,26.870000,26.880000,26.810000,26.810000,465517
...
...
|
|
tickData responses
|
tick data records are separated by \r\n |
record type |
example |
trade record |
record identifier (T=trade, Q=quote) |
datetime (YYYYMMDDHHMMSSmmm) |
last price |
last size |
last exchange |
condition 1 |
condition 2 |
condition 3 |
condition 4 |
|
request:
response:
T,20120803153000551,616.550000,100,Y,0,14,0,0
T,20120803153000551,616.550000,100,Y,0,14,0,0
T,20120803153000551,616.550000,100,Y,0,14,0,0
T,20120803153000551,616.540000,100,Y,0,14,0,0
T,20120803153000601,616.540000,100,B,0,0,0,0
T,20120803153000704,616.585000,101,P,0,0,0,0
T,20120803153001039,616.550000,100,D,0,0,0,0
...
...
|
quote record |
record identifier (T=trade, Q=quote) |
datetime (YYYYMMDDHHMMSSmmm) |
bid price |
ask price |
bid size |
ask size |
bid exchange |
ask exchange |
condition |
|
request:
response:
Q,20120803153000133,616.540000,616.630000,2,1,B,Q,0
Q,20120803153000552,616.540000,616.630000,1,1,J,Q,0
Q,20120803153000557,616.540000,616.630000,1,2,J,B,0
Q,20120803153000697,616.540000,616.630000,1,1,J,Y,0
Q,20120803153000697,616.540000,616.600000,1,1,J,B,0
Q,20120803153000697,616.540000,616.600000,1,1,J,Y,0
...
...
|
|
Stream updates
|
stream records are separated by \r\n |
type |
parameters |
example |
trade
|
T |
identifies update as trade |
symbol |
symbol |
flags |
trade flags |
trade condition1 |
last conditions |
trade condition2 |
|
trade condition3 |
|
trade condition4 |
|
last exchange |
last exchange code |
last price |
last price |
last size |
last size |
last datetime |
YYYYMMDDHHSSmmm |
|
T,INDEX:DJI,1,0,0,0,0,C,13001.20,0,20120828010235000
|
quote
|
Q |
identifies update as quote |
symbol |
symbol |
quote condition |
quote condition flags |
bid exchange |
bid exchange code |
ask exchange |
ask exchange code |
bid price |
bid price |
ask price |
ask price |
bid size |
last size |
ask size |
ask size |
quote datetime |
YYYYMMDDHHSSmmm |
|
Q,CURRENCY:EUR-USD,0,F,F,1.248350,1.248550,0,0,20120828010234000
|
|
trade flags
|
trade flag |
numerical value |
TradeMessageFlagRegularMarketLastPrice |
0x1 |
TradeMessageFlagRegularMarketVolume |
0x2 |
TradeMessageFlagHighPrice |
0x4 |
TradeMessageFlagLowPrice |
0x8 |
TradeMessageFlagDayHighPrice |
0x10 |
TradeMessageFlagDayLowPrice |
0x20 |
TradeMessageFlagExtendedMarketLastPrice |
0x40 |
TradeMessageFlagPreMarketVolume |
0x80 |
TradeMessageFlagAfterMarketVolume |
0x100 |
TradeMessageFlagPreMarketOpenPrice |
0x200 |
TradeMessageFlagOpenPrice |
0x400 |
Trade flags should be applied with bitwise AND to check each corresponding bit |
|
trade conditions
|
trade condition |
numerical value |
TradeConditionRegular |
0 |
TradeConditionAcquisition |
1 |
TradeConditionAveragePrice |
2 |
TradeConditionAutomaticExecution |
3 |
TradeConditionBunched |
4 |
TradeConditionBunchSold |
5 |
TradeConditionCAPElection |
6 |
TradeConditionCash |
7 |
TradeConditionClosing |
8 |
TradeConditionCross |
9 |
TradeConditionDerivativelyPriced |
10 |
TradeConditionDistribution |
11 |
TradeConditionFormT |
12 |
TradeConditionFormTOutOfSequence |
13 |
TradeConditionInterMarketSweep |
14 |
TradeConditionMarketCenterOfficialClose |
15 |
TradeConditionMarketCenterOfficialOpen |
16 |
TradeConditionMarketCenterOpening |
17 |
TradeConditionMarketCenterReOpenning |
18 |
TradeConditionMarketCenterClosing |
19 |
TradeConditionNextDay |
20 |
TradeConditionPriceVariation |
21 |
TradeConditionPriorReferencePrice |
22 |
TradeConditionRule155Amex |
23 |
TradeConditionRule127Nyse |
24 |
TradeConditionOpening |
25 |
TradeConditionOpened |
26 |
TradeConditionRegularStoppedStock |
27 |
TradeConditionReOpening |
28 |
TradeConditionSeller |
29 |
TradeConditionSoldLast |
30 |
TradeConditionSoldLastStoppedStock |
31 |
TradeConditionSoldOutOfSequence |
32 |
TradeConditionSoldOutOfSequenceStoppedStock |
33 |
TradeConditionSplit |
34 |
TradeConditionStockOption |
35 |
TradeConditionYellowFlag |
36 |
|
exchange definitions
|
exchange |
value |
ExchangeAMEX |
A |
ExchangeNasdaqOmxBx |
B |
ExchangeNationalStockExchange |
C |
ExchangeFinraAdf |
D |
ExchangeCQS |
E |
ExchangeForex |
F |
ExchangeInternationalSecuritiesExchange |
I |
ExchangeEdgaExchange |
J |
ExchangeEdgxExchange |
K |
ExchangeChicagoStockExchange |
M |
ExchangeNyseEuronext |
N |
ExchangeNyseArcaExchange |
P |
ExchangeNasdaqOmx |
Q |
ExchangeCTS |
S |
ExchangeCTANasdaqOMX |
T |
ExchangeOTCBB |
U |
ExchangeNNOTC |
u |
ExchangeChicagoBoardOptionsExchange |
W |
ExchangeNasdaqOmxPhlx |
X |
ExchangeBatsYExchange |
Y |
ExchangeBatsExchange |
Z |
ExchangeCanadaToronto |
T |
ExchangeCanadaVenture |
V |
ExchangeComposite |
(SPACE) |
|