Connect an AI client
Install the Edel skills, connect to the public MCP server and authenticate with a scoped API key.
Install the Edel skills
The Edel skills teach a coding agent or AI assistant how to use the public Edel API safely: REST, WebSockets, MCP tools, agents, deposits and withdrawals. Install them with one command:
npx skills add Edel-Finance/edel-ai-config --skill edel-marketsWhat a skill does and does not do
A skill is instructions, not a credential. Installing it does not create an account, sign you in or give the agent permission to trade or move money. The skill tells the agent to read the authentication guide before any private call, to start with read-only checks, and to stop for you at every passkey step.
Connect to the public MCP server
The Edel MCP server is a remote Streamable HTTP service at the path /mcp. Send your API key as an Authorization bearer header on every request, including market tools; public REST market reads need no key. It runs on TestNet and DevNet; MainNet has no public MCP yet. Find the URL for your network in the Networks table.
Load the key from your client's secret store, never from a prompt, a command-line argument or a committed file.
{
"mcpServers": {
"edel": {
"url": "<MCP URL for your network>",
"headers": {
"Authorization": "Bearer <key from your client secret store>"
}
}
}
}Authenticate with an owner-approved key
An AI client gets its API key through a one-time browser approval by the account owner:
- 01The client calls
POST /v1/agent-connect/startwith aclientNameand thescopesit needs. The answer has averificationUrl, auserCodeand aconnectCode. - 02The owner opens the URL, signs in, checks the code, the account and the scopes, and approves with a passkey. The client never asks for the passkey.
- 03The client calls
POST /v1/agent-connect/completewith theconnectCodeeveryintervalSeconds. It answersapprovedwith the key exactly once. The grant ends after ten minutes.
A key expires after 24 hours by default and after 7 days at most. The owner can revoke it at any time. When it expires, run the approval again.
| Scope | Use it for |
|---|---|
read | Account, positions, orders, fills and previews. |
trade | Placing and cancelling orders, after the owner approves the action. |
agents | Opt-in. Managing the owner's in-app agents. TestNet and DevNet. |
funding | Opt-in. Preparing deposits, withdrawals and agent funding. It never signs: the owner signs every funding step in the browser. |
Quick examples
These examples use TestNet, which is open with test money: set EDEL_API_URL to https://testnet.edel-api.xyz. For another network, take its REST URL from Networks. Read a market without a key, then start a read-only grant:
curl --fail-with-body --silent "$EDEL_API_URL/v1/markets/BTC-USDCX-PERP/stats"
curl --fail-with-body --silent --request POST "$EDEL_API_URL/v1/agent-connect/start" \
--header 'content-type: application/json' \
--data '{"clientName":"my-assistant","scopes":["read"]}'
curl --fail-with-body --silent --request POST "$EDEL_API_URL/v1/agent-connect/complete" \
--header 'content-type: application/json' \
--data "{\"connectCode\":\"$CONNECT_CODE\"}"First calls after connecting
- 01Call
edel_connectto confirm the key, its account and its scopes. - 02Call
edel_statusto check account readiness. - 03Check the venue status with
edel_system_status(RESTGET /v1/system/status). Treatstatus_unknownas unavailable. - 04Read markets with
edel_marketsandedel_price. These are snapshots: use WebSockets for live data.
When a request answers 429 with a Retry-After header, wait that many seconds. Otherwise wait for the rate window to reset, at most 60 seconds.