import { AuthApiTransports } from "../../shared/transports.js"; import { PolyesterRequestOptions } from "../../shared/request-options.js"; import { CancelPriceAlertInput, CreatePriceAlertInput, ListPriceAlertsInput, ListPriceAlertsResult, PriceAlert, UpdatePriceAlertInput, UpdatePriceAlertResult } from "./price-alerts.schemas.js"; //#region src/services/price-alerts/price-alerts.d.ts /** * Manages the caller's price alerts. Alerts belong to the root account, not a trading account: * a session and the root account's API keys see the same alerts, and an API key scoped to a * subaccount is refused (`PermissionError`, detail `SUBACCOUNT_KEY_REFUSED`). An alert fires at * most once, only on a crossing it observes from its `referencePrice`; `update` sets a fired * alert again. No call changes balances, orders or account settings. */ declare class PriceAlertsService { #private; constructor(transports: AuthApiTransports); /** * Creates an active alert. Throws `PreconditionFailedError` when the market has no index * price (`PRICE_SOURCE_UNSUPPORTED`) or the active-alert limit is reached, and a retryable * `ServiceUnavailableError` when the market has no current price yet. */ create(input: CreatePriceAlertInput, options?: PolyesterRequestOptions): Promise; /** Lists the caller's alerts, newest first. */ list(input?: ListPriceAlertsInput, options?: PolyesterRequestOptions): Promise; /** * Changes an alert's direction, price or channels; omitted fields stay as they are. A new * direction or price records a new reference price. Updating a triggered alert sets it * again, even with no field given. A stale `expectedRevision` throws * `RevisionConflictError`; a cancelled alert throws `PreconditionFailedError`. */ update(input: UpdatePriceAlertInput, options?: PolyesterRequestOptions): Promise; /** * Cancels an active alert; cancelling a cancelled alert returns it unchanged. A triggered * alert throws `PreconditionFailedError` (`ALERT_TRIGGERED`). */ cancel(input: CancelPriceAlertInput, options?: PolyesterRequestOptions): Promise; } //#endregion export { PriceAlertsService }; //# sourceMappingURL=price-alerts.d.ts.map