Will I succeed in automating comments on a market?
14
250Ṁ309
resolved Sep 30
Resolved
NO

I want to make a market where I periodically reveal new information. The best way I know of is to use the API to add comments to the market. I also want pictures there. Will I succeed in automating this task?

I'll be closing this in around a week. If I succeed before this (to my satisfaction), this resolves YES and if I don't succeed in this time frame, this resolves NO. I'll likely spend at least a couple of hours attempting this. This market won't resolve N/A.

Get
Ṁ1,000
to start trading!

🏅 Top traders

#NameTotal profit
1Ṁ97
2Ṁ48
3Ṁ21
4Ṁ9
5Ṁ3
Sort by:

Satisfied now! Big thanks to nanob0nus for providing the code!

🤖

This is an automated test comment
RED : ab
GREEN: 12

🤖

This is an automated test comment
RED : a
GREEN: 1

🤖

This is an automated test comment
RED : a
GREEN: 1\

🤖

This is an automated test comment\nRED : a\nGREEN: 1\n

🤖

This is an automated test comment\RED : a\GREEN: 1\

🤖

This is an automated test comment RED : a GREEN: 1

🤖

This is an automated test comment RED : ab GREEN: 12

🤖

This is an automated test comment RED : a GREEN: 1

predictedYES 🤖

Second automated Comment

predictedYES 🤖

First automated Comment

predictedYES 🤖

First automated Comment

predictedYES 🤖

First automated Comment

predictedYES 🤖

First automated Comment

predictedYES

Man, can I help you somehow? I want to see the automated random markets.

So what I'd want to do is:

Goal: Have a market based on the idea of "reveal new information every hour".

Approach: I have a file data.txt, from which I reveal this information. Each hour, do a POST-request via the Manifold API to do a comment to the market containing the new information.

[Ideally, I'd edit the description, but the API doesn't support that. One could have a totally separate system for this thing, e.g. a website, but I'm unfortunately not yet a skilled enough programmer to do this.]

What I tried (unsuccessfully): I wrote a bash script containing a part

curl https://manifold.markets/api/v0/comment -X POST \

-H 'Content-Type: application/json' \

-H 'Authorization: Key 123456-blah-blah-blah' \

--data-raw '{"contractId":"iQMXhHXTOOnJ0J3SqvUY", "markdown":$STR}'

where STR is the thing I read from data.txt. However, doing this simply results in a comment reading "$STR" (see below). (Reading the file, sleeping for an hour, etc. seemed like something I am able to do, the issue is putting variables in the POST-request.)

I Googled a bit but couldn't quickly get around this. Also feeling like this whole "post a comment every hour" business is not the cleanest solution.

predictedYES

@Loppukilpailija Would you mind using python? Working with variables like STR is much more straight forward there. I just created this and it works: https://drive.google.com/file/d/15MBmzgC0Jqf5aaZDWCf2ephqJb7szvvo/view?usp=drive_link

predictedYES

@nanob0nus If you cant get python to work I could also try to understand bash

predictedYES

@nanob0nus You can either schedule the comments manually with three lines of code per comment or read them from a file there with a loop

@nanob0nus Sure, any solution is fine, including Python. Note that the Drive file you linked needs permission to access it

predictedYES

@Loppukilpailija ups, changed it, should be accessible now.

No sugar. Guess I'll be updating my markets manually.

Not satisfied yet. What I would want to do is (roughly) to be able to read a file, post a comment with the first N characters of the file, N += 1, wait, repeat. I didn't succeed yet. I might look into it later on, but as of now the market would resolve NO.

🤖

$STR

🤖

This is a test comment posted via the API, in an automated way. Additional automated information: ${n}

© Manifold Markets, Inc.Terms + Mana-only TermsPrivacyRules