otomato-sdk 2.0.255 → 2.0.257
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.
|
@@ -896,6 +896,126 @@ export const TRIGGERS = {
|
|
|
896
896
|
],
|
|
897
897
|
"blockId": 10,
|
|
898
898
|
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/trend-up.png"
|
|
899
|
+
},
|
|
900
|
+
"PRICE_PERCENTAGE_CHANGE": {
|
|
901
|
+
"name": "On-Chain Price Percentage Change",
|
|
902
|
+
"prototype": "pricePercentageChange",
|
|
903
|
+
"description": "This trigger activates when the price of an asset changes by a specified percentage within a given time period.",
|
|
904
|
+
"type": 6,
|
|
905
|
+
"output": {
|
|
906
|
+
"percentageChange": "float",
|
|
907
|
+
"price": "float",
|
|
908
|
+
"priceThen": "float",
|
|
909
|
+
"currency": "string"
|
|
910
|
+
},
|
|
911
|
+
"parameters": [
|
|
912
|
+
{
|
|
913
|
+
"key": "chainId",
|
|
914
|
+
"type": "chainId",
|
|
915
|
+
"description": "Chain ID of the blockchain to monitor",
|
|
916
|
+
"mandatory": true,
|
|
917
|
+
"category": 0
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"key": "contractAddress",
|
|
921
|
+
"type": "erc20",
|
|
922
|
+
"description": "The asset that you want to track",
|
|
923
|
+
"mandatory": true,
|
|
924
|
+
"category": 0
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"key": "currency",
|
|
928
|
+
"type": "string",
|
|
929
|
+
"description": "The currency in which the price is denominated",
|
|
930
|
+
"enum": [
|
|
931
|
+
"USD",
|
|
932
|
+
"ETH",
|
|
933
|
+
"BTC"
|
|
934
|
+
],
|
|
935
|
+
"value": "USD",
|
|
936
|
+
"mandatory": true,
|
|
937
|
+
"category": 1
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"key": "timePeriod",
|
|
941
|
+
"type": "string",
|
|
942
|
+
"description": "The time period over which to measure the price change",
|
|
943
|
+
"enum": [
|
|
944
|
+
"1 minute",
|
|
945
|
+
"15 minutes",
|
|
946
|
+
"30 minutes",
|
|
947
|
+
"1 hour",
|
|
948
|
+
"4 hours",
|
|
949
|
+
"24 hours",
|
|
950
|
+
"7 days"
|
|
951
|
+
],
|
|
952
|
+
"mandatory": true,
|
|
953
|
+
"category": 0
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"key": "percentageChange",
|
|
957
|
+
"type": "float",
|
|
958
|
+
"description": "The percentage change threshold to trigger on (e.g., 10 for +10%, -5 for -5%)",
|
|
959
|
+
"mandatory": true,
|
|
960
|
+
"category": 0
|
|
961
|
+
},
|
|
962
|
+
],
|
|
963
|
+
"examples": [
|
|
964
|
+
{
|
|
965
|
+
"name": "BTC up more than 1% in 24h",
|
|
966
|
+
"description": "Triggers when BTC price increases by more than 10% in the last 24 hours",
|
|
967
|
+
"parameters": [
|
|
968
|
+
{
|
|
969
|
+
"key": "chainId",
|
|
970
|
+
"value": 8453
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"key": "contractAddress",
|
|
974
|
+
"value": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"key": "currency",
|
|
978
|
+
"value": "USD"
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"key": "timePeriod",
|
|
982
|
+
"value": "24 hours"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"key": "percentageChange",
|
|
986
|
+
"value": 1
|
|
987
|
+
}
|
|
988
|
+
]
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"name": "ETH down more than 2% in 30 minutes",
|
|
992
|
+
"description": "Triggers when ETH price decreases by more than 5% in the last 30 minutes",
|
|
993
|
+
"parameters": [
|
|
994
|
+
{
|
|
995
|
+
"key": "chainId",
|
|
996
|
+
"value": 8453
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"key": "contractAddress",
|
|
1000
|
+
"value": "0x4200000000000000000000000000000000000006"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"key": "currency",
|
|
1004
|
+
"value": "USD"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"key": "timePeriod",
|
|
1008
|
+
"value": "1 minute"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"key": "percentageChange",
|
|
1012
|
+
"value": -2
|
|
1013
|
+
}
|
|
1014
|
+
]
|
|
1015
|
+
}
|
|
1016
|
+
],
|
|
1017
|
+
"blockId": 7,
|
|
1018
|
+
"image": "https://otomato-sdk-images.s3.eu-west-1.amazonaws.com/trend-up.png"
|
|
899
1019
|
}
|
|
900
1020
|
}
|
|
901
1021
|
},
|
|
@@ -34,6 +34,7 @@ export class Trigger extends Node {
|
|
|
34
34
|
position: json.position,
|
|
35
35
|
parentInfo: enriched.parentInfo,
|
|
36
36
|
state: json.state,
|
|
37
|
+
isOptional: json.isOptional,
|
|
37
38
|
});
|
|
38
39
|
for (const [key, value] of Object.entries(json.parameters)) {
|
|
39
40
|
if (value === undefined || value === null) {
|
|
@@ -365,6 +365,32 @@ export declare const TRIGGERS: {
|
|
|
365
365
|
blockId: number;
|
|
366
366
|
image: string;
|
|
367
367
|
};
|
|
368
|
+
PRICE_PERCENTAGE_CHANGE: {
|
|
369
|
+
name: string;
|
|
370
|
+
prototype: string;
|
|
371
|
+
description: string;
|
|
372
|
+
type: number;
|
|
373
|
+
output: {
|
|
374
|
+
percentageChange: string;
|
|
375
|
+
price: string;
|
|
376
|
+
priceThen: string;
|
|
377
|
+
currency: string;
|
|
378
|
+
};
|
|
379
|
+
parameters: Parameter[];
|
|
380
|
+
examples: {
|
|
381
|
+
name: string;
|
|
382
|
+
description: string;
|
|
383
|
+
parameters: ({
|
|
384
|
+
key: string;
|
|
385
|
+
value: number;
|
|
386
|
+
} | {
|
|
387
|
+
key: string;
|
|
388
|
+
value: string;
|
|
389
|
+
})[];
|
|
390
|
+
}[];
|
|
391
|
+
blockId: number;
|
|
392
|
+
image: string;
|
|
393
|
+
};
|
|
368
394
|
};
|
|
369
395
|
};
|
|
370
396
|
YIELD: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.257";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|