curl --request POST \
--url https://api.datadash.xyz/api/v1/positions/all \
--header 'Content-Type: application/json' \
--data '
{
"orderBy": [
{
"direction": "desc",
"field": "pnl"
}
],
"page": {
"limit": 50,
"offset": 0
},
"userId": {
"operator": "in",
"value": [
"0x1234567890abcdef1234567890abcdef12345678"
]
}
}
'import requests
url = "https://api.datadash.xyz/api/v1/positions/all"
payload = {
"orderBy": [
{
"direction": "desc",
"field": "pnl"
}
],
"page": {
"limit": 50,
"offset": 0
},
"userId": {
"operator": "in",
"value": ["0x1234567890abcdef1234567890abcdef12345678"]
}
}
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({
orderBy: [{direction: 'desc', field: 'pnl'}],
page: {limit: 50, offset: 0},
userId: {operator: 'in', value: ['0x1234567890abcdef1234567890abcdef12345678']}
})
};
fetch('https://api.datadash.xyz/api/v1/positions/all', 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/positions/all",
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([
'orderBy' => [
[
'direction' => 'desc',
'field' => 'pnl'
]
],
'page' => [
'limit' => 50,
'offset' => 0
],
'userId' => [
'operator' => 'in',
'value' => [
'0x1234567890abcdef1234567890abcdef12345678'
]
]
]),
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/positions/all"
payload := strings.NewReader("{\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\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/positions/all")
.header("Content-Type", "application/json")
.body("{\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datadash.xyz/api/v1/positions/all")
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 \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body[
{
"avgBuyPrice": 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
},
"exitPrice": 123,
"invested": 123,
"marketClosed": true,
"pnl": 123,
"positions": [
{
"avgBuyPrice": 123,
"bought": 123,
"boughtShares": 123,
"pnl": 123,
"positionId": 123,
"realizedPnl": 123,
"roi": 123,
"unrealizedPnl": 123,
"unrealizedShares": 123
}
],
"roi": 123,
"shares": 123,
"unrealizedPnl": 123,
"unrealizedShares": 123
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}All Positions
All positions (open and closed) for a wallet or cohort, grouped by event; the nested positions field carries the per-position breakdown.
curl --request POST \
--url https://api.datadash.xyz/api/v1/positions/all \
--header 'Content-Type: application/json' \
--data '
{
"orderBy": [
{
"direction": "desc",
"field": "pnl"
}
],
"page": {
"limit": 50,
"offset": 0
},
"userId": {
"operator": "in",
"value": [
"0x1234567890abcdef1234567890abcdef12345678"
]
}
}
'import requests
url = "https://api.datadash.xyz/api/v1/positions/all"
payload = {
"orderBy": [
{
"direction": "desc",
"field": "pnl"
}
],
"page": {
"limit": 50,
"offset": 0
},
"userId": {
"operator": "in",
"value": ["0x1234567890abcdef1234567890abcdef12345678"]
}
}
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({
orderBy: [{direction: 'desc', field: 'pnl'}],
page: {limit: 50, offset: 0},
userId: {operator: 'in', value: ['0x1234567890abcdef1234567890abcdef12345678']}
})
};
fetch('https://api.datadash.xyz/api/v1/positions/all', 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/positions/all",
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([
'orderBy' => [
[
'direction' => 'desc',
'field' => 'pnl'
]
],
'page' => [
'limit' => 50,
'offset' => 0
],
'userId' => [
'operator' => 'in',
'value' => [
'0x1234567890abcdef1234567890abcdef12345678'
]
]
]),
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/positions/all"
payload := strings.NewReader("{\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\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/positions/all")
.header("Content-Type", "application/json")
.body("{\n \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datadash.xyz/api/v1/positions/all")
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 \"orderBy\": [\n {\n \"direction\": \"desc\",\n \"field\": \"pnl\"\n }\n ],\n \"page\": {\n \"limit\": 50,\n \"offset\": 0\n },\n \"userId\": {\n \"operator\": \"in\",\n \"value\": [\n \"0x1234567890abcdef1234567890abcdef12345678\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body[
{
"avgBuyPrice": 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
},
"exitPrice": 123,
"invested": 123,
"marketClosed": true,
"pnl": 123,
"positions": [
{
"avgBuyPrice": 123,
"bought": 123,
"boughtShares": 123,
"pnl": 123,
"positionId": 123,
"realizedPnl": 123,
"roi": 123,
"unrealizedPnl": 123,
"unrealizedShares": 123
}
],
"roi": 123,
"shares": 123,
"unrealizedPnl": 123,
"unrealizedShares": 123
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Body
Show child attributes
Show child attributes
User wallet address
Show child attributes
Show child attributes
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
- ID
- Boolean
- 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: Event (embedding + full-text relevance).
Response
List of All Positions rows
Average buying price of the shares
Resolved Event row.
Show child attributes
Show child attributes
Average selling price
Total USD amount invested in the position.
Market Closed
Total profit and loss
Per-position breakdown within the event, bought, bought shares, avg buy price, pnl, realized/unrealized pnl and roi, summed across every matching wallet (so a position held by N cohort users collapses to one entry). Serialized as a JSON array of objects.
Show child attributes
Show child attributes
Return on investment percentage
Total shares bought
Unrealized profit and loss for currently held shares
Number of currently held shares