Skip to content

Commit

Permalink
fix BorrowAsync() timeInForce parameter (#231)
Browse files Browse the repository at this point in the history
* fix BorrowAsync() timeInForce parameter

* fixed test according to BorrowAsync() signature changes
  • Loading branch information
alokym86 authored Oct 9, 2024
1 parent 53e0510 commit 2c5bd40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Kucoin.Net.UnitTests/RestRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public async Task ValidateSpotMarginCalls()
opts.OutputOriginalData = true;
});
var tester = new RestRequestValidator<KucoinRestClient>(client, "Endpoints/Spot/Margin", "https://api.kucoin.com", IsAuthenticated, "data", stjCompare: false);
await tester.ValidateAsync(client => client.SpotApi.Margin.BorrowAsync("ETH", Enums.TimeInForce.GoodTillCanceled, 1), "Borrow");
await tester.ValidateAsync(client => client.SpotApi.Margin.BorrowAsync("ETH", Enums.BorrowOrderType.FOK, 1), "Borrow");
await tester.ValidateAsync(client => client.SpotApi.Margin.RepayAsync("ETH", 1), "Repay");
await tester.ValidateAsync(client => client.SpotApi.Margin.GetBorrowHistoryAsync("ETH"), "GetBorrowHistory");
await tester.ValidateAsync(client => client.SpotApi.Margin.GetRepayHistoryAsync("ETH"), "GetRepayHistory");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public async Task<WebCallResult<IEnumerable<KucoinIsolatedRiskLimitConfig>>> Get
/// <inheritdoc />
public async Task<WebCallResult<KucoinNewBorrowOrder>> BorrowAsync(
string asset,
TimeInForce timeInForce,
BorrowOrderType timeInForce,
decimal quantity,
bool? isIsolated = null,
string? symbol = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public interface IKucoinRestClientSpotApiMargin
/// <param name="ct">Cancellation token</param>
/// <returns>The id of the new order</returns>
Task<WebCallResult<KucoinNewBorrowOrder>> BorrowAsync(
string asset,
TimeInForce timeInForce,
string asset,
BorrowOrderType timeInForce,
decimal quantity,
bool? isIsolated = null,
string? symbol = null,
bool? isHf = null,
CancellationToken ct = default);
CancellationToken ct = default);

/// <summary>
/// Repayment for previously borrowed asset
Expand Down

0 comments on commit 2c5bd40

Please sign in to comment.