Quickstart
Create a Management API key and make your first Koneth API request.
This guide uses a scoped Management API key to read your organization’s API credit balance.
Prerequisites
Section titled “Prerequisites”You need:
- A Koneth organization with an active credit wallet.
- Permission to manage API keys in Koneth Console.
- A key with the
credits:readscope.
1. Create an API key
Section titled “1. Create an API key”In Koneth Console:
- Open API keys
Select your organization, then open API keys.
- Choose access
Give the key a clear name and select
credits:read. Keys created by the current Console form can access all organization servers, subject to their selected scopes. - Store the key
Copy the generated
kapi...value into your secret manager. Koneth shows the full key only once.
2. Set your environment variable
Section titled “2. Set your environment variable”export KONETH_API_KEY="kapi.your-key-id.your-secret"Do not commit this value to source control or expose it in client-side code.
3. Send a request
Section titled “3. Send a request”curl --request GET \ --url https://api.koneth.com/api/v1/management/credits/balance \ --header "Authorization: Management $KONETH_API_KEY" \ --header "X-Request-Id: quickstart-balance-001"const response = await fetch( "https://api.koneth.com/api/v1/management/credits/balance", { headers: { Authorization: `Management ${process.env.KONETH_API_KEY}`, "X-Request-Id": "quickstart-balance-001", }, },);
if (!response.ok) { throw new Error(`Koneth request failed: ${response.status}`);}
const { wallet } = await response.json();console.log(wallet.availableCredits);import osimport requests
response = requests.get( "https://api.koneth.com/api/v1/management/credits/balance", headers={ "Authorization": f"Management {os.environ['KONETH_API_KEY']}", "X-Request-Id": "quickstart-balance-001", }, timeout=30,)response.raise_for_status()
print(response.json()["wallet"]["availableCredits"])A successful response contains the current wallet and low-balance state:
{ "wallet": { "id": "0f6f2d88-9357-4ce6-9b9e-76db2f98bb2e", "organizationId": "b7378db4-5a7a-4e69-a8df-04f2e6d94243", "availableCredits": 24890, "reservedCredits": 0, "lifetimePurchased": 30000, "lifetimeConsumed": 5110, "lowBalanceThreshold": 10000, "createdAt": "2026-08-01T09:00:00.000Z", "updatedAt": "2026-08-25T01:30:00.000Z", "lowBalance": false }}4. Create a trading account
Section titled “4. Create a trading account”Add accounts:create to your key and copy the target server ID from Koneth Console. Mutating requests require a unique Idempotency-Key.
export KONETH_SERVER_ID="6be9a699-2f28-402e-b64e-93ba6bdafe1b"
curl --request POST \ --url "https://api.koneth.com/api/v1/management/servers/$KONETH_SERVER_ID/accounts" \ --header "Authorization: Management $KONETH_API_KEY" \ --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" }'The API returns 202 Accepted with a command and one-time generated credentials. Store the credentials securely, then poll the command until it reaches a terminal state.
Choosing leverage
Section titled “Choosing leverage”leverage accepts any whole number up to the maximum the organisation set on the server. It is not restricted to a menu: if the maximum is 200, then 37 and 150 are equally valid.
Add "unlimitedLeverage": true for an account with no margin requirement at all:
--data '{ "accountName": "Client 1043 Evaluation", "initialBalance": 100000, "leverage": 1, "unlimitedLeverage": true, "requestId": "onboarding-client-1043" }'leverage is still required and still shown on the account; it just is not used for margin while unlimitedLeverage is set. Two things decide whether the request succeeds, and both are refusals rather than silent corrections:
| Code | When |
|---|---|
UNLIMITED_LEVERAGE_UNAVAILABLE |
The organisation has not removed the server’s leverage ceiling. Remove it in Console under the server’s Configure, then retry. |
LEVERAGE_ABOVE_MAXIMUM |
The value exceeds the server’s maximum. |
An unlimited account has no margin, so it cannot be stopped out on margin level — it is closed on remaining balance instead. Treat it as a larger position, not a safer one: losses arrive faster, and a gap can take the account below zero between the stop-out threshold and the fill.