Created
July 28, 2017 04:34
-
-
Save odeblic/5261ebfed166978152b34e534f45974d to your computer and use it in GitHub Desktop.
Draft of exchange simulator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <mutex> | |
#include <functional> | |
class Price | |
{ | |
std::uint64_t value; | |
std::ratio<1, 100> value; | |
}; | |
class Volume | |
{ | |
std::uint64_t value; | |
std::ratio<1, 100> value; | |
}; | |
std::map<int, > | |
struct OrderBook | |
{ | |
void registerTransaction() noexcept | |
{ | |
// price, buyer, seller, quantity, product | |
} | |
}; | |
struct PreOrderBook | |
{ | |
struct Order | |
{ | |
Price price; | |
Quantity quantity; | |
enum direction; | |
enum type; | |
}; | |
std::map<Price, >; | |
void onPriceUpdate(Price price) | |
{ | |
} | |
}; | |
struct Participant | |
{ | |
std::string name; | |
}; | |
struct Instrument | |
{ | |
}; | |
int main() | |
{ | |
std::cout << "----------------" << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment