Account
Authorization
Signed mode: every request is signed with your App Key/Secret. Header set:
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string · header | Required | The account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation. |
X-Api-Key | string · header | Required | Your App Key. |
X-Timestamp | string · header | Required | Request timestamp in seconds (Unix epoch). |
X-Api-Signature | string · header | Required | HMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=. |
Create a new price alert for a security when it rises above or falls below a target price.
longbridge alert add TSLA.US --price 300 --direction rise
longbridge alert add AAPL.US --price 150 --direction fall
Request
Request body
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Required | Security symbol, e.g. `TSLA.US` |
price | string | Required | Target price |
direction | string | Required | Alert direction: `rise` or `fall` |
frequency | string | Optional | Trigger frequency: `once` (default) or `every` |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
id | int64 | Required | ID of the newly created alert |
Response JSON example
{
"code": 0,
"message": "success",
"data": {
"id": 486469
}
}Error code
See the Error Codes page for the full list of error codes.