This file contains 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
var talib = require("talib"); | |
var fs = require("fs"); | |
var _ = require("lodash"); | |
var Q = require("q"); | |
// Display all available indicator function names | |
//var functions = talib.functions; | |
//for (i in functions) { | |
// console.log(functions[i].name); | |
//} |
This file contains 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
<?php | |
$guid = BLOCKCHAIN_ID; | |
$main_password = BLOCKCHAIN_PASS; | |
$json = getCurl("https://blockchain.info/pt/merchant/$guid/new_address?password=$main_password"); | |
echo $json; |
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Conversão de preço USD para BTC</title> | |
</head> | |
<body> | |
<?php | |
$productValue = number_format(25, 2); | |
$satoshi = 100000000; |
This file contains 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
Bot.prototype.userInfo = function() { | |
var that = this | |
, deferred = Q.defer() | |
, channel = this.coin === 'usd' ? 'ok_spotusd_userinfo' : 'ok_spotcny_userinfo'; | |
that.send(channel); | |
that.ws.on('message', function(data) { | |
var messages = JSON.parse(data.data) | |
, channel = messages[0].channel; |
This file contains 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
var Bitcore = require('bitcore'); | |
var Address = Bitcore.Address; | |
var HDPrivateKey = Bitcore.HDPrivateKey; | |
var hdPrivateKey = new HDPrivateKey.fromSeed("bf8e06fd8c0dafbc831933422895ad68c0874439e177f136f8f756b360de94f8"); | |
var hdPublicKey = hdPrivateKey.hdPublicKey; | |
var address = new Address(hdPublicKey.derive( Math.floor(Date.now() / 1000) ).publicKey); | |
var derivedAddress = new Address(hdPublicKey.derive( Math.floor(Date.now() / 1000) ).publicKey); |
This file contains 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
#!/usr/bin/env python | |
import hashlib | |
import hmac | |
import time | |
import json | |
import urllib2 | |
import datetime | |
# Q. What are api endpoints for test and production? | |
# testnet -> https://api.testnet.blinktrade.com/tapi/v1/message |
This file contains 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
var ws = new WebSocket('wss://url'); | |
ws.on('open', function() { | |
console.log('open connect'); | |
ws.send("channel or msg"); | |
}); | |
ws.on('message', function(message) { | |
console.log(message); |
This file contains 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
if (channel === 'ok_btccny_ticker' || channel === 'ok_btcusd_ticker') { | |
self.ticker = data; | |
} | |
if (channel === 'ok_btccny_depth' || channel === 'ok_btcusd_depth') { | |
self.orders = data; | |
self.userInfo(); | |
} |
This file contains 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
import json; | |
import urllib2; | |
print("Price of 1 Bitcoin: $" + json.load(urllib2.urlopen("http://api.coindesk.com/v1/bpi/currentprice.json"))["bpi"]["USD"]["rate"]) |
This file contains 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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script> | |
<script type="text/javascript" src="bower_components/reconnecting-websocket/reconnecting-websocket.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var wsUri = 'ws://ws.blockchain.info/inv'; |
OlderNewer