mit-dci / opencx

An open-source cryptocurrency exchange toolkit for implementing experimental exchange features
MIT License
206 stars 66 forks source link

Need a better way to represent a trading pair #23

Open Rjected opened 5 years ago

Rjected commented 5 years ago

Is your feature request related to a problem? Please describe. Currently, we can represent the same trading pair two different ways (BTC/LTC or LTC/BTC). In cxdbsql we just keep one table which has one of the assets first, and the other second. So there will only be regtest_litereg and not litereg_regtest. Instead, there should be one way of representing an asset pair. #15 should be done before this.

Describe the solution you'd like

15 will give a nice ordering of assets, so maybe the lower asset ID can always go first. Trading pairs can have two non-equal Asset ID's, pairs will be unique if they are ordered.

Describe alternatives you've considered The greater asset ID could go first, but it really doesn't matter.

Additional context N/A