View as Markdown

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.

Parameters of GET /users/current/accounts
ParameterInTypeDescription
offsetqueryinteger
limitqueryinteger
versionqueryinteger[] | null
typequerystring | null
statequerystring[] | null
connectionStatusquerystring[] | null
deploymentStatusquery"deployed" | "undeployed" | "failed" | null
queryquerystring | null
provisioningProfileIdquerystring | null
regionquerystring[] | null
tagsquerystring[] | null
sortOrderquery"asc" | "desc" | null
api-versionheaderstring | null

Responses

  • 200 The accounts. A plain list, or {count, items} with api-version: 2. · TradingAccount[] | TradingAccountPage
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts
ParameterInTypeDescription
transaction-idheaderstring | null
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body NewTradingAccount required

Request body fields of POST /users/current/accounts
FieldTypeDescription
name requiredstring
server requiredstring
loginstring | integer | null
passwordstring | null
platform"mt4" | "mt5" | null
provisioningProfileIdstring | null
magicinteger
manualTradesboolean
slippagenumber | null
quoteStreamingIntervalInSecondsnumber
tagsstring[]
metadataobject | null
reliability"regular" | "high"
resourceSlotsinteger
copyFactoryResourceSlotsinteger
regionstring | null
type"cloud" | "cloud-g1" | "cloud-g2"
symbolstring | null
baseCurrencystring | null
copyFactoryRoles"PROVIDER" | "SUBSCRIBER"[]
riskManagementApiEnabledboolean
metastatsApiEnabledboolean
allocateDedicatedIp"ipv4" | "none" | null
keywordsstring[]
serverAddressstring | null

Responses

  • 201 The new account's id and state. · AccountCreated
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of GET /users/current/accounts/{account_id}
ParameterInTypeDescription
account_id requiredpathstring

Responses

  • 200 The account. · TradingAccount
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PUT /users/current/accounts/{account_id}
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body UpdateTradingAccount required

Request body fields of PUT /users/current/accounts/{account_id}
FieldTypeDescription
namestring | null
passwordstring | null
serverstring | null
magicinteger | null
manualTradesboolean | null
slippagenumber | null
quoteStreamingIntervalInSecondsnumber | null
tagsstring[] | null
metadataobject | null
copyFactoryRoles"PROVIDER" | "SUBSCRIBER"[] | null
resourceSlotsinteger | null
copyFactoryResourceSlotsinteger | null
metastatsApiEnabledboolean | null
allocateDedicatedIp"ipv4" | "none" | null
serverAddressstring | null

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of DELETE /users/current/accounts/{account_id}
ParameterInTypeDescription
account_id requiredpathstring
executeForAllReplicasqueryboolean
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PUT /users/current/accounts/{account_id}/credentials
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body Credentials required

Request body fields of PUT /users/current/accounts/{account_id}/credentials
FieldTypeDescription
loginstring | integer | null
password requiredstring

Responses

  • 200 The account's id and state. · AccountCreated
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts/{account_id}/deploy
ParameterInTypeDescription
account_id requiredpathstring
executeForAllReplicasqueryboolean
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts/{account_id}/enable-account-features
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body AccountFeatures required

Request body fields of POST /users/current/accounts/{account_id}/enable-account-features
FieldTypeDescription
copyFactoryApiCopyTradingEnable | null
riskManagementApiEnabledboolean | null
metastatsApiEnabledboolean | null
reliabilityIncreasedboolean | null
allocateDedicatedIp"ipv4" | "none" | null

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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).

Parameters of POST /users/current/accounts/{account_id}/enable-copy-factory-api
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body CopyTradingEnable required

Request body fields of POST /users/current/accounts/{account_id}/enable-copy-factory-api
FieldTypeDescription
copyFactoryRoles required"PROVIDER" | "SUBSCRIBER"[]
copyFactoryResourceSlotsinteger | null

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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).

Parameters of POST /users/current/accounts/{account_id}/enable-metastats-api
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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).

Parameters of POST /users/current/accounts/{account_id}/enable-risk-management-api
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts/{account_id}/increase-reliability
ParameterInTypeDescription
account_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts/{account_id}/redeploy
ParameterInTypeDescription
account_id requiredpathstring
executeForAllReplicasqueryboolean
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/accounts/{account_id}/undeploy
ParameterInTypeDescription
account_id requiredpathstring
executeForAllReplicasqueryboolean
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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}.

Parameters of GET /users/current/provisioning-profiles
ParameterInTypeDescription
versionqueryinteger | null
statusquery"new" | "active" | null
typequery"mtTerminal" | "managerApi" | null
queryquerystring | null
offsetqueryinteger
limitqueryinteger
api-versionheaderstring | null

Responses

  • 200 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /users/current/provisioning-profiles
ParameterInTypeDescription
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body NewProfile required

Request body fields of POST /users/current/provisioning-profiles
FieldTypeDescription
name requiredstring
version required4 | 5
brokerTimezone requiredstring
brokerDSTSwitchTimezone requiredstring
type"mtTerminal" | "managerApi"
managerLoginstring | null
managerPasswordstring | null
managerServerstring | null

Responses

  • 201 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of GET /users/current/provisioning-profiles/{profile_id}
ParameterInTypeDescription
profile_id requiredpathstring

Responses

  • 200 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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).

Parameters of PUT /users/current/provisioning-profiles/{profile_id}
ParameterInTypeDescription
profile_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Request body UpdateProfile required

Request body fields of PUT /users/current/provisioning-profiles/{profile_id}
FieldTypeDescription
namestring | null
brokerTimezonestring | null
brokerDSTSwitchTimezonestring | null
managerLoginstring | null
managerPasswordstring | null
managerServerstring | null

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of DELETE /users/current/provisioning-profiles/{profile_id}
ParameterInTypeDescription
profile_id requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PUT /users/current/provisioning-profiles/{profile_id}/{file_name}
ParameterInTypeDescription
profile_id requiredpathstring
file_name requiredpathstring
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

  • 204 Successful Response
  • 400 Bad request. On the account API paths a body or query validation failure is a 400 ValidationError with details: [{parameter, message}]. · ErrorEnvelope
  • 401 No credential was sent, or it is not valid or has expired. · ErrorEnvelope
  • 403 The 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. · ErrorEnvelope
  • 404 The account or resource in the path does not exist, or this credential cannot see it. · ErrorEnvelope
  • 409 Conflict: 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. · ErrorEnvelope
  • 429 Too many requests. Wait the Retry-After seconds, then try again. · ErrorEnvelope

Errors (common for this kind of call; every error uses one envelope)

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.