Quickstart
Issue a key, provision a batch of accounts and read one account's performance, in four requests.
Four requests: issue a key, find an account type, provision a batch, read one account’s performance. Ten minutes end to end.
What answers today
Every request in this walkthrough is live: provisioning, traders, credentials and the analytics read included.
1 · Issue a key
In the admin panel, open Developer and create a key. Give it accounts:read and accounts:write for this walkthrough. You can add more scopes later, and you should not grant them until you need them.
Copy the token when it appears. It is shown once and we cannot recover it.
export PFX_KEY=pfx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2 · Check what you have
An account type is the challenge you sell: a starting balance plus the rule set it is judged against. You need its id to provision anything.
curl https://api.propexecutor.com/v1/account-types \
-H "Authorization: Bearer $PFX_KEY"{
"data": [
{
"id": "0f9c2e14-7b3d-4a86-9c11-2ab5d6e7f801",
"name": "$10K Standard",
"starting_balance": 10000,
"price_cents": 9900,
"rule_set_id": "7c4a…"
}
],
"next_cursor": null
}No account types yet? Create them in the panel first: they are a configuration decision (which rules, what balance, what you charge) rather than something to script.
3 · Provision a batch
curl -X POST https://api.propexecutor.com/v1/accounts \
-H "Authorization: Bearer $PFX_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"account_type_id":"0f9c2e14-7b3d-4a86-9c11-2ab5d6e7f801","quantity":5}'{
"data": [
{
"id": "6ab6…",
"account_number": 10000042,
"account_type_id": "0f9c2e14-7b3d-4a86-9c11-2ab5d6e7f801",
"trader_id": null,
"status": "active",
"server": "apex-prop",
"password": "K7mQ…"
}
],
"credits": { "enforced": true, "granted": 250, "used": 47, "remaining": 203 }
}One entry per account (five here, two shown). password is only included when the key also holds credentials:read.
That spent five credits, for good
Each account costs one credit permanently: breaching or archiving it returns nothing. The Idempotency-Key above is what makes a network timeout safe to retry; without it a retry provisions a second batch. See idempotency.
4 · Hand one over, then watch it
Assign the account to a trader, then read its credentials:
# assign the account — the trader is found by email, or created
curl -X PUT https://api.propexecutor.com/v1/accounts/10000042/trader \
-H "Authorization: Bearer $PFX_KEY" -H "Content-Type: application/json" \
-d '{"name":"Jordan Ellis","email":"jordan@example.com"}'
# the login to hand over (needs credentials:read)
curl https://api.propexecutor.com/v1/accounts/10000042/credentials \
-H "Authorization: Bearer $PFX_KEY"Once they are trading, one request gives you the whole performance picture:
curl https://api.propexecutor.com/v1/accounts/10000042/analytics \
-H "Authorization: Bearer $PFX_KEY"That is the analytics object: gain, drawdown, profit factor, the balance and equity curve and the monthly tables, in one call.
Next
- Pagination: before you list more than 50 of anything.
- Rate limits: before you put a poll on a timer.
- Errors: the codes worth retrying, and the ones that mean stop.