Publishing a stream
Here’s how to add to the list of streams.
from microprediction import MicroWriter mw = MicroWriter(write_key='YOUR WRITE KEY HERE') mw.set(name='my_stream.json',value=3.14157)
See publish-using-python for more utilities and patterns.
library(httr) httr::PUT(url = paste0("https://api.microprediction.org/live/", 'my_stream.json'), body = list(write_key = 'YOUR WRITE KEY HERE', budget = 1, value = 3.1457))
See Fred Viole’s r_examples.
r = HTTP.request("PUT", "https://api.microprediction.org/live/my_stream.json"; query=Dict( "write_key" => 'YOUR WRITE KEY', value => 3.14157)) JSON.parse(String(r.body))
This example is from Rusty Conover’s Julia Client.
Send a PUT request to https://api.microprediction.org/live/my_stream.json with the following parameters in the payload:
- budget (can just set to 1)
- value (e.g. 3.14157)
Before you publish
Get your writekey of difficulty 12 at least, and learn about bankruptcy.
After you publish
- Be patient, keep publishing, and promote your stream.
- Retrieve predictions.
- View zscores to assess market efficiency.