API Reference
Endpoint reference for Turnqey ByAllAccounts API v2026.10.1, rendered from the public OpenAPI spec.
api.turnqey.xyz is dedicated to the Morningstar ByAllAccounts integration. This reference is rendered from its OpenAPI 3.1 specification, kept in one production-owned file: openapi/turnqey.json. Other Turnqey products expose their own APIs, documented on their product pages.Servers
https://api.turnqey.xyz- ByAllAccounts API - Production (use /v1/api/* paths)
Auth
Bearer-token issuance for partner client credentials.
/v1/api/tokenAuthGenerate authentication token
Exchanges partner client credentials for a JWT bearer token. The token lifetime is returned in `expiresIn` (seconds) and `expiresOn`; it is not fixed, so refresh from those values rather than a hard-coded interval. Rate limited per source IP: a 429 carries `Retry-After` and `X-RateLimit-*` headers.
Request body
{
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
}Responses
{
"statusCode": 200,
"message": "POST Request successful.",
"isError": false,
"result": {
"expiresOn": "2026-10-30T17:10:43+00:00",
"expiresIn": 3599,
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}{
"statusCode": 400,
"isError": true,
"responseException": {
"exceptionMessage": {
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"$": [
"JSON deserialization for type 'TokenRequest' was missing required properties, including the following: clientId, clientSecret"
]
}
}
}
}Accounts
Linked cryptoasset accounts: lookup by collection or identity, balances, and transactions.
/v1/api/account/collection/{collectionId}AccountsGet account collection by ID
Lists the linked accounts in a collection. Returns an array of `{accountId, type}`, where `type` is the source platform (`coinbase` or `gemini`). An unknown collection, or one that belongs to another partner, returns an empty array with HTTP 200, not a 404.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
collectionId | path | string (uuid) | Yes | UUID of the account collection. |
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": [
{
"accountId": "0f1e2d3c-4b5a-4c6d-8e9f-0a1b2c3d4e5f",
"type": "coinbase"
},
{
"accountId": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
"type": "gemini"
}
]
}/v1/api/account/identity/{identity}AccountsGet account by identity
Resolves the linked account for a partner-side identity string. Returns a single `{accountId, type}`. An unknown identity returns an empty object with HTTP 200, not a 404.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
identity | path | string | Yes | Identity string supplied by the partner when the account was authorized. |
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": {
"accountId": "0f1e2d3c-4b5a-4c6d-8e9f-0a1b2c3d4e5f",
"type": "coinbase"
}
}/v1/api/account/{accountId}/transactionsAccountsGet account transactions
Returns the transaction history for a linked account. Each row carries `type, title, subtitle, header, exchange, dateTime, amount, symbol, volume, fee, price`. Data is served from a 30-minute cache; `forceRefresh=true` asks the source for fresh data when the cache is older than that, and is ignored while the first sync is still running. When the snapshot is older than the freshness window, the response also carries a `dataFreshness` object and `transactionSyncStatus` is `stale` or `reconnect_required`.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
accountId | path | string (uuid) | Yes | UUID of the linked account. |
forceRefresh | query | boolean | No | Refresh from the source when the cached data is older than 30 minutes. Defaults to false. |
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": {
"transactions": [
{
"type": "buy",
"title": "Bought BTC",
"subtitle": "Coinbase",
"header": "0.5 BTC",
"exchange": "coinbase",
"dateTime": "2026-09-12T15:04:05Z",
"amount": "24500.00",
"symbol": "BTC",
"volume": "0.5",
"fee": "12.25",
"price": "49000.00"
}
],
"lastUpdatedOn": "2026-10-30T14:00:00Z"
}
}/v1/api/account/{accountId}/balancesAccountsGet account balances
Returns current balances for a linked account, one row per asset wallet, with cost basis, market value, and realized and unrealized gains. Each row carries `walletId, symbol, balance, currentPrice, marketValue, costBasis, realizedGainLoss, unrealizedGainLoss` plus `costBasisStatus, realizedGainLossStatus, unrealizedGainLossStatus`. Data is served from a 30-minute cache; `forceRefresh=true` asks the source for fresh data when the cache is older than that. When the snapshot is older than the freshness window, the response also carries a `dataFreshness` object and `transactionSyncStatus` is `stale` or `reconnect_required`.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
accountId | path | string (uuid) | Yes | UUID of the linked account. |
forceRefresh | query | boolean | No | Refresh from the source when the cached data is older than 30 minutes. Defaults to false. |
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": {
"balances": [
{
"walletId": "7c1f4b2e-3d5a-4e6f-9a8b-0c1d2e3f4a5b",
"symbol": "BTC",
"balance": "0.5",
"currentPrice": "50000.00",
"marketValue": "25000.00",
"costBasis": "24500.00",
"realizedGainLoss": "500.00",
"unrealizedGainLoss": "500.00",
"costBasisStatus": "complete",
"realizedGainLossStatus": "complete",
"unrealizedGainLossStatus": "complete"
}
],
"marketValue": "25000.00",
"realizedGainLoss": "500.00",
"unrealizedGainLoss": "500.00",
"lastUpdatedOn": "2026-10-30T14:00:00Z",
"transactionSyncStatus": "complete",
"costBasisStatus": "complete",
"realizedGainLossStatus": "complete",
"unrealizedGainLossStatus": "complete"
}
}Checksum
Generates the checksum that signs an account-authorization link.
/v1/api/checksumChecksumGenerate authorization checksum
Generates the HMAC checksum that signs an account-authorization link (`GET /authorize`). The checksum binds your client, the `platform`, the `collection`, and the optional `identity`, and expires after `expiresIn` seconds. Pass the same three values on the `/authorize` URL. This endpoint does not verify or reconcile account data.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
platform | query | string | Yes | Source platform the user will authorize: `coinbase` or `gemini`. A 400 is returned when it is missing. |
collection | query | string (uuid) | No | UUID of an existing collection the authorized account will join. Omit it (here and on `/authorize`) to have Turnqey create a new collection. |
identity | query | string | No | Partner-side identity string for the account. Must match the value used on `/authorize` if supplied. |
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": {
"checksum": "3f9c1b0a7d4e2f6c8b5a9d1e0c7f4b2a6e8d3c1f",
"expiresIn": 900
}
}System
Unauthenticated deployment information.
/versionSystemGet API version
Returns the deployed service version and build. No authentication required. Useful as a reachability probe.
Responses
{
"statusCode": 200,
"message": "GET Request successful.",
"isError": false,
"result": {
"service": "BAA",
"version": "1.0.0.0",
"informationalVersion": "1.0.0+fdaad5001505460fe58d51f14b95d403a2ee9778",
"buildSha": "fdaad5001505460fe58d51f14b95d403a2ee9778",
"environment": "Production",
"generatedAtUtc": "2026-10-30T16:10:43+01:00"
}
}