Skip to content

Save (or replace) the Unusual Whales market-data key.

PUT
/api/advisor/market-data-key
curl --request PUT \
--url https://api.tradr.cloud/api/advisor/market-data-key \
--header 'Content-Type: application/json' \
--data '{ "apiKey": "example" }'

Encrypts the supplied key at rest (AES-256-GCM, REQ-6.6) and stores only the ciphertext plus a last-4-char masking hint — the plaintext is never persisted or returned. Runs a lightweight verification probe (REQ-6.3): a 401/403 rejects the save with MARKET_DATA_KEY_INVALID; a successful probe returns verified: true; a transient failure (timeout / upstream unavailable) stores the key anyway and returns verified: false. Rate limited to 10 saves per user per hour.

Media typeapplication/json
object
apiKey
required
string
>= 8 characters
Examplegenerated
{
"apiKey": "example"
}

{ configured: true, keyHintTail, verified: boolean }.

Validation error or MARKET_DATA_KEY_INVALID (key rejected by Unusual Whales).

Save rate limit reached (10 / hour).