Introduction


Welcome to the documentation for the Tickblaze CLI (Command Line Interface). Here, you will find detailed descriptions of all commands you can use within this platform.


This guide is broken down into sections corresponding to the nature of the commands: Portfolio Commands, Strategy Commands, Data Commands, Resource Commands, and Miscellaneous Commands.


Before we start, it's important to note that options enclosed in square brackets [...] are optional, while those in angle brackets <...> require an input from the user.



Portfolio Commands


portfolio-list

This command lists all the portfolios in the current user's account.


portfolio-new --portfolio-name <portfolio-name> --data-connection-id <data-connection-resource-id>

Creates a new portfolio with the specified portfolio name and data connection ID. Replace <portfolio-name> with the desired name for your new portfolio, and <data-connection-resource-id> with the ID of the data connection you wish to use.


portfolio-start --portfolio-id <desktop-resource-id>

Starts the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio you want to start.


portfolio-stop --portfolio-id <desktop-resource-id>

Stops the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio you want to stop.


portfolio-reset --portfolio-id <desktop-resource-id>

Resets the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio you want to reset.


portfolio-get-info --portfolio-id <desktop-resource-id>

Retrieves information about the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio you're interested in.


portfolio-get-progress --portfolio-id <desktop-resource-id>

Fetches the progress of the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio.


portfolio-get-performance --portfolio-id <desktop-resource-id>

Retrieves performance data of the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio.


portfolio-set-mode --portfolio-id <desktop-resource-id> --mode <backtesting|optimization|simulation|walkforward>

Sets the mode for the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio and <backtesting|optimization|simulation|walkforward> should be replaced with the mode you want to set.


portfolio-get-optimization-results --portfolio-id <desktop-resource-id>

Fetches the optimization results of the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio.


portfolio-data-load --portfolio-id <desktop-resource-id>

Loads the data for the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio.


portfolio-data-unload --portfolio-id <desktop-resource-id>

Unloads the data for the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio.


portfolio-get-orders --portfolio-id <desktop-resource-id> [--status <pending|filled|cancelled|all>]

Fetches the orders for the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio. You can optionally filter by status by replacing <pending|filled|cancelled|all> with the desired order status.


portfolio-get-order-fills --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --order-index <order-index>

Retrieves the order fills for a specific order in a strategy. Replace <desktop-resource-id> with the portfolio ID, <strategy-number> with the strategy number, and <order-index> with the index of the order.


portfolio-get-order-modifications --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --order-index <order-index>

Retrieves the modifications for a specific order in a strategy. Replace <desktop-resource-id> with the portfolio ID, <strategy-number> with the strategy number, and <order-index> with the index of the order.


portfolio-get-positions --portfolio-id <desktop-resource-id> [--status <open|closed|all>]

Fetches the positions for the specified portfolio. <desktop-resource-id> should be replaced with the ID of the portfolio. You can optionally filter by status by replacing <open|closed|all> with the desired position status.


portfolio-set-settings --portfolio-id <desktop-resource-id> [--start-date <yyyyMMdd>] [--end-date <yyyyMMdd>] [--base-currency <usd|eur|gbp|...>] [--engine <workstation|cloud>] [--cpu <single|multi>] [--commission-id <commission-resource-id>] [--dynamic-allocation-id <dynamic-allocation-resource-id>] [--risk-management-id <risk-management-resource-id>] [--slippage-id <slippage-resource-id>] [--tax-system-id <tax-system-resource-id>]

Sets various settings for the specified portfolio. Replace <desktop-resource-id> with the portfolio ID. The rest of the options can be used to set the start and end dates, base currency, engine type, CPU mode, commission ID, dynamic allocation ID, risk management ID, slippage ID, and tax system ID.


portfolio-view-settings --portfolio-id <desktop-resource-id>

Displays the settings for the specified portfolio. Replace <desktop-resource-id> with the portfolio ID.



Strategy Commands


strategy-view-settings --portfolio-id <desktop-resource-id> --strategy-number <strategy-number>

Displays the settings for a specific strategy in a portfolio. Replace <desktop-resource-id> with the portfolio ID and <strategy-number> with the strategy number.


strategy-add --portfolio-id <desktop-resource-id> --strategy-name <strategy-name> --funding <cash-funding-amount> --strategy <trading-strategy-resource-id> [--position-sizing <position-sizing-resource-id>] [--workspace <workspace-resource-id>] [--chart-template <chart-template-resource-id>]

Adds a new strategy to a portfolio. Replace <desktop-resource-id> with the portfolio ID, <strategy-name> with the desired name for your strategy, <cash-funding-amount> with the amount of funding, and <trading-strategy-resource-id> with the ID of the trading strategy to use. Optionally, you can also specify position sizing, workspace, and chart template.


strategy-remove --portfolio-id <desktop-resource-id> --strategy-number <strategy-number>

Removes a strategy from a portfolio. Replace <desktop-resource-id> with the portfolio ID and <strategy-number> with the number of the strategy to remove.


strategy-set-data-series --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --bar-type <tick|second|minute|day|week|month|custom...> [--bar-type-id <bar-type-id>] --bar-size <bar-size> --bar-source <trade|minute|day> --invoke <close|update|never>

Sets the data series for a specific strategy. Replace <desktop-resource-id> with the portfolio ID, <strategy-number> with the strategy number, <tick|second|minute|day|week|month|custom...> with the bar type, <bar-size> with the bar size, <trade|minute|day> with the bar source, and <close|update|never> with the invoke value. Optionally, you can specify the bar type ID.


strategy-add-extra-data-series --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --bar-type <tick|second|minute|day|week|month|custom...> [--bar-type-id <bar-type-resource-id>] --bar-size <bar-size> --bar-source <trade|minute|day> --invoke <close|update|never>

Adds an extra data series to a specific strategy. Use the same replacement as strategy-set-data-series, with the addition of the bar type resource ID if necessary.


strategy-remove-extra-data-series --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --data-series-number <data-series-number>

Removes an extra data series from a specific strategy. Replace <desktop-resource-id> with the portfolio ID, <strategy-number> with the strategy number, and <data-series-number> with the data series number.


strategy-add-symbol --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --symbol-code <symbol-code> --exchange-id <exchange-id-resource-id> --is-eth <false|true> [--contract-type <single|adjusted|unadjusted>] [--contract-year <yyyyMMdd>] [--contract-month <MM>]

Adds a symbol to a specific strategy. Replace <desktop-resource-id> with the portfolio ID, <strategy-number> with the strategy number, <symbol-code> with the code of the symbol, <exchange-id-resource-id> with the exchange ID, <false|true> with whether or not it is ETH. Optionally, you can specify contract type, contract year, and contract month.


strategy-remove-symbol --portfolio-id <desktop-resource-id> --strategy-number <strategy-number> --symbol-code <symbol-code> --exchange-id <exchange-id-resource-id> --is-eth <false|true> [--contract-type <single|adjusted|unadjusted>] [--contract-year <yyyyMMdd>] [--contract-month <MM>]

Removes a symbol from a specific strategy. Use the same replacement values as strategy-add-symbol.



Data Commands


data-backfill-start --portfolio-id <desktop-resource-id> [--start-date <yyyyMMdd>] [--end-date <yyyyMMdd>]

Starts a data backfill for a portfolio. Replace <desktop-resource-id> with the portfolio ID. Optionally, you can specify a start date and end date.


data-backfill-stop --portfolio-id <desktop-resource-id>

Stops a data backfill for a portfolio. Replace <desktop-resource-id> with the portfolio ID.


data-backfill-progress --portfolio-id <desktop-resource-id>

Fetches the progress of a data backfill for a portfolio. Replace <desktop-resource-id> with the portfolio ID.


Resource Commands


resource-list --resource-type <resource-type>

Lists resources of a specific type. Replace <resource-type> with the type of resource you want to list.


resource-get-types

Retrieves a list of all resource types.


resource-get-meta --resource-id <any-resource-id>

Retrieves metadata for a specific resource. Replace <any-resource-id> with the ID of the resource.


resource-delete --resource-id <any-resource-id>

Deletes a specific resource. Replace <any-resource-id> with the ID of the resource.


resource-set-name --resource-id <any-resource-id> --name <resource-name>

Sets the name of a specific resource. Replace <any-resource-id> with the ID of the resource and <resource-name> with the new name.


resource-export --resource-id <any-resource-id> --export-file-path <export-file-path>

Exports a specific resource to a zip file. Replace <any-resource-id> with the ID of the resource and <export-file-path> with the path to the file you want to export to.


resource-import --import-file-path <import-file-path>

Imports a resource from a zip file. Replace <import-file-path> with the path to the file you want to import from.



Miscellaneous Commands


login [--email <email>] [--password <password>]

Logs into your account. Replace <email> with your email and <password> with your password. If you do not provide these details, the CLI will prompt you for them.


logout

Logs out of your account.


clean

Cleans up temporary data.


help

Displays a list of available commands.


exit

Exits the CLI.


This concludes the documentation for the Tickblaze CLI. If you have further questions, please refer to the specific sections for details on each command.