-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
bitstamp.h
33 lines (22 loc) · 914 Bytes
/
bitstamp.h
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
#ifndef BITSTAMP_H
#define BITSTAMP_H
#include <curl/curl.h>
#include <string>
#include "parameters.h"
namespace Bitstamp {
// get quote
double getQuote(CURL* curl, bool isBid);
// get the current availability for usd and btc
double getAvail(CURL *curl, Parameters params, std::string currency);
// send order to the exchange and return order ID
int sendOrder(CURL *curl, Parameters params, std::string direction, double quantity, double price);
// check the status of the order
bool isOrderComplete(CURL *curl, Parameters params, int orderId);
// get the Bitcoin exposition
double getActivePos(CURL *curl, Parameters params);
// get the limit price according to the requested volume
double getLimitPrice(CURL *curl, double volume, bool isBid);
// send a request to the exchange and return a JSON object
json_t* authRequest(CURL *curl, Parameters params, std::string url, std::string options);
}
#endif