Skip to main content
MANIFOLD
script for bte
0
Ṁ50
resolved Apr 21
Resolved
N/A

This is test scripting question.

Market context
Get
Ṁ1,000
to start trading!
Sort by:

@BTE So here we go

1. Get manifoldpy installed :

pip install manifoldpy

or

pip install --upgrade https://github.com/vluzko/manifoldpy/tarball/main

2. Incase there's any numpy issues (iirc i got some) you'll need to reinstall

3. this script works ready to go, I just made this market via it:

already added your user id and username, just change api id

#Imports
from manifoldpy import api
import numpy as np
import scipy as sp
from time import sleep, time
from collections import namedtuple
from traceback import print_exception
from requests.exceptions import ConnectionError
from sys import argv
from time import time

# account details
YOUR_API_KEY = ""
USER_ID = "4JuXgDx47xPagH5mcLDqLzUSN5g2"
USERNAME = "BTE"
wrapper = api.APIWrapper(YOUR_API_KEY)

def make_market():
    key = YOUR_API_KEY
    wrapper = api.APIWrapper(key)
    close = int(time()) * 1000 + 10000
    resp = wrapper.create_market(
        "BINARY",
        "script for bte",
        "This is test scripting question.",
        close,
        ["test", "api"],
        initialProb= 50, #CHANGE FOR A DIFF START PROB
    )
    print(resp.text)
    
if __name__ == "__main__":
    make_market()

This script will make the market at 50% initial prob and then close asap afterwards. You can remove that line if you wanna keep it open or whatever

While downloading manifoldpy in the terminal i am getting warnings about things not being in PATH. Is this important?

@BTE i'd help fix but it'll take time, use the other script directly