### Example JSON Response for Trades Source: https://github.com/tradervue/api-docs/blob/master/trades.md This is an example of the JSON structure returned when listing trades. It includes details for each trade such as symbol, volume, P/L, and timestamps. ```json { "trades": [ { "id": 643888, "symbol": "BBY", "volume": 160, "open": false, "gross_pl": -5.592, "native_pl": -5.592, "native_currency": "USD", "commission": 3.0, "fees": 0.06, "side": "long", "entry_price": 40.75, "exit_price": 40.62, "start_datetime": "2013-10-15T13:07:22.000-04:00", "end_datetime": "2013-10-15T15:59:16.000-04:00", "notes_excerpt": "Second try on pullback trade here, using 15m chart.\r\n\r\nThis one really started to roll around...", "tags": [ "pb15", "pullback", "try2" ], "exec_count": 3, "comment_count": 0, "shared": false }, { "id": 643749, "symbol": "BBY", "volume": 200, "open": false, "gross_pl": -29.0, "native_pl": -29.0, "native_currency": "USD", "commission": 2.0, "fees": 0.54, "side": "long", "entry_price": 41.1, "exit_price": 40.81, "start_datetime": "2013-10-15T11:07:32.000-04:00", "end_datetime": "2013-10-15T11:37:14.000-04:00", "notes_excerpt": "Strong opening drive, then a lower volume pullback. Entered as a pullback trade on the 15-min as...", "tags": [ "pb15", "pullback", "try1" ], "exec_count": 2, "comment_count": 0, "shared": false } ] } ``` -------------------------------- ### Create Journal Note Response Example Source: https://github.com/tradervue/api-docs/blob/master/notes.md A sample JSON response upon successful creation of a journal note. It includes the ID of the newly created note. ```json { "id":13922 } ``` -------------------------------- ### Error Response Example for Update/Create Source: https://github.com/tradervue/api-docs/blob/master/notes.md This JSON structure represents an error response when an update or creation operation fails. It provides details about the error. ```json { "error": "error details here, here, here" } ``` -------------------------------- ### Executions API Response Example Source: https://github.com/tradervue/api-docs/blob/master/executions.md This is an example of the JSON response structure when listing executions for a trade. It includes details such as execution ID, datetime, symbol, quantity, price, and fees. ```json { "executions": [ { "id": 4480554, "datetime": "2013-10-21T09:59:02.000-04:00", "symbol": "HAS", "quantity": 100, "price": 51.51, "commission": 1, "trans_fee": 0, "ecn_fee": 0.3 }, { "id": 4480555, "datetime": "2013-10-21T09:59:38.000-04:00", "symbol": "HAS", "quantity": -100, "price": 51.31, "commission": 1, "trans_fee": 0.1, "ecn_fee": 0.3 } ] } ``` -------------------------------- ### Import Single Execution via cURL Source: https://github.com/tradervue/api-docs/blob/master/imports.md Use this cURL command to send a POST request with a JSON payload for importing a single execution. Ensure to replace 'example:password' with your actual credentials and adjust the 'User-Agent' header. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -H "Content-type: application/json" \ -u example:password \ -d '{"allow_duplicates":"false","overlay_commissions":"false","tags":["one","two"],"account_tag":"swing","executions":[{"datetime":"2013-02-7T09:53:34-05:00","symbol":"SPY","quantity":"100","price":"151.05","option":"","commission":"1.00","transfee":"0.04","ecnfee":"0.21"}]}' \ https://app.tradervue.com/api/v1/imports ``` -------------------------------- ### List Users with cURL Source: https://github.com/tradervue/api-docs/blob/master/users.md Use this cURL command to retrieve a list of all users in your organization. Ensure you replace 'your-org.tradervue.com' with your actual organization URL and 'example:password' with your manager credentials. ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ https://your-org.tradervue.com/api/v1/users ``` -------------------------------- ### Example Trade Response JSON Source: https://github.com/tradervue/api-docs/blob/master/trades.md This JSON object represents a successful response when retrieving trade data. It includes details such as ID, symbol, volume, prices, dates, and notes. ```json { "id": 643888, "symbol": "BBY", "volume": 160, "open": false, "gross_pl": -5.592, "native_pl": -5.592, "native_currency": "USD", "commission": 3.0, "fees": 0.06, "side": "long", "entry_price": 40.75, "exit_price": 40.62, "start_datetime": "2013-10-15T13:07:22.000-04:00", "end_datetime": "2013-10-15T15:59:16.000-04:00", "exec_count": 3, "comment_count": 0, "shared": false, "notes": "Second try on pullback trade here, using 15m chart.\r\n\r\nThis one really started to roll around 2pm, when the market was rolling over at the same time. About 3:30, things weren't really looking up for either BBY or the market, so I decided to sell half at roughly break-even; holding the remainder to either targets or market close (don't want to hold overnight with the government shutdown still unresolved).", "tags": [ "pb15", "pullback", "try2" ], "initial_risk": 20.0, "position_mfe": 43.2, "position_mfe_datetime": "2013-10-15T14:00:00.000-04:00", "position_mae": -17.6, "position_mae_datetime": "2013-10-15T14:48:00.000-04:00", "price_mfe": 0.54, "price_mfe_datetime": "2013-10-15T14:00:00.000-04:00", "price_mae": -0.22, "price_mae_datetime": "2013-10-15T14:48:00.000-04:00", "best_exit_pl": 1.204, "best_exit_pl_datetime": "2013-10-15T15:36:00.000-04:00" } ``` -------------------------------- ### Single Journal Note Response Example Source: https://github.com/tradervue/api-docs/blob/master/notes.md A sample JSON response when retrieving details for a single journal note. It contains the note's ID, its content, and the comment count. ```json { "id": 11433, "notes": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore et dolore magna aliqua.", "comment_count": 0 } ``` -------------------------------- ### POST /api/v1/users Source: https://github.com/tradervue/api-docs/blob/master/users.md Creates a new user in the TraderVue system. This endpoint supports various options for user setup, including trial periods and default settings. ```APIDOC ## POST /api/v1/users ### Description Creates a new user account. You can specify basic user information, trial periods, and default settings. ### Method POST ### Endpoint https://your-org.tradervue.com/api/v1/users ### Parameters #### Request Body - **username** (string) - Required - The desired username for the new user. - **plan** (string) - Required - The subscription plan for the user (e.g., "Gold"). - **email** (string) - Required - The email address for the new user. - **password** (string) - Required - The password for the new user. - **trial_end** (string) - Optional - The end date for the user's trial period in YYYY-MM-DD format. - **settings** (object) - Optional - An object containing various user settings: - **merge_mode** (string) - Optional - Default is "normal". Can be "normal", "force_split", or "force_merge". - **commission_stocks** (string) - Optional - Default commission for stock executions. - **commission_options** (string) - Optional - Default commission for option executions. - **commission_futures** (string) - Optional - Default commission for futures executions. - **mentor** (integer) - Optional - The ID of a user to be set as the mentor. - **charts** (array) - Optional - An array of default chart configurations. Each chart object can have: - **type** (string) - Required - Chart type, e.g., "candlestick" or "ohlc". - **timeframe** (string) - Required - Timeframe for the chart, e.g., "d" (daily), "m15" (15 minute). ### Request Example ```json { "username": "test3", "plan": "Gold", "email": "test3@example.com", "password": "the_password", "trial_end": "2014-06-30", "settings": { "merge_mode": "force_split", "commission_stocks": "1.01", "commission_options": "1.25", "commission_futures": "2.05", "mentor": 124, "charts": [ { "type": "candlestick", "timeframe": "d" }, { "type": "ohlc", "timeframe": "m15" } ] } } ``` ### Response #### Success Response (201) - **id** (integer) - The ID of the newly created user. #### Response Example ```json { "id": 170 } ``` #### Error Response (400) - **error** (string) - A message describing the error. #### Error Response Example ```json { "error": "Invalid request: error details here, here, here" } ``` ``` -------------------------------- ### Get Single User Details Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves detailed information for a specific user within the organization. Use the user's ID to query. ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u admin:password \ "https://your-org.tradervue.com/api/v1/users/10001" ``` -------------------------------- ### Journal Notes API Response Example Source: https://github.com/tradervue/api-docs/blob/master/notes.md This is a sample JSON response when listing journal notes. It includes the ID, notes content, and comment count for each note. ```json { "journal_notes": [ { "id": 11444, "notes": "These are my notes.", "comment_count": 0 }, { "id": 11433, "notes": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore et dolore magna aliqua.", "comment_count": 0 } ] } ``` -------------------------------- ### Update Journal Note Request Body Example Source: https://github.com/tradervue/api-docs/blob/master/notes.md Example JSON payload for updating a journal note. Only the 'notes' field can be modified. ```json { "notes": "here are my updated notes" } ``` -------------------------------- ### User Creation with Optional Settings Source: https://github.com/tradervue/api-docs/blob/master/users.md This JSON payload demonstrates how to include optional settings during user creation, such as merge mode, commission rates, mentor ID, and initial chart configurations. ```json { "username": "test3", "plan": "Gold", "email": "test3@example.com", "password": "the_password", "settings": { "merge_mode": "force_split", "commission_stocks": "1.01", "commission_options": "1.25", "commission_futures": "2.05", "mentor": 124, "charts": [ { "type": "candlestick", "timeframe": "d" }, { "type": "ohlc", "timeframe": "m15" } ] } } ``` -------------------------------- ### Basic User Creation JSON Source: https://github.com/tradervue/api-docs/blob/master/users.md This is a sample JSON payload for creating a new user. The username, plan, email, and password fields are mandatory. ```json { "username": "test3", "plan": "Gold", "email": "test3@example.com", "password": "the_password" } ``` -------------------------------- ### User Creation with Trial End Date Source: https://github.com/tradervue/api-docs/blob/master/users.md Include the `trial_end` parameter to create a user with a specified trial period. Ensure the date format is correct and within organizational limits to avoid errors. ```json { "username": "test3", "plan": "Gold", "email": "test3@example.com", "password": "the_password", "trial_end": "2014-06-30" } ``` -------------------------------- ### List Users Response JSON Source: https://github.com/tradervue/api-docs/blob/master/users.md This is a sample JSON response when listing users. It contains an array of user objects, each with details like ID, username, email, plan, billing mode, and last login. ```json { "users": [ { "id": 10000, "username": "test1", "email": "test1@example.com", "plan": "Free", "billing_mode": "Tradervue CC", "last_login": "2023-09-06T08:05:41.294-04:00" }, { "id": 10001, "username": "test2", "email": "test2@example.com", "plan": "Silver", "billing_mode": "Managed", "last_login": "2025-01-07T13:09:04.702-05:00" } ] } ``` -------------------------------- ### Get Single Journal Note Source: https://github.com/tradervue/api-docs/blob/master/notes.md Retrieves the details of a specific journal note using its ID. ```APIDOC ## GET /api/v1/notes/{id} ### Description Retrieves the details of a specific journal note. ### Method GET ### Endpoint /api/v1/notes/{id} ### Path Parameters - **id** (integer) - Required - The unique identifier of the journal note to retrieve. ### Request Example ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/notes/11433" ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the journal note. - **notes** (string) - The content of the journal note. - **comment_count** (integer) - The number of comments associated with the note. #### Response Example ```json { "id": 11433, "notes": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\r\ntempor incididunt ut labore and dolore magna aliqua.", "comment_count": 0 } ``` ``` -------------------------------- ### Create User via Curl Source: https://github.com/tradervue/api-docs/blob/master/users.md Use this curl command to create a new user via the API. Ensure you replace placeholders with your organization's details and user credentials. The `-u` flag is for basic authentication. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "Content-type: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ -d '{"username":"test3","plan":"Gold","email":"test3@example.com","password":"the_password"}' \ https://your-org.tradervue.com/api/v1/users ``` -------------------------------- ### Get Single Journal Entry Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves detailed journal entry with trade summary statistics and linked trade IDs. ```APIDOC ## GET /api/v1/journal/{id} ### Description Retrieves detailed journal entry with trade summary statistics and linked trade IDs. ### Method GET ### Endpoint /api/v1/journal/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the journal entry. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the journal entry. - **date** (string) - The date of the journal entry. - **notes** (string) - Notes for the journal entry. - **comment_count** (integer) - The number of comments on the journal entry. - **trade_count** (integer) - The number of trades linked to this journal entry. - **total_volume** (integer) - The total volume of trades linked to this entry. - **gross_pl** (float) - The gross profit or loss from linked trades. - **commfees** (float) - Total commissions and fees for linked trades. - **trade_ids** (array of integers) - A list of trade IDs linked to this journal entry. ### Response Example ```json { "id": 9300, "date": "2013-09-06", "notes": "Not a bad trading day; however, I need to be more careful on the open.", "comment_count": 0, "trade_count": 2, "total_volume": 2400, "gross_pl": -1.0, "commfees": 20.57, "trade_ids": [35170, 35176] } ``` ``` -------------------------------- ### Create New User Source: https://context7.com/tradervue/api-docs/llms.txt Creates a new user in the organization. The request body must be JSON and can include optional trial period and settings. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "Content-type: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u admin:password \ -d '{ "username": "newtrader", "plan": "Gold", "email": "newtrader@example.com", "password": "secure_password", "trial_end": "2024-06-30", "settings": { "merge_mode": "force_split", "commission_stocks": "1.01", "commission_options": "1.25", "commission_futures": "2.05", "mentor": 124, "charts": [ {"type": "candlestick", "timeframe": "d"}, {"type": "candlestick", "timeframe": "m5"} ] } }' \ "https://your-org.tradervue.com/api/v1/users" ``` -------------------------------- ### GET /api/v1/trades Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves a paginated list of trades with optional filtering by symbol, tags, date range, side, and duration. ```APIDOC ## GET /api/v1/trades ### Description Retrieves a paginated list of trades with optional filtering by symbol, tags, date range, side, and duration. ### Method GET ### Endpoint `https://app.tradervue.com/api/v1/trades` ### Parameters #### Query Parameters - **symbol** (string) - Optional - Filter trades by symbol. - **side** (string) - Optional - Filter trades by side ('L' for long, 'S' for short). - **duration** (string) - Optional - Filter trades by duration ('D' for intraday, 'I' for multi-day). - **count** (integer) - Optional - Number of trades to return per page (default is 20). - **page** (integer) - Optional - Page number for pagination (default is 1). - **startdate** (string) - Optional - Filter trades starting from this date (MM/DD/YYYY format). - **enddate** (string) - Optional - Filter trades up to this date (MM/DD/YYYY format). - **andtags** (string) - Optional - Filter trades that have all specified tags (comma-separated). - **ortags** (string) - Optional - Filter trades that have at least one of the specified tags (comma-separated). ### Response #### Success Response (200) - **trades** (array of objects) - A list of trades. - **id** (integer) - Unique identifier for the trade. - **symbol** (string) - The trading symbol. - **volume** (integer) - The volume of the trade. - **open** (boolean) - Whether the trade is still open. - **gross_pl** (float) - Gross profit or loss. - **native_pl** (float) - Profit or loss in the native currency. - **native_currency** (string) - The native currency of the trade. - **commission** (float) - Commission paid for the trade. - **fees** (float) - Fees associated with the trade. - **side** (string) - The side of the trade ('long' or 'short'). - **entry_price** (float) - The entry price of the trade. - **exit_price** (float) - The exit price of the trade. - **start_datetime** (string) - The entry date and time of the trade. - **end_datetime** (string) - The exit date and time of the trade. ### Request Example (Default Pagination) ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/trades" ``` ### Request Example (Filtered) ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/trades?symbol=AAPL&side=L&duration=I&count=50&page=1&startdate=01%2F01%2F2024&enddate=12%2F31%2F2024&andtags=swing,momentum" ``` ### Response Example ```json { "trades": [ { "id": 643888, "symbol": "BBY", "volume": 160, "open": false, "gross_pl": -5.592, "native_pl": -5.592, "native_currency": "USD", "commission": 3.0, "fees": 0.06, "side": "long", "entry_price": 40.75, "exit_price": 40.62, "start_datetime": "2013-10-15T13:07:22.000-04:00", "end_datetime": "2013-10-15T15:59:16.000-04:00" } ] } ``` ``` -------------------------------- ### Import Status: Ready Source: https://github.com/tradervue/api-docs/blob/master/imports.md Response indicating that there was no prior import with an unread status and the system is ready for a new import. ```json { "status": "ready" } ``` -------------------------------- ### Get Single Trade Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves detailed information about a specific trade including full notes, MFE/MAE data, and risk metrics. ```APIDOC ## GET /api/v1/trades/{id} ### Description Retrieves detailed information about a specific trade including full notes, MFE/MAE data, and risk metrics. ### Method GET ### Endpoint /api/v1/trades/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the trade. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the trade. - **symbol** (string) - The stock symbol. - **volume** (integer) - The volume of the trade. - **open** (boolean) - Indicates if the trade is currently open. - **gross_pl** (float) - The gross profit or loss of the trade. - **native_pl** (float) - The profit or loss in the native currency. - **native_currency** (string) - The native currency of the trade. - **commission** (float) - The commission paid for the trade. - **fees** (float) - Any additional fees associated with the trade. - **side** (string) - The side of the trade (e.g., 'long', 'short'). - **entry_price** (float) - The price at which the trade was entered. - **exit_price** (float) - The price at which the trade was exited. - **start_datetime** (string) - The date and time the trade was opened. - **end_datetime** (string) - The date and time the trade was closed. - **exec_count** (integer) - The number of executions for this trade. - **comment_count** (integer) - The number of comments on the trade. - **shared** (boolean) - Indicates if the trade is shared. - **notes** (string) - Detailed notes about the trade. - **tags** (array of strings) - Tags associated with the trade. - **initial_risk** (float) - The initial risk defined for the trade. - **position_mfe** (float) - Maximum Favorable Excursion (MFE) of the position. - **position_mfe_datetime** (string) - Datetime of the MFE. - **position_mae** (float) - Maximum Adverse Excursion (MAE) of the position. - **position_mae_datetime** (string) - Datetime of the MAE. - **price_mfe** (float) - MFE in price terms. - **price_mae** (float) - MAE in price terms. - **best_exit_pl** (float) - The best possible profit/loss at exit. - **best_exit_pl_datetime** (string) - Datetime of the best exit. ### Response Example ```json { "id": 643888, "symbol": "BBY", "volume": 160, "open": false, "gross_pl": -5.592, "native_pl": -5.592, "native_currency": "USD", "commission": 3.0, "fees": 0.06, "side": "long", "entry_price": 40.75, "exit_price": 40.62, "start_datetime": "2013-10-15T13:07:22.000-04:00", "end_datetime": "2013-10-15T15:59:16.000-04:00", "exec_count": 3, "comment_count": 0, "shared": false, "notes": "Second try on pullback trade here, using 15m chart...", "tags": ["pb15", "pullback", "try2"], "initial_risk": 20.0, "position_mfe": 43.2, "position_mfe_datetime": "2013-10-15T14:00:00.000-04:00", "position_mae": -17.6, "position_mae_datetime": "2013-10-15T14:48:00.000-04:00", "price_mfe": 0.54, "price_mae": -0.22, "best_exit_pl": 1.204, "best_exit_pl_datetime": "2013-10-15T15:36:00.000-04:00" } ``` ``` -------------------------------- ### GET /api/v1/imports Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves the status of the most recent import operation. This call clears the status after retrieval unless an import is currently processing. ```APIDOC ## GET /api/v1/imports ### Description Retrieves the status of the most recent import operation. This call clears the status after retrieval unless an import is currently processing. ### Method GET ### Endpoint `https://app.tradervue.com/api/v1/imports` ### Response #### Success Response (200) - **status** (string) - The status of the import job (e.g., "ready", "queued", "processing", "succeeded", "failed"). - **info** (object) - Additional information about the import, present for "succeeded" or "failed" statuses. - **exec_count** (integer) - Number of executions processed. - **duplicate_count** (integer) - Number of duplicate executions found. - **overquota_count** (integer) - Number of over-quota executions. - **skipped_futures** (boolean) - Whether futures were skipped. - **skipped_options** (boolean) - Whether options were skipped. - **skipped_forex** (boolean) - Whether forex trades were skipped. - **error_description** (string) - Description of the error if the import failed. - **error_execnumber** (integer) - The execution number where the error occurred. #### Response Example (Ready) ```json { "status": "ready" } ``` #### Response Example (In Progress) ```json { "status": "queued" } ``` #### Response Example (Succeeded) ```json { "status": "succeeded", "info": { "exec_count": 2, "duplicate_count": 0, "overquota_count": 0, "skipped_futures": false, "skipped_options": false, "skipped_forex": false } } ``` #### Response Example (Failed) ```json { "status": "failed", "info": { "exec_count": 0, "error_description": "at least one data row had an invalid quantity", "error_execnumber": 1 } } ``` ``` -------------------------------- ### List All Trades with Curl Source: https://github.com/tradervue/api-docs/blob/master/trades.md Use this command to retrieve a list of all trades. Ensure you replace 'MyApp' and the email with your application details. Authentication is handled via basic auth. ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/trades" ``` -------------------------------- ### Sample JSON Request for Multiple Executions Source: https://github.com/tradervue/api-docs/blob/master/imports.md This JSON structure represents a request to import multiple executions. Ensure datetimes are in ISO 8601 format and quantities are positive for buys and negative for sells. ```json { "allow_duplicates": "false", "overlay_commissions": "false", "tags": ["one", "two"], "account_tag": "swing", "executions": [ { "datetime": "2013-02-07T09:53:34-05:00", "symbol": "SPY", "quantity": "100", "price": "143.74", "option": "", "commission": "1.00", "transfee": "0.04", "ecnfee": "0.21" }, { "datetime": "2013-02-07T09:54:01-05:00", "symbol": "SPY", "quantity": "-100", "price": "143.80", "option": "", "commission": "1.00", "transfee": "0.17", "ecnfee": "0.21" } ] } ``` -------------------------------- ### GET /api/v1/trades/{id}/executions Source: https://github.com/tradervue/api-docs/blob/master/executions.md Lists all executions for a given trade ID. Executions are sorted by execution time, from oldest to newest. ```APIDOC ## GET /api/v1/trades/{id}/executions ### Description Retrieves a list of all executions associated with a specific trade. ### Method GET ### Endpoint /api/v1/trades/{id}/executions ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the trade. ### Request Example ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/trades/659082/executions" ``` ### Response #### Success Response (200) - **executions** (array) - A list of execution objects. - **id** (integer) - The unique identifier of the execution. - **datetime** (string) - The date and time of the execution in ISO 8601 format. - **symbol** (string) - The trading symbol. - **quantity** (number) - The quantity traded. - **price** (number) - The price of the execution. - **commission** (number) - The commission paid for the execution. - **trans_fee** (number) - The transaction fee for the execution. - **ecn_fee** (number) - The ECN fee for the execution. #### Response Example ```json { "executions": [ { "id": 4480554, "datetime": "2013-10-21T09:59:02.000-04:00", "symbol": "HAS", "quantity": 100, "price": 51.51, "commission": 1, "trans_fee": 0, "ecn_fee": 0.3 }, { "id": 4480555, "datetime": "2013-10-21T09:59:38.000-04:00", "symbol": "HAS", "quantity": -100, "price": 51.31, "commission": 1, "trans_fee": 0.1, "ecn_fee": 0.3 } ] } ``` ``` -------------------------------- ### GET /api/v1/trades/{id}/comments Source: https://github.com/tradervue/api-docs/blob/master/comments.md Retrieves a list of comments associated with a specific trade. The comments are returned in chronological order, from oldest to newest. ```APIDOC ## GET /api/v1/trades/{id}/comments ### Description Retrieves a list of comments for a specific trade. ### Method GET ### Endpoint `/api/v1/trades/{id}/comments` ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the trade. ### Request Example ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/trades/421249/comments" ``` ### Response #### Success Response (200) - **comments** (array) - A list of comment objects. - **id** (integer) - The unique identifier of the comment. - **username** (string) - The username of the commenter. - **text** (string) - The content of the comment. - **datetime** (string) - The date and time the comment was made (ISO 8601 format). #### Response Example ```json { "comments": [ { "id": 89, "username": "test1", "text": "Nice. Lorem ipsum dolor sit amet.", "datetime": "2014-06-04T21:49:56.265Z" }, { "id": 90, "username": "example", "text": "Thanks for the feedback!", "datetime": "2014-06-04T21:50:17.227Z" } ] } ``` ``` -------------------------------- ### Create Journal Note Source: https://context7.com/tradervue/api-docs/llms.txt Create a new standalone journal note for general trading observations. The 'notes' field is required. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -H "Content-type: application/json" \ -u example:password \ -d '{"notes": "Key insight: My best setups occur in the first 30 minutes and last hour of trading. Mid-day chop kills my P&L."}' \ "https://app.tradervue.com/api/v1/notes" ``` -------------------------------- ### GET /api/v1/notes/{id}/comments Source: https://github.com/tradervue/api-docs/blob/master/comments.md Retrieves a list of comments associated with a specific journal note. The comments are returned in chronological order, from oldest to newest. ```APIDOC ## GET /api/v1/notes/{id}/comments ### Description Retrieves a list of comments for a specific journal note. ### Method GET ### Endpoint `/api/v1/notes/{id}/comments` ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the journal note. ### Request Example ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/notes/114712/comments" ``` ### Response #### Success Response (200) - **comments** (array) - A list of comment objects. - **id** (integer) - The unique identifier of the comment. - **username** (string) - The username of the commenter. - **text** (string) - The content of the comment. - **datetime** (string) - The date and time the comment was made (ISO 8601 format). #### Response Example ```json { "comments": [ { "id": 89, "username": "test1", "text": "Nice. Lorem ipsum dolor sit amet.", "datetime": "2014-06-04T21:49:56.265Z" }, { "id": 90, "username": "example", "text": "Thanks for the feedback!", "datetime": "2014-06-04T21:50:17.227Z" } ] } ``` ``` -------------------------------- ### GET /api/v1/journal/{id}/comments Source: https://github.com/tradervue/api-docs/blob/master/comments.md Retrieves a list of comments associated with a specific journal entry. The comments are returned in chronological order, from oldest to newest. ```APIDOC ## GET /api/v1/journal/{id}/comments ### Description Retrieves a list of comments for a specific journal entry. ### Method GET ### Endpoint `/api/v1/journal/{id}/comments` ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the journal entry. ### Request Example ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/journal/11473/comments" ``` ### Response #### Success Response (200) - **comments** (array) - A list of comment objects. - **id** (integer) - The unique identifier of the comment. - **username** (string) - The username of the commenter. - **text** (string) - The content of the comment. - **datetime** (string) - The date and time the comment was made (ISO 8601 format). #### Response Example ```json { "comments": [ { "id": 89, "username": "test1", "text": "Nice. Lorem ipsum dolor sit amet.", "datetime": "2014-06-04T21:49:56.265Z" }, { "id": 90, "username": "example", "text": "Thanks for the feedback!", "datetime": "2014-06-04T21:50:17.227Z" } ] } ``` ``` -------------------------------- ### Create New Import Source: https://github.com/tradervue/api-docs/blob/master/imports.md Initiates a new import of trade data into Tradervue. This is the first step in the asynchronous import process. ```APIDOC ## POST /api/v1/imports ### Description Creates a new import operation for trade data. ### Method POST ### Endpoint /api/v1/imports ### Parameters #### Request Body - **trade_data** (file) - Required - The trade data to be imported. The format of the data is determined by Tradervue based on the upload context. ### Request Example (Note: Actual request body will depend on the file upload mechanism and content type. This is a conceptual representation.) ```bash curl -X POST \ -F 'trade_data=@/path/to/your/trades.csv' \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ https://app.tradervue.com/api/v1/imports ``` ### Response (Note: The response structure for creating an import is not detailed in the provided text. Typically, it would include an import ID and an initial status.) #### Success Response (201 Created - Expected) - **import_id** (string) - Unique identifier for the import job. - **status** (string) - Initial status of the import (e.g., 'queued'). #### Response Example (Conceptual) ```json { "import_id": "imp_abc123xyz", "status": "queued" } ``` ``` -------------------------------- ### Query Import Status with Curl Source: https://github.com/tradervue/api-docs/blob/master/imports.md Use this curl command to retrieve the status of the previous import. This call is not idempotent and will reset the status to 'ready' unless an import is queued or processing. ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ https://app.tradervue.com/api/v1/imports ``` -------------------------------- ### Create Asynchronous Import Source: https://context7.com/tradervue/api-docs/llms.txt Create a new asynchronous import job for trade execution data. This endpoint queues imports for background processing. You can specify options like 'allow_duplicates', 'overlay_commissions', 'tags', and 'account_tag'. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -H "Content-type: application/json" \ -u example:password \ -d '{ "allow_duplicates": "false", "overlay_commissions": "false", "tags": ["swing", "momentum"], "account_tag": "main", "executions": [ { "datetime": "2013-02-07T09:53:34-05:00", "symbol": "SPY", "quantity": "100", "price": "143.74", "option": "", "commission": "1.00", "transfee": "0.04", "ecnfee": "0.21" }, { "datetime": "2013-02-07T09:54:01-05:00", "symbol": "SPY", "quantity": "-100", "price": "143.80", "option": "", "commission": "1.00", "transfee": "0.17", "ecnfee": "0.21" } ] }' \ "https://app.tradervue.com/api/v1/imports" ``` -------------------------------- ### Create Trade cURL Command Source: https://github.com/tradervue/api-docs/blob/master/trades.md This cURL command demonstrates how to create a new trade using a POST request. It includes sample data for symbol, notes, risk, sharing status, and tags. ```bash curl -i \ -X POST \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -H "Content-type: application/json" \ -u example:password \ -d '{"symbol":"AAAA","notes":"foo","initial_risk":25.0,"shared":false,"tags":["tag1","tag2"]}' \ "https://app.tradervue.com/api/v1/trades" ``` -------------------------------- ### Identify Application with User-Agent Header Source: https://github.com/tradervue/api-docs/blob/master/README.md Include a User-Agent header to identify your application. This is required for all requests to prevent blacklisting. ```http User-Agent: TradeImporter (http://my-tradeimporter.com) ``` ```http User-Agent: MyApp (yourname@example.com) ``` -------------------------------- ### Get Single Journal Entry Source: https://context7.com/tradervue/api-docs/llms.txt Retrieves detailed information for a specific journal entry using its ID. The response includes trade summary statistics and linked trade IDs. ```bash curl -i \ -H "Accept: application/json" \ -H "User-Agent: MyApp (yourname@example.com)" \ -u example:password \ "https://app.tradervue.com/api/v1/journal/9300" ```