List market trades
curl --request GET \
--url https://api.worm.wtf/markets/{condition_id}/trades/import requests
url = "https://api.worm.wtf/markets/{condition_id}/trades/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/markets/{condition_id}/trades/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.worm.wtf/markets/{condition_id}/trades/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.worm.wtf/markets/{condition_id}/trades/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/markets/{condition_id}/trades/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/markets/{condition_id}/trades/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"amount": "45.000000000000000000",
"price": "0.670000",
"maker_fee": "0.120000000000000000",
"taker_fee": "0.180000000000000000",
"timestamp": 1714300800,
"state": "done",
"is_yes": true
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Markets
List market trades
Retrieve recent public trade history for a single market.
GET
/
markets
/
{condition_id}
/
trades
/
List market trades
curl --request GET \
--url https://api.worm.wtf/markets/{condition_id}/trades/import requests
url = "https://api.worm.wtf/markets/{condition_id}/trades/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/markets/{condition_id}/trades/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.worm.wtf/markets/{condition_id}/trades/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.worm.wtf/markets/{condition_id}/trades/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/markets/{condition_id}/trades/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/markets/{condition_id}/trades/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"amount": "45.000000000000000000",
"price": "0.670000",
"maker_fee": "0.120000000000000000",
"taker_fee": "0.180000000000000000",
"timestamp": 1714300800,
"state": "done",
"is_yes": true
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Path Parameters
string
required
The market condition id.
Query Parameters
integer
default:"50"
Number of rows to return. Range:
1-100.string
Cursor from
meta.next_cursor (before_id keyset pagination).Response
array
Public trade rows ordered by most recent first.
Show Data fields
Show Data fields
string | null
Market condition id.
string
Traded amount.
string
Trade execution price.
string
Maker-side fee amount.
string
Taker-side fee amount.
integer
Trade timestamp in unix seconds.
string
Trade lifecycle state:
created, in_process, done, or failed. Public market trades are typically done.boolean
Outcome side for this trade.
object | null
Pagination:
limit and next_cursor (keyset before_id). See Pagination. On error responses, meta is null.object | null
null on success. Error object on failed requests.{
"data": [
{
"market_condition_id": "7n9G9WfQ2V7d6hM3XK8pQ4LwR2eY6aT1uJ5cB8mN3qPz",
"amount": "45.000000000000000000",
"price": "0.670000",
"maker_fee": "0.120000000000000000",
"taker_fee": "0.180000000000000000",
"timestamp": 1714300800,
"state": "done",
"is_yes": true
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJiZWZvcmVfaWQiOjEyMzQ1fQ"
},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -15,
"slug": "not_found",
"message": "Not found.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}