Bitcoin Forum
January 17, 2020, 02:27:26 PM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Archival / post to proof i own an address - no need to read or reply on: February 20, 2015, 03:25:03 PM
"Bitcointalk Account onemorebtc owns address 1H8xV9SjHsKp2VByRhem2AhQrRAaCYK8uT. 2015/02/15"
signed with: 1H8xV9SjHsKp2VByRhem2AhQrRAaCYK8uT

HNF4umMf5lDOdVu0hKAjASwtfBXF4eeSJ+NfqrROGPbofeYwPj2vvbQ3bKE2vFh5ASjgJivWWZdo4x4p6iU7iFU=

same for the correct date...argh

Bitcointalk Account onemorebtc owns address 1H8xV9SjHsKp2VByRhem2AhQrRAaCYK8uT. 2015/02/20
HABZJrA6gyr3sps/IKADJv4y06DKaOb8QTpZzQvrJjuLbZW7QnmKXNN+AhGXqA8wIwxFfrD4PnD0ak0Zb58uByw=
2  Bitcoin / Bitcoin Technical Support / syncing new node (two log curiosities) on: February 18, 2015, 12:21:48 PM
at first i saw that during sync there were thousands of orphan blocks. why? who broadcasts them still?

second i saw this log lines:
2015-02-18 12:17:12 ERROR: AcceptToMemoryPool : nonstandard transaction: dust
2015-02-18 12:17:13 ERROR: AcceptToMemoryPool: : nonstandard transaction input

(there is a colon to much)

regards
3  Economy / Scam Accusations / BLOCKNET IPO SCAM on: October 27, 2014, 11:20:03 AM
Hello,

BlockNet will start their IPO on Wednesday.

They have MANY claims what will work - but fail to answer any technical questions.

They are asking for 1Million $ (max) for essentially nothing.

They promised Coin A can use Coin B features which just a little fee
 -> NOT true through exchange risk and slippage

They promised Services for all coins, but fail to show ANY concept how to develop and use them.

PLEASE BE SAFE AND STAY AWAY FROM THEM

if you make an IPO you dont need sourcecode - BUT you NEED to have some kind of whitepaper describing what you actually want to do. Not just an idea which shows unusable if someone asks a few questions
4  Local / Biete / Verkaufe XBOX360-SLim mit Spielen (Treuhänder ist Ok) on: July 15, 2014, 01:28:06 AM
Hallo,

ich möchte meine XBOX360-Slim verkaufen.

Originalverpackung habe ich.
Es ist die Variante mit eingebauter 250GB Festplatte und einem freiem 1Monatsabonnent für XBOX Live (ungenutzt).
En Kabelloser Controller liegt bei, sowie alle Kabel zum Anschluß.
Zustand ist neuwertig (auch die Spiele). Ich habe Sie ca. 10 Stunden genutzt.

Folgende Spiele habe ich und werden mit verkauft:
 - Resident Evil
 - Bayonetta
 - Dirt 3
 - Forza Motorsports 4 - Essentials Edition

So sieht sie aus: http://www.amazon.de/Xbox-360-Konsole-Slim-schwarz-matt/dp/B005FPD0O8/ref=sr_1_1?ie=UTF8&qid=1405387019&sr=8-1&keywords=xbox+360+slim+250gb

Lieferkosten übernehme ich; Treuhänder (falls gewünscht) zahlt ihr (Ich habe gute Erfahrungen mit gweedo und escrow.ms).
Falls gewünscht könnt ihr Sie auch persönlich bei mir abholen (Raum Freiburg/Breisgau)

Regeln:
Mindestgebot ist 0.40 BTC.
Ich werde bei jedem Gebot alle Nachkommastellen aber der dritten Stelle ignorieren. Dh ein Gebot von 0.418TC ist identisch mit 0.41BTC)
Ihr könnt gerne Fragen stellen und ich werde versuchen Sie so gut wie möglich zu beantworten.
Alle, die kein Interesse an einem Kauf haben bitte ich jedoch diesen Thread zu ignorieren (Es bringt euch und mir nichts)
Wenn ein Gebot mir zu gut gefällt, kann ich die Auktion auch vorher beenden (quasi ein Sofort-Kaufen; wenn mir jmd. 1BTC bietet sag ich nicht nein Wink )

Die Auktion läuft bis zum 18. Juli 2014 18:00 Uhr Deutsche Zeit.

Viel Spaß!
5  Bitcoin / Project Development / poliniex watcher: small commandline price watcher on: June 20, 2014, 09:46:23 PM
hi,

this is nothing fancy... its just a very small php script (which doesnt need a webserver) which uses the api-php from poliniex.

it looks at your balances and prints this:

Code:
                                      BTC Value                Last                 Ask                 Bid %Change    Volume
   BTC:          0.12004677
   XMR:          8.43757394          0.05536635          0.00656188          0.00669000          0.00656187     24%       700
        buy 20 @ 0.0064 total: 0.128 BTC

   BBR:        100.00000000          0.19579900          0.00195799          0.00203201          0.00195883      3%        67


Total BTC: 0.49921212


i use it together with watch to see whats going on.
Code:
watch "php -e c.php"

...and here it is
Code:
<?

$key = "PLACE YOUR API KEY HERE";
$secret = "PLACE YOUR API SECRET HERE";

class poloniex {
protected $api_key;
protected $api_secret;
protected $trading_url = "https://poloniex.com/tradingApi";
protected $public_url = "https://poloniex.com/public";

public function __construct($api_key, $api_secret) {
$this->api_key = $api_key;
$this->api_secret = $api_secret;
}

private function query(array $req = array()) {
// API settings
$key = $this->api_key;
$secret = $this->api_secret;

// generate a nonce to avoid problems with 32bit systems
$mt = explode(' ', microtime());
$req['nonce'] = $mt[1].substr($mt[0], 2, 6);

// generate the POST data string
$post_data = http_build_query($req, '', '&');
$sign = hash_hmac('sha512', $post_data, $secret);

// generate the extra headers
$headers = array(
'Key: '.$key,
'Sign: '.$sign,
);

// curl handle (initialize if required)
static $ch = null;
if (is_null($ch)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT,
'Mozilla/4.0 (compatible; Poloniex PHP bot; '.php_uname('a').'; PHP/'.phpversion().')'
);
}
curl_setopt($ch, CURLOPT_URL, $this->trading_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

// run the query
$res = curl_exec($ch);

if ($res === false) throw new Exception('Curl error: '.curl_error($ch));
//echo $res;
$dec = json_decode($res, true);
if (!$dec){
//throw new Exception('Invalid data: '.$res);
return false;
}else{
return $dec;
}
}

protected function retrieveJSON($URL) {
$opts = array('http' =>
array(
'method'  => 'GET',
'timeout' => 10
)
);
$context = stream_context_create($opts);
$feed = file_get_contents($URL, false, $context);
$json = json_decode($feed, true);
return $json;
}

public function get_balances() {
return $this->query(
array(
'command' => 'returnBalances'
)
);
}

public function get_open_orders($pair) {
return $this->query(
array(
'command' => 'returnOpenOrders',
'currencyPair' => strtoupper($pair)
)
);
}

public function get_my_trade_history($pair) {
return $this->query(
array(
'command' => 'returnTradeHistory',
'currencyPair' => strtoupper($pair)
)
);
}

public function buy($pair, $rate, $amount) {
return $this->query(
array(
'command' => 'buy',
'currencyPair' => strtoupper($pair),
'rate' => $rate,
'amount' => $amount
)
);
}

public function sell($pair, $rate, $amount) {
return $this->query(
array(
'command' => 'sell',
'currencyPair' => strtoupper($pair),
'rate' => $rate,
'amount' => $amount
)
);
}

public function cancel_order($pair, $order_number) {
return $this->query(
array(
'command' => 'cancelOrder',
'currencyPair' => strtoupper($pair),
'orderNumber' => $order_number
)
);
}

public function withdraw($currency, $amount, $address) {
return $this->query(
array(
'command' => 'withdraw',
'currency' => strtoupper($currency),
'amount' => $amount,
'address' => $address
)
);
}

public function get_trade_history($pair) {
$trades = $this->retrieveJSON($this->public_url.'?command=returnTradeHistory&currencyPair='.strtoupper($pair));
return $trades;
}

public function get_order_book($pair) {
$orders = $this->retrieveJSON($this->public_url.'?command=returnOrderBook&currencyPair='.strtoupper($pair));
return $orders;
}

public function get_volume() {
$volume = $this->retrieveJSON($this->public_url.'?command=return24hVolume');
return $volume;
}

public function get_ticker($pair = "ALL") {
$pair = strtoupper($pair);
$prices = $this->retrieveJSON($this->public_url.'?command=returnTicker');
if($pair == "ALL"){
return $prices;
}else{
$pair = strtoupper($pair);
if(isset($prices[$pair])){
return $prices[$pair];
}else{
return array();
}
}
}

public function get_trading_pairs() {
$tickers = $this->retrieveJSON($this->public_url.'?command=returnTicker');
return array_keys($tickers);
}

public function get_total_btc_balance() {
$balances = $this->get_balances();
$prices = $this->get_ticker();

$tot_btc = 0;

foreach($balances as $coin => $amount){
$pair = "BTC_".strtoupper($coin);

// convert coin balances to btc value
if($amount > 0){
if($coin != "BTC"){
$tot_btc += $amount * $prices[$pair];
}else{
$tot_btc += $amount;
}
}

// process open orders as well
if($coin != "BTC"){
$open_orders = $this->get_open_orders($pair);
foreach($open_orders as $order){
if($order['type'] == 'buy'){
$tot_btc += $order['total'];
}elseif($order['type'] == 'sell'){
$tot_btc += $order['amount'] * $prices[$pair];
}
}
}
}

return $tot_btc;
}
}

$polo = new poloniex($key, $secret);
$balances = $polo->get_balances();
$ticker = $polo->get_ticker();

echo str_pad("", 27)
. str_pad('BTC Value', 20, " ", STR_PAD_LEFT)
. str_pad('Last', 20, " ", STR_PAD_LEFT)
. str_pad('Ask', 20, " ", STR_PAD_LEFT)
. str_pad('Bid', 20, " ", STR_PAD_LEFT)
. str_pad('%Change', 8, " ", STR_PAD_LEFT)
. str_pad('Volume', 10, " ", STR_PAD_LEFT)
. "\r\n";

$totalbtc = 0;

foreach ($balances as $currency=>$balance) {
if($balance > 0.0001) {

echo str_pad($currency, 6, " ", STR_PAD_LEFT)
. ':'
. str_pad(number_format($balance, 8, '.' , ',' ), 20, " ", STR_PAD_LEFT);

if($currency != 'BTC') {
$tick = $ticker['BTC_' . $currency];
if($tick['isFrozen'] > 0) {
echo ' FROZEN';
} else {
$totalbtc += $balance * $tick['last'];
echo str_pad(number_format($balance * $tick['last'], 8, '.' , ',' ), 20, " ", STR_PAD_LEFT)
. str_pad(number_format($tick['last'], 8, '.' , ',' ), 20, " ", STR_PAD_LEFT)
. str_pad(number_format($tick['lowestAsk'], 8, '.' , ',' ), 20, " ", STR_PAD_LEFT)
. str_pad(number_format($tick['highestBid'], 8, '.' , ',' ), 20, " ", STR_PAD_LEFT)
. str_pad(number_format($tick['percentChange']*100, 0, '.' , ',' ), 7, " ", STR_PAD_LEFT)
. '%'
. str_pad(number_format($tick['baseVolume'], 0, '.' , ',' ), 10, " ", STR_PAD_LEFT);
echo "\r\n";
$orders = $polo->get_open_orders('BTC_' . $currency);

if($orders) {
foreach ($orders as $order) {
$totalbtc += $order['total'];
echo "\t" . $order['type'] . ' ' . $order['amount'] . ' @ ' . $order['rate'] . ' total: ' . $order['total'] . " BTC\r\n";
}
}
}
} else {
$totalbtc += $balance;
}
echo "\r\n";
}
}

echo "\r\nTotal BTC: " . number_format($totalbtc, 8, '.' , ',' )

?>


NOTE: you must specify a valid api key in the beginning. this is only used to get your current balances. you can check the code: its very short Wink
Pages: [1]
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!