Skip to content

Instantly share code, notes, and snippets.

View sirolf2009's full-sized avatar

Floris Thijssen sirolf2009

  • Rotterdam, Netherlands
View GitHub Profile
@sirolf2009
sirolf2009 / Server.java
Last active November 6, 2015 15:03
A rest api based socket server
import static spark.Spark.post;
import static spark.Spark.get;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
@sirolf2009
sirolf2009 / HttpBitfinex.java
Last active August 29, 2015 14:27
A request class for the apache http client library. Use it by adding your api keys and go client.execute(new HttpBitfinex("/margin_infos")). Requires commons codec, commons io, gson and apache httpclient
package com.sirolf2009.bitfinex.calls.auth;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import javax.crypto.Mac;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.Hex;