This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import hashlib | |
import hmac | |
import random | |
import string | |
import time | |
import unirest as unirest | |
key = "da01c7e1f0dc4f166c6aa3d56add3293" | |
secret = "XXXXXXXXXXXXXXXXXXXXXXXXXX" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using RestSharp; | |
using System; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Hitbtc.Api.Demo | |
{ | |
class Program | |
{ |