diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-02-29 00:34:46 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-02-29 00:34:46 +0000 |
commit | 7baae789e2be9bfc3671f66ff0ad6a7da684c993 (patch) | |
tree | c082fb963af6b91f60493bd03e0ba13757e2aeb3 /test/endpoints.sh | |
parent | fixes #5 (diff) | |
download | hived-7baae789e2be9bfc3671f66ff0ad6a7da684c993.tar.gz hived-7baae789e2be9bfc3671f66ff0ad6a7da684c993.zip |
added new ticker endpoint that periodically sends crypto prices over telegram
Diffstat (limited to '')
-rwxr-xr-x | test/endpoints.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/test/endpoints.sh b/test/endpoints.sh index 7f9533b..2b73614 100755 --- a/test/endpoints.sh +++ b/test/endpoints.sh @@ -2,11 +2,21 @@ set -e set -x -# sleep 5 -curl -k -X GET "https://localhost:8008/crypto/v1/price?name=CAKE&unit=USD" -curl -k -X GET "https://localhost:8008/crypto/v1/pair?one=ETH&two=CAKE&multiplier=4.0" -curl -k -X POST -H "Content-Type: application/json" -d '{"name":"alert1", "expr":"ETH>CAKE"}' https://localhost:8008/crypto/v1/alert +curl -k -X GET "https://localhost:10008/crypto/v1/price?name=PEPE&unit=USD" +curl -k -X GET "https://localhost:10008/crypto/v1/pair?one=ETH&two=CAKE&multiplier=4.0" +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"alert1", "expr":"ETH>CAKE"}' https://localhost:10008/crypto/v1/alert -curl -k -X GET -H "Content-Type: application/json" "https://localhost:8008/crypto/v1/alert?key=alert1" -curl -k -X DELETE -H "Content-Type: application/json" "https://localhost:8008/crypto/v1/alert?key=alert1" -curl -k -X POST -H "Content-Type: application/json" -d '{"name":"alert1", "expr":"ETH>CAKE"}' https://localhost:8008/crypto/v1/alert +# alert +curl -k -X GET -H "Content-Type: application/json" "https://localhost:10008/crypto/v1/alert?key=alert1" +curl -k -X DELETE -H "Content-Type: application/json" "https://localhost:10008/crypto/v1/alert?key=alert1" +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"alert1", "expr":"ETH>CAKE"}' https://localhost:10008/crypto/v1/alert + +# ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"ETH"}' https://localhost:10008/crypto/v1/ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"BTC"}' https://localhost:10008/crypto/v1/ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"XMR"}' https://localhost:10008/crypto/v1/ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"STX"}' https://localhost:10008/crypto/v1/ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"LINK"}' https://localhost:10008/crypto/v1/ticker +curl -k -X POST -H "Content-Type: application/json" -d '{"name":"PEPE"}' https://localhost:10008/crypto/v1/ticker +curl -k -X GET -H "Content-Type: application/json" https://localhost:10008/crypto/v1/ticker?key=ETH +curl -k -X DELETE -H "Content-Type: application/json" https://localhost:10008/crypto/v1/ticker?key=ETH |