Skip to content

Instantly share code, notes, and snippets.

@jdkealy
Created July 3, 2018 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdkealy/1cf1bbd9458ecdf3d7b47571c35585b8 to your computer and use it in GitHub Desktop.
Save jdkealy/1cf1bbd9458ecdf3d7b47571c35585b8 to your computer and use it in GitHub Desktop.
(defn _trades-chan
"Open the URL as a stream of trades information. Return a channel of the trades, represented as strings."
[]
(let[session (new-session)
{:keys [url sessionid]} (:stream session)
dump-url (str url "?sessionid=" sessionid "&symbols=mu" )
lines (-> dump-url
(client/get {:as :stream})
:body
io/reader
) ]
(first (line-seq lines) )
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment