List trades
Retrieve a paginated list of trades with optional filtering.
Endpoint: GET /api/v1/trades
Query parameters
Example request
cURL:
curl "https://app.mypropjournal.com/api/v1/trades?page=1&limit=25&symbol=NQ" \
-H "Authorization: Bearer mpj_your_api_key_here" \
-H "Content-Type: application/json"
JavaScript:
const response = await fetch(
'https://app.mypropjournal.com/api/v1/trades?page=1&limit=25&symbol=NQ',
{
headers: {
'Authorization': 'Bearer mpj_your_api_key_here',
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
console.log(`Found ${data.pagination.total} trades`);
Python:
import requests
headers = {
'Authorization': 'Bearer mpj_your_api_key_here',
'Content-Type': 'application/json'
}
params = {
'page': 1,
'limit': 25,
'symbol': 'NQ'
}
response = requests.get(
'https://app.mypropjournal.com/api/v1/trades',
headers=headers,
params=params
)
data = response.json()
print(f"Found {data['pagination']['total']} trades")
Example response
{
"data": [
{
"id": "fd07b82a-164c-4c24-885a-7f4db54dab62",
"account_id": "f1588e0d-93fd-4a76-b876-b0753f93bc09",
"symbol": "NQ",
"side": "short",
"quantity": 1,
"entry_price": 29298,
"exit_price": 29290,
"entry_time": "10:17:54",
"exit_time": "10:18:29",
"gross_pnl": 160,
"net_pnl": 158,
"total_commission": 2,
"status": "win",
"entry_date": "2026-02-05",
"exit_date": "2026-02-05",
"asset_class": "futures",
"executions": [
{
"id": "1ed21bd6-8ea2-42d0-b16e-142f9484ecb9",
"side": "sell",
"price": 29298,
"quantity": 1,
"commission": 1,
"execution_time": "10:17:54",
"execution_type": "scale_in",
"execution_timestamp": "2026-02-05T15:17:54+00:00"
},
{
"id": "2ed21bd6-8ea2-42d0-b16e-142f9484ecb9",
"side": "buy",
"price": 29290,
"quantity": 1,
"commission": 1,
"execution_time": "10:18:29",
"execution_type": "scale_out",
"execution_timestamp": "2026-02-05T15:18:29+00:00"
}
]
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 305,
"totalPages": 13,
"has_more": true
}
}
Response fields
Each trade object includes:
Get a single trade
Retrieve detailed information for a specific trade.
Endpoint: GET /api/v1/trades/{id}
Example request
cURL:
curl "https://app.mypropjournal.com/api/v1/trades/fd07b82a-164c-4c24-885a-7f4db54dab62" \
-H "Authorization: Bearer mpj_your_api_key_here" \
-H "Content-Type: application/json"
Example response
Returns a single trade object with the same structure as shown in the list endpoint, including all executions.
Create a trade
Add a new trade to your journal.
Endpoint: POST /api/v1/trades
Required fields
Optional fields
Execution object structure
When providing executions, each object should include:
Example request
cURL:
curl -X POST "https://app.mypropjournal.com/api/v1/trades" \
-H "Authorization: Bearer mpj_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"account_id": "f1588e0d-93fd-4a76-b876-b0753f93bc09",
"symbol": "TSLA",
"side": "long",
"entry_date": "2024-01-15",
"entry_price": 245.00,
"entry_time": "10:30:00",
"quantity": 50,
"executions": [
{
"side": "buy",
"quantity": 50,
"price": 245.00,
"execution_time": "10:30:00",
"commission": 0.50,
"execution_type": "full"
}
]
}'
JavaScript:
const tradeData = {
account_id: "f1588e0d-93fd-4a76-b876-b0753f93bc09",
symbol: "TSLA",
side: "long",
entry_date: "2024-01-15",
entry_price: 245.00,
entry_time: "10:30:00",
quantity: 50,
executions: [
{
side: "buy",
quantity: 50,
price: 245.00,
execution_time: "10:30:00",
commission: 0.50,
execution_type: "full"
}
]
};
const response = await fetch('https://app.mypropjournal.com/api/v1/trades', {
method: 'POST',
headers: {
'Authorization': 'Bearer mpj_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify(tradeData)
});
const result = await response.json();
console.log('Created trade:', result.data.id);
Python:
import requests
trade_data = {
'account_id': 'f1588e0d-93fd-4a76-b876-b0753f93bc09',
'symbol': 'TSLA',
'side': 'long',
'entry_date': '2024-01-15',
'entry_price': 245.00,
'entry_time': '10:30:00',
'quantity': 50,
'executions': [
{
'side': 'buy',
'quantity': 50,
'price': 245.00,
'execution_time': '10:30:00',
'commission': 0.50,
'execution_type': 'full'
}
]
}
response = requests.post(
'https://app.mypropjournal.com/api/v1/trades',
headers={
'Authorization': 'Bearer mpj_your_api_key_here',
'Content-Type': 'application/json'
},
json=trade_data
)
result = response.json()
print(f"Created trade: {result['data']['id']}")
Example response
{
"data": {
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"account_id": "f1588e0d-93fd-4a76-b876-b0753f93bc09",
"symbol": "TSLA",
"side": "long",
"quantity": 50,
"entry_price": 245.00,
"entry_time": "10:30:00",
"entry_date": "2024-01-15",
"status": "open",
"asset_class": "stocks",
"created_at": "2024-01-15T10:30:00Z"
}
}
Update a trade
Modify an existing trade.
Endpoint: PUT /api/v1/trades/{id}
Request body
Accepts the same fields as the create endpoint. All fields are optional — only provided fields will be updated.
Example request
cURL:
curl -X PUT "https://app.mypropjournal.com/api/v1/trades/fd07b82a-164c-4c24-885a-7f4db54dab62" \
-H "Authorization: Bearer mpj_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"exit_price": 250.00,
"exit_time": "14:30:00",
"exit_date": "2024-01-15",
"status": "win"
}'
Delete a trade
Permanently delete a trade and its associated executions.
Endpoint: DELETE /api/v1/trades/{id}
Cascade Delete Warning
Deleting a trade will permanently cascade delete the following related data:
- All executions associated with this trade
- Any trade write-ups linked to this trade
- All tag associations for this trade
This action cannot be undone. The API response will include warnings about what data was affected.
Example request
cURL:
curl -X DELETE "https://app.mypropjournal.com/api/v1/trades/fd07b82a-164c-4c24-885a-7f4db54dab62" \
-H "Authorization: Bearer mpj_your_api_key_here"
Example response
{
"success": true,
"deleted_id": "fd07b82a-164c-4c24-885a-7f4db54dab62"
}
Error responses
400 Bad Request
Invalid request data or parameters:
{
"error": "Validation failed",
"code": "VALIDATION_ERROR",
"details": {
"entry_price": "Must be a positive number",
"side": "Must be 'long' or 'short'"
}
}
401 Unauthorized
Missing or invalid API key:
{
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}
404 Not Found
Trade doesn't exist or doesn't belong to you:
{
"error": "Trade not found",
"code": "NOT_FOUND"
}
See the Pagination & Errors page for complete error documentation.