Publishing a stream
Everyone is doing it. Here’s how you can add to the list of streams.
1. Python
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.
2. R
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.
3. Julia
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.
4. API
Send a PUT request to https://api.microprediction.org/live/my_stream.json with the following parameters in the payload:
- write_key
- 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.
-+-
Documentation map
Edit this page.