otomato-sdk 2.0.521 → 2.0.522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10761,6 +10761,7 @@ export const TRIGGERS = {
10761
10761
  "conditionId": "string",
10762
10762
  "icon": "string",
10763
10763
  "message": "string",
10764
+ "messageApp": "string",
10764
10765
  "allTradesJson": "string"
10765
10766
  },
10766
10767
  "parameters": [
@@ -10791,12 +10792,16 @@ export const TRIGGERS = {
10791
10792
  "PRICE_MOVEMENT": {
10792
10793
  "name": "Polymarket Portfolio Price Movement",
10793
10794
  "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML } = otomatoSDK;\n const marketTitle = env.parameters.marketTitle || \"market\";\n const shortTitle = marketTitle.length > 30\n ? `${marketTitle.substring(0, 30)}...`\n : marketTitle;\n return getDynamicNameWrapperHTML(\n \"Odds movement on\",\n shortTitle\n );\n }",
10794
- "description": "Triggers when odds on a Polymarket position move significantly (10pp in 1h OR 15pp in 24h). Fetches price history directly from Polymarket CLOB API.",
10795
+ "description": "Triggers when odds on a Polymarket position move significantly, with spread-aware filtering. Dynamic thresholds adapt to market liquidity.",
10795
10796
  "type": 6,
10796
10797
  "output": {
10797
10798
  "direction": "string",
10798
10799
  "change": "float",
10799
10800
  "currentOdds": "float",
10801
+ "yesPrice": "float",
10802
+ "sharePrice": "float",
10803
+ "sharePriceBefore": "float",
10804
+ "timeWindowHours": "float",
10800
10805
  "marketTitle": "string",
10801
10806
  "userOutcome": "string",
10802
10807
  "threshold": "string",
@@ -10842,17 +10847,17 @@ export const TRIGGERS = {
10842
10847
  ],
10843
10848
  "examples": [
10844
10849
  {
10845
- "name": "BTC prediction market movement",
10846
- "description": "Monitor odds movement on 'Bitcoin Up or Down' market where user holds Up shares.",
10847
- "externalVariableDescription": "Fetches 24h price history from Polymarket CLOB, computes 1h/24h movement, triggers when threshold breached (10pp/1h or 15pp/24h)",
10850
+ "name": "Low liquidity market (wide spread, thin book)",
10851
+ "description": "S&P 500 >$6,500 end of March 2026. ~6pp spread, ~$10 depth per side. Should be muted by depth gate (<$1000).",
10852
+ "externalVariableDescription": "Tests spread-aware filtering: spread ~6pp effectiveThreshold1h=max(10,9)=10, but both sides <$1000 depth allMuted=true no notifications",
10848
10853
  "parameters": [
10849
10854
  {
10850
10855
  "key": "tokenId",
10851
- "value": "21742633143463906290569050155826241533067272736897614950488156847949938836455"
10856
+ "value": "103627686081498574145117066648965995696702884557334402130517728897461368472979"
10852
10857
  },
10853
10858
  {
10854
10859
  "key": "conditionId",
10855
- "value": "0xf4e4c3d2c1675cc5d73a92c89a92c209d6014ac516bfdf293ca85c6d58b916af"
10860
+ "value": "0xaac865f83febf38dea2a565b661bb2ad5d1a2cf70a56a7dda5348305faff577a"
10856
10861
  },
10857
10862
  {
10858
10863
  "key": "outcomeIndex",
@@ -10860,11 +10865,38 @@ export const TRIGGERS = {
10860
10865
  },
10861
10866
  {
10862
10867
  "key": "marketTitle",
10863
- "value": "Bitcoin Up or Down - February 2, 11PM ET"
10868
+ "value": "Will S&P 500 close over $6,500 end of March 2026?"
10864
10869
  },
10865
10870
  {
10866
10871
  "key": "userOutcome",
10867
- "value": "Up"
10872
+ "value": "Yes"
10873
+ }
10874
+ ]
10875
+ },
10876
+ {
10877
+ "name": "High liquidity market (tight spread, deep book)",
10878
+ "description": "Perplexity IPO by Dec 2027. ~51% odds, high volume ($99K). Should behave like original logic (spread-based thresholds ≈ defaults).",
10879
+ "externalVariableDescription": "Tests that high-liquidity markets pass through normally: tight spread → effectiveThreshold1h≈10, effectiveThreshold24h≈15, depth not muted",
10880
+ "parameters": [
10881
+ {
10882
+ "key": "tokenId",
10883
+ "value": "99304167880927641403329192356418127914431885347175669160469860015962724229493"
10884
+ },
10885
+ {
10886
+ "key": "conditionId",
10887
+ "value": "0x1f3741c4dcdf0e0fe8dcd2a690e87f163914ab9f34692e3df133fc2992549aa6"
10888
+ },
10889
+ {
10890
+ "key": "outcomeIndex",
10891
+ "value": 0
10892
+ },
10893
+ {
10894
+ "key": "marketTitle",
10895
+ "value": "Will Perplexity not IPO by December 31, 2027?"
10896
+ },
10897
+ {
10898
+ "key": "userOutcome",
10899
+ "value": "Yes"
10868
10900
  }
10869
10901
  ]
10870
10902
  }
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.521';
1
+ export const SDK_VERSION = '2.0.522';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -4010,6 +4010,7 @@ export declare const TRIGGERS: {
4010
4010
  conditionId: string;
4011
4011
  icon: string;
4012
4012
  message: string;
4013
+ messageApp: string;
4013
4014
  allTradesJson: string;
4014
4015
  };
4015
4016
  parameters: Parameter[];
@@ -4034,6 +4035,10 @@ export declare const TRIGGERS: {
4034
4035
  direction: string;
4035
4036
  change: string;
4036
4037
  currentOdds: string;
4038
+ yesPrice: string;
4039
+ sharePrice: string;
4040
+ sharePriceBefore: string;
4041
+ timeWindowHours: string;
4037
4042
  marketTitle: string;
4038
4043
  userOutcome: string;
4039
4044
  threshold: string;
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.521";
1
+ export declare const SDK_VERSION = "2.0.522";
2
2
  export declare function compareVersions(v1: string, v2: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otomato-sdk",
3
- "version": "2.0.521",
3
+ "version": "2.0.522",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "repository": {
6
6
  "type": "git",