Skip to main content

Streaming feed

wscat
-H "Authorization: Bearer {token here}" -c wss://api.lime.co/marketdata

Command examples

{ "action":"subscribe","symbols":["AAPL","MSFT","GOOG"] }

{ "action":"unsubscribe","symbols":["AAPL","MSFT","GOOG"] }

Feed example

{"t":"a","s":"AAPL","ls":210,"lm":"EDGX","a":268.81,"as":5,"b":268.68,"bs":11,"l":268.68,"high":270.07,"low":265.86,"open":268.6,"close":268.48,"change":1.560000,"change_pc":0.58,"d":1576018013,"v":21118864}
{"t":"a","s":"MSFT","ls":670,"lm":"FINR","a":151.23,"as":1,"b":151.15,"bs":2,"l":151.21,"high":151.89,"low":150.765,"open":151.29,"close":151.13,"change":-0.230000,"change_pc":-0.15,"d":1576011600,"v":15483417}
{"t":"a","s":"GOOG","ls":1068,"lm":"FINR","a":1345.75,"as":2,"b":1343.51,"bs":1,"l":1344.66,"high":1349.975,"low":1336.04,"open":1341.5,"close":1344.66,"change":1.100000,"change_pc":0.08,"d":1576011600,"v":1054746}
{"t":"t","s":"AAPL","ls":298,"lm":"EDGX","l":268.79,"d":1576018263}
{"t":"t","s":"AAPL","ls":200,"lm":"EDGX","l":268.8,"d":1576018325}

If authentication is denied the websocket connection is terminated immediately. The client should implement reconnection logic to maintain the opened connection. The following commands are supported:

parameterdescription
actionRequired. subscribe or unsubscribe
symbolsAn array of symbols

Subscription command for a symbol that has already been subscribed is ignored. Same behavior applies to Unsubscribe.

Trade

fielddescription
tType t
sSymbol
lsLast Size. Trade quantity
lmLast Market. Trade market center
lLast. Trade Price
dDate. Timestamp in unix format

Aggregate

The server sends a snapshot of current quote data as the first message after successful subscription. All subsequent aggregate messages contain only fields changed since last update.

fielddescription
tType a
sSymbol
lsLast Size. Trade quantity
lLast. Trade price
aAsk
asAsk Size
bBid
bsBid Size
oOpen price
hHigh
lowLow price
cClose price
chChange
chpcChange percent
dDate. Timestamp in unix format

Error

fielddescription
tType e
codeError code
descriptionError description