#lang scribble/doc @(require scribble/manual) @title{Markets} @author{@(author+email "jeeve" "jvjulien@free.fr")} @defmodule[(planet jeeve/markets)]{ This basic library provided client web service and graphics to follow financial markets evolution.} @section{Values} @defproc[(market-value [stock-symbol string?]) number?] Returns the value of quote (in live). Example about CAC40 indice: @racketinput[(market-value "^FCHI")] Returns -1 if stock symbol not found or web service connection failed. You can find a list of US stock symbols here: @link["http://finance.yahoo.com/indices?e=dow_jones"]{Stock symbols} @section{Graphics} @defproc[(market-graph [stock-symbol string?]) any/c] Graphic evolution of one quote market. Default time scale is one hour (3600 s). @racketinput[(market-graph "^DJA")] @defproc[(markets-dashboard [stock-symbols (listof (listof string?))]) any/c] This function displays graphic quotes in rows and columns disposition. Each sublist is a row. @racketinput[(markets-dashboard '(("^FCHI" "^GDAXI") ("^DJA" "^NYA")))] You can parameterize axis scale: @racketblock[(parameterize ([delta-x (* 2 3600)] (code:comment "2 hours in x axis") [delta-y 0.01]) (code:comment "1% in y axis") (markets-dashboard '(("^FCHI" "^GDAXI"))))] @image[#:scale 0.5 "./images/example1.png"]