Save (or replace) the Unusual Whales market-data key.
PUT
/api/advisor/market-data-key
const url = 'https://api.tradr.cloud/api/advisor/market-data-key';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"apiKey":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
apiKey
required
string
Examplegenerated
{ "apiKey": "example"}Responses
Section titled “Responses”{ configured: true, keyHintTail, verified: boolean }.
Validation error or MARKET_DATA_KEY_INVALID (key rejected by Unusual Whales).
Save rate limit reached (10 / hour).