Skip to content

Instantly share code, notes, and snippets.

@learntheropes
learntheropes / bittrex_private_and_public_api.gs
Last active March 3, 2021 08:57
Bittrex private and public API for Google Apps Script (Google Sheet)
// work in progress
// you need a bittrex API key and secret with read account option enabled
// I assume that all the keys are in the "keys" spreadsheet. The key is in cell B5 and the secret in cell C5
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("keys");
var key = sheet.getRange("B5").getValue()
var secret = sheet.getRange("C5").getValue();
var baseUrl = 'https://bittrex.com/api/v1.1/';
var nonce = Math.floor(new Date().getTime()/1000);
@learntheropes
learntheropes / poloniex_private_api.gs
Last active June 2, 2019 01:18
Poloniex private API for Google Apps Script (Google Sheet)
// work in progress
// you need a poloniex API key and secret with trading option enabled
// you can test it with:
// = polo("returnBalances","BTC")
// or
// = polo("returnBalances","all")
// or buy and sell:
// polo("BUY","BTC_LTC", 0.0251, 1) or polo("SELL","BTC_LTC", 0.0251, 1)
Verifying that +consfuso is my blockchain ID. https://onename.com/consfuso
@learntheropes
learntheropes / btcAddrRegex.txt
Last active July 12, 2017 22:17
Regular expression matching Bitcoin address
^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$