Attempt to create a C++ library for Gemini Exchange's API: Gemini's Documentation.
This project use git submodules, git clone https://github.com/tcashel/libgemini.git
and then run git submodule update --init --recursive
.
I know I know, it is unclean to commit these but it helps me stay consistent across my dev envs. Once libgemini
actually works I will clean these up.
If this is your first check out you need to make sure liblifthttp
and simdjson
git submodules are correctly checked out first, then make a build
make
See the makefile
for more of make commands.
This project uses the following:
liblifthttp
to to handel HTTP requests.- As a git submodule
simdjson
for json support.- As a git submodule
- CMake will compile this project base on a git tag int the
CMakeLists.txt
, so the submodule is not necessary to build, but it is convenient to look through the project when using.
- Set up some basic Unit testing and unit test along the way
Be lazy if you can, just wrappers arround liblifthttp
.
Make an Easy way to switch between sandbox api url and production
- Build out basic public api (no auth) functionality
Goal is for a per session outgoing rate limiter
- interface for creating / managing requests to API
- inputting orders, one-off price queries etc..
- should be somewhat lightweight
- one instance per session, could be easier if this is just a wrapper for a request or task that gets passed to the engine.
- what if there are 2 rates to enforce? PublicAPI vs PrivateAPI?
- Engine that implements ratelimit and loops over Request class instances, each which could have their own rate limit.
- easier to just have one engine per session so it's only dealing with 1 rate.
- the rate limiter should always reserve a spot for 1 high priority order, ie: cancel all orders, sell etc.. This is most easily accomplished by reducing allowed rate set in Request class and allowing 1 type of order to ignore the rate limit.
- uses Gemini's webhook API.
- Need to read more
- websocket libraries
cpprestsdk
- Web Socket support
- Project is in 'maintenance mode' so not the best thing to use, should search for another option.
$ sudo dnf install cpprest-devel
µWebSockets
- This looks nice!, 63 contributors, ok not great recent activity
- Apache 2.0 license
- header only c++17, some use of c++20 in examples
- does not use cmake, uses make, nbd just add
include_directories(vendor/uWebSockets/src)
to cmake and we should be good since it is header only.
File bugs and feature requests using GitHub Issues
Copyright © 2021, Tripp Cashel, all rights reserved.