Wrapper function to get all available 'PredictIt' markets and contract prices.

all_markets()

Value

A tibble containing bid and ask data for all 'PredictIt' markets.

Examples

markets <- all_markets()
#> Warning: `as.tbl()` was deprecated in dplyr 1.0.0.
#> Please use `tibble::as_tibble()` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
markets
#> # A tibble: 664 × 20
#>       id name       shortName image url   timeStamp           status contract_id
#>    <int> <chr>      <chr>     <chr> <chr> <dttm>              <chr>        <int>
#>  1  6867 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23546
#>  2  6867 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23547
#>  3  6867 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23545
#>  4  6867 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23548
#>  5  6874 Which par… Who will… http… http… 2022-07-18 07:00:04 Open         23587
#>  6  6874 Which par… Who will… http… http… 2022-07-18 07:00:04 Open         23586
#>  7  6892 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23690
#>  8  6892 Which par… Which pa… http… http… 2022-07-18 07:00:04 Open         23689
#>  9  6953 Will Kama… Harris f… http… http… 2022-07-18 07:00:04 Open         24205
#> 10  6975 Will Mike… Pence fi… http… http… 2022-07-18 07:00:04 Open         24361
#> # … with 654 more rows, and 12 more variables: dateEnd <chr>,
#> #   contract_image <chr>, contract_name <chr>, contract_shortName <chr>,
#> #   contract_status <chr>, lastTradePrice <dbl>, bestBuyYesCost <dbl>,
#> #   bestBuyNoCost <dbl>, bestSellYesCost <dbl>, bestSellNoCost <dbl>,
#> #   lastClosePrice <dbl>, displayOrder <int>