diff --git a/include/api/_Api.hpp b/include/api/_Api.hpp index 360e0bf..3ce2b0e 100644 --- a/include/api/_Api.hpp +++ b/include/api/_Api.hpp @@ -61,27 +61,31 @@ namespace kdeck API_CALL_HEADERS(GetEvents) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/events", GetEvents, PATH(String, basePath), QUERY(Object, eventsRequest)) + API_CALL("GET", "{basePath}/events", GetEvents, PATH(String, basePath), BODY_DTO(Object, eventsRequest)) API_CALL_HEADERS(GetEvent) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/events/{event_ticker}", GetEvent, PATH(String, basePath), PATH(String, event_ticker), QUERY(Object, eventRequest)) + API_CALL("GET", "{basePath}/events/{event_ticker}", GetEvent, PATH(String, basePath), PATH(String, event_ticker), BODY_DTO(Object, eventRequest)) API_CALL_HEADERS(GetMarkets) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/markets", GetMarkets, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), QUERY(Object, marketsRequest)) + API_CALL("GET", "{basePath}/markets", GetMarkets, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), BODY_DTO(Object, marketsRequest)) API_CALL_HEADERS(GetTrades) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/markets/trades", GetTrades, PATH(String, basePath), QUERY(Object, tradesRequest)) + API_CALL("GET", "{basePath}/markets/trades", GetTrades, PATH(String, basePath), BODY_DTO(Object, tradesRequest)) API_CALL_HEADERS(GetMarket) { @@ -91,9 +95,10 @@ namespace kdeck API_CALL_HEADERS(GetMarketOrderbook) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/markets/{ticker}/orderbook", GetMarketOrderbook, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), QUERY(String, ticker), QUERY(Object, marketOrderbookRequest)) + API_CALL("GET", "{basePath}/markets/{ticker}/orderbook", GetMarketOrderbook, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), QUERY(String, ticker), BODY_DTO(Object, marketOrderbookRequest)) API_CALL_HEADERS(GetSeries) { @@ -103,9 +108,10 @@ namespace kdeck API_CALL_HEADERS(GetMarketCandlesticks) { + headers.put("Content-Type", "application/json"); headers.put("Accept", "application/json"); } - API_CALL("GET", "{basePath}/series/{series_ticker}/markets/{ticker}/candlesticks", GetMarketCandlesticks, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), PATH(String, series_ticker), PATH(String, ticker), QUERY(Object, marketCandlesticksRequest)) + API_CALL("GET", "{basePath}/series/{series_ticker}/markets/{ticker}/candlesticks", GetMarketCandlesticks, PATH(String, basePath), AUTHORIZATION(String, authString, "Bearer"), PATH(String, series_ticker), PATH(String, ticker), BODY_DTO(Object, marketCandlesticksRequest)) // portfolio //////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////