Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix BorrowAsync() timeInForce parameter #231

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Kucoin.Net.UnitTests/RestRequestTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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
Loading