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.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
startTime | query | string | null | |
endTime | query | string | null | |
days | query | integer | null | |
symbol | query | string | null | |
limit | query | integer |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400 ``ValidationError`` with ``details: [{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 does not exist or this credential cannot see it, or the position, order or symbol in the path was not found. ·ErrorEnvelope422The body is not valid JSON, or a typed query parameter is not valid. ``details`` lists each one. ·ErrorEnvelope429Too many requests. Wait the ``Retry-After`` seconds, then try again. ·ErrorEnvelope503The 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)
401unauthorized429rate_limited400, 422validation_error404account_not_found503not_connected
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.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
startTime | query | string | null | |
endTime | query | string | null | |
days | query | integer | null |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400 ``ValidationError`` with ``details: [{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 does not exist or this credential cannot see it, or the position, order or symbol in the path was not found. ·ErrorEnvelope422The body is not valid JSON, or a typed query parameter is not valid. ``details`` lists each one. ·ErrorEnvelope429Too many requests. Wait the ``Retry-After`` seconds, then try again. ·ErrorEnvelope503The 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)
401unauthorized429rate_limited400, 422validation_error404account_not_found503not_connected
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).
| Parameter | In | Type | Description |
|---|---|---|---|
accountIds required | query | string | |
startTime | query | string | null | |
endTime | query | string | null | |
days | query | integer | null | |
symbol | query | string | null | |
limit | query | integer |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400 ``ValidationError`` with ``details: [{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. ·ErrorEnvelope429Too many requests. Wait the ``Retry-After`` seconds, 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/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).
| Parameter | In | Type | Description |
|---|---|---|---|
accountIds | query | string | null | |
startTime | query | string | null | |
endTime | query | string | null | |
days | query | integer | null |
Responses
200Successful Response400Bad request. On the account API paths a body or query validation failure is a 400 ``ValidationError`` with ``details: [{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. ·ErrorEnvelope429Too many requests. Wait the ``Retry-After`` seconds, 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/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.