Skip to content

Instantly share code, notes, and snippets.

hitbtc-com

Block or report user

Report or block hitbtc-com

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hitbtc-com
hitbtc-com / socket_orderbook.js
Created Oct 2, 2018
Socket API example with orderbook
View socket_orderbook.js
if (typeof WebSocket !== 'function') {
// for node.js install ws package
WebSocket = require('ws');
}
const logger = {
debug: (...arg) => {
// console.log((new Date).toISOString(), 'DEBUG', ...arg)
},
info: (...arg) => {
View rest_example.py
import datetime
import hashlib
import hmac
import random
import string
import time
import unirest as unirest
key = "da01c7e1f0dc4f166c6aa3d56add3293"
secret = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
View rest_trading.java
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
@hitbtc-com
hitbtc-com / hitbtc_example.java
Created Jul 25, 2014
hitbtc rest trading API example
View hitbtc_example.java
package com.company;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
View hitbtc_streaming.cs
using System;
using WebSocketSharp;
// Install WebSocketSharp https://github.com/sta/websocket-sharp (e.g. via NuGet)
namespace Hitbtc
{
public class Program
{
public static void Main(string[] args)
{
@hitbtc-com
hitbtc-com / hitbtc_example.php
Last active Nov 27, 2018
hitbtc php example
View hitbtc_example.php
<?php
namespace Hitbtc;
/**
* show off @method
*
* @method string balance() balance( array $params )
* @method string ordersActive() ordersActive( array $params )
* @method string new_order() new_order( array $params )
* @method string cancel_order() cancel_order( array $params )
* @method string trades() trades( array $params )
View gist:9808530
using RestSharp;
using System;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace Hitbtc.Api.Demo
{
class Program
{
You can’t perform that action at this time.