otomato-sdk 2.0.449 → 2.0.450

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.
@@ -9442,307 +9442,6 @@ export const TRIGGERS = {
9442
9442
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
9443
9443
  }
9444
9444
  },
9445
- "POLYMARKET_LIMIT_ORDERS": {
9446
- "description": "Polymarket limit order fill detection",
9447
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
9448
- "tags": {},
9449
- "LIMIT_ORDER_FILL": {
9450
- "name": "Polymarket Limit Order Fill Detection",
9451
- "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML } = otomatoSDK;\n const shortAddress = `${env.parameters.polymarketAddress.substring(0, 6)}...${env.parameters.polymarketAddress.substring(38)}`;\n return getDynamicNameWrapperHTML(\n \"Polymarket limit order fills for\",\n shortAddress\n );\n }",
9452
- "description": "Detects when a user's Polymarket limit orders have been filled (partially or fully) by monitoring the CLOB Orders API",
9453
- "type": 6,
9454
- "output": {
9455
- "orderId": "string",
9456
- "filledAmount": "float",
9457
- "totalFilled": "float",
9458
- "originalSize": "float",
9459
- "marketTitle": "string",
9460
- "outcome": "string",
9461
- "side": "string",
9462
- "price": "float",
9463
- "fillType": "string",
9464
- "fillPercentage": "float",
9465
- "message": "string"
9466
- },
9467
- "parameters": [
9468
- {
9469
- "key": "polymarketAddress",
9470
- "type": "address",
9471
- "description": "The user's Polymarket proxy wallet address (0x...)",
9472
- "mandatory": true,
9473
- "category": 0
9474
- },
9475
- ],
9476
- "examples": [
9477
- {
9478
- "name": "Monitor all limit orders for address",
9479
- "description": "Detects when any limit order for this Polymarket address is partially or fully filled. Uses real test address from Polymarket docs.",
9480
- "externalVariableDescription": "Polls CLOB Orders API every 5 minutes to detect fills by comparing size_matched changes",
9481
- "parameters": [
9482
- {
9483
- "key": "polymarketAddress",
9484
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9485
- }
9486
- ]
9487
- },
9488
- {
9489
- "name": "Track limit order fills for whale address",
9490
- "description": "Monitor a high-activity address for limit order fills. Example shows tracking multiple orders across different markets.",
9491
- "externalVariableDescription": "Detects partial fills (size_matched increase) and full fills (order disappearance) with market data enrichment",
9492
- "parameters": [
9493
- {
9494
- "key": "polymarketAddress",
9495
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9496
- }
9497
- ]
9498
- },
9499
- {
9500
- "name": "Personal limit order tracker",
9501
- "description": "Get notified when your own Polymarket limit orders are filled. Replace with your Polymarket proxy wallet address.",
9502
- "externalVariableDescription": "Tracks cumulative fills across multiple partial fills and distinguishes cancelled orders from filled orders using activity API",
9503
- "parameters": [
9504
- {
9505
- "key": "polymarketAddress",
9506
- "value": "0x0000000000000000000000000000000000000000"
9507
- }
9508
- ]
9509
- }
9510
- ],
9511
- "blockId": 119,
9512
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
9513
- }
9514
- },
9515
- "POLYMARKET_RESOLUTION": {
9516
- "description": "Polymarket market resolution detection",
9517
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
9518
- "tags": {},
9519
- "MARKET_RESOLUTION": {
9520
- "name": "Polymarket Market Resolution Detection",
9521
- "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML } = otomatoSDK;\n const shortAddress = `${env.parameters.polymarketAddress.substring(0, 6)}...${env.parameters.polymarketAddress.substring(38)}`;\n return getDynamicNameWrapperHTML(\n \"Polymarket market resolutions for\",\n shortAddress\n );\n }",
9522
- "description": "Detects when markets resolve, determines win/loss for user positions, and calculates claimable amounts and P&L",
9523
- "type": 6,
9524
- "output": {
9525
- "conditionId": "string",
9526
- "marketTitle": "string",
9527
- "outcome": "string",
9528
- "userWon": "string",
9529
- "claimableAmount": "float",
9530
- "profitLoss": "float",
9531
- "roi": "float",
9532
- "size": "float",
9533
- "avgPrice": "float",
9534
- "initialValue": "float",
9535
- "message": "string"
9536
- },
9537
- "parameters": [
9538
- {
9539
- "key": "polymarketAddress",
9540
- "type": "address",
9541
- "description": "The user's Polymarket proxy wallet address (0x...)",
9542
- "mandatory": true,
9543
- "category": 0
9544
- },
9545
- ],
9546
- "examples": [
9547
- {
9548
- "name": "Track winning positions (Example: User wins)",
9549
- "description": "Detects market resolutions where the user's outcome won. Real example from docs: Elon tweet market where user bought 14,489 Yes shares at $0.12 avg ($1,738.74 invested), market resolved Yes, user can claim $14,489.54 for $12,750.80 profit (733% ROI).",
9550
- "externalVariableDescription": "Polls Positions API every 10 minutes, detects redeemable flag transition (false → true), determines win via curPrice=1.0 && currentValue>0, calculates claimable=$14,489.54, profit=$12,750.80, ROI=733%",
9551
- "parameters": [
9552
- {
9553
- "key": "polymarketAddress",
9554
- "value": "0x08bfd9fe77f532f8f0d8f77532f8f0d8f77532f8"
9555
- }
9556
- ]
9557
- },
9558
- {
9559
- "name": "Track losing positions (Example: User loses)",
9560
- "description": "Detects market resolutions where the user's outcome lost. Example: User bought 1000 Yes shares at $0.42 avg ($420 invested), market resolved No, shares are worthless, loss of $420 (-100% ROI).",
9561
- "externalVariableDescription": "Polls Positions API every 10 minutes, detects redeemable flag transition (false → true), determines loss via curPrice=0.0 && currentValue=0, calculates claimable=$0, loss=$-420, ROI=-100%",
9562
- "parameters": [
9563
- {
9564
- "key": "polymarketAddress",
9565
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9566
- }
9567
- ]
9568
- },
9569
- {
9570
- "name": "Track hedged positions (Multiple positions in same market)",
9571
- "description": "Monitors user with both Yes AND No positions in same market (hedging strategy). Each position triggers separate notification on resolution. Example: 500 Yes shares + 200 No shares in same market.",
9572
- "externalVariableDescription": "Uses composite cache key (conditionId_outcomeIndex) to track each position separately. If Yes wins: Yes position notifies profit, No position notifies loss.",
9573
- "parameters": [
9574
- {
9575
- "key": "polymarketAddress",
9576
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9577
- }
9578
- ]
9579
- },
9580
- {
9581
- "name": "Personal position tracker",
9582
- "description": "Get notified when YOUR Polymarket positions resolve with full P&L breakdown. Replace with your own Polymarket proxy wallet address. Shows claimable amount, profit/loss, and ROI percentage.",
9583
- "externalVariableDescription": "Tracks redeemable flag transitions, calculates win/loss, computes claimable amount (size for wins, $0 for losses), profit (claimable - initial), and ROI ((profit/initial)*100)",
9584
- "parameters": [
9585
- {
9586
- "key": "polymarketAddress",
9587
- "value": "0x0000000000000000000000000000000000000000"
9588
- }
9589
- ]
9590
- }
9591
- ],
9592
- "blockId": 117,
9593
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
9594
- }
9595
- },
9596
- "POLYMARKET_PRICE_MOVEMENT": {
9597
- "description": "Polymarket price movement detection",
9598
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
9599
- "tags": {},
9600
- "PRICE_MOVEMENT": {
9601
- "name": "Polymarket Price Movement Detection",
9602
- "dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML } = otomatoSDK;\n const shortAddress = `${env.parameters.polymarketAddress.substring(0, 6)}...${env.parameters.polymarketAddress.substring(38)}`;\n return getDynamicNameWrapperHTML(\n \"Polymarket price movements for\",\n shortAddress\n );\n }",
9603
- "description": "Detects significant price (odds) movements on markets where user has positions, using rolling time windows and threshold-based alerts",
9604
- "type": 6,
9605
- "output": {
9606
- "conditionId": "string",
9607
- "marketTitle": "string",
9608
- "outcome": "string",
9609
- "currentPrice": "float",
9610
- "previousPrice": "float",
9611
- "absoluteChange": "float",
9612
- "relativeChange": "float",
9613
- "timeWindow": "string",
9614
- "userPnlImpact": "float",
9615
- "severity": "string",
9616
- "message": "string"
9617
- },
9618
- "parameters": [
9619
- {
9620
- "key": "polymarketAddress",
9621
- "type": "address",
9622
- "description": "The user's Polymarket proxy wallet address (0x...)",
9623
- "mandatory": true,
9624
- "category": 0
9625
- },
9626
- {
9627
- "key": "minAbsoluteChange",
9628
- "type": "float",
9629
- "description": "Minimum absolute price change in percentage points (pp) to trigger alert",
9630
- "value": 5,
9631
- "mandatory": false,
9632
- "category": 1
9633
- },
9634
- {
9635
- "key": "minRelativeChange",
9636
- "type": "float",
9637
- "description": "Minimum relative price change in percentage (%) to trigger alert",
9638
- "value": 10,
9639
- "mandatory": false,
9640
- "category": 1
9641
- },
9642
- {
9643
- "key": "timeWindows",
9644
- "type": "string_array",
9645
- "description": "Time windows to monitor for price changes",
9646
- "value": [
9647
- "5 minutes",
9648
- "1 hour",
9649
- "24 hours"
9650
- ],
9651
- "enum": [
9652
- "5 minutes",
9653
- "15 minutes",
9654
- "30 minutes",
9655
- "1 hour",
9656
- "4 hours",
9657
- "24 hours"
9658
- ],
9659
- "mandatory": false,
9660
- "category": 1
9661
- },
9662
- ],
9663
- "examples": [
9664
- {
9665
- "name": "Monitor short-term spikes (5-minute window)",
9666
- "description": "Detects sudden price movements in 5-minute window. Example: Bitcoin market odds jump from 45% to 60% (+15pp, +33% relative) in 5 minutes.",
9667
- "externalVariableDescription": "Polls positions every 5 minutes, records price snapshots, compares current against 5-min-old snapshot, triggers if absolute >=5pp OR relative >=10%",
9668
- "parameters": [
9669
- {
9670
- "key": "polymarketAddress",
9671
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9672
- },
9673
- {
9674
- "key": "minAbsoluteChange",
9675
- "value": 5
9676
- },
9677
- {
9678
- "key": "minRelativeChange",
9679
- "value": 10
9680
- },
9681
- {
9682
- "key": "timeWindows",
9683
- "value": [
9684
- "5 minutes"
9685
- ]
9686
- }
9687
- ]
9688
- },
9689
- {
9690
- "name": "Monitor hourly trends (1-hour window)",
9691
- "description": "Detects medium-term price trends over 1 hour. Example: Election market drifts from 52% to 48% (-4pp, -7.7% relative) over 1 hour.",
9692
- "externalVariableDescription": "Compares current price against 1-hour-old snapshot from rolling cache, calculates P&L impact on position size",
9693
- "parameters": [
9694
- {
9695
- "key": "polymarketAddress",
9696
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9697
- },
9698
- {
9699
- "key": "minAbsoluteChange",
9700
- "value": 5
9701
- },
9702
- {
9703
- "key": "minRelativeChange",
9704
- "value": 10
9705
- },
9706
- {
9707
- "key": "timeWindows",
9708
- "value": [
9709
- "1 hour"
9710
- ]
9711
- }
9712
- ]
9713
- },
9714
- {
9715
- "name": "Monitor all time windows (comprehensive)",
9716
- "description": "Tracks price movements across all time windows (5min, 1hr, 24hr). Assigns severity based on magnitude and P&L impact.",
9717
- "externalVariableDescription": "Maintains rolling 24-hour snapshot cache, compares against each time window independently, deduplicates notifications",
9718
- "parameters": [
9719
- {
9720
- "key": "polymarketAddress",
9721
- "value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
9722
- },
9723
- {
9724
- "key": "minAbsoluteChange",
9725
- "value": 5
9726
- },
9727
- {
9728
- "key": "minRelativeChange",
9729
- "value": 10
9730
- },
9731
- {
9732
- "key": "timeWindows",
9733
- "value": [
9734
- "5 minutes",
9735
- "1 hour",
9736
- "24 hours"
9737
- ]
9738
- }
9739
- ]
9740
- }
9741
- ],
9742
- "blockId": 118,
9743
- "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
9744
- }
9745
- },
9746
9445
  "ABSTRACT": {
9747
9446
  "description": "Abstract flash badge",
9748
9447
  "image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/abstract.webp",
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = '2.0.449';
1
+ export const SDK_VERSION = '2.0.450';
2
2
  export function compareVersions(v1, v2) {
3
3
  // Split the version strings into parts
4
4
  const v1Parts = v1.split('.').map(Number);
@@ -3560,120 +3560,6 @@ export declare const TRIGGERS: {
3560
3560
  image: string;
3561
3561
  };
3562
3562
  };
3563
- POLYMARKET_LIMIT_ORDERS: {
3564
- description: string;
3565
- image: string;
3566
- tags: {};
3567
- LIMIT_ORDER_FILL: {
3568
- name: string;
3569
- dynamicName: string;
3570
- description: string;
3571
- type: number;
3572
- output: {
3573
- orderId: string;
3574
- filledAmount: string;
3575
- totalFilled: string;
3576
- originalSize: string;
3577
- marketTitle: string;
3578
- outcome: string;
3579
- side: string;
3580
- price: string;
3581
- fillType: string;
3582
- fillPercentage: string;
3583
- message: string;
3584
- };
3585
- parameters: Parameter[];
3586
- examples: {
3587
- name: string;
3588
- description: string;
3589
- externalVariableDescription: string;
3590
- parameters: {
3591
- key: string;
3592
- value: string;
3593
- }[];
3594
- }[];
3595
- blockId: number;
3596
- image: string;
3597
- };
3598
- };
3599
- POLYMARKET_RESOLUTION: {
3600
- description: string;
3601
- image: string;
3602
- tags: {};
3603
- MARKET_RESOLUTION: {
3604
- name: string;
3605
- dynamicName: string;
3606
- description: string;
3607
- type: number;
3608
- output: {
3609
- conditionId: string;
3610
- marketTitle: string;
3611
- outcome: string;
3612
- userWon: string;
3613
- claimableAmount: string;
3614
- profitLoss: string;
3615
- roi: string;
3616
- size: string;
3617
- avgPrice: string;
3618
- initialValue: string;
3619
- message: string;
3620
- };
3621
- parameters: Parameter[];
3622
- examples: {
3623
- name: string;
3624
- description: string;
3625
- externalVariableDescription: string;
3626
- parameters: {
3627
- key: string;
3628
- value: string;
3629
- }[];
3630
- }[];
3631
- blockId: number;
3632
- image: string;
3633
- };
3634
- };
3635
- POLYMARKET_PRICE_MOVEMENT: {
3636
- description: string;
3637
- image: string;
3638
- tags: {};
3639
- PRICE_MOVEMENT: {
3640
- name: string;
3641
- dynamicName: string;
3642
- description: string;
3643
- type: number;
3644
- output: {
3645
- conditionId: string;
3646
- marketTitle: string;
3647
- outcome: string;
3648
- currentPrice: string;
3649
- previousPrice: string;
3650
- absoluteChange: string;
3651
- relativeChange: string;
3652
- timeWindow: string;
3653
- userPnlImpact: string;
3654
- severity: string;
3655
- message: string;
3656
- };
3657
- parameters: Parameter[];
3658
- examples: {
3659
- name: string;
3660
- description: string;
3661
- externalVariableDescription: string;
3662
- parameters: ({
3663
- key: string;
3664
- value: string;
3665
- } | {
3666
- key: string;
3667
- value: number;
3668
- } | {
3669
- key: string;
3670
- value: string[];
3671
- })[];
3672
- }[];
3673
- blockId: number;
3674
- image: string;
3675
- };
3676
- };
3677
3563
  ABSTRACT: {
3678
3564
  description: string;
3679
3565
  image: string;
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.449";
1
+ export declare const SDK_VERSION = "2.0.450";
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.449",
3
+ "version": "2.0.450",
4
4
  "description": "An SDK for building and managing automations on Otomato",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/types/src/index.d.ts",