Bitcoin Forum
January 20, 2025, 07:14:41 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Using docker container for wallets etc on: December 13, 2014, 10:47:56 PM
Hi!

Anyone else using docker container for wallets etc? I'd like to install, start and stop daemons more easy, so I write Dockerfile's at the moment.

Ciao,
Andreas
2  Local / Projektentwicklung / Suche Java Coder für Trading Software on: September 30, 2013, 02:01:27 PM
Hi!

Ich bastel immer noch an meinem Trading Framework, und such immer noch Leute, die da mitbasteln wollen...

https://bitcointalk.org/index.php?topic=79088.msg3268989#msg3268989

Ciao,
Andreas
3  Local / Treffen / Bitcoin-Stammtisch in Kaiserslautern on: April 24, 2013, 11:08:38 AM
Hallo!

Falls sich hier mehr als 2 Leute auf einen Termin einigen können, sollten wir ein Treffen in Kaiserslautern oder Umgebung machen.

Vermutlich wird es den meisten Richtung Wochenende am besten passen, also schlag ich mal Freitag oder Samstag vor?

Ciao,
Andreas
4  Local / Treffen / Jemand aus Südwest-Deutschland? on: February 24, 2013, 04:55:22 PM
Hallo!

Bin aus der Pfalz. Noch andere btc-User aus dieser Gegend hier?
5  Local / Projektentwicklung / Suche Mitstreiter für kleine Phonegap App on: January 11, 2013, 03:01:18 PM
Hallo!

Möchte ein wenig Phonegap lernen und hab deshalb mal ne kleine App für btc-e gestartet (MtGox könnte man ggf. aber auch unterstützen).

https://i.imgur.com/5fKND.png

Falls jemand Lust hat, ein wenig mitzubasteln, einfach mal ne PN schicken.

Ciao,
Andreas
6  Bitcoin / Project Development / Collab for phonegap app for btc-e on: January 08, 2013, 06:45:27 PM
Hello!

I'm learning phonegap at the moment, and as a small practicing project, I'm working on a UI for btc-e. Since I'm a coder and not a designer, it would be nice to collaboration with someone, who has some UI or (more) Javascript skills.

I already have something running, so some work is already done:

https://i.imgur.com/qmcEI.png

Ciao,
Andreas
7  Economy / Trading Discussion / Formal definition of a trading language on: December 15, 2012, 01:59:11 PM
Hi!

I thought about a way to describe trading strategies in a well-defined language. Still working on the concept, but here is a simple example, what it could look like:

Code:
rule "Compare btc-e sma"
     when
( BTCe.btc<=>usd.ticker.buy * 110% > BTCe.btc<=>usd.sma(6h) ) && ( BTCe.btc.balance() > 1.0 )
     then
BTCe.btc<=>usd.sell( BTCe.btc.balance() - 1.0)
end

The overall structure is taken from drools (that's what I want to translate it to).

Most of these expressions follow the scheme

<tradesite>.<currency pair>.<method>
or
<tradesite>.<currency>.<method>

which is quite easy to parse because the '<=>' indicates a currency pair in my app. laSeek already contributed the first construct, namely the '%' suffix. Times are always handled as microseconds here, which gives you sometimes numbers, that are not very convenient to read. So I wanted to use suffixes, like 's', 'm' and 'h' (maybe even 'd' for days) to make the numbers more readable. So 1s just translates to 1000000 here.

This structure would be simple enough to translate it automatically, which is important to me. My idea so far was to write an Antlr grammar to parse the language, because it has a non.restrictive license and everyone could add his own productions.

Is there any interested in such a definition? People willing to collaborate to create one?

Ciao,
Andreas
8  Alternate cryptocurrencies / Altcoin Discussion / New LTC exchange concept on: July 31, 2012, 02:37:17 PM
Hi!

Will all the DDOS attack discussion lately and now the btc-e problem, we should discuss new ways of trading.

I thought about the minimal data for an exchange, and got these tables yet:

--
-- Table for the xchange users
--
DROP TABLE IF EXISTS users;
CREATE TABLE users (
  id INT NOT NULL AUTO_INCREMENT,          -- The unique id of the user
  nickname VARCHAR(40) NOT NULL,           -- nick (or user-) name
  encrypted_password VARCHAR(40),          -- encrypted password of the user
  email varchar(64) NOT NULL,              -- email address of the user
  language varchar(3),                     -- the prefered language id (us, de, etc)
  timezone TINYINT(2) DEFAULT 0,           -- the timzone the user is in (-12 to 12)
  created TIMESTAMP NOT NULL DEFAULT NOW() -- date of the registration
) TYPE=MyISAM AUTO_INCREMENT=1;
--
-- End table users
--

--
-- Table for the funds of a user (for one currency)
--
DROP TABLE IF EXISTS funds;
CREATE TABLE funds (
  id INT NOT NULL AUTO_INCREMENT,      -- The unique id of this fund
  user_id INT NOT NULL,            -- id of the user
  currency TINYINT NOT NULL,         -- id of the currency (btc, ltc, usd)
  balance BIGINT NOT NULL,         -- balance * 100000000
  deposit_addr VARCHAR(32),         -- If there was already a deposit addy generated, store it here.
  last_updated TIMESTAMP NOT NULL DEFAULT NOW()
) TYPE=MyISAM AUTO_INCREMENT=1;
--
-- End table funds
--

--
-- Table for the xchange orders
--
DROP TABLE IF EXISTS orders;
CREATE TABLE orders (
  id INT NOT NULL AUTO_INCREMENT,      -- The unique id of the order
  user_id INT NOT NULL,            -- id of the user
  type TINYINT NOT NULL,         -- 0 = buy, 1 = sell, 2 = deposit, 3 = withdraw
  price BIGINT NOT NULL,         -- The price as nano coins
  amount BIGINT NOT NULL,         -- The amount * 100000000
  currency TINYINT NOT NULL,
  payment_currency TINYINT NOT NULL,
  parent_id INT,            -- If this is a split order, this id points to the original order.
  status TINYINT NOT NULL,         -- 0 = created, 1 = processed etc.
  created TIMESTAMP NOT NULL DEFAULT NOW(),   
) TYPE=MyISAM AUTO_INCREMENT=1;      
--
-- End table orders
--

It's written in MySQL, but it could be any other format. Important are just the data.

So I thought it should be important to organize the data in a network and not in single server, to make ddos attacks harder (don't want to claim impossible here). So those data should be distribute (and most obviously duplicated) over a network. Each node would become part of the exchange.

But there are problems. One, that I see, is performance. Orders should be spread quickly throughout the net, so everyone has an (almost) equal chance to react. I guess, that would mean socket connections between the nodes. Not sure, if that's even enough to spread the order fast enough.

Another issue are FIAT deposits and withdraws. I don't know yet, how to organize it, since every node would have to keep some share of the funds and would have to be accoutable for a withdrawal. Hard (or impossible?) to implement.

Implementation: I thought it would be good to build the data transfer on HTTP protocol. Maybe just via ajax calls. Would allow any user to access the exchange via a browser. To become a node, someone would have to install some exchange script. This version would mean, that there are nodes and simple users. Maybe it would be better to write a specific client, so every user becomes an exchange node (like the bitcoin client structure).

What are your ideas and/or comments on the issue?

Ciao,
Andreas
9  Bitcoin / Project Development / Comparing APIs from various trading sites on: May 30, 2012, 10:58:43 AM
Hi!

I'm implementing APIs from several trading sites at the moment. It's a good way to find shortcomings of an API and compare different concept of requests or posts.

I thought it might be helpful to post some of the findings, so site owners can improve their APIs if they are interested. OTOH it might be helpful for implementer to share workarounds for some problems.


As a start, I'll mention the MtGox trades method.

https://en.bitcoin.it/wiki/MtGox/API/HTTP/v1#Multi_currency_trades

It has a filter to fetch all trades since <id>. Problem is, that I'd like to fetch all trades from the last 7 days or so. It would be cool to have a date filter, so you get all the trades since <date>. As an alternative, id could be relative to the current id. So when you pass -100 as the id, you'd get the last 100 trades.
Intersango implements  filters:
https://intersango.com/api.php
and they have a paramter last_trade_date, although I don't understand yet, if you request all trades earlier than this date (not so good, I think) or all trades after that date.

Ciao,
Andreas
10  Bitcoin / Project Development / Looking for Java coder and/or trader for tradebot development on: May 03, 2012, 01:58:09 PM
Hi!

I already wrote some code, but I'm looking for some Java and/or trade experience to further this project.

TIA,
Andreas
11  Bitcoin / Development & Technical Discussion / XML standard to store trades, order etc? on: April 20, 2012, 03:52:20 PM
Hi!

I fetch the mtgox data in an app and would like to store them, so I don't have to fetch them completely again. Is there a standard XML format to store trades and orders?

TIA,
Andreas
12  Local / Trading und Spekulation / Bitcoins in der Bild erwähnt on: April 05, 2012, 01:07:59 PM
http://www.bild.de/geld/wirtschaft/wirtschaftsticker/wichtige-meldungen-aus-der-wirtschaft-23509676.bild.html

Warum hab ich da kein gutes Gefühl bei...? *gruebel*
13  Other / Beginners & Help / A newbie wants to understand the bitcoin mining concept on: January 16, 2012, 01:16:09 PM
Hi!

Sorry for my poor Englisch, but it's not my native tongue, since I'm from Germany.

I have read about the bitcoin concept a while ago and already installed a miner on my Radeon 5850. Works ago, but I'd like to get a small miner going on my daily coding machine, which has a GeForce 7. So I got me BrookGPU, got some demo apps going and want to write some code for it.

Since I have not much clue about the whole mining process, I thought that I should start with a very simple demo app, called hashcode and modify it to do something useful. So I ported it to the cc65 compiler and run it on Vice (a c64 emulator) just to have some fun with it and to understand the code etc.

My current problem is the difficulty <=> hash comparison. I wrote a decode function for the difficulty according to the Wiki entry:

Code:
/**
 * Decode the target into a 256 bit int. See the target entry in the bitcoin wiki for details.
 */
void decodeDifficulty( uint8 *targetArray, uint32 target) {
  uint32 offset = ( ( target >> 24) - 3) << 3;
  int bitshift = offset & 7;
  int currentByte = offset >> 3;
  uint32 targetBits = target & (uint32)0x00ffffff;

  if( targetBits & 0x00800000) {  // Is the difficulty negative?
    targetBits |= (uint32)0xff000000;
    bzero( targetArray, sizeof(uint8) * currentByte);  // Empty everything below the bitmask
    memset( &targetArray[ currentByte + 4], 0xff, sizeof( uint8) * ( SHA256_DIGEST_LENGTH - 4 - currentByte));  // Fill bits over the bitmask with 1 for sign extension
  } else {
    bzero( targetArray, sizeof(uint8) * SHA256_DIGEST_LENGTH);  // Empty the target array
  }

  targetArray[ currentByte++] = (uint8)( targetBits & 0xff);
  targetBits >>= 8;
  targetArray[ currentByte++] = (uint8)( targetBits & 0xff);
  targetBits >>= 8;
  targetArray[ currentByte++] = (uint8)( targetBits & 0xff);
  targetBits >>= 8;
  targetArray[ currentByte] = (uint8)( targetBits & 0xff);
}

and a compare function for 32 byte integers:

Code:
/**
 * Compare 2 256 bit integer values.
 *
 * @return a value > 0, if hash1 > hash2 , a value < 0, if hash1 < hash2 and 0 if they are equal.
 */
int compareHash( uint8 *hash1, uint8 *hash2) {
  uint8 msb1, msb2;
  int currentByte;
  int byteDifference;

  // Check, if both numbers have the same sign..
  msb1 = hash1[ SHA256_DIGEST_LENGTH - 1] & 0x80;
  msb2 = hash2[ SHA256_DIGEST_LENGTH - 1] & 0x80;

  if( msb1 != msb2) {  // Both numbers differ in sign
    return msb1 ? -1 : 1;
  }
 
  // We have to compare byte by byte... :-(
  for( currentByte = SHA256_DIGEST_LENGTH - 1; currentByte >= 0; --currentByte) {

    byteDifference = hash1[ currentByte] - hash2[ currentByte];  // Compute the difference of the current bytes-.

    if( byteDifference) {     // If the bytes differ.
      return byteDifference;  // just return the difference.
    }
  }

  return 0;  // both ints are equal.
}

, but what happens if the hash is greater then 0x8000.... => is negative? It's smaller in my current code, so it would be a solution, which is wrong as I understand it. So should I compare abs(hash) < difficulty ?

Thanks in advance,
Andreas
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!