View as Markdown

API reference / Account REST API (/users/current)

Speed and execution quality

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/{account_id}/execution-quality

Account Execution Quality Auth: auth-token

Execution quality of this account over a time range: slippage per fill, time to fill, rejects and requotes (TASK-212). See the module docstring.

Parameters of GET /users/current/accounts/{account_id}/execution-quality
ParameterInTypeDescription
account_id requiredpathstring
startTimequerystring | null
endTimequerystring | null
daysqueryinteger | null
symbolquerystring | null
limitqueryinteger

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 does not exist or this credential cannot see it, or the position, order or symbol in the path was not found. · ErrorEnvelope
  • 422 The body is not valid JSON, or a typed query parameter is not valid. ``details`` lists each one. · ErrorEnvelope
  • 429 Too many requests. Wait the ``Retry-After`` seconds, then try again. · ErrorEnvelope
  • 503 The terminal is not connected or not synchronized yet. 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/execution-quality' \
  -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/execution-quality",
    )
    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/execution-quality");
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}/speed

Account Speed Auth: auth-token

Event latency, close-confirm time and time to fill of this account (TASK-231). See the module docstring for the body.

Parameters of GET /users/current/accounts/{account_id}/speed
ParameterInTypeDescription
account_id requiredpathstring
startTimequerystring | null
endTimequerystring | null
daysqueryinteger | 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 does not exist or this credential cannot see it, or the position, order or symbol in the path was not found. · ErrorEnvelope
  • 422 The body is not valid JSON, or a typed query parameter is not valid. ``details`` lists each one. · ErrorEnvelope
  • 429 Too many requests. Wait the ``Retry-After`` seconds, then try again. · ErrorEnvelope
  • 503 The terminal is not connected or not synchronized yet. 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/speed' \
  -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/speed",
    )
    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/speed");
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/execution-quality/compare

Compare Execution Quality Auth: auth-token

Execution quality of 2 to 4 accounts side by side (TASK-212).

Parameters of GET /users/current/execution-quality/compare
ParameterInTypeDescription
accountIds requiredquerystring
startTimequerystring | null
endTimequerystring | null
daysqueryinteger | null
symbolquerystring | null
limitqueryinteger

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
  • 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/execution-quality/compare?accountIds=string' \
  -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/execution-quality/compare",
        params={"accountIds": "string"},
    )
    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/execution-quality/compare", {
  params: {"accountIds":"string"},
});
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/speed

Organisation Speed Auth: auth-token

Speed of the organisation's accounts together (TASK-231).

Parameters of GET /users/current/speed
ParameterInTypeDescription
accountIdsquerystring | null
startTimequerystring | null
endTimequerystring | null
daysqueryinteger | 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
  • 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/speed' \
  -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/speed",
    )
    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/speed");
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.