-
Notifications
You must be signed in to change notification settings - Fork 12
/
exchanges.h
80 lines (74 loc) · 2.82 KB
/
exchanges.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "web.h"
namespace gecko {
// Purpose: class interface to all CoinGecko 'exchanges' functions found below
// Refer: https://www.coingecko.com/api/documentations/v3#/exchanges_(beta)
// Status: beta, likely unstable - slightly tested
class exchangesFunctions : private web {
public:
// Action: fetches all market exchanges
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// getExchanges()
// getExchanges(100)
// getExchanges(100, 2)
// Notes: none
DllExport gecko::web::response getExchanges(
OPTIONAL unsigned short per_page = 100,
OPTIONAL unsigned short page = 1
);
// Action: fetches all supported market exchanges id and name
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// listExchangeInfo()
// Notes: none
DllExport gecko::web::response listExchangeInfo();
// Action: fetches market exchange volume in BTC and top 100 tickers only
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// getExchangeVolume("binance")
// Notes: none
DllExport gecko::web::response getExchangeVolume(
REQUIRED std::string id
);
// Action: fetches market exchange tickers
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// getExchangeTickers("binance", NULL, true)
// getExchangeTickers("binance", "bitcoin")
// Notes: none
DllExport gecko::web::response getExchangeTickers(
REQUIRED std::string id,
OPTIONAL const char* coin_ids = NULL,
OPTIONAL bool include_exchange_logo = false,
OPTIONAL unsigned short page = 1,
OPTIONAL std::string depth = "cost_to_move_up_usd",
OPTIONAL std::string order = "trust_score_desc"
);
// Action: fetches status updates for a given market exchange (beta)
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// getExchangeStatusUpdates("binance")
// getExchangeStatusUpdates("binance", 20)
// Notes: function is in BETA
DllExport gecko::web::response getExchangeStatusUpdates(
REQUIRED std::string id,
OPTIONAL unsigned short per_page = 100,
OPTIONAL unsigned short page = 1
);
// Action: fetches volume_chart data for a given market exchange (beta)
// Returns: gecko::web::response
// Refer: https://www.coingecko.com/api/documentations/v3
// Example(s):
// getExchangeVolumeChart("binance", "1")
// Notes: function is in BETA
DllExport gecko::web::response getExchangeVolumeChart(
REQUIRED std::string id,
REQUIRED std::string days
);
};
}