watchers

WATCHER: get a signed callback when an FX pair crosses a...

WATCHER: get a signed callback when an FX pair crosses a rate you set. Arm once, pay once. base + quote are 3-letter ISO currency codes (e.g. base USD, quote EUR). conditionType 'above'/'below'; threshold is the quote-per-base rate. Fires once per crossing; bounded by maxFires/expiry. Rates via Frankfurter (ECB). Signed (verify offline) + retried; recoverable via watchers.status. Returns a watcherId.

post/api/watchers/fx-rate

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/watchers/fx-rate
  • Auth: API key in header PAYMENT-SIGNATURE

Request body

basestring required

Base currency, e.g. USD.

quotestring required

Quote currency, e.g. EUR.

conditionType'above' | 'below' required

Fire when the rate goes above or below the threshold.

thresholdnumber required

Quote-per-base rate to cross, e.g. 0.95.

callbackUrlstring uri required

Signed event POSTed here (verify X-2s-Signature). Any http(s) URL.

payloadobject

Arbitrary JSON echoed back in every callback.

expiresInSecondsinteger

Active window in seconds (default 30d, max 90d).

maxFiresinteger

Stop after this many callbacks (default 1).

labelstring

Optional free-text tag.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.