Skip to content

Commit ef26cd3

Browse files
author
codez0mb1e
committed
Inject BaseAsset-based precision
1 parent 4c37bb4 commit ef26cd3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/BinanceBot.Market/Configurations/MarketStrategyConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public record MarketStrategyConfiguration
3030

3131

3232
/// <summary>
33-
/// Precision of the quote asset
33+
/// Precision of the base asset
3434
/// </summary>
35-
public int QuoteAssetPrecision { get; set; }
35+
public int BaseAssetPrecision { get; set; }
3636

3737
/// <summary>
3838
/// Price precision

src/BinanceBot.Market/MarketMakerBot.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public override async Task<BinancePlacedOrder> CreateOrderAsync(CreateOrderReque
9696
order.Side,
9797
order.OrderType,
9898
// price-quantity
99-
price: order.Price,
99+
price: order.Price,
100100
quantity: order.Quantity,
101101
// metadata
102102
newClientOrderId: order.NewClientOrderId,
@@ -170,9 +170,9 @@ private async Task OnMarketBestPairChanged(object sender, MarketBestPairChangedE
170170
OrderType = SpotOrderType.Limit,
171171
// price-quantity
172172
Price = Decimal.Round(q.Price, decimals: MarketStrategy.Config.PricePrecision),
173-
Quantity = Decimal.Round(q.Volume, decimals: MarketStrategy.Config.QuoteAssetPrecision),
173+
Quantity = Decimal.Round(q.Volume, decimals: MarketStrategy.Config.BaseAssetPrecision),
174174
// metadata
175-
NewClientOrderId = "test",
175+
NewClientOrderId = $"market-bot-{Guid.NewGuid():N}".Substring(0, 36),
176176
TimeInForce = TimeInForce.GoodTillCanceled,
177177
RecvWindow = (int)MarketStrategy.Config.ReceiveWindow.TotalMilliseconds
178178
};

0 commit comments

Comments
 (0)