This document outlines how to export CloudWatch Metrics to CSV.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function BINANCE_PRICE(coinsymbol, pair) { | |
| var url = "https://api.binance.com/api/v3/ticker/price?symbol="+coinsymbol.toUpperCase()+pair.toUpperCase() | |
| var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); | |
| var json = response.getContentText(); | |
| var data = JSON.parse(json); | |
| return data.price | |
| } | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function updateAssetPrices(sheetTab) { | |
| var currency = sheetTab.getRange('J1').getValue(); | |
| var response = UrlFetchApp.fetch( | |
| 'https://min-api.cryptocompare.com/data/price?fsym=' + currency + '&tsyms=USD') | |
| var jsonData = response.getContentText(); | |
| var data = JSON.parse(jsonData); | |
| sheetTab.getRange('J2').setValue(data.USD); | |
| sheetTab.getRange('J3').setValue( | |
| Utilities.formatDate(new Date(), "EST", "yyyy-MM-dd'T'HH:mm:ss'Z'")); | |
| } |
This sample script is for using Binance API by Google Apps Script. This script encryptes "signature" like samples. In this script, "Example 1: As a query string" is used, and it retrieves "All orders (SIGNED)" by "GET".
function main() {
var key = '#####'; // Please input your key.
var secret = '#####'; // Please input your secret.
var api = "/api/v3/allOrders"; // Please input API Endpoint you want.
var timestamp = Number(new Date().getTime()).toFixed(0);
var string = "symbol=LTCBTC&timestamp=" + timestamp; // Please input query parameters for the inputterd API.- Login to https://web.telegram.org
- Copy-paste contents of
telegram-scripts.jsinto JS console - Run
showContacts()to get the list of contacts with ids - Run
saveChat(userId)whereuserIdis the id from step 3
Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.