watchers

WATCHER: get a signed callback when EVM gas crosses a level...

WATCHER: get a signed callback when EVM gas crosses a level you set — e.g. "wake me when Ethereum gas drops below 10 gwei." Arm once, pay once (no account, no API key). chain: base | ethereum | polygon | arbitrum | optimism. conditionType: 'below' or 'above'; threshold is in gwei (compared to the chosen fee tier's max fee per gas). tier: slow | standard | fast (default standard). Fires once per crossing; bounded by a maxFires / expiry budget. Deliveries are EIP-191-signed (verify offline) and retried with exponential backoff; missed pushes are recoverable via watchers.status. Returns a watcherId.

post/api/watchers/gas-price

Request

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

Request body

chain'base' | 'ethereum' | 'polygon' | 'arbitrum' | 'optimism' required

EVM chain whose gas to watch.

conditionType'below' | 'above' required

'below' (cheap gas alert) or 'above' (congestion alert).

thresholdnumber required

Gas price threshold in gwei (e.g. 10), compared to the chosen tier’s max fee per gas.

tier'slow' | 'standard' | 'fast'

Fee tier to compare against. Default: standard.

callbackUrlstring uri required

Where we POST the event. Any http(s) URL; the JSON body is signed (verify with X-2s-Signature). e.g. https://your-agent.app/hooks/gas

payloadobject

Arbitrary JSON echoed back verbatim in every callback. e.g. {"agentId":"a1"}

expiresInSecondsinteger

How long the watch stays active, in seconds. Default 2592000 (30 days), max 7776000 (90 days).

maxFiresinteger

Stop after this many callbacks (default 1). Each fire is a fresh crossing into the condition.

labelstring

Optional free-text tag to recognize this watcher later.

Response

(unresolved $ref)

Changes

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