Fortell
Developers

Authentication

A key proves who you are. You make it on the website. You send it in one header.

Make a key

  • Sign in on the Fortell website and open Settings, then API keys.
  • Give the key a name. Choose its scopes. Set an expiry in days if you want one.
  • Copy the key. Fortell shows it one time only. It cannot show it again.

Keys are made on the website only. The API cannot make a key.

Scopes

  • read: always on. Reads your account, your markets and your positions.
  • trade-evaluation: off until you tick it. Places, closes and protects paper orders on your Evaluation.
  • funded-build: off until you tick it. Builds unsigned transactions for your funded account.

A call without the scope it needs is refused with api_key_scope. The body names the missing scope in the field needs. A Perps order on your funded account needs funded-build. The same order on your Evaluation needs trade-evaluation.

Send the key

Send the key in the Authorization header as a bearer token.

Header
Authorization: Bearer fk_live_...
Check the key (curl)
curl -s https://api.fortell.finance/v1/agent/whoami \
  -H "Authorization: Bearer $FORTELL_API_KEY"

The whoami endpoint returns the key id, its name, its scopes, its wallet and its expiry. It never returns the secret.

Keep the key safe

  • Keep it in an environment variable, for example FORTELL_API_KEY. Do not put it in code or in a repository.
  • Never put it in a URL. The API refuses a key in the query string with api_key_in_url. Revoke a key that was in a URL.
  • Use one key for each script. Give each key only the scopes it needs. Set an expiry.
  • Fortell stores only a keyed hash of the key. It cannot show you the key again. If you lose it, make a new key.

Revoke a key

Open Settings, then API keys, and revoke the key. It stops at once. Every request checks the key, with no cache. Signing out of every session, or detaching the wallet of a key, also ends that key.