|
kalshi-cpp 0.6.2
C++23 client for Kalshi's Predictions API
|
libcurl transport. More...
#include <kalshi/http_client.hpp>
Public Member Functions | |
| HttpClient (Signer signer, ClientConfig config={}) | |
| HttpClient (ClientConfig config={}) | |
| ~HttpClient () override | |
| HttpClient (HttpClient &&) noexcept | |
| HttpClient & | operator= (HttpClient &&) noexcept |
| HttpClient (const HttpClient &)=delete | |
| HttpClient & | operator= (const HttpClient &)=delete |
| Result< HttpResponse > | request (HttpMethod method, std::string_view path, std::string_view body={}) const override |
path is relative to the base URL and may carry a query string. | |
| const ClientConfig & | config () const noexcept |
| Result< HttpResponse > | del (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | get (std::string_view path) const |
| Result< HttpResponse > | post (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | put (std::string_view path, std::string_view body={}) const |
Public Member Functions inherited from kalshi::HttpTransport | |
| virtual | ~HttpTransport ()=default |
| Result< HttpResponse > | get (std::string_view path) const |
| Result< HttpResponse > | post (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | put (std::string_view path, std::string_view body={}) const |
| Result< HttpResponse > | del (std::string_view path, std::string_view body={}) const |
libcurl transport.
Signs every request when constructed with a Signer; without one it sends unauthenticated requests, which is enough for public market data.
Requests on one client run one at a time because they share a libcurl handle and its connection cache. Use one client per thread for parallelism.
|
explicit |
|
explicit |
|
override |
|
noexcept |
|
delete |
|
noexcept |
|
delete |
|
overridevirtual |
path is relative to the base URL and may carry a query string.
Implements kalshi::HttpTransport.
|
noexcept |
|
inline |
|
inline |
|
inline |
|
inline |