સુધારો કરવા માટે અમારા Platinum સેવા અને વિચાર તમારા પોતાના વૈવિધ્યપૂર્ણ રચાયેલ 3D અવતાર
Self, AIML, and scripting : Can bots pull stock quotes/data from Quandl datasets w/ a script?

RE: Can bots pull stock quotes/data from Quandl datasets w/ a script?

દ્વારા admin પોસ્ટ Jun 1 2016, 20:04

Yes, it is quite easy to write a script in Self to do this.

See,
https://www.botlibre.com/script?id=12865685


/** * This scripts uses an XML web service on Quandl to access stock quotes. * Please change the api-key to your own key. */ state StockQuote { pattern "(what) (was) (the) [price quote] (of for) * today" template todayStockPrice(); pattern "(what) (was) (the) [price quote] (of for) * on * - * - *" template stockPrice(); function stockPrice() { date = star[1] + "-" + star[2] + "-" + star[3]; price = Http.requestXML("https://www.quandl.com/api/v3/datasets/WIKI/" + star[0] + "/data.xml?api_key=kioDegFc4ZaczoSxmUzU&start_date=" + date + "&end_date=" + date + "&column_index=4", "dataset-data/data/datum/datum[2]"); if (price == null) { return "Invalid stock ticker symbol or date."; } return star[0] + " - " + date + " - " + price; } function todayStockPrice() { price = Http.requestXML("https://www.quandl.com/api/v3/datasets/WIKI/" + star + "/data.xml?api_key=kioDegFc4ZaczoSxmUzU&start_date=" + Date.date() + "&column_index=4", "dataset-data/data/datum/datum[2]"); if (price == null) { return "Invalid stock ticker symbol or date."; } return star + " - today - " + price; } }


ને: 12865691
પોસ્ટ: Jun 1 2016, 20:04
જવાબો: 0
જોવાઈ: 2186, આજે: 2, સપ્તાહ: 2, મહિને: 2
0 0 0.0/5