Chart books

Organize and manage chart screenshots with metadata and annotations.

Overview

Chart Books allow you to save and organize chart screenshots with descriptions, tags, and metadata. Unlike other endpoints, Chart Books do not use rich text content — they store simple metadata about chart images.

Features:

  • Store chart image URLs
  • Add descriptions and notes
  • Tag and categorize charts
  • Link to specific trades or setups

Note: Chart Books do not support multi-format content or TipTap editor, as they primarily store chart image references rather than rich text content.


List chart books

Endpoint: GET /api/v1/chart-books

Query parameters

ParameterTypeDescription
pageintegerPage number (default 1)
limitintegerItems per page, max 100 (default 50)
searchstringSearch in title and description

Example

curl "https://app.mypropjournal.com/api/v1/chart-books?limit=20" \
  -H "Authorization: Bearer mpj_your_api_key_here"

Example response

{
  "data": [
    {
      "id": "abc-123",
      "title": "NQ Support Levels - May 2026",
      "description": "Key support and resistance levels for NQ futures",
      "image_url": "https://storage.example.com/charts/nq-may-2026.png",
      "created_at": "2026-05-13T10:00:00Z",
      "updated_at": "2026-05-13T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 156,
    "totalPages": 8
  }
}

Get single chart book

Endpoint: GET /api/v1/chart-books/{id}

curl "https://app.mypropjournal.com/api/v1/chart-books/abc-123" \
  -H "Authorization: Bearer mpj_your_api_key_here"

Create chart book

Endpoint: POST /api/v1/chart-books

Request body

FieldTypeRequiredDescription
titlestringYesChart title
descriptionstringNoChart description
image_urlstringNoURL to chart image

Example

await fetch('https://app.mypropjournal.com/api/v1/chart-books', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer mpj_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'ES Weekly Chart - Trend Analysis',
    description: 'Weekly timeframe showing major support/resistance zones',
    image_url: 'https://storage.example.com/charts/es-weekly-2026-05.png'
  })
});

Update chart book

Endpoint: PUT /api/v1/chart-books/{id}

curl -X PUT "https://app.mypropjournal.com/api/v1/chart-books/abc-123" \
  -H "Authorization: Bearer mpj_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated: ES Weekly Chart",
    "description": "Added new resistance level at 5300"
  }'

Delete chart book

Endpoint: DELETE /api/v1/chart-books/{id}

curl -X DELETE "https://app.mypropjournal.com/api/v1/chart-books/abc-123" \
  -H "Authorization: Bearer mpj_your_api_key_here"

Use cases

Batch import chart screenshots

import requests
import os

def import_charts(api_key, charts_directory):
    """Import all charts from a directory"""
    for filename in os.listdir(charts_directory):
        if filename.endswith(('.png', '.jpg', '.jpeg')):
            # Upload to your storage (e.g., Supabase, S3)
            image_url = upload_chart_image(f"{charts_directory}/{filename}")
            
            # Create chart book entry
            response = requests.post(
                'https://app.mypropjournal.com/api/v1/chart-books',
                headers={
                    'Authorization': f'Bearer {api_key}',
                    'Content-Type': 'application/json'
                },
                json={
                    'title': filename.replace('.png', '').replace('-', ' ').title(),
                    'description': f'Chart imported from {filename}',
                    'image_url': image_url
                }
            )
            
            print(f"Imported: {filename} -> {response.json()['data']['id']}")

import_charts('mpj_your_key', './my-charts')
// Get all charts and create HTML gallery
const response = await fetch(
  'https://app.mypropjournal.com/api/v1/chart-books?limit=100',
  {
    headers: { 'Authorization': 'Bearer mpj_your_api_key' }
  }
);

const charts = (await response.json()).data;

// Generate HTML gallery
const html = `
<!DOCTYPE html>
<html>
<head>
  <title>My Chart Gallery</title>
  <style>
    .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px; }
    .chart { border: 1px solid #ccc; padding: 10px; }
    .chart img { width: 100%; height: auto; }
  </style>
</head>
<body>
  <h1>Chart Gallery</h1>
  <div class="gallery">
    ${charts.map(chart => `
      <div class="chart">
        <img src="${chart.image_url}" alt="${chart.title}" />
        <h3>${chart.title}</h3>
        <p>${chart.description || ''}</p>
      </div>
    `).join('')}
  </div>
</body>
</html>
`;

await fs.writeFile('chart-gallery.html', html);
console.log('Gallery created!');

Next steps