Bitcoin Forum
November 13, 2024, 06:44:04 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: silinebilir  (Read 107 times)
teramit (OP)
Legendary
*
Offline Offline

Activity: 1877
Merit: 1396

The Last Cryptocoin Burner


View Profile
April 09, 2019, 02:54:27 PM
Last edit: April 10, 2019, 03:06:22 PM by teramit
 #1

-
mrtersiyer
Newbie
*
Offline Offline

Activity: 17
Merit: 36


View Profile
April 10, 2019, 07:51:49 PM
 #2

-

Bende Kodu yazmıştım Cheesy

const crypto = require('crypto');
const https = require('https');

const accessKey = 'accessKeyBuraya';
const secretKey = 'secretKeyBuraya';
var timestamp = Math.floor(Date.now() / 1000);
var message= accessKey+timestamp;

const httpMethod = 'GET';
const host = 'www.btcturk.com';
const standardizedQuerystring='/api/balance'

function hmacBase64(key, msg) {
    var hmac = crypto.createHmac('sha256', Buffer.from(key, 'base64'));
    hmac.update(msg, 'utf8');
    return hmac.digest('base64');
}

var authHeaders = {
   'X-PCK': accessKey,
   'X-Stamp': timestamp,
   'X-Signature': hmacBase64(secretKey,message)
   }

var options = {
    host: host,
   path: standardizedQuerystring,
    port: 443,
    method: httpMethod,
    headers: authHeaders
}

var request = https.request(options, function (response) {
   console.log(response.statusCode);

    response.on('data', function (chunk) {
        console.log(chunk.toString());
    });
});

request.end();
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!