curl --request POST \
--url https://api.burokku.app/v1/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "<string>",
"level_usd": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({asset: '<string>', level_usd: 123})
};
fetch('https://api.burokku.app/v1/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.burokku.app/v1/alerts"
payload = {
"asset": "<string>",
"level_usd": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alert": {
"kind": "<string>",
"watches": "<string>",
"on": true,
"starter": true,
"channels": [
"inapp"
],
"fired": 0,
"asset": "<string>",
"direction": "above",
"level_usd": 123,
"id": "<string>"
},
"manage_path": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"refreshing": true,
"currency": {
"code": "<string>",
"per_usd": 123
}
}Create a price alert
Use this only when the user asks to be alerted when a token’s price goes above or below a level. Creates a price alert in their Burokku account that notifies them in Burokku, and by email, push or Telegram where those are set up. It never trades. Returns the alert as created.
curl --request POST \
--url https://api.burokku.app/v1/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "<string>",
"level_usd": 123
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({asset: '<string>', level_usd: 123})
};
fetch('https://api.burokku.app/v1/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.burokku.app/v1/alerts"
payload = {
"asset": "<string>",
"level_usd": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alert": {
"kind": "<string>",
"watches": "<string>",
"on": true,
"starter": true,
"channels": [
"inapp"
],
"fired": 0,
"asset": "<string>",
"direction": "above",
"level_usd": 123,
"id": "<string>"
},
"manage_path": "<string>",
"read_at": "2023-11-07T05:31:56Z",
"refreshing": true,
"currency": {
"code": "<string>",
"per_usd": 123
}
}Authorizations
OAuth 2.1 for apps that act for a Burokku user: the authorization code grant with PKCE (S256) required of every client. Clients use a Client ID Metadata Document, or register at /oauth/register (at most 20 registrations an hour from one network). Set resource to https://api.burokku.app/v1: a token issued for the MCP server (the default without resource) is refused here with a 401 (invalid-token); a token is for one resource, so authorize once for each and refresh with the same resource (another gets invalid_target). Every grant includes portfolio.read. Authorization server metadata: https://app.burokku.app/.well-known/oauth-authorization-server; this API’s protected resource metadata: https://api.burokku.app/.well-known/oauth-protected-resource/v1. Access tokens last 1 hour; each refresh returns a new refresh token (use the newest), and one unused for 30 days lapses. OAuth errors are JSON, { error, error_description }.
Body
Response
OK
When these figures were read (ISO 8601, UTC).
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$