From 24ccde46559935db3fcbf83844a5c7890c9a64ec Mon Sep 17 00:00:00 2001 From: KuboOrk Date: Thu, 28 Dec 2023 16:12:12 +0300 Subject: [PATCH 1/3] fixed type of timestamp parameter --- Src/Common/ApiServiceImp/BybitAssetService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Common/ApiServiceImp/BybitAssetService.cs b/Src/Common/ApiServiceImp/BybitAssetService.cs index 0efbb99..20083bf 100644 --- a/Src/Common/ApiServiceImp/BybitAssetService.cs +++ b/Src/Common/ApiServiceImp/BybitAssetService.cs @@ -536,7 +536,7 @@ public BybitAssetService(HttpClient httpClient, string apiKey, string apiSecret, /// /// /// id - public async Task PlaceAssetWithdraw(string coin, string chain, string address, string amount, int timestamp, string? tag = null, int? forceChain = null, AccountType? accountType = null, FeeType? feeType = null) + public async Task PlaceAssetWithdraw(string coin, string chain, string address, string amount, long timestamp, string? tag = null, int? forceChain = null, AccountType? accountType = null, FeeType? feeType = null) { var query = new Dictionary { { "coin", coin }, { "chain", chain }, { "address", address }, { "amount", amount }, { "timestamp", timestamp } }; BybitParametersUtils.AddOptionalParameters(query, From ce64abc1bd4d9dc56410517c0b8ade51f1a209b8 Mon Sep 17 00:00:00 2001 From: irene-displayr Date: Tue, 27 Aug 2024 22:49:33 +1000 Subject: [PATCH 2/3] Update BybitService.cs ctor: check url for null and default to main url I've got an Exception when tried to use BybitMarketDataService without specifying url. If you look at the ctor from BybitMarketDataService you will notice that you set URL to default null in the ctor. That means that this "null" value will be passed all the way through to the BybitService, so your default value won't work. --- Src/Common/Services/BybitService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Common/Services/BybitService.cs b/Src/Common/Services/BybitService.cs index b7d7092..914c877 100644 --- a/Src/Common/Services/BybitService.cs +++ b/Src/Common/Services/BybitService.cs @@ -32,7 +32,7 @@ public BybitService(HttpClient httpClient, string? apiKey = null, string? apiSec public BybitService(HttpClient httpClient, string? url = BybitConstants.HTTP_MAINNET_URL, string recvWindow = BybitConstants.DEFAULT_REC_WINDOW) { this.httpClient = httpClient; - this.url = url; + this.url = URL ?? BybitConstants.HTTP_MAINNET_URL; this.recvWindow = recvWindow; } From d427b0ca0702b524c49dd17cd172e4f1c0b3f716 Mon Sep 17 00:00:00 2001 From: irene-displayr Date: Thu, 29 Aug 2024 20:50:43 +1000 Subject: [PATCH 3/3] Update BybitService.cs --- Src/Common/Services/BybitService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Common/Services/BybitService.cs b/Src/Common/Services/BybitService.cs index 914c877..2289dde 100644 --- a/Src/Common/Services/BybitService.cs +++ b/Src/Common/Services/BybitService.cs @@ -32,7 +32,7 @@ public BybitService(HttpClient httpClient, string? apiKey = null, string? apiSec public BybitService(HttpClient httpClient, string? url = BybitConstants.HTTP_MAINNET_URL, string recvWindow = BybitConstants.DEFAULT_REC_WINDOW) { this.httpClient = httpClient; - this.url = URL ?? BybitConstants.HTTP_MAINNET_URL; + this.url = url ?? BybitConstants.HTTP_MAINNET_URL; this.recvWindow = recvWindow; }