Authentication
Both SDKs auto-load TM_KEY_FILE from your environment or a .env file in the working directory, then handle signing and token refresh for you. There's no manual JWT step.
See API keys for how to download a key bundle.
# .env
TM_ENV=prod
TM_KEY_FILE=/path/to/truemarkets-api-key-XXXXXXXX.json
| Variable | Purpose |
|---|---|
TM_KEY_FILE | Path to the downloaded API key bundle (JSON, contains key_id and the private JWK) |
TM_ENV | Which environment to target, e.g. prod |
Treat the bundle like a password
Anyone with the key bundle can mint JWTs against your account. Don't commit it, and don't copy it into shared environments. Revoke and re-create at settings/api-keys if it leaks.