import requests
import json


def get_market(id):
    """
    Query the PredictIt API to get the details of a particular market given the market's ID.
    """
    market = requests.request(
        'GET', "https://www.predictit.org/api/marketdata/markets/%d" % id)
    return json.loads(market.content)