Set a rate alert
Watch a pair and notify when it crosses `rate`. 409 when the condition already holds. An alert fires on the rate *crossing* the threshold rather than on it being past it, so one set above a rate that is already higher could not fire until the rate first fell back — storing it would hand somebody a control that looks armed and is not. The error says what the rate is now, which is the thing they were asking about. 409 too when the same threshold is already set on the same pair: that is a double-click rather than a second intention.
Watch a pair and notify when it crosses rate.
409 when the condition already holds. An alert fires on the rate crossing the threshold rather than on it being past it, so one set above a rate that is already higher could not fire until the rate first fell back — storing it would hand somebody a control that looks armed and is not. The error says what the rate is now, which is the thing they were asking about.
409 too when the same threshold is already set on the same pair: that is a double-click rather than a second intention.
Authorization
OAuth2PasswordBearer In: header
Cookie Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A threshold to watch on one currency pair.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/b/v1/fx/alerts" \ -H "Content-Type: application/json" \ -d '{ "from_currency": "str", "to_currency": "str", "direction": "above", "rate": 1 }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "from_currency": "string", "to_currency": "string", "direction": "string", "rate": "string", "created_at": "2019-08-24T14:15:22Z", "last_triggered_at": "2019-08-24T14:15:22Z", "last_triggered_rate": "string"}Rate alerts you have set GET
Every rate alert this business has set, newest first. `last_triggered_at` is null on an alert that has not fired yet, which is the ordinary state of a useful one rather than a sign anything is wrong.
Remove a rate alert DELETE
Stop watching a threshold. Deleting rather than deactivating: an alert is a small, cheap thing to set again, and a list cluttered with switched-off rows is one nobody reads. The notifications it already sent are unaffected — they are a record of what the rate did, not of what is being watched now.