POST
https://api.cryptohopper.com/v1/user/askai
Sends a question to Ask AI, the Cryptohopper assistant, for one section. A plain question is answered as a stream of Server-Sent Events (Content-Type text/event-stream), not as JSON.
OAuth scope:
read user About scopes
No response example: the event stream is produced by the separate AI gateway service and its format is not defined in this codebase. A form-encoded request with suggestion_id returns the stored answer of that suggested question as JSON instead. To answer a confirmation card from an earlier streamed answer, POST confirm_id with action confirm or cancel (and optionally session_id) instead of a question.
Example request
curl -X POST "https://api.cryptohopper.com/v1/user/askai" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"page":"dashboard","question":"Why is my bot not buying?"}'
const response = await fetch('https://api.cryptohopper.com/v1/user/askai', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"page": "dashboard",
"question": "Why is my bot not buying?"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/user/askai",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"page": "dashboard",
"question": "Why is my bot not buying?"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user/askai');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'page' => 'dashboard',
'question' => 'Why is my bot not buying?',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |