Skip to content
API status
API reference

Create a trading account

POST
/api/v1/management/servers/{serverId}/accounts
curl --request POST \
--url https://api.koneth.com/api/v1/management/servers/6be9a699-2f28-402e-b64e-93ba6bdafe1b/accounts \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: account-create-client-1042' \
--header 'X-Request-Id: onboarding-client-1042' \
--data '{ "accountName": "Client 1042 Evaluation", "initialBalance": 100000, "leverage": 100, "requestId": "onboarding-client-1042" }'

Queues a trading account creation command. Requires accounts:create. The first accepted request returns one-time trading and investor passwords.

serverId
required
string format: uuid

UUID of a trading server owned by your organization.

Example
6be9a699-2f28-402e-b64e-93ba6bdafe1b
Idempotency-Key
required
string
>= 1 characters <= 100 characters

Unique key for this logical mutation. Reuse it only when retrying the same operation. Maximum 100 characters.

Example
account-create-client-1042
X-Request-Id
string

Optional correlation ID used for API request billing and logs.

Example
onboarding-client-1042
Media typeapplication/json
object
accountName
required
string
>= 1 characters <= 100 characters
password

Omit to generate a password.

string format: password
>= 8 characters <= 128 characters
initialBalance
required
number
<= 1000000000
leverage
required
integer
>= 1 <= 10000
requestId
required
string
>= 1 characters <= 100 characters
Example
{
"accountName": "Client 1042 Evaluation",
"initialBalance": 100000,
"leverage": 100,
"requestId": "onboarding-client-1042"
}

An earlier command was returned for the idempotency key.

Media typeapplication/json
object
command
required
object
id
required
string format: uuid
operation
required
string
Allowed values: account.create account.update account.enable account.disable account.archive account.delete account.password_reset account.investor_password_reset account.history_export finance.deposit finance.withdraw
status
required
string
Allowed values: queued leased succeeded failed expired
managedAccountId
One of:
string format: uuid
attempts
required
integer
payload
object
key
additional properties
any
result
One of:
object
key
additional properties
any
errorCode
One of:
string
errorMessage
One of:
string
idempotencyKey
required
string
createdAt
required
string format: date-time
completedAt
One of:
string format: date-time
key
additional properties
any
credentials

Returned only for a newly queued account creation.

object
tradingPassword
required

One-time trading password returned with a newly queued account creation.

string
investorPassword
required

One-time investor password returned with a newly queued account creation.

string
duplicate
required
boolean
Example
{
"command": {
"operation": "account.create",
"status": "queued"
}
}

Account creation queued. Store the returned credentials securely.

Media typeapplication/json
object
command
required
object
id
required
string format: uuid
operation
required
string
Allowed values: account.create account.update account.enable account.disable account.archive account.delete account.password_reset account.investor_password_reset account.history_export finance.deposit finance.withdraw
status
required
string
Allowed values: queued leased succeeded failed expired
managedAccountId
One of:
string format: uuid
attempts
required
integer
payload
object
key
additional properties
any
result
One of:
object
key
additional properties
any
errorCode
One of:
string
errorMessage
One of:
string
idempotencyKey
required
string
createdAt
required
string format: date-time
completedAt
One of:
string format: date-time
key
additional properties
any
credentials

Returned only for a newly queued account creation.

object
tradingPassword
required

One-time trading password returned with a newly queued account creation.

string
investorPassword
required

One-time investor password returned with a newly queued account creation.

string
duplicate
required
boolean
Example
{
"command": {
"operation": "account.create",
"status": "queued"
}
}

Invalid request.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Examplegenerated
{
"error": "example",
"issues": [
{}
]
}

Management API authentication is missing or invalid.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Management API authentication required"
}

The organization cannot cover the active API request price.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Insufficient API credits"
}

The key lacks the required scope or server access.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Missing API scope: accounts:read"
}

The requested resource was not found.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Examplegenerated
{
"error": "example",
"issues": [
{}
]
}

The request conflicts with the current resource state.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Examplegenerated
{
"error": "example",
"issues": [
{}
]
}

Unexpected server error.

Media typeapplication/json
object
error
required
string
issues

Validation issue details when the request fails schema validation.

Array<object>
object
key
additional properties
any
Example
{
"error": "Internal server error"
}