forked from binance-exchange/binacpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_wapi.cpp
More file actions
41 lines (25 loc) · 814 Bytes
/
Copy pathexample_wapi.cpp
File metadata and controls
41 lines (25 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <map>
#include <vector>
#include <string>
#include "binacpp.h"
#include "binacpp_websocket.h"
#include <json/json.h>
#define API_KEY "api key"
#define SECRET_KEY "secret key"
//----------------------
int main() {
string api_key = API_KEY;
string secret_key = SECRET_KEY;
BinaCPP::init( api_key , secret_key );
Json::Value result;
long recvWindow = 10000;
BinaCPP::withdraw("ETH", "0x7bBd854e1CC7A762FFa19DfF07Da7E68D997bFa2", "", 10.0, "", recvWindow, result);
cout << result << endl;
BinaCPP::get_depositHistory( "ETH", 0, 0,0, recvWindow, result ) ;
cout << result << endl;
BinaCPP::get_withdrawHistory( "ETH", 0, 0,0, recvWindow, result ) ;
cout << result << endl;
BinaCPP::get_depositAddress( "ETH", recvWindow, result ) ;
cout << result << endl;
return 0;
}