otomato-sdk 2.0.442 → 2.0.444
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.
|
@@ -9084,6 +9084,7 @@ export const TRIGGERS = {
|
|
|
9084
9084
|
"POLYMARKET": {
|
|
9085
9085
|
"description": "Decentralized prediction market protocol",
|
|
9086
9086
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
|
|
9087
|
+
"tags": {},
|
|
9087
9088
|
"OUTCOME_PRICE": {
|
|
9088
9089
|
"name": "Market Outcome Price",
|
|
9089
9090
|
"dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML, getComparisonString } = otomatoSDK;\n return getDynamicNameWrapperHTML(\n env.context.name,\n `${getComparisonString(env.parameters.condition, env.parameters.comparisonValue)}`\n );\n }",
|
|
@@ -9154,6 +9155,585 @@ export const TRIGGERS = {
|
|
|
9154
9155
|
],
|
|
9155
9156
|
"blockId": 42,
|
|
9156
9157
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9158
|
+
},
|
|
9159
|
+
"MARKET_RESOLUTION": {
|
|
9160
|
+
"name": "Polymarket Market Resolution Detection",
|
|
9161
|
+
"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 }",
|
|
9162
|
+
"description": "Detects when markets resolve, determines win/loss for user positions, and calculates claimable amounts and P&L",
|
|
9163
|
+
"type": 6,
|
|
9164
|
+
"output": {
|
|
9165
|
+
"conditionId": "string",
|
|
9166
|
+
"marketTitle": "string",
|
|
9167
|
+
"outcome": "string",
|
|
9168
|
+
"userWon": "string",
|
|
9169
|
+
"claimableAmount": "float",
|
|
9170
|
+
"profitLoss": "float",
|
|
9171
|
+
"roi": "float",
|
|
9172
|
+
"size": "float",
|
|
9173
|
+
"avgPrice": "float",
|
|
9174
|
+
"initialValue": "float",
|
|
9175
|
+
"message": "string"
|
|
9176
|
+
},
|
|
9177
|
+
"parameters": [
|
|
9178
|
+
{
|
|
9179
|
+
"key": "polymarketAddress",
|
|
9180
|
+
"type": "address",
|
|
9181
|
+
"description": "The user's Polymarket proxy wallet address (0x...)",
|
|
9182
|
+
"mandatory": true,
|
|
9183
|
+
"category": 0
|
|
9184
|
+
},
|
|
9185
|
+
],
|
|
9186
|
+
"examples": [
|
|
9187
|
+
{
|
|
9188
|
+
"name": "Track winning positions (Example: User wins)",
|
|
9189
|
+
"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).",
|
|
9190
|
+
"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%",
|
|
9191
|
+
"parameters": [
|
|
9192
|
+
{
|
|
9193
|
+
"key": "polymarketAddress",
|
|
9194
|
+
"value": "0x08bfd9fe77f532f8f0d8f77532f8f0d8f77532f8"
|
|
9195
|
+
}
|
|
9196
|
+
]
|
|
9197
|
+
},
|
|
9198
|
+
{
|
|
9199
|
+
"name": "Track losing positions (Example: User loses)",
|
|
9200
|
+
"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).",
|
|
9201
|
+
"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%",
|
|
9202
|
+
"parameters": [
|
|
9203
|
+
{
|
|
9204
|
+
"key": "polymarketAddress",
|
|
9205
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9206
|
+
}
|
|
9207
|
+
]
|
|
9208
|
+
},
|
|
9209
|
+
{
|
|
9210
|
+
"name": "Track hedged positions (Multiple positions in same market)",
|
|
9211
|
+
"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.",
|
|
9212
|
+
"externalVariableDescription": "Uses composite cache key (conditionId_outcomeIndex) to track each position separately. If Yes wins: Yes position notifies profit, No position notifies loss.",
|
|
9213
|
+
"parameters": [
|
|
9214
|
+
{
|
|
9215
|
+
"key": "polymarketAddress",
|
|
9216
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9217
|
+
}
|
|
9218
|
+
]
|
|
9219
|
+
},
|
|
9220
|
+
{
|
|
9221
|
+
"name": "Personal position tracker",
|
|
9222
|
+
"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.",
|
|
9223
|
+
"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)",
|
|
9224
|
+
"parameters": [
|
|
9225
|
+
{
|
|
9226
|
+
"key": "polymarketAddress",
|
|
9227
|
+
"value": "0x0000000000000000000000000000000000000000"
|
|
9228
|
+
}
|
|
9229
|
+
]
|
|
9230
|
+
}
|
|
9231
|
+
],
|
|
9232
|
+
"blockId": 44,
|
|
9233
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9234
|
+
},
|
|
9235
|
+
"TRADE_EXECUTION": {
|
|
9236
|
+
"name": "Polymarket Trade Execution Notification",
|
|
9237
|
+
"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 trades for\",\n shortAddress\n );\n }",
|
|
9238
|
+
"description": "Get notified when trades execute on your Polymarket account (limit orders and market orders)",
|
|
9239
|
+
"type": 6,
|
|
9240
|
+
"output": {
|
|
9241
|
+
"transactionHash": "string",
|
|
9242
|
+
"marketTitle": "string",
|
|
9243
|
+
"outcome": "string",
|
|
9244
|
+
"side": "string",
|
|
9245
|
+
"size": "float",
|
|
9246
|
+
"price": "float",
|
|
9247
|
+
"usdcValue": "float",
|
|
9248
|
+
"timestamp": "float",
|
|
9249
|
+
"message": "string"
|
|
9250
|
+
},
|
|
9251
|
+
"parameters": [
|
|
9252
|
+
{
|
|
9253
|
+
"key": "polymarketAddress",
|
|
9254
|
+
"type": "address",
|
|
9255
|
+
"description": "Your Polymarket proxy wallet address (0x...)",
|
|
9256
|
+
"mandatory": true,
|
|
9257
|
+
"category": 0
|
|
9258
|
+
},
|
|
9259
|
+
],
|
|
9260
|
+
"examples": [
|
|
9261
|
+
{
|
|
9262
|
+
"name": "Track all trades",
|
|
9263
|
+
"description": "Get notified whenever you execute a trade on Polymarket, whether it's a limit order that filled or a market order.",
|
|
9264
|
+
"externalVariableDescription": "Polls Activity API every 5 minutes, checks for new TRADE entries by comparing transaction hashes, sends notification for each new trade execution",
|
|
9265
|
+
"parameters": [
|
|
9266
|
+
{
|
|
9267
|
+
"key": "polymarketAddress",
|
|
9268
|
+
"value": "0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d"
|
|
9269
|
+
}
|
|
9270
|
+
]
|
|
9271
|
+
}
|
|
9272
|
+
],
|
|
9273
|
+
"blockId": 43,
|
|
9274
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9275
|
+
},
|
|
9276
|
+
"PRICE_MOVEMENT": {
|
|
9277
|
+
"name": "Polymarket Price Movement Detection",
|
|
9278
|
+
"dynamicName": "async (env, { otomatoSDK }) => {\n const { getDynamicNameWrapperHTML } = otomatoSDK;\n const marketSlug = env.parameters.marketSlug || \"market\";\n const shortSlug = marketSlug.length > 20\n ? `${marketSlug.substring(0, 20)}...`\n : marketSlug;\n return getDynamicNameWrapperHTML(\n \"Price movements for\",\n shortSlug\n );\n }",
|
|
9279
|
+
"description": "Detects significant price (odds) movements on a specific Polymarket market, using rolling time windows and threshold-based alerts",
|
|
9280
|
+
"type": 6,
|
|
9281
|
+
"output": {
|
|
9282
|
+
"marketSlug": "string",
|
|
9283
|
+
"marketTitle": "string",
|
|
9284
|
+
"outcome": "string",
|
|
9285
|
+
"currentPrice": "float",
|
|
9286
|
+
"previousPrice": "float",
|
|
9287
|
+
"absoluteChange": "float",
|
|
9288
|
+
"relativeChange": "float",
|
|
9289
|
+
"timeWindow": "string",
|
|
9290
|
+
"severity": "string",
|
|
9291
|
+
"message": "string"
|
|
9292
|
+
},
|
|
9293
|
+
"parameters": [
|
|
9294
|
+
{
|
|
9295
|
+
"key": "marketSlug",
|
|
9296
|
+
"type": "string",
|
|
9297
|
+
"description": "The Polymarket market slug (e.g., 'xrp-updown-15m-1768680900')",
|
|
9298
|
+
"mandatory": true,
|
|
9299
|
+
"category": 0
|
|
9300
|
+
},
|
|
9301
|
+
{
|
|
9302
|
+
"key": "outcome",
|
|
9303
|
+
"type": "string",
|
|
9304
|
+
"description": "The outcome to monitor (e.g., 'Up', 'Down', 'Yes', 'No'). Leave empty to monitor the first outcome.",
|
|
9305
|
+
"mandatory": false,
|
|
9306
|
+
"category": 0
|
|
9307
|
+
},
|
|
9308
|
+
{
|
|
9309
|
+
"key": "minAbsoluteChange",
|
|
9310
|
+
"type": "float",
|
|
9311
|
+
"description": "Minimum absolute price change in percentage points (pp) to trigger alert",
|
|
9312
|
+
"value": 5,
|
|
9313
|
+
"mandatory": false,
|
|
9314
|
+
"category": 1
|
|
9315
|
+
},
|
|
9316
|
+
{
|
|
9317
|
+
"key": "minRelativeChange",
|
|
9318
|
+
"type": "float",
|
|
9319
|
+
"description": "Minimum relative price change in percentage (%) to trigger alert",
|
|
9320
|
+
"value": 10,
|
|
9321
|
+
"mandatory": false,
|
|
9322
|
+
"category": 1
|
|
9323
|
+
},
|
|
9324
|
+
{
|
|
9325
|
+
"key": "timeWindows",
|
|
9326
|
+
"type": "string_array",
|
|
9327
|
+
"description": "Time windows to monitor for price changes",
|
|
9328
|
+
"value": [
|
|
9329
|
+
"5 minutes",
|
|
9330
|
+
"1 hour"
|
|
9331
|
+
],
|
|
9332
|
+
"enum": [
|
|
9333
|
+
"5 minutes",
|
|
9334
|
+
"15 minutes",
|
|
9335
|
+
"30 minutes",
|
|
9336
|
+
"1 hour",
|
|
9337
|
+
"4 hours",
|
|
9338
|
+
"24 hours"
|
|
9339
|
+
],
|
|
9340
|
+
"mandatory": false,
|
|
9341
|
+
"category": 1
|
|
9342
|
+
},
|
|
9343
|
+
],
|
|
9344
|
+
"examples": [
|
|
9345
|
+
{
|
|
9346
|
+
"name": "Monitor XRP market for short-term spikes",
|
|
9347
|
+
"description": "Detects sudden price movements in 5-minute window on XRP Up/Down market.",
|
|
9348
|
+
"externalVariableDescription": "Polls market every 5 minutes, records price snapshots, compares current against 5-min-old snapshot, triggers if absolute >=5pp OR relative >=10%",
|
|
9349
|
+
"parameters": [
|
|
9350
|
+
{
|
|
9351
|
+
"key": "marketSlug",
|
|
9352
|
+
"value": "xrp-updown-15m-1768680900"
|
|
9353
|
+
},
|
|
9354
|
+
{
|
|
9355
|
+
"key": "outcome",
|
|
9356
|
+
"value": "Down"
|
|
9357
|
+
},
|
|
9358
|
+
{
|
|
9359
|
+
"key": "minAbsoluteChange",
|
|
9360
|
+
"value": 5
|
|
9361
|
+
},
|
|
9362
|
+
{
|
|
9363
|
+
"key": "minRelativeChange",
|
|
9364
|
+
"value": 10
|
|
9365
|
+
},
|
|
9366
|
+
{
|
|
9367
|
+
"key": "timeWindows",
|
|
9368
|
+
"value": [
|
|
9369
|
+
"5 minutes"
|
|
9370
|
+
]
|
|
9371
|
+
}
|
|
9372
|
+
]
|
|
9373
|
+
},
|
|
9374
|
+
{
|
|
9375
|
+
"name": "Monitor Bitcoin market for hourly trends",
|
|
9376
|
+
"description": "Detects medium-term price trends over 1 hour on Bitcoin market.",
|
|
9377
|
+
"externalVariableDescription": "Compares current price against 1-hour-old snapshot from rolling cache",
|
|
9378
|
+
"parameters": [
|
|
9379
|
+
{
|
|
9380
|
+
"key": "marketSlug",
|
|
9381
|
+
"value": "btc-updown-15m-1768680000"
|
|
9382
|
+
},
|
|
9383
|
+
{
|
|
9384
|
+
"key": "outcome",
|
|
9385
|
+
"value": "Up"
|
|
9386
|
+
},
|
|
9387
|
+
{
|
|
9388
|
+
"key": "minAbsoluteChange",
|
|
9389
|
+
"value": 5
|
|
9390
|
+
},
|
|
9391
|
+
{
|
|
9392
|
+
"key": "minRelativeChange",
|
|
9393
|
+
"value": 10
|
|
9394
|
+
},
|
|
9395
|
+
{
|
|
9396
|
+
"key": "timeWindows",
|
|
9397
|
+
"value": [
|
|
9398
|
+
"1 hour"
|
|
9399
|
+
]
|
|
9400
|
+
}
|
|
9401
|
+
]
|
|
9402
|
+
},
|
|
9403
|
+
{
|
|
9404
|
+
"name": "Monitor market with custom thresholds",
|
|
9405
|
+
"description": "Tracks price movements with higher sensitivity (2pp or 5% change).",
|
|
9406
|
+
"externalVariableDescription": "Uses custom thresholds to detect smaller movements, useful for high-liquidity markets",
|
|
9407
|
+
"parameters": [
|
|
9408
|
+
{
|
|
9409
|
+
"key": "marketSlug",
|
|
9410
|
+
"value": "eth-updown-15m-1768680900"
|
|
9411
|
+
},
|
|
9412
|
+
{
|
|
9413
|
+
"key": "outcome",
|
|
9414
|
+
"value": "Up"
|
|
9415
|
+
},
|
|
9416
|
+
{
|
|
9417
|
+
"key": "minAbsoluteChange",
|
|
9418
|
+
"value": 2
|
|
9419
|
+
},
|
|
9420
|
+
{
|
|
9421
|
+
"key": "minRelativeChange",
|
|
9422
|
+
"value": 5
|
|
9423
|
+
},
|
|
9424
|
+
{
|
|
9425
|
+
"key": "timeWindows",
|
|
9426
|
+
"value": [
|
|
9427
|
+
"5 minutes",
|
|
9428
|
+
"1 hour"
|
|
9429
|
+
]
|
|
9430
|
+
}
|
|
9431
|
+
]
|
|
9432
|
+
}
|
|
9433
|
+
],
|
|
9434
|
+
"blockId": 45,
|
|
9435
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9436
|
+
}
|
|
9437
|
+
},
|
|
9438
|
+
"POLYMARKET_LIMIT_ORDERS": {
|
|
9439
|
+
"description": "Polymarket limit order fill detection",
|
|
9440
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
|
|
9441
|
+
"tags": {},
|
|
9442
|
+
"LIMIT_ORDER_FILL": {
|
|
9443
|
+
"name": "Polymarket Limit Order Fill Detection",
|
|
9444
|
+
"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 }",
|
|
9445
|
+
"description": "Detects when a user's Polymarket limit orders have been filled (partially or fully) by monitoring the CLOB Orders API",
|
|
9446
|
+
"type": 6,
|
|
9447
|
+
"output": {
|
|
9448
|
+
"orderId": "string",
|
|
9449
|
+
"filledAmount": "float",
|
|
9450
|
+
"totalFilled": "float",
|
|
9451
|
+
"originalSize": "float",
|
|
9452
|
+
"marketTitle": "string",
|
|
9453
|
+
"outcome": "string",
|
|
9454
|
+
"side": "string",
|
|
9455
|
+
"price": "float",
|
|
9456
|
+
"fillType": "string",
|
|
9457
|
+
"fillPercentage": "float",
|
|
9458
|
+
"message": "string"
|
|
9459
|
+
},
|
|
9460
|
+
"parameters": [
|
|
9461
|
+
{
|
|
9462
|
+
"key": "polymarketAddress",
|
|
9463
|
+
"type": "address",
|
|
9464
|
+
"description": "The user's Polymarket proxy wallet address (0x...)",
|
|
9465
|
+
"mandatory": true,
|
|
9466
|
+
"category": 0
|
|
9467
|
+
},
|
|
9468
|
+
],
|
|
9469
|
+
"examples": [
|
|
9470
|
+
{
|
|
9471
|
+
"name": "Monitor all limit orders for address",
|
|
9472
|
+
"description": "Detects when any limit order for this Polymarket address is partially or fully filled. Uses real test address from Polymarket docs.",
|
|
9473
|
+
"externalVariableDescription": "Polls CLOB Orders API every 5 minutes to detect fills by comparing size_matched changes",
|
|
9474
|
+
"parameters": [
|
|
9475
|
+
{
|
|
9476
|
+
"key": "polymarketAddress",
|
|
9477
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9478
|
+
}
|
|
9479
|
+
]
|
|
9480
|
+
},
|
|
9481
|
+
{
|
|
9482
|
+
"name": "Track limit order fills for whale address",
|
|
9483
|
+
"description": "Monitor a high-activity address for limit order fills. Example shows tracking multiple orders across different markets.",
|
|
9484
|
+
"externalVariableDescription": "Detects partial fills (size_matched increase) and full fills (order disappearance) with market data enrichment",
|
|
9485
|
+
"parameters": [
|
|
9486
|
+
{
|
|
9487
|
+
"key": "polymarketAddress",
|
|
9488
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9489
|
+
}
|
|
9490
|
+
]
|
|
9491
|
+
},
|
|
9492
|
+
{
|
|
9493
|
+
"name": "Personal limit order tracker",
|
|
9494
|
+
"description": "Get notified when your own Polymarket limit orders are filled. Replace with your Polymarket proxy wallet address.",
|
|
9495
|
+
"externalVariableDescription": "Tracks cumulative fills across multiple partial fills and distinguishes cancelled orders from filled orders using activity API",
|
|
9496
|
+
"parameters": [
|
|
9497
|
+
{
|
|
9498
|
+
"key": "polymarketAddress",
|
|
9499
|
+
"value": "0x0000000000000000000000000000000000000000"
|
|
9500
|
+
}
|
|
9501
|
+
]
|
|
9502
|
+
}
|
|
9503
|
+
],
|
|
9504
|
+
"blockId": 43,
|
|
9505
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9506
|
+
}
|
|
9507
|
+
},
|
|
9508
|
+
"POLYMARKET_RESOLUTION": {
|
|
9509
|
+
"description": "Polymarket market resolution detection",
|
|
9510
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
|
|
9511
|
+
"tags": {},
|
|
9512
|
+
"MARKET_RESOLUTION": {
|
|
9513
|
+
"name": "Polymarket Market Resolution Detection",
|
|
9514
|
+
"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 }",
|
|
9515
|
+
"description": "Detects when markets resolve, determines win/loss for user positions, and calculates claimable amounts and P&L",
|
|
9516
|
+
"type": 6,
|
|
9517
|
+
"output": {
|
|
9518
|
+
"conditionId": "string",
|
|
9519
|
+
"marketTitle": "string",
|
|
9520
|
+
"outcome": "string",
|
|
9521
|
+
"userWon": "string",
|
|
9522
|
+
"claimableAmount": "float",
|
|
9523
|
+
"profitLoss": "float",
|
|
9524
|
+
"roi": "float",
|
|
9525
|
+
"size": "float",
|
|
9526
|
+
"avgPrice": "float",
|
|
9527
|
+
"initialValue": "float",
|
|
9528
|
+
"message": "string"
|
|
9529
|
+
},
|
|
9530
|
+
"parameters": [
|
|
9531
|
+
{
|
|
9532
|
+
"key": "polymarketAddress",
|
|
9533
|
+
"type": "address",
|
|
9534
|
+
"description": "The user's Polymarket proxy wallet address (0x...)",
|
|
9535
|
+
"mandatory": true,
|
|
9536
|
+
"category": 0
|
|
9537
|
+
},
|
|
9538
|
+
],
|
|
9539
|
+
"examples": [
|
|
9540
|
+
{
|
|
9541
|
+
"name": "Track winning positions (Example: User wins)",
|
|
9542
|
+
"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).",
|
|
9543
|
+
"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%",
|
|
9544
|
+
"parameters": [
|
|
9545
|
+
{
|
|
9546
|
+
"key": "polymarketAddress",
|
|
9547
|
+
"value": "0x08bfd9fe77f532f8f0d8f77532f8f0d8f77532f8"
|
|
9548
|
+
}
|
|
9549
|
+
]
|
|
9550
|
+
},
|
|
9551
|
+
{
|
|
9552
|
+
"name": "Track losing positions (Example: User loses)",
|
|
9553
|
+
"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).",
|
|
9554
|
+
"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%",
|
|
9555
|
+
"parameters": [
|
|
9556
|
+
{
|
|
9557
|
+
"key": "polymarketAddress",
|
|
9558
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9559
|
+
}
|
|
9560
|
+
]
|
|
9561
|
+
},
|
|
9562
|
+
{
|
|
9563
|
+
"name": "Track hedged positions (Multiple positions in same market)",
|
|
9564
|
+
"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.",
|
|
9565
|
+
"externalVariableDescription": "Uses composite cache key (conditionId_outcomeIndex) to track each position separately. If Yes wins: Yes position notifies profit, No position notifies loss.",
|
|
9566
|
+
"parameters": [
|
|
9567
|
+
{
|
|
9568
|
+
"key": "polymarketAddress",
|
|
9569
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9570
|
+
}
|
|
9571
|
+
]
|
|
9572
|
+
},
|
|
9573
|
+
{
|
|
9574
|
+
"name": "Personal position tracker",
|
|
9575
|
+
"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.",
|
|
9576
|
+
"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)",
|
|
9577
|
+
"parameters": [
|
|
9578
|
+
{
|
|
9579
|
+
"key": "polymarketAddress",
|
|
9580
|
+
"value": "0x0000000000000000000000000000000000000000"
|
|
9581
|
+
}
|
|
9582
|
+
]
|
|
9583
|
+
}
|
|
9584
|
+
],
|
|
9585
|
+
"blockId": 44,
|
|
9586
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9587
|
+
}
|
|
9588
|
+
},
|
|
9589
|
+
"POLYMARKET_PRICE_MOVEMENT": {
|
|
9590
|
+
"description": "Polymarket price movement detection",
|
|
9591
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png",
|
|
9592
|
+
"tags": {},
|
|
9593
|
+
"PRICE_MOVEMENT": {
|
|
9594
|
+
"name": "Polymarket Price Movement Detection",
|
|
9595
|
+
"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 }",
|
|
9596
|
+
"description": "Detects significant price (odds) movements on markets where user has positions, using rolling time windows and threshold-based alerts",
|
|
9597
|
+
"type": 6,
|
|
9598
|
+
"output": {
|
|
9599
|
+
"conditionId": "string",
|
|
9600
|
+
"marketTitle": "string",
|
|
9601
|
+
"outcome": "string",
|
|
9602
|
+
"currentPrice": "float",
|
|
9603
|
+
"previousPrice": "float",
|
|
9604
|
+
"absoluteChange": "float",
|
|
9605
|
+
"relativeChange": "float",
|
|
9606
|
+
"timeWindow": "string",
|
|
9607
|
+
"userPnlImpact": "float",
|
|
9608
|
+
"severity": "string",
|
|
9609
|
+
"message": "string"
|
|
9610
|
+
},
|
|
9611
|
+
"parameters": [
|
|
9612
|
+
{
|
|
9613
|
+
"key": "polymarketAddress",
|
|
9614
|
+
"type": "address",
|
|
9615
|
+
"description": "The user's Polymarket proxy wallet address (0x...)",
|
|
9616
|
+
"mandatory": true,
|
|
9617
|
+
"category": 0
|
|
9618
|
+
},
|
|
9619
|
+
{
|
|
9620
|
+
"key": "minAbsoluteChange",
|
|
9621
|
+
"type": "float",
|
|
9622
|
+
"description": "Minimum absolute price change in percentage points (pp) to trigger alert",
|
|
9623
|
+
"value": 5,
|
|
9624
|
+
"mandatory": false,
|
|
9625
|
+
"category": 1
|
|
9626
|
+
},
|
|
9627
|
+
{
|
|
9628
|
+
"key": "minRelativeChange",
|
|
9629
|
+
"type": "float",
|
|
9630
|
+
"description": "Minimum relative price change in percentage (%) to trigger alert",
|
|
9631
|
+
"value": 10,
|
|
9632
|
+
"mandatory": false,
|
|
9633
|
+
"category": 1
|
|
9634
|
+
},
|
|
9635
|
+
{
|
|
9636
|
+
"key": "timeWindows",
|
|
9637
|
+
"type": "string_array",
|
|
9638
|
+
"description": "Time windows to monitor for price changes",
|
|
9639
|
+
"value": [
|
|
9640
|
+
"5 minutes",
|
|
9641
|
+
"1 hour",
|
|
9642
|
+
"24 hours"
|
|
9643
|
+
],
|
|
9644
|
+
"enum": [
|
|
9645
|
+
"5 minutes",
|
|
9646
|
+
"15 minutes",
|
|
9647
|
+
"30 minutes",
|
|
9648
|
+
"1 hour",
|
|
9649
|
+
"4 hours",
|
|
9650
|
+
"24 hours"
|
|
9651
|
+
],
|
|
9652
|
+
"mandatory": false,
|
|
9653
|
+
"category": 1
|
|
9654
|
+
},
|
|
9655
|
+
],
|
|
9656
|
+
"examples": [
|
|
9657
|
+
{
|
|
9658
|
+
"name": "Monitor short-term spikes (5-minute window)",
|
|
9659
|
+
"description": "Detects sudden price movements in 5-minute window. Example: Bitcoin market odds jump from 45% to 60% (+15pp, +33% relative) in 5 minutes.",
|
|
9660
|
+
"externalVariableDescription": "Polls positions every 5 minutes, records price snapshots, compares current against 5-min-old snapshot, triggers if absolute >=5pp OR relative >=10%",
|
|
9661
|
+
"parameters": [
|
|
9662
|
+
{
|
|
9663
|
+
"key": "polymarketAddress",
|
|
9664
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9665
|
+
},
|
|
9666
|
+
{
|
|
9667
|
+
"key": "minAbsoluteChange",
|
|
9668
|
+
"value": 5
|
|
9669
|
+
},
|
|
9670
|
+
{
|
|
9671
|
+
"key": "minRelativeChange",
|
|
9672
|
+
"value": 10
|
|
9673
|
+
},
|
|
9674
|
+
{
|
|
9675
|
+
"key": "timeWindows",
|
|
9676
|
+
"value": [
|
|
9677
|
+
"5 minutes"
|
|
9678
|
+
]
|
|
9679
|
+
}
|
|
9680
|
+
]
|
|
9681
|
+
},
|
|
9682
|
+
{
|
|
9683
|
+
"name": "Monitor hourly trends (1-hour window)",
|
|
9684
|
+
"description": "Detects medium-term price trends over 1 hour. Example: Election market drifts from 52% to 48% (-4pp, -7.7% relative) over 1 hour.",
|
|
9685
|
+
"externalVariableDescription": "Compares current price against 1-hour-old snapshot from rolling cache, calculates P&L impact on position size",
|
|
9686
|
+
"parameters": [
|
|
9687
|
+
{
|
|
9688
|
+
"key": "polymarketAddress",
|
|
9689
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9690
|
+
},
|
|
9691
|
+
{
|
|
9692
|
+
"key": "minAbsoluteChange",
|
|
9693
|
+
"value": 5
|
|
9694
|
+
},
|
|
9695
|
+
{
|
|
9696
|
+
"key": "minRelativeChange",
|
|
9697
|
+
"value": 10
|
|
9698
|
+
},
|
|
9699
|
+
{
|
|
9700
|
+
"key": "timeWindows",
|
|
9701
|
+
"value": [
|
|
9702
|
+
"1 hour"
|
|
9703
|
+
]
|
|
9704
|
+
}
|
|
9705
|
+
]
|
|
9706
|
+
},
|
|
9707
|
+
{
|
|
9708
|
+
"name": "Monitor all time windows (comprehensive)",
|
|
9709
|
+
"description": "Tracks price movements across all time windows (5min, 1hr, 24hr). Assigns severity based on magnitude and P&L impact.",
|
|
9710
|
+
"externalVariableDescription": "Maintains rolling 24-hour snapshot cache, compares against each time window independently, deduplicates notifications",
|
|
9711
|
+
"parameters": [
|
|
9712
|
+
{
|
|
9713
|
+
"key": "polymarketAddress",
|
|
9714
|
+
"value": "0x9cb528aacf7dc71439c142c564acf5e61599e613"
|
|
9715
|
+
},
|
|
9716
|
+
{
|
|
9717
|
+
"key": "minAbsoluteChange",
|
|
9718
|
+
"value": 5
|
|
9719
|
+
},
|
|
9720
|
+
{
|
|
9721
|
+
"key": "minRelativeChange",
|
|
9722
|
+
"value": 10
|
|
9723
|
+
},
|
|
9724
|
+
{
|
|
9725
|
+
"key": "timeWindows",
|
|
9726
|
+
"value": [
|
|
9727
|
+
"5 minutes",
|
|
9728
|
+
"1 hour",
|
|
9729
|
+
"24 hours"
|
|
9730
|
+
]
|
|
9731
|
+
}
|
|
9732
|
+
]
|
|
9733
|
+
}
|
|
9734
|
+
],
|
|
9735
|
+
"blockId": 45,
|
|
9736
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/polymarket.png"
|
|
9157
9737
|
}
|
|
9158
9738
|
},
|
|
9159
9739
|
"ABSTRACT": {
|
|
@@ -3435,6 +3435,7 @@ export declare const TRIGGERS: {
|
|
|
3435
3435
|
POLYMARKET: {
|
|
3436
3436
|
description: string;
|
|
3437
3437
|
image: string;
|
|
3438
|
+
tags: {};
|
|
3438
3439
|
OUTCOME_PRICE: {
|
|
3439
3440
|
name: string;
|
|
3440
3441
|
dynamicName: string;
|
|
@@ -3462,6 +3463,216 @@ export declare const TRIGGERS: {
|
|
|
3462
3463
|
blockId: number;
|
|
3463
3464
|
image: string;
|
|
3464
3465
|
};
|
|
3466
|
+
MARKET_RESOLUTION: {
|
|
3467
|
+
name: string;
|
|
3468
|
+
dynamicName: string;
|
|
3469
|
+
description: string;
|
|
3470
|
+
type: number;
|
|
3471
|
+
output: {
|
|
3472
|
+
conditionId: string;
|
|
3473
|
+
marketTitle: string;
|
|
3474
|
+
outcome: string;
|
|
3475
|
+
userWon: string;
|
|
3476
|
+
claimableAmount: string;
|
|
3477
|
+
profitLoss: string;
|
|
3478
|
+
roi: string;
|
|
3479
|
+
size: string;
|
|
3480
|
+
avgPrice: string;
|
|
3481
|
+
initialValue: string;
|
|
3482
|
+
message: string;
|
|
3483
|
+
};
|
|
3484
|
+
parameters: Parameter[];
|
|
3485
|
+
examples: {
|
|
3486
|
+
name: string;
|
|
3487
|
+
description: string;
|
|
3488
|
+
externalVariableDescription: string;
|
|
3489
|
+
parameters: {
|
|
3490
|
+
key: string;
|
|
3491
|
+
value: string;
|
|
3492
|
+
}[];
|
|
3493
|
+
}[];
|
|
3494
|
+
blockId: number;
|
|
3495
|
+
image: string;
|
|
3496
|
+
};
|
|
3497
|
+
TRADE_EXECUTION: {
|
|
3498
|
+
name: string;
|
|
3499
|
+
dynamicName: string;
|
|
3500
|
+
description: string;
|
|
3501
|
+
type: number;
|
|
3502
|
+
output: {
|
|
3503
|
+
transactionHash: string;
|
|
3504
|
+
marketTitle: string;
|
|
3505
|
+
outcome: string;
|
|
3506
|
+
side: string;
|
|
3507
|
+
size: string;
|
|
3508
|
+
price: string;
|
|
3509
|
+
usdcValue: string;
|
|
3510
|
+
timestamp: string;
|
|
3511
|
+
message: string;
|
|
3512
|
+
};
|
|
3513
|
+
parameters: Parameter[];
|
|
3514
|
+
examples: {
|
|
3515
|
+
name: string;
|
|
3516
|
+
description: string;
|
|
3517
|
+
externalVariableDescription: string;
|
|
3518
|
+
parameters: {
|
|
3519
|
+
key: string;
|
|
3520
|
+
value: string;
|
|
3521
|
+
}[];
|
|
3522
|
+
}[];
|
|
3523
|
+
blockId: number;
|
|
3524
|
+
image: string;
|
|
3525
|
+
};
|
|
3526
|
+
PRICE_MOVEMENT: {
|
|
3527
|
+
name: string;
|
|
3528
|
+
dynamicName: string;
|
|
3529
|
+
description: string;
|
|
3530
|
+
type: number;
|
|
3531
|
+
output: {
|
|
3532
|
+
marketSlug: string;
|
|
3533
|
+
marketTitle: string;
|
|
3534
|
+
outcome: string;
|
|
3535
|
+
currentPrice: string;
|
|
3536
|
+
previousPrice: string;
|
|
3537
|
+
absoluteChange: string;
|
|
3538
|
+
relativeChange: string;
|
|
3539
|
+
timeWindow: string;
|
|
3540
|
+
severity: string;
|
|
3541
|
+
message: string;
|
|
3542
|
+
};
|
|
3543
|
+
parameters: Parameter[];
|
|
3544
|
+
examples: {
|
|
3545
|
+
name: string;
|
|
3546
|
+
description: string;
|
|
3547
|
+
externalVariableDescription: string;
|
|
3548
|
+
parameters: ({
|
|
3549
|
+
key: string;
|
|
3550
|
+
value: string;
|
|
3551
|
+
} | {
|
|
3552
|
+
key: string;
|
|
3553
|
+
value: number;
|
|
3554
|
+
} | {
|
|
3555
|
+
key: string;
|
|
3556
|
+
value: string[];
|
|
3557
|
+
})[];
|
|
3558
|
+
}[];
|
|
3559
|
+
blockId: number;
|
|
3560
|
+
image: string;
|
|
3561
|
+
};
|
|
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
|
+
};
|
|
3465
3676
|
};
|
|
3466
3677
|
ABSTRACT: {
|
|
3467
3678
|
description: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.444";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|