Get Active Positions
Retrieve a user’s currently active positions across all markets.
The user’s wallet address (normalized to lowercase)
Number of positions to return (max 100)
Number of records to skip for pagination
Sort direction: ASC or DESC
Minimum position size to include
Optional condition ID to filter positions for a specific market
Response
The user’s proxy wallet address
The condition ID of the market
Average purchase price per share
Initial investment value in USD
Current position value in USD
Total amount spent on this position in USD
Realized profit/loss in USD
Percentage realized profit/loss
Current market price per share
Whether the position can be redeemed
Whether the position can be merged
Name of the opposite outcome
Asset address of the opposite outcome
Unix timestamp of last activity
Number of orders in this position
Example Request
curl -X GET "https://api.kuest.com/v1/positions?user=0x1234...&limit=50&offset=0&sortDirection=DESC&sizeThreshold=0.01" \
-H "Content-Type: application/json"
```bash
### Example Response
```json
[
{
"proxyWallet": "0x1234567890abcdef",
"asset": "0xasset123...",
"conditionId": "0xcondition456...",
"size": 150.75,
"avgPrice": 0.55,
"initialValue": 82.91,
"currentValue": 105.52,
"cashPnl": 22.61,
"totalBought": 82.91,
"curPrice": 0.70,
"percentPnl": 27.27,
"redeemable": false,
"mergeable": true,
"title": "Will Bitcoin reach $100k in 2024?",
"slug": "bitcoin-100k-2024",
"icon": "https://cdn.kuest.com/icons/bitcoin.png",
"eventSlug": "crypto-predictions",
"outcome": "Yes",
"outcomeIndex": 0,
"oppositeOutcome": "No",
"oppositeAsset": "0xasset789...",
"timestamp": 1709500800,
"orderCount": 3
}
]
```bash
## Get Closed Positions
Retrieve a user's historical closed positions.
<ParamField query="user" type="string" required>
The user's wallet address (normalized to lowercase)
</ParamField>
<ParamField query="limit" type="string" default="50">
Number of positions to return (max 100)
</ParamField>
<ParamField query="offset" type="string" default="0">
Number of records to skip for pagination
</ParamField>
<ParamField query="sortBy" type="string" default="TIMESTAMP">
Sort field (typically `TIMESTAMP`)
</ParamField>
<ParamField query="sortDirection" type="string" default="DESC">
Sort direction: `ASC` or `DESC`
</ParamField>
<ParamField query="sizeThreshold" type="string" default="0.01">
Minimum position size to include
</ParamField>
<ParamField query="market" type="string">
Optional condition ID to filter for a specific market
</ParamField>
### Example Request
```bash cURL
curl -X GET "https://api.kuest.com/v1/closed-positions?user=0x1234...&limit=50&offset=0&sortBy=TIMESTAMP&sortDirection=DESC" \
-H "Content-Type: application/json"
```bash
## Get Portfolio Value
Retrieve the current total value of a user's portfolio.
<ParamField query="user" type="string" required>
The user's wallet address
</ParamField>
### Response
Returns a number or object representing the total portfolio value in USD.
### Example Request
```bash cURL
curl -X GET "https://api.kuest.com/v1/value?user=0x1234..." \
-H "Content-Type: application/json"
```bash
### Example Response
```json
{
"value": 1234.56
}
```bash
## Get Trading Volume
Retrieve a user's total trading volume.
<ParamField query="user" type="string" required>
The user's wallet address
</ParamField>
### Response
Returns the total trading volume in USD.
### Example Request
```bash cURL
curl -X GET "https://api.kuest.com/v1/volume?user=0x1234..." \
-H "Content-Type: application/json"
```bash
### Example Response
```json
{
"volume": 5678.90,
"total_volume": 5678.90
}
```bash
## Get Markets Traded
Retrieve the number of unique markets a user has traded in.
<ParamField query="user" type="string" required>
The user's wallet address
</ParamField>
### Response
Returns the number of markets the user has participated in.
### Example Request
```bash cURL
curl -X GET "https://api.kuest.com/v1/traded?user=0x1234..." \
-H "Content-Type: application/json"
```bash
### Example Response
```json
{
"traded": 42
}
```bash
<Note>
All user addresses are normalized to lowercase. Position values are returned in USD. Use pagination for large result sets.
</Note>