curl --request GET \
--url https://api-uat.dimetrades.com/api/positions/portfolio/positions \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://api-uat.dimetrades.com/api/positions/portfolio/positions"
headers = {
"Authorization": "Bearer <token>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-API-Key': '<api-key>'}
};
fetch('https://api-uat.dimetrades.com/api/positions/portfolio/positions', 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-uat.dimetrades.com/api/positions/portfolio/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-API-Key: <api-key>"
],
]);
$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-uat.dimetrades.com/api/positions/portfolio/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-API-Key", "<api-key>")
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-uat.dimetrades.com/api/positions/portfolio/positions")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/positions/portfolio/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"positions": [
{
"id": 15,
"marketId": 60497,
"market": {
"id": 60497,
"title": "M6.0+ in California",
"ticker": "KXEQCA60-2026-A1",
"yesTitle": "Yes",
"noTitle": "No",
"currentPrice": 60,
"status": "open",
"result": null,
"event": {
"id": 5454,
"title": "Will there be a 6.0+ magnitude earthquake in California in 2026?",
"ticker": "KXEQCA60-2026",
"imageUrl": "https://cdn.dimetrades.com/events/5454.png"
}
},
"side": "yes",
"contracts": 9,
"avgPrice": 60,
"cost": 5.4,
"marketValue": 0,
"unrealizedPnl": -5.4,
"payoutIfWin": 9,
"yesContracts": 9,
"noContracts": 0,
"lockedYesContracts": 0,
"lockedNoContracts": 0,
"totalYesCost": 5.4,
"totalNoCost": 0,
"avgYesPrice": 60,
"avgNoPrice": 0,
"yesMarketValue": 0,
"noMarketValue": 0,
"realizedPnl": 0,
"totalFeesPaid": 0.04,
"totalVolume": 9,
"lastUpdatedAt": "2026-07-04T11:55:17.494Z"
}
],
"summary": {
"totalPositions": 1,
"totalPositionValue": 0,
"totalCost": 5.4,
"totalUnrealizedPnl": -5.4
},
"pagination": {
"count": 1,
"totalCount": 1,
"hasPreviousPage": false,
"hasNextPage": false
}
},
"errors": []
}Portfolio active positions
Returns the authenticated user’s active positions in a portfolio-oriented
shape — per-position side, average price, cost, market value, unrealized PnL,
and payout-if-win, alongside the full YES/NO breakdown (contracts, locked
contracts, cost, average price, market value per side). Each position also
carries an aggregate data.summary (total positions, total position value,
total cost, total unrealized PnL) computed across every matching
position, not just the current page — the summary totals stay identical
regardless of which page you request.
curl --request GET \
--url https://api-uat.dimetrades.com/api/positions/portfolio/positions \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://api-uat.dimetrades.com/api/positions/portfolio/positions"
headers = {
"Authorization": "Bearer <token>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-API-Key': '<api-key>'}
};
fetch('https://api-uat.dimetrades.com/api/positions/portfolio/positions', 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-uat.dimetrades.com/api/positions/portfolio/positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-API-Key: <api-key>"
],
]);
$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-uat.dimetrades.com/api/positions/portfolio/positions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-API-Key", "<api-key>")
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-uat.dimetrades.com/api/positions/portfolio/positions")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/positions/portfolio/positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"positions": [
{
"id": 15,
"marketId": 60497,
"market": {
"id": 60497,
"title": "M6.0+ in California",
"ticker": "KXEQCA60-2026-A1",
"yesTitle": "Yes",
"noTitle": "No",
"currentPrice": 60,
"status": "open",
"result": null,
"event": {
"id": 5454,
"title": "Will there be a 6.0+ magnitude earthquake in California in 2026?",
"ticker": "KXEQCA60-2026",
"imageUrl": "https://cdn.dimetrades.com/events/5454.png"
}
},
"side": "yes",
"contracts": 9,
"avgPrice": 60,
"cost": 5.4,
"marketValue": 0,
"unrealizedPnl": -5.4,
"payoutIfWin": 9,
"yesContracts": 9,
"noContracts": 0,
"lockedYesContracts": 0,
"lockedNoContracts": 0,
"totalYesCost": 5.4,
"totalNoCost": 0,
"avgYesPrice": 60,
"avgNoPrice": 0,
"yesMarketValue": 0,
"noMarketValue": 0,
"realizedPnl": 0,
"totalFeesPaid": 0.04,
"totalVolume": 9,
"lastUpdatedAt": "2026-07-04T11:55:17.494Z"
}
],
"summary": {
"totalPositions": 1,
"totalPositionValue": 0,
"totalCost": 5.4,
"totalUnrealizedPnl": -5.4
},
"pagination": {
"count": 1,
"totalCount": 1,
"hasPreviousPage": false,
"hasNextPage": false
}
},
"errors": []
}Authorizations
The end user's JWT access token, sent as Authorization: Bearer <token>.
Obtain one from POST /partner/customers or POST /partner/customers/login
— both return it as token. It identifies which of your users a call
is made for, and is sent alongside your X-API-Key on every authenticated
endpoint.
Event discovery, categories, subcategories and scores are public and need no token.
ISV / partner credential — public half. Required on every request.
Identifies the integration partner (ISV) making the call. Issued by Dime
Trades when the ISV is onboarded and sent on every /partner/* endpoint:
X-API-Key: dt_pk_live_7f3c9a2e5b18
- On the two partner endpoints that create accounts or issue tokens (
POST /partner/customers,POST /partner/customers/login), it is accompanied byX-API-Secretand is the only authentication — there is no user token yet. - On every other partner endpoint it is sent alongside the user's
Authorization: Bearer <token>: the API key says which platform is calling, the bearer token says which user it is calling for.
Credentials are scoped to one or more brands; using a key with a brandId outside that scope returns 403. Staging and production keys are separate.
The key identifies your platform — treat it as a backend credential.
Query Parameters
1-based page number for paginated results.
x >= 1Number of rows per page.
1 <= x <= 100