API keys in the JAFX Terminal: create, roll and revoke
Create and manage API keys on the Developers page of the web trader (https://terminal.jafx.com), in the left menu. A key lets your own program or AI agent use one trading account through the JAFX Trading API, which is live (details at https://jafx.com/developers/). The API is switched on for demo and live accounts.
Before you start
- Log in to the web trader with the trading account the key is for. If you are logged out, the page shows "Log in to manage your API keys."
- Keys are for accounts on the Live Server and the Demo Server. The page shows a LIVE or DEMO badge beside the account number. On a live account it adds: "Real money: orders from trading keys on this account execute for real."
- You need the account's master trading password. The investor password cannot be used.
- An account can hold up to 10 active keys and connected AI apps together.
Create a key
- Open Developers and select Create API key.
- Enter a Name, for example "EURUSD breakout bot".
- Choose what the key may do:
| Type | What it allows |
|---|---|
| Read-only | "Market data and account reads. For dashboards and research agents." It cannot trade. |
| Trading | "Bots place, change and close orders within the limits below." |
| Proposals | "Orders become proposals you confirm here first. Recommended for AI agents." |
- For a Trading or Proposals key, set its limits: Max lots per order, Orders per minute, Max open positions, Daily loss stop (% of equity) and Symbols (empty = all).
- Set Expires after (days): 1 to 365, 90 by default. Untick Allow AI agents (MCP) if only a program will use the key.
- Under Only allow these IP addresses (recommended), enter the address your program calls from. - A locked key can't be used from anywhere else, even if it leaks. - To leave a Trading or Proposals key unlocked, you must tick Let this key be used from any IP address. - The lock is set when the key is created. To change it, create a new key.
- On a live account, tick the box that starts "I understand that this key can trade real money on live account".
- Select Create key, then confirm with your master password. Your web trader session stays logged in.
- Copy your key now. "It is shown only once." Select Copy, store the key somewhere safe, then select I have stored it.
Keys look like jafx_demo_… or jafx_live_…. JAFX keeps only a one-way hash of the key, so nobody can show it to you again, including support. If you lose it, roll or revoke it.
If Create key shows a message instead:
| Message | What to do |
|---|---|
| "Give the key a name" | Fill in Name. |
| "Enter the IP addresses your bot uses, or tick “Let this key be used from any IP address”" | Do one of the two. |
| "Confirm that orders from this key use real money" | Tick the live-account box. |
Starting limits
| Setting | Demo account | Live account | You can set |
|---|---|---|---|
| Type | Trading | Proposals | Any of the three |
| Max lots per order | 1.00 | 0.10 | Up to 100 lots |
| Max open positions (positions and pending orders together) | 20 | 10 | 1 to 200 |
| Orders per minute | 30 | 10 | 1 to 120 |
| Daily loss stop | 10% of the day's starting equity | 2% | A percentage, or empty for none |
Daily loss stop: "If equity drops this much below its start-of-day level, the key can't open new positions until the next trading day. Nothing is closed." Closing and reducing positions still works. The day starts at midnight Europe/Athens.
How long your keys can trade
Your keys place orders through your account's own trading session. The API trading card on the Developers page shows where it stands.
- 24 hours after each sign-in. The session starts when you do one of these:
- log in to the web trader with your password
- create or roll a key
- select Renew
It lasts 24 hours whether or not the web trader stays open. After that the card reads "Your API keys can’t trade right now: 24 hours passed since the last sign-in". Orders then answer sign_in_required until you log in again or select Renew.
- Keep my bots trading around the clock. Off by default. "Trading sign-ins end after 24 hours. With this on, JAFX keeps your trading password encrypted and signs your bots back in by itself. Switch it off at any time and the password is deleted at once." You enter your master password once to switch it on.
- Stop API trading now ends the session at once. Your programs can't place or change orders until you log in again or select Renew. It also switches off around-the-clock trading and deletes the saved password.
- Changing your trading password ends the session too. If around-the-clock trading was on, switch it on again with the new password.
- Logging out of the web trader does not stop your keys.
Roll or revoke a key
The key list shows these details for each key: Name, Access, Limits, IP lock, the last characters of the key, Created, Expires, Last used and Status.
- Roll gives the key a new secret with the same settings. The old secret keeps working for 24 hours, so you can update your program without a gap. Rolling asks for your master password.
- Revoke stops the key. Do this at once if a key may have leaked, then create a new one.
Confirm proposals
Orders from a Proposals key appear on the Developers page under Proposals waiting for you. Each one shows a summary of the order, when it expires and the key it came from.
- Select Confirm to send the order or Reject to drop it.
- A proposal you don't confirm expires after 10 minutes.
- Recent proposals lists the latest decisions.
Keep your key safe
- Anyone who has a Trading key can trade on your account as you, within its limits, at any hour. Anyone who has a Read-only key can see the account's balance, positions and history.
- Never paste a key into a chat, a website, a screenshot or code you share.
- Never send it to JAFX support. We never ask for your API key or your password.
- Use one key per program, with the least access it needs. A dashboard needs a Read-only key.
- AI assistants that run in the cloud have no fixed address, so an IP lock can't hold them. Give them a Proposals key.
Messages on the Developers page
| Message | What it means |
|---|---|
| "Account N is on the Test Server, where API keys aren't available. Accounts on the Live Server and the Demo Server can create them." | Log in with an account on the Live Server or the Demo Server. |
| "API trading on live accounts is switched off right now. Demo accounts can still create keys." | Live accounts can't create keys at the moment. Keys for live accounts are normally switched on, so this means JAFX has switched them off for now. |
| "API keys are not enabled on this server yet." | Keys can't be created at the moment. |
| "Your API keys can’t trade right now: your trading account refused the saved password…" | Your trading password changed. Switch Keep my bots trading around the clock on again with the current password. |
Need help?
Tell us the key's name and the message you see. Never send the key itself.
We are available 24/7 via live chat or email (support@jafx.com).
Was this article helpful?
Thank you for telling us.