curl --request POST \
--url https://api.datadash.xyz/api/v1/activity \
--header 'Content-Type: application/json' \
--data '
{
"activities": [
"Buy",
"Sell"
],
"filter": [
{
"field": "wallet",
"operator": "in",
"value": [
"0x1234567890abcdef1234567890abcdef12345678"
]
},
{
"field": "timestamp",
"operator": "last",
"value": {
"length": 30,
"unit": "day"
}
}
],
"orderBy": [
{
"direction": "desc",
"field": "timestamp"
}
],
"page": {
"limit": 50,
"offset": 0
}
}
'import requests
url = "https://api.datadash.xyz/api/v1/activity"
payload = {
"activities": ["Buy", "Sell"],
"filter": [
{
"field": "wallet",
"operator": "in",
"value": ["0x1234567890abcdef1234567890abcdef12345678"]
},
{
"field": "timestamp",
"operator": "last",
"value": {
"length": 30,
"unit": "day"
}
}
],
"orderBy": [
{
"direction": "desc",
"field": "timestamp"
}
],
"page": {
"limit": 50,
"offset": 0
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
activities: ['Buy', 'Sell'],
filter: [
{
field: 'wallet',
operator: 'in',
value: ['0x1234567890abcdef1234567890abcdef12345678']
},
{field: 'timestamp', operator: 'last', value: {length: 30, unit: 'day'}}
],
orderBy: [{direction: 'desc', field: 'timestamp'}],
page: {limit: 50, offset: 0}
})
};
fetch('https://api.datadash.xyz/api/v1/activity', 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.datadash.xyz/api/v1/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'activities' => [
'Buy',
'Sell'
],
'filter' => [
[
'field' => 'wallet',
'operator' => 'in',
'value' => [
'0x1234567890abcdef1234567890abcdef12345678'
]
],
[
'field' => 'timestamp',
'operator' => 'last',
'value' => [
'length' => 30,
'unit' => 'day'
]
]
],
'orderBy' => [
[
'direction' => 'desc',
'field' => 'timestamp'
]
],
'page' => [
'limit' => 50,
'offset' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.datadash.xyz/api/v1/activity"
payload := strings.NewReader("{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datadash.xyz/api/v1/activity")
.header("Content-Type", "application/json")
.body("{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datadash.xyz/api/v1/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}"
response = http.request(request)
puts response.read_body[
{
"activity": 123,
"amount": 123,
"avgBuyingPrice": 123,
"event": {
"active": true,
"archived": true,
"closed": true,
"description": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"icon": "<string>",
"id": 123,
"image": "<string>",
"liquidity": 123,
"openInterest": 123,
"seriesId": 123,
"slug": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"tagIds": [
123
],
"title": "<string>",
"topMarketGroupItemTitle": "<string>",
"topMarketOneDayPriceChange": 123,
"topMarketOneHourPriceChange": 123,
"topMarketOneMonthPriceChange": 123,
"topMarketOneWeekPriceChange": 123,
"topMarketOneYearPriceChange": 123,
"topMarketPrice": 123,
"topTokenName": "<string>",
"traders": 123,
"trades": 123,
"volume": 123,
"volume1mo": 123,
"volume1wk": 123,
"volume1yr": 123,
"volume24h": 123
},
"market": {
"active": true,
"archived": true,
"closed": true,
"description": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"eventId": 123,
"eventSlug": "<string>",
"groupItemTitle": "<string>",
"icon": "<string>",
"id": 123,
"image": "<string>",
"liquidity": 123,
"openInterest": 123,
"outcomeNames": [
"<string>"
],
"outcomePrices": [
123
],
"question": "<string>",
"slug": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"volume": 123,
"volume24h": 123
},
"realizedPnl": 123,
"realizedPnlPercentage": 123,
"seqId": "<string>",
"series": {
"active": true,
"archived": true,
"closed": true,
"featured": true,
"icon": "<string>",
"id": 123,
"image": "<string>",
"recurrence": "<string>",
"restricted": true,
"seriesType": "<string>",
"slug": "<string>",
"subtitle": "<string>",
"ticker": "<string>",
"title": "<string>"
},
"tags": [
{
"id": 123,
"label": "<string>",
"numEvents": 123,
"numTraders": 123,
"slug": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"token": {
"eventId": 123,
"eventSlug": "<string>",
"isYesToken": true,
"marketClosed": true,
"marketClosedTime": "2023-11-07T05:31:56Z",
"marketEndDate": "2023-11-07T05:31:56Z",
"marketGroupItemTitle": "<string>",
"marketIcon": "<string>",
"marketId": 123,
"marketLiquidity": 123,
"marketOneDayPriceChange": 123,
"marketOpenInterest": 123,
"marketQuestion": "<string>",
"marketSlug": "<string>",
"marketStartDate": "2023-11-07T05:31:56Z",
"marketTraders": 123,
"marketTrades": 123,
"marketVolume": 123,
"marketVolume24h": 123,
"positionId": 123,
"tagIds": [
123
],
"tokenId": "<string>",
"tokenName": "<string>",
"tokenPrice": 123
},
"txHash": "<string>",
"usdAmount": 123,
"usdPrice": 123,
"user": {
"bio": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"pnl": 123,
"profileImageUrl": "<string>",
"pseudonym": "<string>",
"rank": 123,
"userId": "<string>",
"verifiedBadge": true,
"xUsername": "<string>"
}
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Enriched Activities
Chronological log of prediction-market trades (buys and sells), one row per fill, enriched with market, event, category and series metadata.
curl --request POST \
--url https://api.datadash.xyz/api/v1/activity \
--header 'Content-Type: application/json' \
--data '
{
"activities": [
"Buy",
"Sell"
],
"filter": [
{
"field": "wallet",
"operator": "in",
"value": [
"0x1234567890abcdef1234567890abcdef12345678"
]
},
{
"field": "timestamp",
"operator": "last",
"value": {
"length": 30,
"unit": "day"
}
}
],
"orderBy": [
{
"direction": "desc",
"field": "timestamp"
}
],
"page": {
"limit": 50,
"offset": 0
}
}
'import requests
url = "https://api.datadash.xyz/api/v1/activity"
payload = {
"activities": ["Buy", "Sell"],
"filter": [
{
"field": "wallet",
"operator": "in",
"value": ["0x1234567890abcdef1234567890abcdef12345678"]
},
{
"field": "timestamp",
"operator": "last",
"value": {
"length": 30,
"unit": "day"
}
}
],
"orderBy": [
{
"direction": "desc",
"field": "timestamp"
}
],
"page": {
"limit": 50,
"offset": 0
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
activities: ['Buy', 'Sell'],
filter: [
{
field: 'wallet',
operator: 'in',
value: ['0x1234567890abcdef1234567890abcdef12345678']
},
{field: 'timestamp', operator: 'last', value: {length: 30, unit: 'day'}}
],
orderBy: [{direction: 'desc', field: 'timestamp'}],
page: {limit: 50, offset: 0}
})
};
fetch('https://api.datadash.xyz/api/v1/activity', 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.datadash.xyz/api/v1/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'activities' => [
'Buy',
'Sell'
],
'filter' => [
[
'field' => 'wallet',
'operator' => 'in',
'value' => [
'0x1234567890abcdef1234567890abcdef12345678'
]
],
[
'field' => 'timestamp',
'operator' => 'last',
'value' => [
'length' => 30,
'unit' => 'day'
]
]
],
'orderBy' => [
[
'direction' => 'desc',
'field' => 'timestamp'
]
],
'page' => [
'limit' => 50,
'offset' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.datadash.xyz/api/v1/activity"
payload := strings.NewReader("{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datadash.xyz/api/v1/activity")
.header("Content-Type", "application/json")
.body("{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datadash.xyz/api/v1/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"activities\": [\n \"Buy\",\n \"Sell\"\n ],\n \"filter\": [\n {\n \"field\": \"wallet\",\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n },\n {\n \"field\": \"timestamp\",\n \"operator\": \"last\",\n \"value\": {\n \"length\": 30,\n \"unit\": \"day\"\n }\n }\n ],\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"timestamp\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n }\n}"
response = http.request(request)
puts response.read_body[
{
"activity": 123,
"amount": 123,
"avgBuyingPrice": 123,
"event": {
"active": true,
"archived": true,
"closed": true,
"description": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"icon": "<string>",
"id": 123,
"image": "<string>",
"liquidity": 123,
"openInterest": 123,
"seriesId": 123,
"slug": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"tagIds": [
123
],
"title": "<string>",
"topMarketGroupItemTitle": "<string>",
"topMarketOneDayPriceChange": 123,
"topMarketOneHourPriceChange": 123,
"topMarketOneMonthPriceChange": 123,
"topMarketOneWeekPriceChange": 123,
"topMarketOneYearPriceChange": 123,
"topMarketPrice": 123,
"topTokenName": "<string>",
"traders": 123,
"trades": 123,
"volume": 123,
"volume1mo": 123,
"volume1wk": 123,
"volume1yr": 123,
"volume24h": 123
},
"market": {
"active": true,
"archived": true,
"closed": true,
"description": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"eventId": 123,
"eventSlug": "<string>",
"groupItemTitle": "<string>",
"icon": "<string>",
"id": 123,
"image": "<string>",
"liquidity": 123,
"openInterest": 123,
"outcomeNames": [
"<string>"
],
"outcomePrices": [
123
],
"question": "<string>",
"slug": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"volume": 123,
"volume24h": 123
},
"realizedPnl": 123,
"realizedPnlPercentage": 123,
"seqId": "<string>",
"series": {
"active": true,
"archived": true,
"closed": true,
"featured": true,
"icon": "<string>",
"id": 123,
"image": "<string>",
"recurrence": "<string>",
"restricted": true,
"seriesType": "<string>",
"slug": "<string>",
"subtitle": "<string>",
"ticker": "<string>",
"title": "<string>"
},
"tags": [
{
"id": 123,
"label": "<string>",
"numEvents": 123,
"numTraders": 123,
"slug": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"token": {
"eventId": 123,
"eventSlug": "<string>",
"isYesToken": true,
"marketClosed": true,
"marketClosedTime": "2023-11-07T05:31:56Z",
"marketEndDate": "2023-11-07T05:31:56Z",
"marketGroupItemTitle": "<string>",
"marketIcon": "<string>",
"marketId": 123,
"marketLiquidity": 123,
"marketOneDayPriceChange": 123,
"marketOpenInterest": 123,
"marketQuestion": "<string>",
"marketSlug": "<string>",
"marketStartDate": "2023-11-07T05:31:56Z",
"marketTraders": 123,
"marketTrades": 123,
"marketVolume": 123,
"marketVolume24h": 123,
"positionId": 123,
"tagIds": [
123
],
"tokenId": "<string>",
"tokenName": "<string>",
"tokenPrice": 123
},
"txHash": "<string>",
"usdAmount": 123,
"usdPrice": 123,
"user": {
"bio": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"displayName": "<string>",
"pnl": 123,
"profileImageUrl": "<string>",
"pseudonym": "<string>",
"rank": 123,
"userId": "<string>",
"verifiedBadge": true,
"xUsername": "<string>"
}
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Body
Show child attributes
Show child attributes
Restrict to these activity types. All are returned when omitted.
1Buy, Sell Return rows aggregated into time buckets of this grain, grouped by bucket, activity and wallet. Omit for one row per event.
1 hour, 6 hours, 12 hours, 1 day, 1 week, 1 month Filters to apply, combined with AND. Use a group for OR.
1A single field condition. in/notIn take an array of values; matches/notMatches take one search term.
- Numeric
- Large number
- ID
- Wallet address
- Time range
- User Profile Lookup
- User Tag Profile Lookup
- Group
Show child attributes
Show child attributes
Sort keys in priority order; the first is the primary sort. Defaults to the table's configured ranking when omitted.
Show child attributes
Show child attributes
Free-text search over: Market (embedding + full-text relevance).
Response
List of Enriched Activities rows
Type of prediction market activity
Share amount
Average buying price at the time of this activity in USD.
Resolved Event row.
Show child attributes
Show child attributes
Resolved Market row.
Show child attributes
Show child attributes
Realized profit and loss in USD.
Realized PnL as a percentage (materialized)
Sequence ID
Resolved Series row.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When the activity occurred
Resolved Token row.
Show child attributes
Show child attributes
Blockchain transaction hash
USD value of the shares bought/sold in the activity.
Share price in USD
Resolved User row.
Show child attributes
Show child attributes