Pages:
Author

Topic: Do like to team up - page 4. (Read 14267 times)

legendary
Activity: 1260
Merit: 1003
May 10, 2015, 04:23:52 AM
Running Java code on the GPU.

http://m.youtube.com/watch?v=4ShyMMqjIJI

"Lol"... that's why I love Java.

"Learning a new Word every Day".

sr. member
Activity: 410
Merit: 257
May 09, 2015, 09:52:27 PM
Running Java code on the GPU.

http://m.youtube.com/watch?v=4ShyMMqjIJI
legendary
Activity: 1260
Merit: 1003
May 09, 2015, 07:48:24 PM
Ok. Let me know, when you have time. One topic, that I'm especially interested in, is faster calculation. I had ideas for using OpenCL, but so far it seems, there's no good solution to use BigDecimal with it? So I set my hopes on project sumatra.

WTF is sumatra?!?
sr. member
Activity: 410
Merit: 257
May 09, 2015, 05:24:31 PM
Ok. Let me know, when you have time. One topic, that I'm especially interested in, is faster calculation. I had ideas for using OpenCL, but so far it seems, there's no good solution to use BigDecimal with it? So I set my hopes on project sumatra.
legendary
Activity: 1260
Merit: 1003
May 09, 2015, 11:30:28 AM
Ok, it seems I'm somewhat further here. Maybe we can share some code for arb, or so.



I will do for sure before Monday. Apologies... but I'm very busy with another project this weekend.
sr. member
Activity: 410
Merit: 257
May 09, 2015, 11:24:55 AM
Ok, it seems I'm somewhat further here. Maybe we can share some code for arb, or so.

legendary
Activity: 1260
Merit: 1003
May 09, 2015, 11:21:42 AM
You cannot send orders yet with your lib? That's the most important feature for a bot. Send the order and then track it if it was filled, rejected etc.

Coin Analytics is a platform that shows an "all around" view of the cryptocurrency market: it is not designed to make trades.

At the moment I've developed the Arbitrage engine and it is only for informative purpose it does not make trades when it finds an arbitrage opportunity in the market.
legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
May 09, 2015, 07:11:48 AM
list of members update plz read first post!
sr. member
Activity: 410
Merit: 257
May 08, 2015, 04:21:56 PM
Yeah, I had similar structures. But I had to change the fee structure as an example, because some exchanges have fees that depend on order amount or traded volume. So I use a method now, that returns the fee for a given order. I think every exchange should have an API method for that, but that is rarely the case.

You cannot send orders yet with your lib? That's the most important feature for a bot. Send the order and then track it if it was filled, rejected etc.

Another problem might be the names of the markets. For some reasons, some exchanges use different names for the same currency. That's why I coded a class just for these codes, that dynamically adds and maintains them.

I use depth as the orderbook, but that's just a different term for the same thing.

Very cool! Keep up the good work!

I'd like to code a new JavaFX app now, because I have the idea, that the same app should run on the desktop, server and android. With Swing, I managed to reach the first 2 target, but Android needed a special treatment. Hope to fix that now with JavaFX. But I still have to learn a lot of it.
legendary
Activity: 1260
Merit: 1003
May 08, 2015, 10:28:18 AM
@BitNow: wow, that looks like some nice sources! If I had knew, that such a lib exists, I might have never started my own exchange API implementations. Congrats!

My lib still lacks the database part, so maybe we could collaborate at some point.

Things are really easy. Those are the entities:
1) Exchange
2) Market
3) FeeAPI_Type
4) API
5) Fee

Exchange holds the exchanges info:

Market holds Market info:
  • code: market code (ex: BTC, BTC_USD, BTC_EUR, BTC_GBP, etc...
  • description: market description (ex: for BTC_GBP -> "BTC_GBP market")

FeeAPI_Type holds Fee and API type's information:
  • market: market code (ex: BTC_EUR)
  • type: type of API/fee (ex: ORDERBOOK/DEPOSIT/WITHDRAW/TICKER...)

API holds API info:

Fee holds Fee info (similar to API):
  • exchange: exchange code (ex: BITFINEX)
  • type_market: market code (ex: FIAT_IWT)
  • type_type: market type (ex: DEPOSIT)
  • unit: fee unit (ex: $, €, £, BTC...)
  • value: fee value (ex: 0.1)
  • note: other notes about that fee entity

In bold primary keys.

Than in the code I have a RESTInterface which every Exchange inherits so that you can easily load the appropriate interface for the correct API: adapt the interface to the API response for that particular exchange (ex: JSON, SOAP, XML...).
RESTInterface:
Quote
package com.gconsulting.webapp.rest.interfaces;

import java.util.List;

import org.json.JSONException;
import org.json.JSONObject;

import com.gconsulting.model.Market;
import com.gconsulting.webapp.model.Orderbook;

public interface RESTInterface {

   public List getPairs(JSONObject source);
   public Orderbook getOrderbook(JSONObject source, String market) throws JSONException;
}

Ex Bitfinex exchange:
Quote
package com.gconsulting.webapp.rest.interfaces;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.gconsulting.model.Market;
import com.gconsulting.webapp.model.Order;
import com.gconsulting.webapp.model.Orderbook;

public class BITFINEXInterface implements RESTInterface {

   @Override
   public List getPairs(JSONObject source) {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public Orderbook getOrderbook(JSONObject source, String market)
         throws JSONException {

      Orderbook result = new Orderbook();
      JSONArray asks = source.getJSONArray("asks");
      JSONArray bids = source.getJSONArray("bids");
      List sellOrders = new ArrayList<>();
      List buyOrders = new ArrayList<>();
      double cumValue = 0.0;
      double price = 0.0;
      double amount = 0.0;
      for (int i = 0; i < asks.length(); i++) {
         JSONObject jsonobject = asks.getJSONObject(i);
         price = jsonobject.getDouble("price");
         amount = jsonobject.getDouble("amount");
         cumValue += price * amount;
         sellOrders.add(new Order(price, amount, cumValue));
      }
      result.setSellOrders(sellOrders);
      cumValue = 0.0;
      price = 0.0;
      amount = 0.0;
      for (int i = 0; i < bids.length(); i++) {
         JSONObject jsonobject = bids.getJSONObject(i);
         price = jsonobject.getDouble("price");
         amount = jsonobject.getDouble("amount");
         cumValue += price * amount;
         buyOrders.add(new Order(price, amount, cumValue));
      }
      result.setBuyOrders(buyOrders);
      return result;
   }
}

With that structure you can easily manage 90% of Exchanges API/Fee structures.
sr. member
Activity: 410
Merit: 257
May 08, 2015, 08:31:32 AM
@BitNow: wow, that looks like some nice sources! If I had knew, that such a lib exists, I might have never started my own exchange API implementations. Congrats!

My lib still lacks the database part, so maybe we could collaborate at some point.
legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
May 08, 2015, 06:20:57 AM

Is it still possible to join the team? My skills are non-technical:
Innovation, Sustainability, project management, International/European/Dutch Law, Marketing, Entrepreneurship, Business development. Please feel free to PM me if joining is still possible!
@Nina_Solomons you are welcome joining the team.

No one replied to my suggestion!!!
newbie
Activity: 4
Merit: 0
May 08, 2015, 01:52:31 AM

Is it still possible to join the team? My skills are non-technical:
Innovation, Sustainability, project management, International/European/Dutch Law, Marketing, Entrepreneurship, Business development. Please feel free to PM me if joining is still possible!
legendary
Activity: 1260
Merit: 1003
May 07, 2015, 09:40:06 PM
rpc interfacing to various wallets would be cool and very helpful, methinks.

If you need some Java code to interface with exchanges API and Blockchain.info wallet have a look at my code for Coin Analytics.
Link: https://bitbucket.org/zackkoBB/coin-ana-ytics

We have 30+ exchanges and 20 more to come.
sr. member
Activity: 410
Merit: 257
May 07, 2015, 07:42:15 PM
OK. I'm daybyter on skype.
hero member
Activity: 671
Merit: 501
Blockchain and stuff
May 07, 2015, 06:35:22 PM


At quick glance, I can understand your code. I am interested, but I will be going out of town for the weekend, and will be back around Tuesday.  Skype sounds good, once I am back, if that works for you.   
sr. member
Activity: 410
Merit: 257
May 07, 2015, 05:35:24 PM
But you are interested? Some of my code is in github:

https://github.com/ReAzem/cryptocoin-tradelib

Just to get an idea of my coding style.

The code is somewhat dated, and I do a major rewrite of my botcode now learning JavaFX in the process.

We could discuss this via skype, if you are interested?
hero member
Activity: 671
Merit: 501
Blockchain and stuff
May 07, 2015, 12:13:51 PM
rpc interfacing to various wallets would be cool and very helpful, methinks.

That is for sure something I can do. Smiley

Could you help with some java code? Idea is, that a bot could use the wallet to send money or check if some withdrawn money was actually received. So we could transfer money between exchanges etc.
I dont know java off the top of my head, but from what I understand its a lot like .net.  I should be able to, but I don't want to promise.
sr. member
Activity: 410
Merit: 257
May 07, 2015, 09:19:20 AM
rpc interfacing to various wallets would be cool and very helpful, methinks.

That is for sure something I can do. Smiley

Could you help with some java code? Idea is, that a bot could use the wallet to send money or check if some withdrawn money was actually received. So we could transfer money between exchanges etc.
legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
May 07, 2015, 04:27:50 AM
list of members update read first post!
Pages:
Jump to: