Skip to content

Commit

Permalink
parse order seq number for get open orders as a signed int (#24)
Browse files Browse the repository at this point in the history
* parse order seq number for get open orders as a signed int

* rm println
  • Loading branch information
RahulJain28 authored Mar 7, 2023
1 parent ea3bf92 commit 958c453
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/processor/process_get_open_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub async fn process_get_open_orders(
let trader_index = market
.get_trader_index(trader_pubkey)
.ok_or_else(|| anyhow::anyhow!("Trader not found"))?;

let book_bids = market.get_book(Side::Bid);
let book_asks = market.get_book(Side::Ask);
let price_precision: usize =
Expand All @@ -43,7 +42,7 @@ pub async fn process_get_open_orders(
if order.trader_index as u32 == trader_index {
open_bids.push(format!(
"{0: <20} | {1: <20} | {2: <10} | {3: <10}",
order_id.order_sequence_number,
order_id.order_sequence_number as i64,
order_id.price_in_ticks,
format!(
"{:.1$}",
Expand Down Expand Up @@ -71,7 +70,7 @@ pub async fn process_get_open_orders(
if order.trader_index as u32 == trader_index {
open_asks.push(format!(
"{0: <20} | {1: <20} | {2: <10} | {3: <10}",
order_id.order_sequence_number,
order_id.order_sequence_number as i64,
order_id.price_in_ticks,
format!(
"{:.1$}",
Expand Down

0 comments on commit 958c453

Please sign in to comment.