Developer documentation Pro & Platinum

API Docs

Read and manage your journal with REST API keys, endpoints and request examples.

Two ways to connect to your journal

REST API: apps, scripts and automations

Use an API key in your own software to send HTTP requests to TradesViz. Choose the accounts and permissions for each key; no MCP connection is required.

Hosted MCP: compatible AI assistants

Connect your assistant to the MCP server run by TradesViz and approve access through browser sign-in. The assistant calls journal tools for you; no local server installation or REST API key is required.

Setup instructions for ChatGPT, Grok and Claude

Pro & Platinum API access. Both methods use the same journal permissions, selected accounts and current subscription checks, but have separate credentials. Existing read-only access stays read-only; edits and deletions require explicit permissions. Neither places broker orders; documentation does not grant access.

MCP connection setup is available on this site. Use the server URL and browser sign-in instructions in MCP Docs.

READ API · GET ONLY https://www.tradesviz.com/api/v2 OpenAPI JSON

Endpoint reference

Requests on the left. Responses on the right. Examples are documentation only; this page sends no API requests.

GET

Journal context

https://www.tradesviz.com/api/v2/context

Required scopes: trades.read

Authentication options

API key: Bearer API key

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

No query, path or custom header parameters.

Responses

HTTP 200

Journal data limited to this credential's current account grants.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data": {
    "base_currency": "string",
    "timezone": "string"
  },
  "meta": {
    "consistency": "live_keyset",
    "data_source": "configured_database",
    "internal_only": false,
    "request_id": "string",
    "test_only": true,
    "trade_refs": "not_permanent"
  },
  "pagination": {
    "has_more": false,
    "next_cursor": "string"
  }
}
Response fields and constraints
data Required
object

additionalProperties: false

data.timezone Required
string
data.base_currency Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

meta.internal_only Optional
boolean
meta.data_source Optional
string

enum: ["configured_database", "capability_functions"]

meta.consistency Optional
string

const: "live_keyset"

meta.trade_refs Optional
string

const: "not_permanent"

pagination Required
object

additionalProperties: false

pagination.has_more Required
boolean
pagination.next_cursor Required
string | null

Opaque cursor; expires after ten minutes.

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Context"
    },
    "meta": {
      "$ref": "#/components/schemas/Meta"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "required": [
    "data",
    "meta",
    "pagination"
  ],
  "type": "object"
}
HTTP 400

Invalid query, cursor, host, or request body.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 401

Missing, invalid, expired, or revoked API key.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 403

Required credential scope missing.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 404

Endpoint or account unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 405

Only GET is allowed.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 422

Query exceeds account or page limits.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 429

Request, continuation, response-byte or concurrency quota reached. Quotas are shared by user across REST and MCP; honor Retry-After.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}

Response headers

{
  "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
      "minimum": 1,
      "type": "integer"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 500

Unexpected internal failure.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 503

Database or service unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
GET

List trading accounts

https://www.tradesviz.com/api/v2/accounts

Required scopes: trades.read

Authentication options

API key: Bearer API key

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

page_size Optional
integer · query

default: 50 minimum: 1 maximum: 100

cursor Optional
string · query

Pass next_cursor unchanged with the same request parameters. maxLength: 4096

Responses

HTTP 200

Journal data limited to this credential's current account grants.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "created_at": "2026-01-15T15:30:00Z",
      "name": "string"
    }
  ],
  "meta": {
    "consistency": "live_keyset",
    "data_source": "configured_database",
    "internal_only": false,
    "request_id": "string",
    "test_only": true,
    "trade_refs": "not_permanent"
  },
  "pagination": {
    "has_more": false,
    "next_cursor": "string"
  }
}
Response fields and constraints
data Required
array of object

maxItems: 100

data[].account_id Required
string

format: "uuid"

data[].name Required
string
data[].created_at Required
string

format: "date-time"

meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

meta.internal_only Optional
boolean
meta.data_source Optional
string

enum: ["configured_database", "capability_functions"]

meta.consistency Optional
string

const: "live_keyset"

meta.trade_refs Optional
string

const: "not_permanent"

pagination Required
object

additionalProperties: false

pagination.has_more Required
boolean
pagination.next_cursor Required
string | null

Opaque cursor; expires after ten minutes.

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "items": {
        "$ref": "#/components/schemas/Account"
      },
      "maxItems": 100,
      "type": "array"
    },
    "meta": {
      "$ref": "#/components/schemas/Meta"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "required": [
    "data",
    "meta",
    "pagination"
  ],
  "type": "object"
}
HTTP 400

Invalid query, cursor, host, or request body.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 401

Missing, invalid, expired, or revoked API key.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 403

Required credential scope missing.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 404

Endpoint or account unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 405

Only GET is allowed.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 422

Query exceeds account or page limits.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 429

Request, continuation, response-byte or concurrency quota reached. Quotas are shared by user across REST and MCP; honor Retry-After.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}

Response headers

{
  "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
      "minimum": 1,
      "type": "integer"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 500

Unexpected internal failure.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 503

Database or service unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
GET

List trades

https://www.tradesviz.com/api/v2/trades

Required scopes: trades.read

Authentication options

API key: Bearer API key

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

page_size Optional
integer · query

default: 50 minimum: 1 maximum: 100

cursor Optional
string · query

Pass next_cursor unchanged with the same request parameters. maxLength: 4096

account_ids Required
array of string · query

Public UUIDs returned by /api/v2/accounts. minItems: 1 maxItems: 50 uniqueItems: true

extra_data Optional
boolean · query

When true, adds the nested extra_data object. Requires trades.extended.read. default: false

sort_time_start Optional
string · query

Inclusive RFC 3339 lower bound for sort_time. Supply together with sort_time_end; omit both for no time window. format: "date-time"

sort_time_end Optional
string · query

Exclusive RFC 3339 upper bound for sort_time. Supply together with sort_time_start; must be later than the lower bound. format: "date-time"

Responses

HTTP 200

Journal data limited to this credential's current account grants.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "asset_type": "string",
      "base_close_price": "string",
      "base_commission": "string",
      "base_fees": "string",
      "base_gross_pnl": "string",
      "base_net_pnl": "string",
      "base_open_price": "string",
      "closed_at": "2026-01-15T15:30:00Z",
      "extra_data": {
        "duration_seconds": "string",
        "native_close_price": "string",
        "native_gross_pnl": "string",
        "native_net_pnl": "string",
        "native_open_price": "string",
        "percent_return": "string",
        "r_value": "string",
        "total_buy_quantity": "string",
        "total_credit_debit": "string",
        "total_executions": 0,
        "total_sell_quantity": "string"
      },
      "is_simulated": false,
      "last_execution_at": "2026-01-15T15:30:00Z",
      "native_currency": "string",
      "opened_at": "2026-01-15T15:30:00Z",
      "remaining_quantity": "string",
      "side": "string",
      "sort_time": "2026-01-15T15:30:00Z",
      "status": "open",
      "symbol": "string",
      "total_quantity": "string",
      "trade_ref": "string",
      "underlying": "string"
    }
  ],
  "meta": {
    "consistency": "live_keyset",
    "data_source": "configured_database",
    "internal_only": false,
    "request_id": "string",
    "test_only": true,
    "trade_refs": "not_permanent"
  },
  "pagination": {
    "has_more": false,
    "next_cursor": "string"
  }
}
Response fields and constraints
data Required
array of object

maxItems: 100

data[].account_id Required
string

format: "uuid"

data[].trade_ref Required
string

Opaque reference; not permanent across trade rebuilds.

data[].sort_time Required
string

format: "date-time"

data[].status Required
string

enum: ["open", "closed", "unknown"]

data[].symbol Required
string | null
data[].underlying Required
string | null
data[].asset_type Required
string | null
data[].side Required
string | null
data[].native_currency Required
string | null
data[].opened_at Required
string | null

format: "date-time"

data[].closed_at Required
string | null

format: "date-time"

data[].last_execution_at Required
string | null

format: "date-time"

data[].total_quantity Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].remaining_quantity Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_open_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_close_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_gross_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_net_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_commission Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_fees Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].is_simulated Required
boolean | null
data[].extra_data Optional
object

additionalProperties: false

data[].extra_data.r_value Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.percent_return Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.native_open_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.native_close_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.native_gross_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.native_net_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.total_buy_quantity Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.total_sell_quantity Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.total_executions Required
integer | null

minimum: 0

data[].extra_data.duration_seconds Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].extra_data.total_credit_debit Required
string | null

Exact decimal encoded as a string, never a JSON float.

meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

meta.internal_only Optional
boolean
meta.data_source Optional
string

enum: ["configured_database", "capability_functions"]

meta.consistency Optional
string

const: "live_keyset"

meta.trade_refs Optional
string

const: "not_permanent"

pagination Required
object

additionalProperties: false

pagination.has_more Required
boolean
pagination.next_cursor Required
string | null

Opaque cursor; expires after ten minutes.

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "items": {
        "$ref": "#/components/schemas/Trade"
      },
      "maxItems": 100,
      "type": "array"
    },
    "meta": {
      "$ref": "#/components/schemas/Meta"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "required": [
    "data",
    "meta",
    "pagination"
  ],
  "type": "object"
}
HTTP 400

Invalid query, cursor, host, or request body.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 401

Missing, invalid, expired, or revoked API key.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 403

Required credential scope missing.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 404

Endpoint or account unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 405

Only GET is allowed.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 422

Query exceeds account or page limits.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 429

Request, continuation, response-byte or concurrency quota reached. Quotas are shared by user across REST and MCP; honor Retry-After.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}

Response headers

{
  "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
      "minimum": 1,
      "type": "integer"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 500

Unexpected internal failure.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 503

Database or service unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
GET

List executions

https://www.tradesviz.com/api/v2/executions

Required scopes: trades.read executions.read

Authentication options

API key: Bearer API key

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

page_size Optional
integer · query

default: 50 minimum: 1 maximum: 100

cursor Optional
string · query

Pass next_cursor unchanged with the same request parameters. maxLength: 4096

account_id Required
string · query

Public account UUID returned by /api/v2/accounts. format: "uuid"

trade_ref Required
string · query

A trade_ref returned for this same account. minLength: 1 maxLength: 200

Responses

HTTP 200

Journal data limited to this credential's current account grants.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "asset_type": "string",
      "base_commission": "string",
      "base_fees": "string",
      "base_price": "string",
      "executed_at": "2026-01-15T15:30:00Z",
      "execution_ref": "string",
      "is_simulated": false,
      "native_currency": "string",
      "native_price": "string",
      "quantity": "string",
      "side": "string",
      "symbol": "string",
      "trade_ref": "string",
      "underlying": "string"
    }
  ],
  "meta": {
    "consistency": "live_keyset",
    "data_source": "configured_database",
    "internal_only": false,
    "request_id": "string",
    "test_only": true,
    "trade_refs": "not_permanent"
  },
  "pagination": {
    "has_more": false,
    "next_cursor": "string"
  }
}
Response fields and constraints
data Required
array of object

maxItems: 100

data[].account_id Required
string

format: "uuid"

data[].trade_ref Required
string

Opaque reference; not permanent across trade rebuilds.

data[].execution_ref Required
string

Opaque reference; not permanent across trade rebuilds.

data[].executed_at Required
string

format: "date-time"

data[].symbol Required
string | null
data[].side Required
string | null
data[].native_currency Required
string | null
data[].asset_type Required
string | null
data[].underlying Required
string | null
data[].quantity Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].native_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_price Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_commission Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].base_fees Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].is_simulated Required
boolean | null
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

meta.internal_only Optional
boolean
meta.data_source Optional
string

enum: ["configured_database", "capability_functions"]

meta.consistency Optional
string

const: "live_keyset"

meta.trade_refs Optional
string

const: "not_permanent"

pagination Required
object

additionalProperties: false

pagination.has_more Required
boolean
pagination.next_cursor Required
string | null

Opaque cursor; expires after ten minutes.

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "items": {
        "$ref": "#/components/schemas/Execution"
      },
      "maxItems": 100,
      "type": "array"
    },
    "meta": {
      "$ref": "#/components/schemas/Meta"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "required": [
    "data",
    "meta",
    "pagination"
  ],
  "type": "object"
}
HTTP 400

Invalid query, cursor, host, or request body.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 401

Missing, invalid, expired, or revoked API key.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 403

Required credential scope missing.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 404

Endpoint or account unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 405

Only GET is allowed.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 422

Query exceeds account or page limits.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 429

Request, continuation, response-byte or concurrency quota reached. Quotas are shared by user across REST and MCP; honor Retry-After.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}

Response headers

{
  "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
      "minimum": 1,
      "type": "integer"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 500

Unexpected internal failure.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 503

Database or service unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
GET

Analytics summaries

https://www.tradesviz.com/api/v2/analytics

Required scopes: trades.read analytics.read

Authentication options

API key: Bearer API key

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

account_ids Required
array of string · query

Public UUIDs returned by /api/v2/accounts. minItems: 1 maxItems: 5 uniqueItems: true

period_start Required
string · query

Inclusive UTC lower bound. Required; the period may span at most 31 days. format: "date-time"

period_end Required
string · query

Exclusive UTC upper bound. Required; the period may span at most 31 days. format: "date-time"

Responses

HTTP 200

Journal data limited to this credential's current account grants.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "avg_loss": "string",
      "avg_win": "string",
      "losing_trades": 0,
      "profit_factor": "string",
      "total_commission": "string",
      "total_fees": "string",
      "total_gross_pnl": "string",
      "total_net_pnl": "string",
      "trade_count": 0,
      "win_rate": "string",
      "winning_trades": 0
    }
  ],
  "meta": {
    "consistency": "live_keyset",
    "data_source": "configured_database",
    "internal_only": false,
    "request_id": "string",
    "test_only": true,
    "trade_refs": "not_permanent"
  },
  "pagination": {
    "has_more": false,
    "next_cursor": "string"
  }
}
Response fields and constraints
data Required
array of object

maxItems: 5

data[].account_id Required
string

format: "uuid"

data[].trade_count Required
integer

minimum: 0

data[].winning_trades Required
integer

minimum: 0

data[].losing_trades Required
integer

minimum: 0

data[].win_rate Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].total_net_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].total_gross_pnl Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].total_commission Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].total_fees Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].avg_win Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].avg_loss Required
string | null

Exact decimal encoded as a string, never a JSON float.

data[].profit_factor Required
string | null

Exact decimal encoded as a string, never a JSON float.

meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

meta.internal_only Optional
boolean
meta.data_source Optional
string

enum: ["configured_database", "capability_functions"]

meta.consistency Optional
string

const: "live_keyset"

meta.trade_refs Optional
string

const: "not_permanent"

pagination Required
object

additionalProperties: false

pagination.has_more Required
boolean
pagination.next_cursor Required
string | null

Opaque cursor; expires after ten minutes.

{
  "additionalProperties": false,
  "properties": {
    "data": {
      "items": {
        "$ref": "#/components/schemas/Analytics"
      },
      "maxItems": 5,
      "type": "array"
    },
    "meta": {
      "$ref": "#/components/schemas/Meta"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "required": [
    "data",
    "meta",
    "pagination"
  ],
  "type": "object"
}
HTTP 400

Invalid query, cursor, host, or request body.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 401

Missing, invalid, expired, or revoked API key.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 403

Required credential scope missing.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 404

Endpoint or account unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 405

Only GET is allowed.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 422

Query exceeds account or page limits.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 429

Request, continuation, response-byte or concurrency quota reached. Quotas are shared by user across REST and MCP; honor Retry-After.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}

Response headers

{
  "Retry-After": {
    "description": "Seconds to wait before retrying.",
    "schema": {
      "minimum": 1,
      "type": "integer"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 500

Unexpected internal failure.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
HTTP 503

Database or service unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "request_id": "string",
    "test_only": true
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.message Required
string
meta Required
object

additionalProperties: false

meta.request_id Required
string
meta.test_only Required
boolean

const: true

{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        },
        "test_only": {
          "const": true,
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "test_only"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "type": "object"
}
POST

Eligible import accounts

https://api.tradesviz.com/api/v2/journal/accounts

Scoped access: API key: executions.write. This discovers accounts eligible for execution import.

Send exactly {}. Lists currently owned and permitted destinations. Read-only discovery: no source enrollment, execution capture or journal write. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key. API keys require trades.read for annotation discovery, or executions.write for import discovery.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

No query, path or custom header parameters.

JSON body

Full request schema
{
  "additionalProperties": false,
  "properties": {},
  "required": [],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{}

Responses

HTTP 200

Authenticated account discovery.

Example response

{
  "accounts": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "name": "Example simulation account"
    }
  ],
  "supported_asset_types": [
    "stock",
    "future"
  ]
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
accounts Required
array of object
accounts[].account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

accounts[].name Required
string
supported_asset_types Required
array of string
{
  "additionalProperties": false,
  "properties": {
    "accounts": {
      "items": {
        "$ref": "#/components/schemas/JournalAccount"
      },
      "type": "array"
    },
    "supported_asset_types": {
      "items": {
        "enum": [
          "stock",
          "future"
        ],
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "accounts",
    "supported_asset_types"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Import executions

https://api.tradesviz.com/api/v2/journal/execution-batches

Scoped access: executions.write

Schema 3 append only; no grouping_policy or client-supplied server IDs. At most 500 fills and 1 MiB encoded JSON. Keep the same idempotency key, account, client instance, connector and unchanged request on retry. Rebatching unchanged fill IDs within the same registered source may create a new receipt but must not duplicate fills; this is not cross-source/broker-wide deduplication. Never reset identities or keys to bypass a conflict. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key. API-key and MCP imports are limited to 50 fills per request; Basic imports allow 500. Use the same key and source_execution_id values for retries; changing API keys is a different source, not cross-key deduplication.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

ninjatrader is an ordered stream; python is batch delivery. Preserve the connector across retries. Required only for Basic authentication. API keys use their own credential identity. enum: ["ninjatrader", "python"]

Idempotency-Key Required
string · header

Stable key for this logical request. A changed request with the same key conflicts. minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

schema_version Required
integer

const: 3

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

mode Required
string

const: "append"

executions Required
array of object

No repeated source_execution_id in one batch. NT sequences must also be unique. minItems: 1 maxItems: 500

executions[].source_execution_id Required
string

Permanent fill ID unique within this source. Preserve its facts on every retry/rebatch. minLength: 1 maxLength: 128 pattern: "^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$"

executions[].source_sequence Required
string | null

ninjatrader: permanent positive sequence string, at most 9223372036854775807. python: explicitly null, never an invented ordinal. pattern: "^[1-9][0-9]{0,18}$"

executions[].executed_at Required
string

Actual fill timestamp with timezone; UTC Z recommended. At most six fractional-second digits. format: "date-time" pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"

executions[].instrument Required
object

additionalProperties: false

executions[].instrument.asset_type Required
string

enum: ["stock", "future"]

executions[].instrument.symbol Required
string

Unambiguous server-master symbol, without surrounding whitespace; e.g. AAPL.US or ES 12-26. Syntax alone does not qualify an instrument. minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9][A-Za-z0-9 ._:/-]{0,63}$"

executions[].side Required
string

enum: ["buy", "sell"]

executions[].quantity Required
string

Exact decimal string; at most 22 integer and 8 fractional digits. No JSON numbers or exponent notation. Must be positive; futures quantities must be integral. pattern: "^-?(?:0|[1-9][0-9]{0,21})(?:\\.[0-9]{1,8})?$"

executions[].native_price Required
string

Exact decimal string; at most 22 integer and 8 fractional digits. No JSON numbers or exponent notation. Stocks must be positive; futures must align to the trusted contract tick. pattern: "^-?(?:0|[1-9][0-9]{0,21})(?:\\.[0-9]{1,8})?$"

executions[].native_currency Required
string

const: "USD"

executions[].base_commission Required
string

Exact decimal string; at most 22 integer and 8 fractional digits. No JSON numbers or exponent notation. Nonnegative charge in account USD; zero is explicit. pattern: "^-?(?:0|[1-9][0-9]{0,21})(?:\\.[0-9]{1,8})?$"

executions[].base_fees Required
string

Exact decimal string; at most 22 integer and 8 fractional digits. No JSON numbers or exponent notation. Nonnegative charge in account USD; zero is explicit. pattern: "^-?(?:0|[1-9][0-9]{0,21})(?:\\.[0-9]{1,8})?$"

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "executions": {
      "description": "No repeated source_execution_id in one batch. NT sequences must also be unique.",
      "items": {
        "$ref": "#/components/schemas/JournalExecution"
      },
      "maxItems": 500,
      "minItems": 1,
      "type": "array"
    },
    "mode": {
      "const": "append",
      "type": "string"
    },
    "schema_version": {
      "const": 3,
      "type": "integer"
    }
  },
  "required": [
    "schema_version",
    "account_id",
    "mode",
    "executions"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "executions": [
    {
      "base_commission": "0.25",
      "base_fees": "0",
      "executed_at": "2026-09-13T12:00:00Z",
      "instrument": {
        "asset_type": "stock",
        "symbol": "AAPL.US"
      },
      "native_currency": "USD",
      "native_price": "180.50",
      "quantity": "2",
      "side": "buy",
      "source_execution_id": "example-fill-1001",
      "source_sequence": null
    }
  ],
  "mode": "append",
  "schema_version": 3
}

Responses

HTTP 202

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Example response

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "analytics_pending": true,
  "data_version": 1,
  "operation_id": "00000000-0000-4000-8000-000000000002",
  "projection_only": false,
  "record_count": 1,
  "status": "applied",
  "target": "journal"
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
string

enum: ["accepted", "processing", "blocked", "rejected", "applied"]

record_count Required
integer

Receipt record count, not proof of this many newly inserted native rows on a replay. minimum: 1 maximum: 500

projection_only Required
boolean

const: false

target Required
string

const: "journal"

data_version Required
integer | null

Positive committed data version only for applied; otherwise null. minimum: 1

analytics_pending Required
boolean

Applied native rows may still await deferred analytics such as MAE/MFE. Stored applied_analytics_pending is exposed as status=applied and analytics_pending=true.

application_error Optional
object

additionalProperties: false

application_error.code Required
string
application_error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "analytics_pending": {
      "description": "Applied native rows may still await deferred analytics such as MAE/MFE. Stored applied_analytics_pending is exposed as status=applied and analytics_pending=true.",
      "type": "boolean"
    },
    "application_error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "data_version": {
      "description": "Positive committed data version only for applied; otherwise null.",
      "minimum": 1,
      "type": [
        "integer",
        "null"
      ]
    },
    "operation_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "projection_only": {
      "const": false,
      "type": "boolean"
    },
    "record_count": {
      "description": "Receipt record count, not proof of this many newly inserted native rows on a replay.",
      "maximum": 500,
      "minimum": 1,
      "type": "integer"
    },
    "status": {
      "enum": [
        "accepted",
        "processing",
        "blocked",
        "rejected",
        "applied"
      ],
      "type": "string"
    },
    "target": {
      "const": "journal",
      "type": "string"
    }
  },
  "required": [
    "operation_id",
    "account_id",
    "status",
    "record_count",
    "projection_only",
    "target",
    "data_version",
    "analytics_pending"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
GET

Recover an import receipt

https://api.tradesviz.com/api/v2/journal/execution-imports/{operation_id}

Scoped access: executions.write. Recovering a receipt can finish an accepted import.

Use the same Basic identity, account, client instance and connector as submission. This GET is not a passive status read: an authorized poll may resume pending application. Preserve receipts and use bounded polling. No query string or body. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

ninjatrader is an ordered stream; python is batch delivery. Preserve the connector across retries. Required only for Basic authentication. API keys use their own credential identity. enum: ["ninjatrader", "python"]

X-TradesViz-Account Required
string · header

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

operation_id Required
string · path

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Example response

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "analytics_pending": true,
  "data_version": 1,
  "operation_id": "00000000-0000-4000-8000-000000000002",
  "projection_only": false,
  "record_count": 1,
  "status": "applied",
  "target": "journal"
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
string

enum: ["accepted", "processing", "blocked", "rejected", "applied"]

record_count Required
integer

Receipt record count, not proof of this many newly inserted native rows on a replay. minimum: 1 maximum: 500

projection_only Required
boolean

const: false

target Required
string

const: "journal"

data_version Required
integer | null

Positive committed data version only for applied; otherwise null. minimum: 1

analytics_pending Required
boolean

Applied native rows may still await deferred analytics such as MAE/MFE. Stored applied_analytics_pending is exposed as status=applied and analytics_pending=true.

application_error Optional
object

additionalProperties: false

application_error.code Required
string
application_error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "analytics_pending": {
      "description": "Applied native rows may still await deferred analytics such as MAE/MFE. Stored applied_analytics_pending is exposed as status=applied and analytics_pending=true.",
      "type": "boolean"
    },
    "application_error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    },
    "data_version": {
      "description": "Positive committed data version only for applied; otherwise null.",
      "minimum": 1,
      "type": [
        "integer",
        "null"
      ]
    },
    "operation_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "projection_only": {
      "const": false,
      "type": "boolean"
    },
    "record_count": {
      "description": "Receipt record count, not proof of this many newly inserted native rows on a replay.",
      "maximum": 500,
      "minimum": 1,
      "type": "integer"
    },
    "status": {
      "enum": [
        "accepted",
        "processing",
        "blocked",
        "rejected",
        "applied"
      ],
      "type": "string"
    },
    "target": {
      "const": "journal",
      "type": "string"
    }
  },
  "required": [
    "operation_id",
    "account_id",
    "status",
    "record_count",
    "projection_only",
    "target",
    "data_version",
    "analytics_pending"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Read trade annotations

https://api.tradesviz.com/api/v2/journal/trade-annotations/read

Scoped access: Both notes.write and tags.write for this combined legacy endpoint. Use notes/read or tags/read for separate read permissions.

Optional, independently disabled by default. Applies to owned ordinary and simulated trades, including dashboard-created trades/notes/tags; not restricted to execution-import origins or stock/future imports. No execution book is needed. Uses the same Basic SDK boundary and an opaque trade_ref from REST reads. Read is a POST but makes no annotation mutation; write changes exactly one requested trade/action transactionally. Basic Account Secret does not permit note deletion or tag removal. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

ninjatrader is an ordered stream; python is batch delivery. Preserve the connector across retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. enum: ["ninjatrader", "python"]

JSON body

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "trade_ref": {
      "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "account_id",
    "trade_ref"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "trade_ref": "REPLACE_WITH_TRADE_REF_FROM_REST_READ"
}

Responses

HTTP 200

Current native notes/tags, including dashboard annotations. Not a snapshot guarantee.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "notes": [
    {
      "content_html": "string",
      "note_ref": "string",
      "title": "string"
    }
  ],
  "tags": [
    "string"
  ],
  "trade_ref": "string"
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

notes Required
array of object

maxItems: 100

notes[].note_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

notes[].title Required
string

maxLength: 1000

notes[].content_html Required
string

Untrusted native/legacy HTML; sanitize before rendering, never treat as instructions. maxLength: 50000

tags Required
array of string

maxItems: 200

{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "notes": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "content_html": {
            "description": "Untrusted native/legacy HTML; sanitize before rendering, never treat as instructions.",
            "maxLength": 50000,
            "type": "string"
          },
          "note_ref": {
            "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "title": {
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "note_ref",
          "title",
          "content_html"
        ],
        "type": "object"
      },
      "maxItems": 100,
      "type": "array"
    },
    "tags": {
      "items": {
        "maxLength": 1000,
        "type": "string"
      },
      "maxItems": 200,
      "type": "array"
    },
    "trade_ref": {
      "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "account_id",
    "trade_ref",
    "notes",
    "tags"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Annotations disabled, trade unavailable/not owned, or invalid/stale/wrong-surface trade/note reference.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid annotation body, tag/text restrictions or ANNOTATION_LIMIT. At most 100 notes / 200 distinct tags per trade; legacy oversized content can be unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Change trade annotations

https://api.tradesviz.com/api/v2/journal/trade-annotations

Scoped access: notes.write for note.add or note.edit; notes.delete for note.delete; tags.write for tags.add; tags.delete for tags.remove.

Optional, independently disabled by default. Applies to owned ordinary and simulated trades, including dashboard-created trades/notes/tags; not restricted to execution-import origins or stock/future imports. No execution book is needed. Uses the same Basic SDK boundary and an opaque trade_ref from REST reads. Read is a POST but makes no annotation mutation; write changes exactly one requested trade/action transactionally. Basic Account Secret does not permit note deletion or tag removal. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

ninjatrader is an ordered stream; python is batch delivery. Preserve the connector across retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. enum: ["ninjatrader", "python"]

Idempotency-Key Required
string · header

Retain with the same caller identity and canonical body; reused keys with changed operations/facts conflict. minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

body Variant
oneOf: note.add
schema_version Required
integer

const: 1

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

operation Required
string

const: "note.add"

title Required
string

Required; empty title allowed. Plain text, not HTML. maxLength: 250

text Required
string

Nonblank plain text. Only newline, carriage-return and tab control characters allowed. HTML-escaped on storage; encoded storage limits also apply. minLength: 1 maxLength: 20000

body Variant
oneOf: note.edit
schema_version Required
integer

const: 1

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

operation Required
string

const: "note.edit"

note_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

title Required
string

Required; empty title allowed. Plain text, not HTML. maxLength: 250

text Required
string

Nonblank plain text. Only newline, carriage-return and tab control characters allowed. HTML-escaped on storage; encoded storage limits also apply. minLength: 1 maxLength: 20000

body Variant
oneOf: note.delete
schema_version Required
integer

const: 1

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

operation Required
string

const: "note.delete"

note_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

body Variant
oneOf: tags.add
schema_version Required
integer

const: 1

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

operation Required
string

const: "tags.add"

tags Required
array of string

Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order. minItems: 1 maxItems: 20 uniqueItems: true

body Variant
oneOf: tags.remove
schema_version Required
integer

const: 1

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

operation Required
string

const: "tags.remove"

tags Required
array of string

Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order. minItems: 1 maxItems: 20 uniqueItems: true

Full request schema
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation": {
          "const": "note.add",
          "type": "string"
        },
        "schema_version": {
          "const": 1,
          "type": "integer"
        },
        "text": {
          "description": "Nonblank plain text. Only newline, carriage-return and tab control characters allowed. HTML-escaped on storage; encoded storage limits also apply.",
          "maxLength": 20000,
          "minLength": 1,
          "type": "string"
        },
        "title": {
          "description": "Required; empty title allowed. Plain text, not HTML.",
          "maxLength": 250,
          "type": "string"
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "trade_ref",
        "operation",
        "title",
        "text"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "note_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "operation": {
          "const": "note.edit",
          "type": "string"
        },
        "schema_version": {
          "const": 1,
          "type": "integer"
        },
        "text": {
          "description": "Nonblank plain text. Only newline, carriage-return and tab control characters allowed. HTML-escaped on storage; encoded storage limits also apply.",
          "maxLength": 20000,
          "minLength": 1,
          "type": "string"
        },
        "title": {
          "description": "Required; empty title allowed. Plain text, not HTML.",
          "maxLength": 250,
          "type": "string"
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "trade_ref",
        "operation",
        "note_ref",
        "title",
        "text"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "note_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "operation": {
          "const": "note.delete",
          "type": "string"
        },
        "schema_version": {
          "const": 1,
          "type": "integer"
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "trade_ref",
        "operation",
        "note_ref"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation": {
          "const": "tags.add",
          "type": "string"
        },
        "schema_version": {
          "const": 1,
          "type": "integer"
        },
        "tags": {
          "description": "Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order.",
          "items": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 20,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "trade_ref",
        "operation",
        "tags"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "operation": {
          "const": "tags.remove",
          "type": "string"
        },
        "schema_version": {
          "const": 1,
          "type": "integer"
        },
        "tags": {
          "description": "Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order.",
          "items": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 20,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "trade_ref",
        "operation",
        "tags"
      ],
      "type": "object"
    }
  ]
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "operation": "note.add",
  "schema_version": 1,
  "text": "Followed the entry plan.",
  "title": "Review",
  "trade_ref": "REPLACE_WITH_TRADE_REF_FROM_REST_READ"
}

Responses

HTTP 200

Committed annotation mutation or its retained idempotent result. No execution data_version or polling endpoint is returned.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "changed": 1,
  "note_ref": "string",
  "operation": "note.add",
  "operation_id": "00000000-0000-4000-8000-000000000001",
  "status": "applied",
  "trade_ref": "string"
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
body Variant
oneOf: 1
operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
string

const: "applied"

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

changed Required
integer

const: 1

operation Required
string

enum: ["note.add", "note.edit", "note.delete"]

note_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

body Variant
oneOf: 2
operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
string

const: "applied"

account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

trade_ref Required
string

Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild. minLength: 1 maxLength: 1024

changed Required
integer

Changed native annotation rows; tag removal can include existing duplicate attachments. minimum: 0

operation Required
string

enum: ["tags.add", "tags.remove"]

tags Required
array of string

Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order. minItems: 1 maxItems: 20 uniqueItems: true

{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "changed": {
          "const": 1,
          "type": "integer"
        },
        "note_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "operation": {
          "enum": [
            "note.add",
            "note.edit",
            "note.delete"
          ],
          "type": "string"
        },
        "operation_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "status": {
          "const": "applied",
          "type": "string"
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "status",
        "account_id",
        "trade_ref",
        "changed",
        "operation",
        "note_ref"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "changed": {
          "description": "Changed native annotation rows; tag removal can include existing duplicate attachments.",
          "minimum": 0,
          "type": "integer"
        },
        "operation": {
          "enum": [
            "tags.add",
            "tags.remove"
          ],
          "type": "string"
        },
        "operation_id": {
          "description": "Canonical lowercase, nonzero UUID.",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "status": {
          "const": "applied",
          "type": "string"
        },
        "tags": {
          "description": "Explicit labels without surrounding whitespace, HTML delimiters, quotes, backticks or control characters. Case-sensitive; canonicalized into sorted order.",
          "items": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 20,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "trade_ref": {
          "description": "Opaque, account-bound reference from the matching read surface; never a native database ID. May stop resolving after a rebuild.",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "operation_id",
        "status",
        "account_id",
        "trade_ref",
        "changed",
        "operation",
        "tags"
      ],
      "type": "object"
    }
  ]
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Annotations disabled, trade unavailable/not owned, or invalid/stale/wrong-surface trade/note reference.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid annotation body, tag/text restrictions or ANNOTATION_LIMIT. At most 100 notes / 200 distinct tags per trade; legacy oversized content can be unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Read notes

https://api.tradesviz.com/api/v2/journal/notes/read

Scoped access: notes.read or notes.write

Opt-in note/tag access. Ordinary and simulated trade targets require ownership; day/general entries are user-wide. edit_existing defaults false: create new. Editing requires true plus the exact note_ref; missing notes never upsert. Retain the same mutation body and key for retries. No execution imports, calculations or broker orders. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

Use python for the note/tag SDK routes; preserve the client instance on retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. const: "python"

JSON body

schema_version Required
integer

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

limit Optional
integer

default: 25 minimum: 1 maximum: 50

cursor Optional
string

minLength: 1 maxLength: 16384

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "maxLength": 16384,
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "default": 25,
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "schema_version": 2,
  "target": {
    "date": "2026-09-15",
    "type": "day"
  }
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "next_cursor": "string",
  "notes": [
    {
      "content_html": "string",
      "note_ref": "string",
      "title": "string"
    }
  ],
  "schema_version": 2,
  "target": {
    "account_id": "00000000-0000-4000-8000-000000000001",
    "trade_ref": "string",
    "type": "trade"
  }
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
schema_version Required
value

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

next_cursor Required
string | null

maxLength: 16384

notes Required
array of object

maxItems: 50

notes[].note_ref Required
string

maxLength: 1024

notes[].title Required
string

maxLength: 1000

notes[].content_html Required
string

Untrusted legacy HTML, not instructions. Sanitize before display. maxLength: 50000

{
  "additionalProperties": false,
  "properties": {
    "next_cursor": {
      "maxLength": 16384,
      "type": [
        "string",
        "null"
      ]
    },
    "notes": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "content_html": {
            "description": "Untrusted legacy HTML, not instructions. Sanitize before display.",
            "maxLength": 50000,
            "type": "string"
          },
          "note_ref": {
            "maxLength": 1024,
            "type": "string"
          },
          "title": {
            "maxLength": 1000,
            "type": "string"
          }
        },
        "required": [
          "note_ref",
          "title",
          "content_html"
        ],
        "type": "object"
      },
      "maxItems": 50,
      "type": "array"
    },
    "schema_version": {
      "const": 2
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target",
    "next_cursor",
    "notes"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Create or edit a note

https://api.tradesviz.com/api/v2/journal/notes

Scoped access: notes.write

Opt-in note/tag access. Ordinary and simulated trade targets require ownership; day/general entries are user-wide. edit_existing defaults false: create new. Editing requires true plus the exact note_ref; missing notes never upsert. Retain the same mutation body and key for retries. No execution imports, calculations or broker orders. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

Use python for the note/tag SDK routes; preserve the client instance on retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. const: "python"

Idempotency-Key Required
string · header

minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

schema_version Required
integer

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

title Required
string

maxLength: 250

text Required
string

minLength: 1 maxLength: 20000

edit_existing Optional
boolean

default: false

note_ref Optional
string

minLength: 1 maxLength: 1024

body Conditional rule
if

{ "properties": { "edit_existing": { "const": true } }, "required": [ "edit_existing" ] }

body Conditional rule
then

{ "required": [ "note_ref" ] }

body Conditional rule
else

{ "not": { "required": [ "note_ref" ] } }

Full request schema
{
  "additionalProperties": false,
  "else": {
    "not": {
      "required": [
        "note_ref"
      ]
    }
  },
  "if": {
    "properties": {
      "edit_existing": {
        "const": true
      }
    },
    "required": [
      "edit_existing"
    ]
  },
  "properties": {
    "edit_existing": {
      "default": false,
      "type": "boolean"
    },
    "note_ref": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    },
    "text": {
      "maxLength": 20000,
      "minLength": 1,
      "type": "string"
    },
    "title": {
      "maxLength": 250,
      "type": "string"
    }
  },
  "required": [
    "schema_version",
    "target",
    "title",
    "text"
  ],
  "then": {
    "required": [
      "note_ref"
    ]
  },
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "edit_existing": false,
  "schema_version": 2,
  "target": {
    "date": "2026-09-15",
    "type": "day"
  },
  "text": "Followed the risk plan.",
  "title": "Daily review"
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "action": "notes.save",
  "changed": 0,
  "note_ref": "string",
  "operation_id": "00000000-0000-4000-8000-000000000001",
  "schema_version": 2,
  "status": "applied",
  "target": {
    "account_id": "00000000-0000-4000-8000-000000000001",
    "trade_ref": "string",
    "type": "trade"
  }
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
schema_version Required
value

const: 2

operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
value

const: "applied"

account_id Required
string | null

format: "uuid"

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

action Required
value

const: "notes.save"

changed Required
integer

minimum: 0

note_ref Required
string

maxLength: 1024

{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "action": {
      "const": "notes.save"
    },
    "changed": {
      "minimum": 0,
      "type": "integer"
    },
    "note_ref": {
      "maxLength": 1024,
      "type": "string"
    },
    "operation_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "schema_version": {
      "const": 2
    },
    "status": {
      "const": "applied"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "operation_id",
    "status",
    "account_id",
    "target",
    "action",
    "changed",
    "note_ref"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Delete a note

https://api.tradesviz.com/api/v2/journal/notes/delete

Scoped access: notes.delete

Opt-in note/tag access. Ordinary and simulated trade targets require ownership; day/general entries are user-wide. edit_existing defaults false: create new. Editing requires true plus the exact note_ref; missing notes never upsert. Retain the same mutation body and key for retries. No execution imports, calculations or broker orders. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

Use python for the note/tag SDK routes; preserve the client instance on retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. const: "python"

Idempotency-Key Required
string · header

minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

schema_version Required
integer

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

note_ref Required
string

minLength: 1 maxLength: 1024

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "note_ref": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target",
    "note_ref"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "note_ref": "REPLACE_WITH_NOTE_REF_FROM_REST_READ",
  "schema_version": 2,
  "target": {
    "date": "2026-09-15",
    "type": "day"
  }
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "action": "notes.delete",
  "changed": 0,
  "note_ref": "string",
  "operation_id": "00000000-0000-4000-8000-000000000001",
  "schema_version": 2,
  "status": "applied",
  "target": {
    "account_id": "00000000-0000-4000-8000-000000000001",
    "trade_ref": "string",
    "type": "trade"
  }
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
schema_version Required
value

const: 2

operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
value

const: "applied"

account_id Required
string | null

format: "uuid"

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

target Variant
oneOf: misc
target.type Required
value

const: "misc"

action Required
value

const: "notes.delete"

changed Required
integer

minimum: 0

note_ref Required
string

maxLength: 1024

{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "action": {
      "const": "notes.delete"
    },
    "changed": {
      "minimum": 0,
      "type": "integer"
    },
    "note_ref": {
      "maxLength": 1024,
      "type": "string"
    },
    "operation_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "schema_version": {
      "const": 2
    },
    "status": {
      "const": "applied"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "type": {
              "const": "misc"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "operation_id",
    "status",
    "account_id",
    "target",
    "action",
    "changed",
    "note_ref"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Read tags

https://api.tradesviz.com/api/v2/journal/tags/read

Scoped access: tags.read or tags.write

Opt-in note/tag access. Ordinary and simulated trade targets require ownership; day/general entries are user-wide. edit_existing defaults false: create new. Editing requires true plus the exact note_ref; missing notes never upsert. Retain the same mutation body and key for retries. No execution imports, calculations or broker orders. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

Use python for the note/tag SDK routes; preserve the client instance on retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. const: "python"

JSON body

schema_version Required
integer

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

limit Optional
integer

default: 25 minimum: 1 maximum: 50

cursor Optional
string

minLength: 1 maxLength: 16384

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "cursor": {
      "maxLength": 16384,
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "default": 25,
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "schema_version": 2,
  "target": {
    "date": "2026-09-15",
    "type": "day"
  }
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "next_cursor": "string",
  "schema_version": 2,
  "tags": [
    "string"
  ],
  "target": {
    "account_id": "00000000-0000-4000-8000-000000000001",
    "trade_ref": "string",
    "type": "trade"
  }
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
schema_version Required
value

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

next_cursor Required
string | null

maxLength: 16384

tags Required
array of string

maxItems: 50

{
  "additionalProperties": false,
  "properties": {
    "next_cursor": {
      "maxLength": 16384,
      "type": [
        "string",
        "null"
      ]
    },
    "schema_version": {
      "const": 2
    },
    "tags": {
      "items": {
        "maxLength": 1000,
        "type": "string"
      },
      "maxItems": 50,
      "type": "array"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target",
    "next_cursor",
    "tags"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Add or remove tags

https://api.tradesviz.com/api/v2/journal/tags

Scoped access: tags.write to add tags; tags.delete to remove tags. Write access alone never permits removal.

Opt-in note/tag access. Ordinary and simulated trade targets require ownership; day/general entries are user-wide. edit_existing defaults false: create new. Editing requires true plus the exact note_ref; missing notes never upsert. Retain the same mutation body and key for retries. No execution imports, calculations or broker orders. OAuth requires notes.delete to delete a note and tags.delete to remove tag attachments. Write scopes alone never permit deletion. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

X-TradesViz-Client-Instance Optional
string · header

Stable client installation/mapping identity. Never regenerate to escape an error. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

X-TradesViz-Connector Optional
string · header

Use python for the note/tag SDK routes; preserve the client instance on retries. Required only for Basic authentication. OAuth uses the consent identity; API keys use their own credential identity. const: "python"

Idempotency-Key Required
string · header

minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

schema_version Required
integer

const: 2

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

operation Required
string

enum: ["add", "remove"]

tags Required
array of string

minItems: 1 maxItems: 20 uniqueItems: true

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "operation": {
      "enum": [
        "add",
        "remove"
      ],
      "type": "string"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "tags": {
      "items": {
        "maxLength": 100,
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 20,
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "target",
    "operation",
    "tags"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "operation": "add",
  "schema_version": 2,
  "tags": [
    "Reviewed"
  ],
  "target": {
    "date": "2026-09-15",
    "type": "day"
  }
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "action": "tags.mutate",
  "changed": 0,
  "operation_id": "00000000-0000-4000-8000-000000000001",
  "schema_version": 2,
  "status": "applied",
  "tags": [
    "string"
  ],
  "target": {
    "account_id": "00000000-0000-4000-8000-000000000001",
    "trade_ref": "string",
    "type": "trade"
  }
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
schema_version Required
value

const: 2

operation_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

status Required
value

const: "applied"

account_id Required
string | null

format: "uuid"

target Required
value
target Variant
oneOf: trade
target.type Required
value

const: "trade"

target.account_id Required
string

format: "uuid"

target.trade_ref Required
string

minLength: 1 maxLength: 1024

target Variant
oneOf: day
target.type Required
value

const: "day"

target.date Required
string

format: "date" pattern: "^\\d{4}-\\d{2}-\\d{2}$"

action Required
value

const: "tags.mutate"

changed Required
integer

minimum: 0

tags Required
array of string

maxItems: 20

{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "action": {
      "const": "tags.mutate"
    },
    "changed": {
      "minimum": 0,
      "type": "integer"
    },
    "operation_id": {
      "description": "Canonical lowercase, nonzero UUID.",
      "format": "uuid",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      "type": "string"
    },
    "schema_version": {
      "const": 2
    },
    "status": {
      "const": "applied"
    },
    "tags": {
      "items": {
        "maxLength": 100,
        "type": "string"
      },
      "maxItems": 20,
      "type": "array"
    },
    "target": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "account_id": {
              "format": "uuid",
              "type": "string"
            },
            "trade_ref": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "type": {
              "const": "trade"
            }
          },
          "required": [
            "type",
            "account_id",
            "trade_ref"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "date": {
              "format": "date",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            },
            "type": {
              "const": "day"
            }
          },
          "required": [
            "type",
            "date"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "schema_version",
    "operation_id",
    "status",
    "account_id",
    "target",
    "action",
    "changed",
    "tags"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Accounts for notes and tags

https://api.tradesviz.com/api/v2/journal/annotations/accounts

Scoped access: API key: trades.read. This discovers accounts for annotations without enrolling an import source.

List owned accounts using the same journal access requirements as /accounts. No execution enrollment is needed. Send {}. Basic Account Secret does not permit note deletion or tag removal. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key. API keys require trades.read for annotation discovery, or executions.write for import discovery.

Authentication options

Legacy Account Secret: Email and existing Account Secret over HTTPS. No delete or management authority; never paste credentials into chat.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

No query, path or custom header parameters.

JSON body

Full request schema
{
  "additionalProperties": false,
  "properties": {},
  "required": [],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "accounts": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "name": "string"
    }
  ]
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
accounts Required
array of object
accounts[].account_id Required
string

Canonical lowercase, nonzero UUID. format: "uuid" pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"

accounts[].name Required
string
{
  "additionalProperties": false,
  "properties": {
    "accounts": {
      "items": {
        "$ref": "#/components/schemas/JournalAccount"
      },
      "type": "array"
    }
  },
  "required": [
    "accounts"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Idempotency or immutable execution facts conflict. Reconcile; do not invent new IDs.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Preview a journal change

https://api.tradesviz.com/api/v2/journal/management/prepare

Scoped access: Depends on the command: trades.write for trade edits, splits and merges; executions.edit for execution edits; trades.delete or executions.delete for deletion; tags.delete for global tag deletion. Cascading deletions also require the matching note, tag, execution and trade delete permissions.

Preview an explicit edit, deletion, split, merge or global tag deletion. No journal mutations. Requires the operation scope and every cascading delete scope. Review preview before committing; valid for five minutes. If the same request was already committed, returns its receipt with replayed:true instead of a new preview. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

Idempotency-Key Required
string · header

minLength: 16 maxLength: 128 pattern: "^[!-~]{16,128}$"

JSON body

body Variant
oneOf: trade.edit
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "trade.edit"

trade_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

changes Required
object

minProperties: 1 additionalProperties: false

changes.stop_loss Optional
string | null

Exact decimal string; null clears this target.

changes.profit_target Optional
string | null

Exact decimal string; null clears this target.

changes.initial_risk Optional
string | null

Exact decimal string; null clears this target.

changes.is_locked Optional
boolean
body Variant
oneOf: execution.edit
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "execution.edit"

trade_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

execution_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

changes Required
object

minProperties: 1 additionalProperties: false

changes.quantity Optional
string

Exact decimal string; null clears this target.

changes.commission Optional
string

Exact decimal string; null clears this target.

changes.fees Optional
string

Exact decimal string; null clears this target.

changes.native_price Optional
string

Exact decimal string; null clears this target.

changes.executed_at Optional
string

format: "date-time"

changes.side Optional
value

enum: ["buy", "sell"]

body Variant
oneOf: execution.delete
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "execution.delete"

trade_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

execution_refs Required
array of string

minItems: 1 maxItems: 500 uniqueItems: true

body Variant
oneOf: trade.delete
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "trade.delete"

trade_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

body Variant
oneOf: trade.split
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "trade.split"

trade_refs Required
array of string

minItems: 1 maxItems: 1 uniqueItems: true

execution_refs Required
array of string

minItems: 1 maxItems: 500 uniqueItems: true

body Variant
oneOf: trades.merge
schema_version Required
value

const: 1

account_id Required
string

format: "uuid"

operation Required
value

const: "trades.merge"

trade_refs Required
array of string

minItems: 2 maxItems: 10 uniqueItems: true

body Variant
oneOf: tag.delete_global
schema_version Required
value

const: 1

account_id Required
null
operation Required
value

const: "tag.delete_global"

tag Required
string

minLength: 1 maxLength: 128

Full request schema
{
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "changes": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "initial_risk": {
              "description": "Exact decimal string; null clears this target.",
              "type": [
                "string",
                "null"
              ]
            },
            "is_locked": {
              "type": "boolean"
            },
            "profit_target": {
              "description": "Exact decimal string; null clears this target.",
              "type": [
                "string",
                "null"
              ]
            },
            "stop_loss": {
              "description": "Exact decimal string; null clears this target.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": "object"
        },
        "operation": {
          "const": "trade.edit"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs",
        "changes"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "changes": {
          "additionalProperties": false,
          "minProperties": 1,
          "properties": {
            "commission": {
              "description": "Exact decimal string; null clears this target.",
              "type": "string"
            },
            "executed_at": {
              "format": "date-time",
              "type": "string"
            },
            "fees": {
              "description": "Exact decimal string; null clears this target.",
              "type": "string"
            },
            "native_price": {
              "description": "Exact decimal string; null clears this target.",
              "type": "string"
            },
            "quantity": {
              "description": "Exact decimal string; null clears this target.",
              "type": "string"
            },
            "side": {
              "enum": [
                "buy",
                "sell"
              ]
            }
          },
          "type": "object"
        },
        "execution_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "operation": {
          "const": "execution.edit"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs",
        "execution_refs",
        "changes"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "execution_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 500,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "operation": {
          "const": "execution.delete"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs",
        "execution_refs"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "operation": {
          "const": "trade.delete"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "execution_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 500,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "operation": {
          "const": "trade.split"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs",
        "execution_refs"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": "string"
        },
        "operation": {
          "const": "trades.merge"
        },
        "schema_version": {
          "const": 1
        },
        "trade_refs": {
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 2,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "trade_refs"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "account_id": {
          "type": "null"
        },
        "operation": {
          "const": "tag.delete_global"
        },
        "schema_version": {
          "const": 1
        },
        "tag": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "schema_version",
        "account_id",
        "operation",
        "tag"
      ],
      "type": "object"
    }
  ]
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "changes": {
    "stop_loss": "170.00"
  },
  "operation": "trade.edit",
  "schema_version": 1,
  "trade_refs": [
    "REPLACE_WITH_TRADE_REF_FROM_REST_READ"
  ]
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "expires_in": 300,
  "intent_token": "string",
  "preview": {
    "after": [
      {
        "base_net_pnl": 0,
        "symbol": "string",
        "total_executions": 0,
        "total_remaining_quantity": 0,
        "trade_position": "string",
        "trade_ref": "string"
      }
    ],
    "before": [
      {
        "base_net_pnl": 0,
        "symbol": "string",
        "total_executions": 0,
        "total_remaining_quantity": 0,
        "trade_position": "string",
        "trade_ref": "string"
      }
    ],
    "changes": {},
    "deleted_executions": 0,
    "deleted_trades": 0,
    "execution_order_policy": "string",
    "metadata_policy": "string",
    "notes_deleted": 0,
    "notes_moved": 0,
    "operation": "string",
    "required_scopes": [
      "string"
    ],
    "tags_deleted": 0
  },
  "writes_performed": false
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
body Variant
oneOf: 1
preview Required
value
preview Variant
oneOf: 1
preview.operation Required
string
preview.required_scopes Required
array of string
preview.before Required
array of object
preview.before[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

preview.before[].symbol Required
string | null
preview.before[].trade_position Required
string | null
preview.before[].total_executions Required
integer | null
preview.before[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

preview.before[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

preview.after Required
array of object
preview.after[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

preview.after[].symbol Required
string | null
preview.after[].trade_position Required
string | null
preview.after[].total_executions Required
integer | null
preview.after[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

preview.after[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

preview.changes Required
object
preview.deleted_executions Required
integer

minimum: 0

preview.deleted_trades Required
integer

minimum: 0

preview.notes_moved Required
integer

minimum: 0

preview.notes_deleted Required
integer

minimum: 0

preview.tags_deleted Required
integer

minimum: 0

preview.execution_order_policy Required
string
preview.metadata_policy Required
string
preview Variant
oneOf: tag.delete_global
preview.operation Required
value

const: "tag.delete_global"

preview.tag Required
string
preview.required_scopes Required
array of string
preview.trade_attachments Required
integer

minimum: 0

preview.day_attachments Required
integer

minimum: 0

preview.affected_accounts Required
array of string
preview.scope Required
string
intent_token Required
string
expires_in Required
integer

const: 300

writes_performed Required
value

const: false

body Variant
oneOf: 2
body Variant
oneOf: 1
operation_id Required
string

format: "uuid"

account_id Required
string | null

format: "uuid"

status Required
value

const: "applied"

data_version Required
integer | null
analytics_pending Required
value

const: true

replayed Optional
boolean
operation Required
string
required_scopes Required
array of string
before Required
array of object
before[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

before[].symbol Required
string | null
before[].trade_position Required
string | null
before[].total_executions Required
integer | null
before[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

before[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

after Required
array of object
after[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

after[].symbol Required
string | null
after[].trade_position Required
string | null
after[].total_executions Required
integer | null
after[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

after[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

changes Required
object
deleted_executions Required
integer

minimum: 0

deleted_trades Required
integer

minimum: 0

notes_moved Required
integer

minimum: 0

notes_deleted Required
integer

minimum: 0

tags_deleted Required
integer

minimum: 0

execution_order_policy Required
string
metadata_policy Required
string
body Variant
oneOf: tag.delete_global
operation_id Required
string

format: "uuid"

account_id Required
string | null

format: "uuid"

status Required
value

const: "applied"

data_version Required
integer | null
analytics_pending Required
value

const: true

replayed Optional
boolean
operation Required
value

const: "tag.delete_global"

tag Required
string
required_scopes Required
array of string
trade_attachments Required
integer

minimum: 0

day_attachments Required
integer

minimum: 0

affected_accounts Required
array of string
scope Required
string
{
  "description": "A new request returns a preview. Retrying an already committed request returns its receipt with replayed:true, without applying the change again.",
  "oneOf": [
    {
      "properties": {
        "expires_in": {
          "const": 300,
          "type": "integer"
        },
        "intent_token": {
          "type": "string"
        },
        "preview": {
          "$ref": "#/components/schemas/JournalManagementPreview"
        },
        "writes_performed": {
          "const": false
        }
      },
      "required": [
        "preview",
        "intent_token",
        "expires_in",
        "writes_performed"
      ],
      "type": "object"
    },
    {
      "$ref": "#/components/schemas/JournalManagementCommitResult"
    }
  ]
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Stale preview, incompatible merge, or changed request using the same key. Fetch current data and obtain new confirmation.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Commit a journal change

https://api.tradesviz.com/api/v2/journal/management/commit

Scoped access: The same operation and cascading delete permissions as the approved preview. Permissions are checked again at commit.

Commit the confirmed signed preview. Data/settings changes reject stale previews. Repeat the identical intent after a timeout; never generate a fresh identity to force a retry. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

No query, path or custom header parameters.

JSON body

account_id Required
string | null

format: "uuid"

operation Required
value

enum: ["trade.edit", "execution.edit", "execution.delete", "trade.delete", "trade.split", "trades.merge", "tag.delete_global"]

intent_token Required
string

maxLength: 60000

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "intent_token": {
      "maxLength": 60000,
      "type": "string"
    },
    "operation": {
      "enum": [
        "trade.edit",
        "execution.edit",
        "execution.delete",
        "trade.delete",
        "trade.split",
        "trades.merge",
        "tag.delete_global"
      ]
    }
  },
  "required": [
    "account_id",
    "operation",
    "intent_token"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "intent_token": "REPLACE_WITH_CONFIRMED_PREPARE_INTENT",
  "operation": "trade.edit"
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "after": [
    {
      "base_net_pnl": 0,
      "symbol": "string",
      "total_executions": 0,
      "total_remaining_quantity": 0,
      "trade_position": "string",
      "trade_ref": "string"
    }
  ],
  "analytics_pending": true,
  "before": [
    {
      "base_net_pnl": 0,
      "symbol": "string",
      "total_executions": 0,
      "total_remaining_quantity": 0,
      "trade_position": "string",
      "trade_ref": "string"
    }
  ],
  "changes": {},
  "data_version": 0,
  "deleted_executions": 0,
  "deleted_trades": 0,
  "execution_order_policy": "string",
  "metadata_policy": "string",
  "notes_deleted": 0,
  "notes_moved": 0,
  "operation": "string",
  "operation_id": "00000000-0000-4000-8000-000000000001",
  "replayed": false,
  "required_scopes": [
    "string"
  ],
  "status": "applied",
  "tags_deleted": 0
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
body Variant
oneOf: 1
operation_id Required
string

format: "uuid"

account_id Required
string | null

format: "uuid"

status Required
value

const: "applied"

data_version Required
integer | null
analytics_pending Required
value

const: true

replayed Optional
boolean
operation Required
string
required_scopes Required
array of string
before Required
array of object
before[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

before[].symbol Required
string | null
before[].trade_position Required
string | null
before[].total_executions Required
integer | null
before[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

before[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

after Required
array of object
after[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

after[].symbol Required
string | null
after[].trade_position Required
string | null
after[].total_executions Required
integer | null
after[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

after[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

changes Required
object
deleted_executions Required
integer

minimum: 0

deleted_trades Required
integer

minimum: 0

notes_moved Required
integer

minimum: 0

notes_deleted Required
integer

minimum: 0

tags_deleted Required
integer

minimum: 0

execution_order_policy Required
string
metadata_policy Required
string
body Variant
oneOf: tag.delete_global
operation_id Required
string

format: "uuid"

account_id Required
string | null

format: "uuid"

status Required
value

const: "applied"

data_version Required
integer | null
analytics_pending Required
value

const: true

replayed Optional
boolean
operation Required
value

const: "tag.delete_global"

tag Required
string
required_scopes Required
array of string
trade_attachments Required
integer

minimum: 0

day_attachments Required
integer

minimum: 0

affected_accounts Required
array of string
scope Required
string
{
  "oneOf": [
    {
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "after": {
          "items": {
            "properties": {
              "base_net_pnl": {
                "description": "Numeric value; decimal values are encoded as strings.",
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "symbol": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total_executions": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "total_remaining_quantity": {
                "description": "Numeric value; decimal values are encoded as strings.",
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "trade_position": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trade_ref": {
                "description": "Opaque reference returned by this API. Do not construct it.",
                "type": "string"
              }
            },
            "required": [
              "trade_ref",
              "symbol",
              "trade_position",
              "total_executions",
              "total_remaining_quantity",
              "base_net_pnl"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "analytics_pending": {
          "const": true
        },
        "before": {
          "items": {
            "properties": {
              "base_net_pnl": {
                "description": "Numeric value; decimal values are encoded as strings.",
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "symbol": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total_executions": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "total_remaining_quantity": {
                "description": "Numeric value; decimal values are encoded as strings.",
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "trade_position": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trade_ref": {
                "description": "Opaque reference returned by this API. Do not construct it.",
                "type": "string"
              }
            },
            "required": [
              "trade_ref",
              "symbol",
              "trade_position",
              "total_executions",
              "total_remaining_quantity",
              "base_net_pnl"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "changes": {
          "type": "object"
        },
        "data_version": {
          "type": [
            "integer",
            "null"
          ]
        },
        "deleted_executions": {
          "minimum": 0,
          "type": "integer"
        },
        "deleted_trades": {
          "minimum": 0,
          "type": "integer"
        },
        "execution_order_policy": {
          "type": "string"
        },
        "metadata_policy": {
          "type": "string"
        },
        "notes_deleted": {
          "minimum": 0,
          "type": "integer"
        },
        "notes_moved": {
          "minimum": 0,
          "type": "integer"
        },
        "operation": {
          "type": "string"
        },
        "operation_id": {
          "format": "uuid",
          "type": "string"
        },
        "replayed": {
          "type": "boolean"
        },
        "required_scopes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "status": {
          "const": "applied"
        },
        "tags_deleted": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "operation_id",
        "account_id",
        "status",
        "data_version",
        "analytics_pending",
        "operation",
        "required_scopes",
        "before",
        "after",
        "changes",
        "deleted_executions",
        "deleted_trades",
        "notes_moved",
        "notes_deleted",
        "tags_deleted",
        "execution_order_policy",
        "metadata_policy"
      ],
      "type": "object"
    },
    {
      "properties": {
        "account_id": {
          "format": "uuid",
          "type": [
            "string",
            "null"
          ]
        },
        "affected_accounts": {
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        "analytics_pending": {
          "const": true
        },
        "data_version": {
          "type": [
            "integer",
            "null"
          ]
        },
        "day_attachments": {
          "minimum": 0,
          "type": "integer"
        },
        "operation": {
          "const": "tag.delete_global"
        },
        "operation_id": {
          "format": "uuid",
          "type": "string"
        },
        "replayed": {
          "type": "boolean"
        },
        "required_scopes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scope": {
          "type": "string"
        },
        "status": {
          "const": "applied"
        },
        "tag": {
          "type": "string"
        },
        "trade_attachments": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "operation_id",
        "account_id",
        "status",
        "data_version",
        "analytics_pending",
        "operation",
        "tag",
        "required_scopes",
        "trade_attachments",
        "day_attachments",
        "affected_accounts",
        "scope"
      ],
      "type": "object"
    }
  ]
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Stale preview, incompatible merge, or changed request using the same key. Fetch current data and obtain new confirmation.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
POST

Search trades

https://api.tradesviz.com/api/v2/journal/trades/search

Scoped access: trades.read. Tag filtering also requires tags.read or tags.write.

Bounded, cursor-paginated search of authorized accounts. Requires trades.read; tag filtering additionally requires tags.read or tags.write. Exact labels/symbols; from inclusive and to exclusive apply to opening time. API keys require the same journal scope and selected-account/personal consent as MCP. New scopes are never added to an existing key.

Authentication options

OAuth token: TradesViz OAuth access token for the canonical MCP resource, with explicit account/personal consent and operation scopes. Not a read API key or Account Secret. Never follow redirects with credentials.

Scoped API key: Personal API key created in API & MCP with explicit journal permissions. Uses the same operation scopes as MCP; offline_access is OAuth-only. Real journal changes, not a sandbox. Account Secret is not a scoped API key.

Each option is separate. Selected accounts, subscription and operation permissions still apply.

Request

No query, path or custom header parameters.

JSON body

account_id Required
string

format: "uuid"

symbol Optional
string

maxLength: 128

status Optional
value

enum: ["open", "closed"]

side Optional
value

enum: ["long", "short"]

asset_type Optional
string

maxLength: 128

tag Optional
string

maxLength: 128

from Optional
string

format: "date-time"

to Optional
string

format: "date-time"

min_pnl Optional
string
max_pnl Optional
string
is_simulated Optional
boolean
limit Optional
integer

default: 50 minimum: 1 maximum: 100

cursor Optional
string

maxLength: 16384

Full request schema
{
  "additionalProperties": false,
  "properties": {
    "account_id": {
      "format": "uuid",
      "type": "string"
    },
    "asset_type": {
      "maxLength": 128,
      "type": "string"
    },
    "cursor": {
      "maxLength": 16384,
      "type": "string"
    },
    "from": {
      "format": "date-time",
      "type": "string"
    },
    "is_simulated": {
      "type": "boolean"
    },
    "limit": {
      "default": 50,
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "max_pnl": {
      "type": "string"
    },
    "min_pnl": {
      "type": "string"
    },
    "side": {
      "enum": [
        "long",
        "short"
      ]
    },
    "status": {
      "enum": [
        "open",
        "closed"
      ]
    },
    "symbol": {
      "maxLength": 128,
      "type": "string"
    },
    "tag": {
      "maxLength": 128,
      "type": "string"
    },
    "to": {
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "account_id"
  ],
  "type": "object"
}

Request example

Replace example identifiers with references returned by the API.

{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "limit": 10,
  "symbol": "AAPL"
}

Responses

HTTP 200

Durable receipt. Check status and data_version; HTTP status alone is not application success.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "data_version": 0,
  "next_cursor": "string",
  "trades": [
    {
      "account_id": "00000000-0000-4000-8000-000000000001",
      "asset_type": "string",
      "base_net_pnl": 0,
      "close_date": "2026-01-15T15:30:00Z",
      "is_sim": false,
      "open_date": "2026-01-15T15:30:00Z",
      "symbol": "string",
      "total_remaining_quantity": 0,
      "trade_position": "string",
      "trade_ref": "string"
    }
  ]
}

Response headers

{
  "X-TradesViz-Request-Id": {
    "description": "Production request correlation ID; do not send credentials when reporting it.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
trades Required
array of object
trades[].account_id Required
string

format: "uuid"

trades[].trade_ref Required
string

Opaque reference returned by this API. Do not construct it.

trades[].symbol Required
string | null
trades[].asset_type Required
string | null
trades[].open_date Required
string | null

format: "date-time"

trades[].close_date Required
string | null

format: "date-time"

trades[].trade_position Required
string | null
trades[].base_net_pnl Required
number | string | null

Numeric value; decimal values are encoded as strings.

trades[].total_remaining_quantity Required
number | string | null

Numeric value; decimal values are encoded as strings.

trades[].is_sim Required
boolean
next_cursor Required
string | null
data_version Required
integer
{
  "properties": {
    "data_version": {
      "type": "integer"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "trades": {
      "items": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "type": "string"
          },
          "asset_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "base_net_pnl": {
            "description": "Numeric value; decimal values are encoded as strings.",
            "type": [
              "number",
              "string",
              "null"
            ]
          },
          "close_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "is_sim": {
            "type": "boolean"
          },
          "open_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_remaining_quantity": {
            "description": "Numeric value; decimal values are encoded as strings.",
            "type": [
              "number",
              "string",
              "null"
            ]
          },
          "trade_position": {
            "type": [
              "string",
              "null"
            ]
          },
          "trade_ref": {
            "description": "Opaque reference returned by this API. Do not construct it.",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "trade_ref",
          "symbol",
          "asset_type",
          "open_date",
          "close_date",
          "trade_position",
          "base_net_pnl",
          "total_remaining_quantity",
          "is_sim"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "trades",
    "next_cursor",
    "data_version"
  ],
  "type": "object"
}
HTTP 400

Malformed request; browser Origin/Cookie, query strings and transfer encoding are not supported.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 401

Invalid, expired, revoked or insufficiently scoped credential, unauthorized account/personal target, or ineligible subscription.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 403

Trusted HTTPS proxy boundary denied the request; edge policies may also reject before the application.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 404

Feature, route, account or scoped receipt unavailable.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 405

Wrong HTTP method for this exact path; trailing slashes are not aliases.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 409

Stale preview, incompatible merge, or changed request using the same key. Fetch current data and obtain new confirmation.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 413

Encoded request body exceeds 1048576 bytes or has an invalid Content-Length.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 415

POST requires Content-Type: application/json.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 422

Invalid schema, identity, instrument, numeric value, timestamp, account profile or sequence.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 429

Quota/backlog/response budget exhausted. A write may already have committed; retry the same identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
HTTP 503

Busy, unavailable dependency or fail-closed configuration. Retry with bounded backoff and unchanged identity.

Illustrative JSON shape. Values are placeholders, not journal data.

{
  "error": {
    "code": "string",
    "field": "string"
  }
}

Response headers

{
  "Retry-After": {
    "description": "Minimum delay in seconds; use bounded backoff.",
    "schema": {
      "type": "string"
    }
  }
}
Response fields and constraints
error Required
object

additionalProperties: false

error.code Required
string
error.field Optional
string
{
  "additionalProperties": false,
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

Authentication and workflow guides

Quick start

Choose the access method that matches what you want to do:

TaskHow to authorizeGet started
Read journal data with RESTA read-only API key for selected accountsRead API authentication
Import, edit, split, merge or delete journal data with RESTAn API key with the specific journal permissions; deletion requires separate delete scopesREST write guide
Read or write through an MCP clientBrowser sign-in and consent for selected accounts and permissionsConnect with MCP

Create a REST API key

  1. Open the API dashboard, name a key, select your owned trading accounts, choose its expiry, and select only the optional scopes you need.
  2. Create the key and copy its one-time secret. No accounts outside that explicit selection are included.
  3. Try GET /accounts. Use its returned public account_id values to request trades.

Run requests against this same app host. Store the key in an environment variable or secret store, not source code, a query string, or a chat message.

# Enter the key without echoing it or putting it in shell history.
read -rsp 'API key: ' TRADESVIZ_API_KEY; echo

curl -sS -H "Authorization: Bearer $TRADESVIZ_API_KEY" \
  'https://www.tradesviz.com/api/v2/accounts'

# Replace PUBLIC_ACCOUNT_UUID with an account_id returned above.
curl -sS -G -H "Authorization: Bearer $TRADESVIZ_API_KEY" \
  --data-urlencode 'account_ids=PUBLIC_ACCOUNT_UUID' \
  --data-urlencode 'page_size=10' \
  'https://www.tradesviz.com/api/v2/trades'

unset TRADESVIZ_API_KEY

The browser playground on the dashboard sends these same requests. It sends the bearer key and deliberately omits your session cookie.

Authentication & account access

Use Authorization: Bearer <API_KEY>. A browser login alone is not API authentication. The legacy tvz_api_test prefix is part of the compatible key format, not a sandbox: permitted writes change your real journal.

Same journal permissions for REST and MCP

Choose from 10 permissions. Trades and executions are managed together: read, extended reading, add/edit and delete. Notes and tags each have read, add/edit and delete. Only trade/execution reading is selected by default. Extended reading includes analytics. Unavailable permissions cannot be selected. Existing keys never gain scopes automatically: create a replacement with the required permissions, switch your client, then revoke the old key.

PermissionAllowsCompatible scopes
Trades and executions: ReadRead trades, executions and accounts.trades.read, executions.read
Trades and executions: Extended readingExtended trade/execution reading, including trade details and analytics.trades.extended.read, analytics.read
Trades and executions: Add / editAdd and edit trades and executions, change TP/SL, split and merge.trades.write, executions.write, executions.edit
Trades and executions: DeleteDelete trades and executions. Notes and tags need their own delete permissions.trades.delete, executions.delete
Notes: ReadRead notes.notes.read
Notes: Add / editCreate and edit notes.notes.write
Notes: DeleteDelete notes.notes.delete
Tags: ReadRead tags.tags.read
Tags: Add / editAdd tags to trades and days.tags.write
Tags: DeleteRemove tags and delete tag definitions globally.tags.delete

Day notes, day tags and general notes require the separate Day and general journal opt-in when creating a key or authorizing MCP. They are shared across your journal, not tied to one trading account. Global tag deletion also requires access to every affected account. A cascading deletion requires every applicable delete scope. offline_access is OAuth-only: API keys already have an expiry and do not use refresh tokens.

  • Dashboard key creation and revocation require your logged-in session and CSRF protection.
  • You must retain current Pro or Platinum access and have API access available for your account.
  • Every key has trades.read. That scope permits only context, accounts, and the fixed 21-field core trade response.
  • trades.extended.read is optional and is never selected automatically. A request must also send extra_data=true to add one nested object containing the eleven documented fields; omitting it returns the core fields even for a key that has the scope.
  • New keys include trades.read and executions.read together. Execution reads return the fixed public execution fields; there is no separate execution extended-data payload today. The shared extended-reading choice adds the documented trade details and analytics without another execution permission toggle.
  • The extended-reading choice includes analytics.read for the documented aggregate endpoint and trades.extended.read. Existing clients can keep their current scope names. A partially authorized older connection is marked limited; displaying it as a group does not expand its access.
  • No read scope grants journal write capability.
  • A key is tied to its owner, expiry, and selected accounts. New trading accounts are not added automatically.
  • Revocation, expiry, unavailable accounts, ownership changes, and current Pro or Platinum access are checked again on subsequent reads.
  • Only a secret digest is stored. The full key is returned once at creation and cannot be recovered from the key list.

API account_id values are saved UUID aliases, not new trading accounts. The same existing account keeps the same API ID across keys and renames, while internal account identifiers remain private. Creating an alias does not change the account or any journal row.

Each read checks that mapping against current ownership and the key's selected-account grants. An ID alone never grants access, and a deleted/recreated account does not inherit the old binding. Discover authorized IDs with GET /accounts; pass those IDs to account-scoped reads.

Endpoints

GET/context

Returns only the key owner's saved timezone and base_currency. This is display context, not AI context or a browser session. API timestamps remain UTC, and clients may call accounts or trades without calling this endpoint first.

{"data": {"timezone": "America/New_York", "base_currency": "USD"}, "pagination": {"has_more": false, "next_cursor": null}, "meta": {"request_id": "example", "test_only": true}}

The values above are illustrative; the endpoint returns the key owner's saved settings.

GET/accounts

Lists currently available accounts from the key's explicit selection.

ParameterTypeBehavior
page_sizeIntegerOptional. Default 50; from 1 to 100.
cursorStringOptional. Pass the previous response's next_cursor unchanged.

GET/trades

Returns bounded pages of trades for selected public account IDs. This endpoint only reads data; use the separate journal write routes to import executions.

ParameterTypeBehavior
account_idsUUID, repeatedRequired. Between 1 and 50 distinct public IDs returned by /accounts.
page_sizeIntegerOptional. Default 50; from 1 to 100.
cursorStringOptional. Continue with the same accounts, page size, data mode, and time window.
sort_time_startRFC 3339 timestampOptional inclusive lower bound. Supply together with sort_time_end, or omit both.
sort_time_endRFC 3339 timestampOptional exclusive upper bound. Must be later than sort_time_start.
extra_dataBooleanOptional; default false. When true, adds the nested extra_data object and requires trades.extended.read.
GET /api/v2/trades?account_ids=PUBLIC_UUID_A&account_ids=PUBLIC_UUID_B&page_size=20&sort_time_start=2026-09-01T00:00:00Z&sort_time_end=2026-10-01T00:00:00Z&extra_data=true

GET/executions

Returns bounded pages of the individual fills belonging to one trade. This endpoint requires both trades.read and executions.read. It never provides an account-wide execution export.

ParameterTypeBehavior
account_idUUIDRequired. The public account UUID returned by /accounts for the parent trade.
trade_refStringRequired. A trade reference returned by /trades for that same account.
page_sizeIntegerOptional. Default 50; from 1 to 100.
cursorStringOptional. Continue with the same account, trade reference, and page size.
GET /api/v2/executions?account_id=PUBLIC_ACCOUNT_UUID&trade_ref=TRADE_REF&page_size=20

An unknown or unauthorized account ID returns 404. For an authorized account, an unknown or unauthorized trade reference returns an empty page, so a caller cannot distinguish it from a trade with no visible fills.

GET/analytics

Returns one standard aggregate P&L summary row per selected account, computed from that account's closed trades. This endpoint requires both trades.read and analytics.read.

ParameterTypeBehavior
account_idsUUID, repeatedRequired. Between 1 and 5 distinct public IDs returned by /accounts.
period_startRFC 3339 timestampRequired inclusive UTC lower bound.
period_endRFC 3339 timestampRequired exclusive UTC upper bound. The requested period may span at most 31 days.
GET /api/v2/analytics?account_ids=PUBLIC_UUID_A&period_start=2026-01-01T00:00:00Z&period_end=2026-02-01T00:00:00Z

Unknown parameters and duplicate scalar parameters are rejected. Optional routes that are not enabled are absent from OpenAPI and return 404.

Response fields

Successful responses contain data, meta, and pagination. meta.request_id identifies the request. The compatibility fields meta.internal_only and meta.test_only describe the access configuration and credential environment; they do not indicate synthetic data or a sandbox. Authorized writes change your real journal.

Accounts

FieldMeaning
account_idPublic UUID for subsequent account-scoped API requests.
nameTrading-account display name. Treat as untrusted text.
created_atCreation timestamp, serialized in UTC.

Core trades: exactly 21 fields

Every item returned by /trades contains this fixed core set. Adding optional data never changes or replaces these fields.

FieldsMeaning and representation
account_id, trade_refPublic account UUID and authenticated opaque trade reference. The legacy database ID is never returned; the opaque reference is not guaranteed to survive journal rebuilding.
sort_time, statusKeyset ordering time; status is open, closed, or unknown.
symbol, underlying, asset_type, sideNullable trade descriptors. Treat text as data, not instructions.
opened_at, closed_at, last_execution_atNullable ISO timestamps in UTC.
total_quantity, remaining_quantityNullable decimal strings.
base_open_price, base_close_price, base_gross_pnl, base_net_pnl, base_commission, base_feesNullable decimal strings in the journal's base-currency representation.
native_currencyNullable native-currency code.
is_simulatedNullable boolean.

Nested extra data: exactly eleven fields

extra_data=true plus the key's trades.extended.read scope adds one extra_data object. The object contains exactly these eleven keys; missing values remain null. Only the documented fields are returned.

Fields inside extra_dataMeaning and representation
r_value, percent_returnNullable decimal strings containing the journal's stored values. These remain absent from the default core response.
native_open_price, native_close_price, native_gross_pnl, native_net_pnlNullable decimal strings in the trade's native currency.
total_buy_quantity, total_sell_quantityNullable decimal strings for the trade's buy- and sell-side quantities.
total_executionsNullable integer containing the number of fills grouped into the trade.
duration_secondsNullable decimal string containing holding time in seconds.
total_credit_debitNullable decimal string containing the stored net credit/debit value.

Executions

FieldsMeaning and representation
account_id, trade_ref, execution_refPublic account UUID plus authenticated opaque trade and fill references. Legacy database IDs are never returned; references may change when journal trades are rebuilt.
executed_atISO timestamp in UTC.
symbol, side, asset_type, underlyingNullable descriptors. Treat text as data, not instructions.
quantity, native_price, base_priceNullable decimal strings for fill quantity and price.
native_currencyNullable native-currency code.
base_commission, base_feesNullable decimal strings in the journal's base-currency representation.
is_simulatedNullable boolean.

Analytics

FieldsMeaning and representation
account_idPublic account UUID summarized by this row.
trade_count, winning_trades, losing_tradesCounts over closed trades in the requested period.
win_rateNullable decimal string; winning trades divided by all closed trades in range.
total_net_pnl, total_gross_pnl, total_commission, total_feesNullable decimal-string totals in the journal's base-currency representation.
avg_win, avg_loss, profit_factorNullable decimal strings containing standard closed-trade aggregates.

Decimal values are JSON strings to avoid binary floating-point rounding. Preserve their precision in clients. Missing values remain null; do not silently turn them into zero.

Pagination & consistency

When pagination.has_more is true, URL-encode pagination.next_cursor and pass it as cursor with the same endpoint, key, selected accounts, page size, and data mode. Stop when has_more is false and next_cursor is null.

curl -sS -G -H "Authorization: Bearer $TRADESVIZ_API_KEY" \
  --data-urlencode 'account_ids=PUBLIC_ACCOUNT_UUID' \
  --data-urlencode 'page_size=10' \
  --data-urlencode 'cursor=NEXT_CURSOR_FROM_PREVIOUS_RESPONSE' \
  'https://www.tradesviz.com/api/v2/trades'

Cursors are encrypted and authenticated, expire after 10 minutes, and are bound to the exact authorized request and response projection. Do not edit them or move them between keys or core/extended requests. Restart from the first page if a cursor expires or the account grant changes.

Trades sort by sort_time descending, then trade reference descending. This is live keyset pagination, not a frozen export snapshot: imports, edits, or rebuilding may change the data between pages. Do not rely on trade references as permanent external identifiers.

/executions uses live keyset pagination too. Its cursor is bound to one public account, one trade reference, the page size, and the key.

/analytics is not paginated. It returns one row per requested account with pagination.has_more false and pagination.next_cursor null.

Errors & limits

API errors contain error.code, error.message, and meta.request_id. Share the request ID when reporting a failure. Never share the bearer key.

HTTPMeaningWhat to do
400Invalid argument or cursorCheck parameters; restart pagination if needed.
401Missing or invalid credentialCheck the key, expiry, revocation, and the owner's current access.
403Missing scope or rejected originUse a key carrying the documented scope and the intended app host.
404Unavailable endpoint, account, or restricted accessCheck the URL, selected accounts, and current Pro or Platinum access. Contact support if access is still unavailable.
405Unsupported methodUse GET for journal reads.
422Request too broadReduce page size or accounts.
429Request, pagination, response or concurrency limit reachedHonor Retry-After and reduce concurrency. Switching keys does not reset your user quota.
500 / 503Read failure or unavailable serviceRetry transient failures with backoff; contact support with the request ID.

Key management allows up to 10 active keys, 50 selected accounts per key, and a 365-day maximum lifetime. Paginated REST responses contain at most 100 rows. Request execution and response sizes are bounded.

REST reads, journal requests and MCP tools share your user quota across keys and connected apps. Default limits are 120 requests per minute, 30 continuation pages per minute, 50 MiB of response data per hour and 2 concurrent operations. Server settings may impose different limits. IP, credential and service-wide protections also apply, so a request can be limited before these user limits are reached. Use one pagination loop and bounded retries.

When a subscription ends, API access stops, but you can still view and revoke your existing API keys from the dashboard. Reconnecting an app or creating another key does not give it additional permissions.

Journal writes with REST

Import executions and manage notes and tags in your normal TradesViz journal. These actions never place broker orders. Write access must be available for your account; creating a read-only key does not grant it. For an MCP client, use MCP write permissions instead of these credentials.

WRITE APIhttps://api.tradesviz.comJournal OpenAPI JSON

Use Authorization: Bearer API_KEY with executions.write to import executions into your selected accounts. The same key can read, annotate and manage the journal with its other explicitly selected scopes. For legacy SDK integrations, Authorization: Basic base64(email:account_secret) remains supported for imports and non-deleting annotation changes, not trade management or deletes. The Account Secret is not your login password. Never put credentials in a URL, request JSON, source code, logs, or chat.

These are SDK-only exact paths, without trailing slashes or query strings. Production requires HTTPS; browser Origin and Cookie requests are rejected. There is no browser session authentication or CORS support. Do not follow redirects with credentials.

Three execution routes, one retained delivery identity

Method and exact pathPurpose
POST /api/v2/journal/accountsSend exactly {} as JSON. Returns accounts containing account_id and name, plus supported_asset_types. Select an owned destination explicitly. Discovery creates no journal rows and does not start capture.
POST /api/v2/journal/execution-batchesSubmit the schema-3 append envelope below. HTTP 202 returns a durable receipt, even when application has already finished.
GET /api/v2/journal/execution-imports/{operation_id}Get the scoped receipt with the original identity and account. An authorized poll can also resume pending application; it is not a passive status-only read.

For legacy Basic batch delivery, send a stable X-TradesViz-Client-Instance UUID and X-TradesViz-Connector: python on batch and receipt requests. API-key Bearer requests do not need these two headers. Both authentication methods require a stable Idempotency-Key of 16–128 printable ASCII characters without spaces for batches. Receipt requests require X-TradesViz-Account with the original destination UUID and no body. Both POST routes require Content-Type: application/json.

Schema 3: explicit execution facts

The exact envelope contains only schema_version, account_id, mode, and executions. Version 3 is the command schema; URLs still use /api/v2. No grouping_policy, server source/book IDs, or user-selected economics are accepted. Unknown or omitted fields are rejected.

{
  "schema_version": 3,
  "account_id": "00000000-0000-4000-8000-000000000001",
  "mode": "append",
  "executions": [{
    "source_execution_id": "example-fill-1001",
    "source_sequence": null,
    "executed_at": "2026-09-13T12:00:00Z",
    "instrument": {"asset_type": "stock", "symbol": "AAPL.US"},
    "side": "buy",
    "quantity": "2",
    "native_price": "180.50",
    "native_currency": "USD",
    "base_commission": "0.25",
    "base_fees": "0"
  }]
}

Replace the example account ID with the destination returned by account discovery and use your actual execution facts. This example contains only an entry, so it leaves an open trade; a matching exit closes it through normal FIFO grouping. Use a dedicated test account when experimenting with sample data.

Field or limitContract
executions1–50 executions for API-key/MCP imports; 1–500 for legacy Basic imports. The entire encoded request must fit within 1 MiB (1,048,576 bytes). IDs cannot repeat within a batch.
source_execution_idPermanent source-local fill ID, 1–128 characters: an alphanumeric first character followed by alphanumerics or ._:@/-. Changed facts under an existing ID are conflicts, not corrections.
source_sequenceExplicitly null for REST batch delivery with X-TradesViz-Connector: python.
executed_atActual timezone-qualified timestamp, preferably UTC Z; at most six fractional-second digits. Do not replace a retried fill's time with the retry time.
Quantity, price, commission, feesDecimal strings, never JSON floating-point values; at most 22 integer and 8 fractional digits. Quantity is positive and integral for futures. Stock prices are positive; future prices must align with the qualified contract tick. Commission and fees are explicit nonnegative USD amounts.
Qualified instrumentsKnown USD US stocks and exact-contract, fixed-multiplier USD futures resolved by the server catalog. USD account profile qualification still applies. Options, FX, non-USD, continuous futures, unknown symbols and variable multipliers are not supported. Storage precision is not stock exchange tick validation.

Receipts, retries, and duplicate protection

{"operation_id":"00000000-0000-4000-8000-000000000002","account_id":"00000000-0000-4000-8000-000000000001","status":"applied","record_count":1,"projection_only":false,"target":"journal","data_version":1,"analytics_pending":true}

accepted means durable admission, not committed native journal rows; processing, blocked, or rejected are not success. Only status: "applied" with a positive data_version proves native application. analytics_pending: true means deferred enrichment such as MAE/MFE is not finished. The internal applied_analytics_pending state is exposed on the wire as applied plus that boolean. Pending receipts may include a sanitized application_error.code.

Persist the complete request and its idempotency key before sending. After a timeout, lost response, 429, or transient 503, retain the original account, client instance, connector, fill IDs, sequence and request; retry with bounded backoff and honor Retry-After. A response-budget rejection can occur after a write committed. Use the existing receipt when known; never manufacture a new identity to clear an error.

Request idempotency and fill deduplication are different. Rebatching unchanged fills under a new request key within the same registered source may create a new receipt without new executions. It does not deduplicate the same broker fills submitted through another source, installation, connector or sync system. record_count is not a count of newly inserted rows on replay. Avoid sending the same fills from multiple tools and preserve your saved requests.

Do not retry permanent validation or conflict errors blindly. 401 is an authorization failure; 409 requires identity/fact reconciliation; 413/415/422 require a valid bounded JSON request. A 404 can mean an unavailable feature, account or receipt. An edge-generated denial may not contain journal JSON; report only its request/ray ID and sanitized status, never credentials or full responses.

Existing compatible open positions are valid append targets. You do not need to delete journal history or empty an account before importing executions.

Read and change notes and tags

When available for your account, these routes use the same HTTPS host and a scoped API-key or OAuth Bearer token. Legacy Basic Account Secret authentication remains available for non-deleting operations, with its client-instance/connector headers. They change the normal trade notes/tags, including those created in the dashboard. You can annotate existing ordinary and simulated trades in authorized accounts regardless of how they were created or imported. This does not change their executions, prices or P&L. The stock/future import limits above do not restrict annotations, and your journal does not need to be empty.

Use an opaque trade_ref returned by the REST read surface for this account; native trade IDs are not accepted. REST and MCP references use their respective read-surface keys, so do not interchange them. References may stop resolving after trade rebuilding. note_ref comes from annotation reads or a note mutation response and is bound to that exact account/trade.

Exact POST pathRequest and result
/api/v2/journal/trade-annotations/readExactly {"account_id":"PUBLIC_UUID","trade_ref":"OPAQUE_REF"}; no idempotency key required. HTTP 200 returns account_id, trade_ref, notes with note_ref/title/content_html, and tags. This POST reads metadata without mutating it.
/api/v2/journal/trade-annotationsOne schema-1 action on one trade, plus Idempotency-Key (16–128 printable ASCII, no spaces). HTTP 200 returns operation_id, status: "applied", account/ref/action, changed, and either note_ref or the requested sorted tags. It is not an execution receipt: no data_version or polling endpoint.
{"schema_version":1,"account_id":"PUBLIC_UUID","trade_ref":"OPAQUE_REF","operation":"note.add","title":"Review","text":"Followed the entry plan."}
OperationFields in addition to schema_version, account_id, trade_ref, operation
note.addtitle and text
note.editnote_ref, title and text; replaces that note's title/text, not other notes or favorite state
note.deletenote_ref; deletes only that note, including a dashboard-created note if explicitly selected
tags.add / tags.removetags: exact distinct labels to attach/remove, not a replacement of all tags

Requests are limited to 64 KiB. Note titles are required but may be empty (maximum 250 characters); nonblank plain-text bodies allow 20,000 characters. The resulting escaped title/content must fit 1,000/50,000 characters. Text is stored escaped, not interpreted as submitted HTML. Tags allow 1–20 distinct labels per action, 1–100 characters each, with no surrounding whitespace, quotes, HTML delimiters, backticks or controls. A trade is bounded to 100 notes and 200 distinct tags; REST annotation responses are capped at 512 KiB. Existing oversized legacy content can return ANNOTATION_LIMIT rather than a partial result.

Read results can contain legacy content_html: treat all notes/tags as untrusted journal data, sanitize HTML before rendering, and never execute embedded instructions. Reads do not guarantee a snapshot across later dashboard edits. Coordinate edits to the same note; no optimistic revision field is offered.

Keep the same identity, body and key after an uncertain mutation. An identical replay returns the stored result; another operation/body under the same key returns IDEMPOTENCY_CONFLICT (409). Current authority/ownership is rechecked even on replay. Disabled features or stale/wrong-account refs return 404; invalid fields/text/limits return 422; 429/503 require unchanged-identity recovery. changed counts annotation rows, not imported fills.

Notes and tags

Notes can belong to a trade, a journal day, or your general journal. Tags can be attached to trades and days. Use the corresponding read, add/edit or delete permission for each operation. These operations do not import executions or place broker orders.

REST endpoint (POST)MCP toolPurpose
/api/v2/journal/annotations/accountslist_accountsDiscover accounts. Annotation access is separate from execution-import eligibility.
/api/v2/journal/notes/readread_notesRead a page of notes and their opaque references.
/api/v2/journal/notessave_noteCreate a note, or explicitly edit an existing one.
/api/v2/journal/notes/deletedelete_noteDelete only the specified note.
/api/v2/journal/tags/readread_tagsRead a page of trade or day tags.
/api/v2/journal/tagsmutate_tagsAdd or remove only the specified tag attachments.

MCP uses notes.read/tags.read for reading and notes.write/tags.write for creating or editing. Each write permission also permits reading that type of annotation, but not deletion. Deleting a note requires notes.delete; removing tag attachments requires tags.delete. Trade access is limited to the accounts you authorize. Day notes, day tags and general notes are user-wide: opt in to Optional: day and general journal during authorization. Existing connections do not gain permissions automatically; reconnect and review the request.

REST accepts Authorization: Bearer API_KEY with the same notes/tag scopes and account/personal consent as MCP. For mutations, send a stable Idempotency-Key. Reads use a default page size of 25 (maximum 50); pass next_cursor back as cursor without changing its target.

Deletion requires its own scope. Scoped API keys and OAuth tokens may delete only with notes.delete or tags.delete as applicable. Account Secret authentication never permits deletion. Bearer requests do not need client-instance or connector headers. Legacy Basic clients still require X-TradesViz-Connector: python and a stable UUID in X-TradesViz-Client-Instance. Never paste credentials into chat.

Every request uses schema_version: 2 and one target: {"type":"trade","account_id":"PUBLIC_UUID","trade_ref":"OPAQUE_REF"}, {"type":"day","date":"2026-09-15"}, or {"type":"misc"} (notes only). Dates identify journal days, not execution timestamps. Use references returned by reads; do not guess IDs.

{
  "schema_version": 2,
  "target": {"type": "misc"},
  "title": "Weekly review",
  "text": "Follow the plan and review risk before entry.",
  "edit_existing": false
}

edit_existing defaults to false, which creates a new note. To edit, send true and the exact note_ref returned by read_notes for that target. A missing note returns an error; it never silently creates a replacement. Notes are plain text on writes; returned content_html may contain legacy HTML and must be sanitized before display. Other notes, favorites, categories and tag groups are not replaced.

For tags, send operation: "add" or "remove" with tags: ["Reviewed", "Risk checked"]. For deletion, send only the common fields and note_ref. Keep the same body, client identity and key if a mutation needs retrying. Notes nested inside another note and general-note tag attachments are not supported.

Search, edit, split, merge and delete

REST and MCP share these journal operations and permission checks. Use a scoped personal API key for REST, or a scoped OAuth token for the MCP resource. Read-only keys, Account Secrets and old connections do not acquire management rights. Approve only the additional permissions you need.

REST endpoint (POST)MCP toolPurpose
/api/v2/journal/trades/searchsearch_tradesFind trades using account, exact symbol, opening-time range, open/closed status, long/short side, asset type, P&L bounds, tag, or simulated status. Maximum 100 results per page; follow the cursor. Tag filters need tag read access.
/api/v2/journal/management/prepareprepare_journal_changeShow the proposed change, before/after totals and required permissions. Nothing is written.
/api/v2/journal/management/commitcommit_journal_changeApply the confirmed preview atomically and return a retry-safe receipt.

REST prepare takes the command below and an Idempotency-Key header. MCP prepare takes {"body": COMMAND, "idempotency_key": "YOUR_STABLE_KEY"}. Use opaque references from the connected account, never database IDs.

{
  "schema_version": 1,
  "account_id": "PUBLIC_ACCOUNT_UUID",
  "operation": "trade.edit",
  "trade_refs": ["RETURNED_TRADE_REF"],
  "changes": {"stop_loss": "19999", "profit_target": "20002"}
}

Operations are trade.edit, execution.edit, execution.delete, trade.delete, trade.split, trades.merge, and tag.delete_global. Execution operations and splitting also take execution_refs; execution edit takes exactly one. Merge takes 2–10 trade refs, with the destination first. All numeric edits are exact decimal strings; timestamps include a timezone. Target null clears that target. See OpenAPI for complete request shapes.

Show the preview and obtain confirmation, then send its intent_token, account_id and operation to commit. A preview expires after five minutes. Changed data or calculation settings require a fresh preview and confirmation. After a timeout, retry the identical intent: a retained receipt prevents double application, even after deletion. A signed preview is not itself proof that a human approved it.

Split moves selected whole executions to a new trade; notes, tags, uploads and targets stay on the original. Merge keeps the first trade's identity and metadata, and moves source annotations and uploads. Incompatible instruments, accounts, simulator status, conflicting TP/SL or shared conversations are rejected. Deletes include the previewed dependent rows; files are not removed from storage by these tools.

Global tag deletion is a separate explicit action: {"schema_version":1,"account_id":null,"operation":"tag.delete_global","tag":"123"}. It previews and removes every exact matching trade/day attachment in your journal, including simulated trades. It requires tags.delete, personal-journal consent, and consent for every affected account. Tag groups, note categories and other labels are preserved. TradesViz derives tag labels from attachments, so removing all occurrences removes the label from its tag list; the same label can be created again later. This is never inferred from a request to remove a tag from one trade.

Execution recalculation and TP/SL calculation currently support qualified USD stocks and fixed-multiplier futures with the supported FIFO profile, including simulated trades. Unsupported profiles return an error without changes. Search, full-trade deletion, lock edits and annotations do not require that calculation profile. Advanced analytics may remain pending; a receipt is not proof that deferred analytics has completed.

Connect your assistant

Use a remote MCP connection with browser sign-in. You do not need a local server, a REST API key or your Account Secret.

MCP server URLhttps://mcp.tradesviz.com/mcp
OpenAI / ChatGPT
  1. In ChatGPT, open Settings > Security and login and enable Developer mode, if your account or workspace allows it.
  2. Open Plugins, select the plus button and name the connection TradesViz.
  3. Enter the MCP server URL above as a public endpoint. Use browser OAuth authentication when prompted, then create the connection.
  4. Sign in to TradesViz and approve the accounts and permissions you want to share. Install or enable the connection in ChatGPT, then select it in a new conversation.

OpenAI setup instructions

Grok
  1. Open Grok Connectors.
  2. Select New Connector > Custom and enter the MCP server URL above.
  3. Complete browser sign-in with TradesViz and approve your accounts and permissions.
  4. Use the connector in a conversation. Business or Enterprise workspaces may need an administrator to add it first.

Grok connector instructions

Claude
  1. Open Customize > Connectors, select +, then Add custom connector.
  2. Name it TradesViz, enter the MCP server URL above and select Add.
  3. Select Connect and complete TradesViz browser sign-in. Review the accounts and permissions before authorizing.
  4. In your conversation, open + > Connectors and enable TradesViz. Team and Enterprise owners must first add it under Organization settings > Connectors.

Claude connector instructions

Start with: List my authorized TradesViz accounts. Check the results before requesting changes. Extra permissions require a new authorization; old connections are not upgraded automatically.

Client menus and availability depend on the provider and your workspace. These setup guides are not a claim of provider certification. If OAuth registration fails, contact TradesViz support with the client name and error. Do not paste credentials into a chat.