-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
115 additions
and
177 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.10...3.17) | ||
project(demo LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
include_directories(/usr/local/huobi) | ||
|
||
add_subdirectory(account) | ||
add_subdirectory(crossmargin) | ||
add_subdirectory(isolatedmargin) | ||
add_subdirectory(market) | ||
add_subdirectory(reference) | ||
add_subdirectory(trade) | ||
add_subdirectory(wallet) | ||
add_subdirectory(websocketAsset) | ||
add_subdirectory(websocketMarket) | ||
add_subdirectory(websocketOrders) | ||
|
||
find_package(cpprestsdk REQUIRED) | ||
|
||
link_directories(/usr/local/lib/) | ||
link_directories(/usr/local/huobi/) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#include <client/accountClient.h> | ||
|
||
using namespace std; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#include <client/crossMarginClient.h> | ||
|
||
using namespace std; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#include <client/isolatedMarginClient.h> | ||
|
||
using namespace std; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#include <iostream> | ||
#include <client/referenceClient.h> | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#include <client/tradeClient.h> | ||
|
||
using namespace std; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#include <client/walletClient.h> | ||
|
||
using namespace std; | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# | ||
# Ubuntu Dockerfile | ||
# | ||
# https://github.com/dockerfile/ubuntu | ||
# | ||
|
||
# Pull base image. | ||
FROM ubuntu:18.04 | ||
|
||
# Install. | ||
RUN \ | ||
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ | ||
apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get install -y build-essential && \ | ||
apt-get install -y curl git vim wget cmake && \ | ||
apt-get install -y libssl-dev libcurl4-openssl-dev zlib1g-dev libcpprest-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set environment variables. | ||
ENV HOME /root | ||
|
||
# Define working directory. | ||
WORKDIR /root | ||
|
||
RUN \ | ||
git clone https://github.com/huobiapi/huobi_Cpp.git && \ | ||
cd huobi_Cpp && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. -DCMAKE_PREFIX_PATH=/opt/cpprest-2.10.16/lib64/cmake/ && \ | ||
make && \ | ||
make install | ||
|
||
WORKDIR /root | ||
|
||
RUN \ | ||
cd huobi_Cpp/demo/reference && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. -DCMAKE_PREFIX_PATH=/opt/cpprest-2.10.16/lib64/cmake/ -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake && \ | ||
make | ||
|
||
# Define default command. | ||
CMD ["bash"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_ACCOUNTCLIENT_H | ||
#define HUOBI_ACCOUNTCLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_CROSSMARGINCLIENT_H | ||
#define HUOBI_CROSSMARGINCLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_ISOLATEDMARGINCLIENT_H | ||
#define HUOBI_ISOLATEDMARGINCLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_MARKETCLIENT_H | ||
#define HUOBI_MARKETCLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_REFERENCECLIENT_H | ||
#define HUOBI_REFERENCECLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_TRADECLIENT_H | ||
#define HUOBI_TRADECLIENT_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_WALLETCLIENT_H | ||
#define HUOBI_WALLETCLIENT_H | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_GZDECOMPRESS_H | ||
#define HUOBI_GZDECOMPRESS_H | ||
#include <zlib.h> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_INCLUDE_H | ||
#define HUOBI_INCLUDE_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_FUTURESTRANSFERREQUEST_H | ||
#define HUOBI_FUTURESTRANSFERREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_ACCOUNTHISTORYREQUEST_H | ||
#define HUOBI_ACCOUNTHISTORYREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_ACCOUNTLEDGERREQUEST_H | ||
#define HUOBI_ACCOUNTLEDGERREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_MANAGESUBUSERREQUEST_H | ||
#define HUOBI_MANAGESUBUSERREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_SUBUSERTRANSFERREQUEST_H | ||
#define HUOBI_SUBUSERTRANSFERREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_CROSSMARGINLOANORDERSREQUEST_H | ||
#define HUOBI_CROSSMARGINLOANORDERSREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_CROSSMARGINTRANSFERORAPPLYREQUEST_H | ||
#define HUOBI_CROSSMARGINTRANSFERORAPPLYREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#ifndef HUOBI_ISOLATEDMARGINBALANCEREQUEST_H | ||
#define HUOBI_ISOLATEDMARGINBALANCEREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_LOANORDERSREQUEST_H | ||
#define HUOBI_LOANORDERSREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#ifndef HUOBI_ISOLATEDMARGINTRANSFERORAPPLYREQUEST_H | ||
#define HUOBI_ISOLATEDMARGINTRANSFERORAPPLYREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_CANDLESTICKREQUEST_H | ||
#define HUOBI_CANDLESTICKREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_DEPTHREQUEST_H | ||
#define HUOBI_DEPTHREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_HISTORYTRADEREQUEST_H | ||
#define HUOBI_HISTORYTRADEREQUEST_H | ||
struct HistoryTradeRequest { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_TICKERREQUEST_H | ||
#define HUOBI_TICKERREQUEST_H | ||
struct TickerRequest { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_TRADEREQUEST_H | ||
#define HUOBI_TRADEREQUEST_H | ||
struct TradeRequest{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_REFERENCECURRENCIESREQUEST_H | ||
#define HUOBI_REFERENCECURRENCIESREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_BATCHCANCELOPENORDERSREQUEST_H | ||
#define HUOBI_BATCHCANCELOPENORDERSREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_BATCHCANCELORDERSREQUEST_H | ||
#define HUOBI_BATCHCANCELORDERSREQUEST_H | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
|
||
#ifndef HUOBI_MATCHRESULTSHISTORYREQUEST_H | ||
#define HUOBI_MATCHRESULTSHISTORYREQUEST_H | ||
|
||
|
Oops, something went wrong.