curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}")
.bearer_auth(std::env::var("EDEL_API_KEY")?)
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();{
"free": {},
"used": {},
"total": {},
"info": {
"version": "external-account-snapshot/v1",
"accountId": "<string>",
"asset": "<string>",
"snapshotSequence": 1,
"readModelDigest": "<string>",
"marginMode": "isolated",
"cashBalanceAtoms": "<string>",
"cashBalance": "<string>",
"equityAtoms": "<string>",
"equity": "<string>",
"availableForOrdersAtoms": "<string>",
"availableForOrders": "<string>",
"resync": {
"stream": "account.margin",
"fromSequence": 123
},
"assetBalances": [
{
"asset": "<string>",
"totalAtoms": "<string>",
"lockedAtoms": "<string>",
"heldAtoms": "<string>",
"freeAtoms": "<string>"
}
],
"consentState": "absent",
"state": "account_never_funded",
"collateralBalance": {
"accountId": "<string>",
"asset": "<string>",
"decimals": 5,
"totalAtoms": "<string>",
"lockedAtoms": "<string>",
"heldAtoms": "<string>",
"journalSequence": 1,
"freeAtoms": "<string>",
"markRevision": "<string>"
},
"withdrawalReservedAtoms": "<string>",
"withdrawalReserved": "<string>",
"initialMarginAtoms": "<string>",
"initialMargin": "<string>",
"positionInitialMarginAtoms": "<string>",
"positionInitialMargin": "<string>",
"orderReserveAtoms": "<string>",
"orderReserve": "<string>",
"riskEvidence": {
"status": "complete"
},
"liquidationCandidate": true,
"maintenanceRequirementAtoms": "<string>",
"marginHealthBps": "<string>",
"badDebtAtoms": "<string>",
"positions": [
{
"marketId": "<string>",
"unrealizedPnlAtoms": "<string>",
"signedBaseAtoms": "<string>",
"entryNotionalAtoms": "<string>",
"markPriceAtoms": "<string>",
"entryPriceAtoms": "<string>"
}
],
"spotHoldings": [
{
"asset": "<string>",
"symbol": "<string>",
"amountAtoms": "<string>",
"amount": "<string>",
"valuationPrice": "<string>",
"markPriceSource": "book_mid",
"valueAtoms": "<string>",
"value": "<string>"
}
],
"spotHoldingsValueAtoms": "<string>",
"spotHoldingsValue": "<string>",
"totalAccountValueAtoms": "<string>",
"totalAccountValue": "<string>",
"unpricedAssets": [
"<string>"
]
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}Fetch balances for every held asset
Works for perpetual and spot accounts: with spot on, it returns one entry for each asset the account holds, spot tokens included. Spot is live on TestNet.
The settlement asset has the same unsigned free, used and total with spot enabled or disabled. Total is settled cash plus net internal transfers, floored at zero. Used includes withdrawal holds and collateral withheld from orders by reserves and risk. Free is bounded by the remaining settled collateral and native order capacity, so free plus used equals total. If a legacy snapshot lacks complete reserve or hold information, free is the smaller of total and native order capacity floored at zero, and used is null. With spot enabled, known token balances are included. Complete multi-asset responses carry raw atoms in info.assetBalances. Has no unified field for a marked account value, so info carries spotHoldingsValue, totalAccountValue (equity plus spotHoldingsValue), spotHoldings and unpricedAssets, as on the account snapshot. An organization key (edel_ok_) spends the one trading budget of its organization, shared by every key of the organization: the limit an Edel operator stored for the organization, else the default limit an Edel operator set for every organization (6000 requests per 60 seconds while none is set), at most 12000 per 60 seconds; a user key keeps its own trader limit. Over the budget the answer is 429 rate_limited with Retry-After, and info.rateLimit names the limiter (organization), requestsPerWindow and windowMs.
Method and path: GET /v2/accounts/{accountId}
Authentication: DFNS trader bearer required.
Request schema: none.
Response schema: V2BalanceResponse.
Error envelope: V2ErrorResponse (contains ExternalRestError external-rest-error/v1 as info).
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}")
.bearer_auth(std::env::var("EDEL_API_KEY")?)
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();{
"free": {},
"used": {},
"total": {},
"info": {
"version": "external-account-snapshot/v1",
"accountId": "<string>",
"asset": "<string>",
"snapshotSequence": 1,
"readModelDigest": "<string>",
"marginMode": "isolated",
"cashBalanceAtoms": "<string>",
"cashBalance": "<string>",
"equityAtoms": "<string>",
"equity": "<string>",
"availableForOrdersAtoms": "<string>",
"availableForOrders": "<string>",
"resync": {
"stream": "account.margin",
"fromSequence": 123
},
"assetBalances": [
{
"asset": "<string>",
"totalAtoms": "<string>",
"lockedAtoms": "<string>",
"heldAtoms": "<string>",
"freeAtoms": "<string>"
}
],
"consentState": "absent",
"state": "account_never_funded",
"collateralBalance": {
"accountId": "<string>",
"asset": "<string>",
"decimals": 5,
"totalAtoms": "<string>",
"lockedAtoms": "<string>",
"heldAtoms": "<string>",
"journalSequence": 1,
"freeAtoms": "<string>",
"markRevision": "<string>"
},
"withdrawalReservedAtoms": "<string>",
"withdrawalReserved": "<string>",
"initialMarginAtoms": "<string>",
"initialMargin": "<string>",
"positionInitialMarginAtoms": "<string>",
"positionInitialMargin": "<string>",
"orderReserveAtoms": "<string>",
"orderReserve": "<string>",
"riskEvidence": {
"status": "complete"
},
"liquidationCandidate": true,
"maintenanceRequirementAtoms": "<string>",
"marginHealthBps": "<string>",
"badDebtAtoms": "<string>",
"positions": [
{
"marketId": "<string>",
"unrealizedPnlAtoms": "<string>",
"signedBaseAtoms": "<string>",
"entryNotionalAtoms": "<string>",
"markPriceAtoms": "<string>",
"entryPriceAtoms": "<string>"
}
],
"spotHoldings": [
{
"asset": "<string>",
"symbol": "<string>",
"amountAtoms": "<string>",
"amount": "<string>",
"valuationPrice": "<string>",
"markPriceSource": "book_mid",
"valueAtoms": "<string>",
"value": "<string>"
}
],
"spotHoldingsValueAtoms": "<string>",
"spotHoldingsValue": "<string>",
"totalAccountValueAtoms": "<string>",
"totalAccountValue": "<string>",
"unpricedAssets": [
"<string>"
]
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "promo_code_unknown",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "feature_disabled",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused",
"info": {
"group": "sub_accounts",
"level": "read"
},
"positions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"tokens": [
{
"asset": "<string>",
"amount": "<string>"
}
],
"progress": {
"accountId": "<string>",
"cancelledOrdersCount": 1,
"filledDuringClosureCount": 1,
"remainingOrdersCount": 1,
"remainingPositionsCount": 1,
"remainingPositions": [
{
"marketId": "<string>",
"side": "long",
"size": "<string>",
"sizeAtoms": "<string>"
}
],
"closedPositionsCount": 1,
"revokedKeysCount": 1,
"returnedAmount": "<string>",
"returnedAsset": "<string>",
"transferId": "<string>",
"transferIds": [
"<string>"
]
},
"rateLimit": {
"limiter": "trader",
"requestsPerWindow": 123,
"windowMs": 123
},
"rule": "amount_step",
"field": "<string>",
"limit": "<string>",
"nearestValid": "<string>",
"minCost": "<string>",
"free": "<string>",
"price": "<string>",
"cost": "<string>",
"minAmount": "<string>"
}
}Authorizations
The authorization field takes the session bearer returned by sign-in, or an API key where the route allows keys. Paste the token itself into the authorization field. When invitation-only access is enabled, private operations require the account's sign-in email to be invited. Sign-in can complete without an invitation, but private HTTP, MCP and FIX operations refuse with access_not_allowlisted (HTTP 403): "Private access is limited to invited accounts. Contact support to request access." Public market data remains available. Invitation changes apply to the next private operation, including existing FIX sessions. Do not retry until support confirms access.
Response
Success
- Option 1
- Option 2
Balances: free, used and total for every asset, and one entry per asset code.