std::set<T> keeps unique values in sorted order; std::unordered_set<T> keeps unique values in a hash table. insert returns a pair whose .second is true when the value was new, which answers "have I seen this before?" in one call.
An unordered_ container finds an element by hashing the key to a bucket, then comparing the keys in that bucket with ==. For your own key type you supply both: an operator==, and a hash object with std::size_t operator()(const Key&) const. The one rule: keys that are equal must have equal hashes. Hash exactly the fields that == compares, and combine their hashes with something like h * 31 + next.
A sorted container can also sort the other way: std::map<long long, long long, std::greater<long long>> keeps the highest key first, which suits the bid side of a book.
A key type with == and a hash over the same fields.