Add columns to a tab
Build your request
Change the values and the command follows. The token is never typed here: the command reads it from the SPECTRE_LOCAL_API_TOKEN environment variable. Run it in your own terminal.
curl -X POST 'http://127.0.0.1:48180/v1/workspace/windows/1/tabs/2/stacks' \
-H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"instrument": "binance:futures:SOLUSDT",
"chart": true
}
]
}'Adds the columns after the last column of the tab, which keeps its name and the widths of its columns. A tab that is not selected becomes active for the time of the command. stacks and charts of the answer are only the added widgets, in the order of columns.
bearerToken workspace:writeAuthorizationBearer <token>The Local API token: spt_ and 64 hex characters. Copy it from Settings App → General → Local API. It is accepted only in the Authorization header. The names listed with an operation are the scopes it requires. The token of the terminal carries all of them.
Scope: workspace:write
id*integerThe id of a window from GET /workspace.
int640 <= valuetab*integerThe id of a tab inside its window, numbered from one.
int640 <= valueapplication/json- body
items*array<>1 <= items <= 50What the command touched.
application/json- response
What a workspace command opened or touched. The numbers it concerns are filled in. The rest is null or empty.
window_id*|int64tab_id*|int64stacks*array<>charts*array<>curl -X POST 'http://127.0.0.1:48180/v1/workspace/windows/1/tabs/2/stacks' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "instrument": "binance:futures:SOLUSDT", "chart": true } ]}'{ "window_id": 1, "tab_id": 2, "stacks": [ 16 ], "charts": [ 17 ]}Select a tab POST
Selects the tab in its window. The focus of the window does not change.
Open a tab of instruments POST
Opens a tab with one column for each element of `items`, in the order of the list. Without `name` the tab takes the symbol of the first instrument, plus the number of the others if there are any: `BTCUSDT +1`. The side and the share of a chart come from the multiview settings.