API reference / Account REST API (/users/current)
Accounts and provisioning
Account REST API (/users/current). Generated from the OpenAPI document the services export (/openapi.json).
Samples use the placeholders YOUR_API_KEY and YOUR_ACCOUNT_ID.
Paste a sandbox key (twsk_…) to fill them in and to use Try it.
It stays in this browser tab and is only sent to the sandbox, never to the live API.
Try it is off in this build: No sandbox URL is configured for this build of the docs.
GET /users/current/accounts
List accounts Auth: auth-token
The organisation's MT4 and MT5 accounts this credential can see, with filters. Send
api-version: 2 to get {count, items} instead of a plain list.
| Parameter | In | Type | Description |
|---|---|---|---|
offset | query | integer | |
limit | query | integer | |
version | query | integer[] | null | |
type | query | string | null | |
state | query | string[] | null | |
connectionStatus | query | string[] | null | |
deploymentStatus | query | "deployed" | "undeployed" | "failed" | null | |
query | query | string | null | |
provisioningProfileId | query | string | null | |
region | query | string[] | null | |
tags | query | string[] | null | |
sortOrder | query | "asc" | "desc" | null | |
api-version | header | string | null |
Responses
200The accounts. A plain list, or{count, items}withapi-version: 2. ·TradingAccount[] | TradingAccountPage400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/users/current/accounts' \
-H 'auth-token: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/users/current/accounts",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/accounts");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts
Create an account Idempotency-Key Auth: auth-token
Create a trading account and deploy its terminal; 201 {id, state}. Send
transaction-id or Idempotency-Key so a retry never creates a second account.
Without login and password the account is a DRAFT.
| Parameter | In | Type | Description |
|---|---|---|---|
transaction-id | header | string | null | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body NewTradingAccount required
| Field | Type | Description |
|---|---|---|
name required | string | |
server required | string | |
login | string | integer | null | |
password | string | null | |
platform | "mt4" | "mt5" | null | |
provisioningProfileId | string | null | |
magic | integer | |
manualTrades | boolean | |
slippage | number | null | |
quoteStreamingIntervalInSeconds | number | |
tags | string[] | |
metadata | object | null | |
reliability | "regular" | "high" | |
resourceSlots | integer | |
copyFactoryResourceSlots | integer | |
region | string | null | |
type | "cloud" | "cloud-g1" | "cloud-g2" | |
symbol | string | null | |
baseCurrency | string | null | |
copyFactoryRoles | "PROVIDER" | "SUBSCRIBER"[] | |
riskManagementApiEnabled | boolean | |
metastatsApiEnabled | boolean | |
allocateDedicatedIp | "ipv4" | "none" | null | |
keywords | string[] | |
serverAddress | string | null |
Responses
201The new account's id and state. ·AccountCreated400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"name":"example","server":"Tickwire-Sandbox","magic":0,"manualTrades":false,"quoteStreamingIntervalInSeconds":2.5,"reliability":"regular","resourceSlots":1,"copyFactoryResourceSlots":1,"type":"cloud-g2","riskManagementApiEnabled":false,"metastatsApiEnabled":false}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts",
json={
"name": "example",
"server": "Tickwire-Sandbox",
"magic": 0,
"manualTrades": False,
"quoteStreamingIntervalInSeconds": 2.5,
"reliability": "regular",
"resourceSlots": 1,
"copyFactoryResourceSlots": 1,
"type": "cloud-g2",
"riskManagementApiEnabled": False,
"metastatsApiEnabled": False,
},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts", {
body: {
"name": "example",
"server": "Tickwire-Sandbox",
"magic": 0,
"manualTrades": false,
"quoteStreamingIntervalInSeconds": 2.5,
"reliability": "regular",
"resourceSlots": 1,
"copyFactoryResourceSlots": 1,
"type": "cloud-g2",
"riskManagementApiEnabled": false,
"metastatsApiEnabled": false
},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /users/current/accounts/{account_id}
Get an account Auth: auth-token
One trading account, with state, connectionStatus, ipMode and health.
health is unknown until the terminal has reported.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string |
Responses
200The account. ·TradingAccount400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found
curl
curl -sS -X GET 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
-H 'auth-token: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/users/current/accounts/YOUR_ACCOUNT_ID",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/accounts/YOUR_ACCOUNT_ID");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /users/current/accounts/{account_id}
Update an account Idempotency-Key Auth: auth-token
Change an account's settings (204). The change takes effect on the next redeploy.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body UpdateTradingAccount required
| Field | Type | Description |
|---|---|---|
name | string | null | |
password | string | null | |
server | string | null | |
magic | integer | null | |
manualTrades | boolean | null | |
slippage | number | null | |
quoteStreamingIntervalInSeconds | number | null | |
tags | string[] | null | |
metadata | object | null | |
copyFactoryRoles | "PROVIDER" | "SUBSCRIBER"[] | null | |
resourceSlots | integer | null | |
copyFactoryResourceSlots | integer | null | |
metastatsApiEnabled | boolean | null | |
allocateDedicatedIp | "ipv4" | "none" | null | |
serverAddress | string | null |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X PUT 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/users/current/accounts/YOUR_ACCOUNT_ID",
json={},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/accounts/YOUR_ACCOUNT_ID", {
body: {},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
DELETE /users/current/accounts/{account_id}
Delete an account Idempotency-Key Auth: auth-token
Stop the account's terminal and delete the account (204). If the host cannot be
reached the account shows DELETE_FAILED and the delete is retried.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
executeForAllReplicas | query | boolean | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X DELETE 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"DELETE",
"/users/current/accounts/YOUR_ACCOUNT_ID",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("DELETE", "/users/current/accounts/YOUR_ACCOUNT_ID", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /users/current/accounts/{account_id}/credentials
Set account credentials Idempotency-Key Auth: auth-token
Set the broker login and password; answers {id, state}. A DRAFT account is
then deployed. The password is never returned or logged.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body Credentials required
| Field | Type | Description |
|---|---|---|
login | string | integer | null | |
password required | string |
Responses
200The account's id and state. ·AccountCreated400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X PUT 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/credentials' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"password":"YOUR_PASSWORD"}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/users/current/accounts/YOUR_ACCOUNT_ID/credentials",
json={"password": "YOUR_PASSWORD"},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/accounts/YOUR_ACCOUNT_ID/credentials", {
body: {"password":"YOUR_PASSWORD"},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/deploy
Deploy an account Idempotency-Key Auth: auth-token
Start the account's terminal (204). Watch the account's state and
connectionStatus to see when it is connected.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
executeForAllReplicas | query | boolean | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/deploy' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/deploy",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/deploy", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/enable-account-features
Enable account features Idempotency-Key Auth: auth-token
Set several feature flags on the account in one call (204), including whether it uses an own address.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body AccountFeatures required
| Field | Type | Description |
|---|---|---|
copyFactoryApi | CopyTradingEnable | null | |
riskManagementApiEnabled | boolean | null | |
metastatsApiEnabled | boolean | null | |
reliabilityIncreased | boolean | null | |
allocateDedicatedIp | "ipv4" | "none" | null |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features",
json={},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features", {
body: {},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/enable-copy-factory-api
Enable the copy trading API Idempotency-Key Auth: auth-token
Record the copy trading roles and resource slots on the account (204).
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body CopyTradingEnable required
| Field | Type | Description |
|---|---|---|
copyFactoryRoles required | "PROVIDER" | "SUBSCRIBER"[] | |
copyFactoryResourceSlots | integer | null |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"copyFactoryRoles":["PROVIDER"]}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api",
json={"copyFactoryRoles": ["PROVIDER"]},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api", {
body: {"copyFactoryRoles":["PROVIDER"]},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/enable-metastats-api
Enable the trading statistics API Idempotency-Key Auth: auth-token
Record the trading statistics API flag on the account (204).
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/enable-risk-management-api
Enable the risk management API Idempotency-Key Auth: auth-token
Record the risk management API flag on the account (204).
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/increase-reliability
Increase reliability Idempotency-Key Auth: auth-token
Record that high reliability was requested (204). The account is still served by one
terminal; instances gives the real count.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/redeploy
Redeploy an account Idempotency-Key Auth: auth-token
Restart the account's terminal (204). This applies settings changed since the last deploy.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
executeForAllReplicas | query | boolean | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/redeploy' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/redeploy",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/redeploy", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/accounts/{account_id}/undeploy
Undeploy an account Idempotency-Key Auth: auth-token
Stop the account's terminal and keep the account (204). An undeployed account holds no terminal and costs nothing.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
executeForAllReplicas | query | boolean | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/undeploy' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/accounts/YOUR_ACCOUNT_ID/undeploy",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/undeploy", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /users/current/provisioning-profiles
List provisioning profiles Auth: auth-token
The organisation's provisioning profiles, with filters. Send api-version: 2 to
get {count, items}.
| Parameter | In | Type | Description |
|---|---|---|---|
version | query | integer | null | |
status | query | "new" | "active" | null | |
type | query | "mtTerminal" | "managerApi" | null | |
query | query | string | null | |
offset | query | integer | |
limit | query | integer | |
api-version | header | string | null |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/users/current/provisioning-profiles' \
-H 'auth-token: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/users/current/provisioning-profiles",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/provisioning-profiles");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /users/current/provisioning-profiles
Create a provisioning profile Idempotency-Key Auth: auth-token
Create a profile with a broker's time zones; 201 {id}. Time zones must be IANA
names, for example Europe/Athens.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body NewProfile required
| Field | Type | Description |
|---|---|---|
name required | string | |
version required | 4 | 5 | |
brokerTimezone required | string | |
brokerDSTSwitchTimezone required | string | |
type | "mtTerminal" | "managerApi" | |
managerLogin | string | null | |
managerPassword | string | null | |
managerServer | string | null |
Responses
201Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/users/current/provisioning-profiles' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"name":"example","version":4,"brokerTimezone":"2026-09-01T00:00:00.000","brokerDSTSwitchTimezone":"2026-09-01T00:00:00.000","type":"mtTerminal"}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/users/current/provisioning-profiles",
json={
"name": "example",
"version": 4,
"brokerTimezone": "2026-09-01T00:00:00.000",
"brokerDSTSwitchTimezone": "2026-09-01T00:00:00.000",
"type": "mtTerminal",
},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/provisioning-profiles", {
body: {
"name": "example",
"version": 4,
"brokerTimezone": "2026-09-01T00:00:00.000",
"brokerDSTSwitchTimezone": "2026-09-01T00:00:00.000",
"type": "mtTerminal"
},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /users/current/provisioning-profiles/{profile_id}
Get a provisioning profile Auth: auth-token
One profile, with its serverNames and uploaded files.
| Parameter | In | Type | Description |
|---|---|---|---|
profile_id required | path | string |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
-H 'auth-token: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/users/current/provisioning-profiles/PROFILE_ID",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/provisioning-profiles/PROFILE_ID");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /users/current/provisioning-profiles/{profile_id}
Update a provisioning profile Idempotency-Key Auth: auth-token
Change a profile's name, time zones or manager settings (204).
| Parameter | In | Type | Description |
|---|---|---|---|
profile_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Request body UpdateProfile required
| Field | Type | Description |
|---|---|---|
name | string | null | |
brokerTimezone | string | null | |
brokerDSTSwitchTimezone | string | null | |
managerLogin | string | null | |
managerPassword | string | null | |
managerServer | string | null |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X PUT 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/users/current/provisioning-profiles/PROFILE_ID",
json={},
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/provisioning-profiles/PROFILE_ID", {
body: {},
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
DELETE /users/current/provisioning-profiles/{profile_id}
Delete a provisioning profile Idempotency-Key Auth: auth-token
Delete a profile (204). A profile that accounts still use is a 400
ValidationError.
| Parameter | In | Type | Description |
|---|---|---|---|
profile_id required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X DELETE 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"DELETE",
"/users/current/provisioning-profiles/PROFILE_ID",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("DELETE", "/users/current/provisioning-profiles/PROFILE_ID", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /users/current/provisioning-profiles/{profile_id}/{file_name}
Upload a provisioning profile file Idempotency-Key Auth: auth-token
Upload the broker's servers file (servers.dat for MT5, *.srv or
servers.ini for MT4) as multipart field file or a raw body (204). The profile
becomes active once its platform's file is present.
| Parameter | In | Type | Description |
|---|---|---|---|
profile_id required | path | string | |
file_name required | path | string | |
Idempotency-Key | header | string | null | Optional; replays the first answer |
X-Actor | header | string | null | Who is acting (audit log) |
X-Reason | header | string | null | Why (audit log; percent-encode non-ASCII) |
Responses
204Successful Response400Bad request. On the account API paths a body or query validation failure is a 400ValidationErrorwithdetails: [{parameter, message}]. ·ErrorEnvelope401No credential was sent, or it is not valid or has expired. ·ErrorEnvelope403The credential is valid but may not do this, for example a read-only key on a change, or a token without the needed role or account. ·ErrorEnvelope404The account or resource in the path does not exist, or this credential cannot see it. ·ErrorEnvelope409Conflict: the Idempotency-Key was used with another body, a request with the same key is still running, or the resource is in a state that does not allow this. ·ErrorEnvelope429Too many requests. Wait theRetry-Afterseconds, then try again. ·ErrorEnvelope
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X PUT 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME' \
-H 'auth-token: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Actor: my-app' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME",
idempotency_key="my-request-1",
actor="my-app",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME", {
idempotencyKey: "my-request-1",
actor: "my-app",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.