nash-io / openlimits

A Rust high performance cryptocurrency trading API with support for multiple exchanges and language wrappers.
http://openlimits.io
BSD 2-Clause "Simplified" License
275 stars 44 forks source link

Add buyer_order_id and seller_order_id in Trade #140

Closed Vorticity-Flux closed 3 years ago

Vorticity-Flux commented 3 years ago

Trade by definition has two sides - buyer and seller, so it has to contain both buyer order id and seller order id. Most of the exchanges (including binance and nash) report this information.

There's also 'own trade' when considered in the view of interfaces like 'own trade history', in this case only one order id relevant to user is usually reported.

As openlimits now mixes up 'all trades' and 'own trades' in one data type I had to make buyer_order_id and seller_order_id optional and fill them if the information is available.

jankjr commented 3 years ago

Could you remove the order_id in python.rs and expose buyer/seller ids? @Vorticity-Flux

I think this looks good otherwise.

Ejhfast commented 3 years ago

Thanks! Merged after testing here: https://github.com/nash-io/openlimits/pull/144