Skip to content

Commit

Permalink
Merge pull request #31 from kayahasa/master
Browse files Browse the repository at this point in the history
fix instrument name issue
  • Loading branch information
burakoner committed Aug 5, 2023
2 parents 33026e9 + 4d861cf commit fde1f70
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 48 deletions.
10 changes: 10 additions & 0 deletions OKX.Api/Models/OkxSocketResponses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ public bool Success

public class OkxSocketUpdateResponse<T> : OkxSocketResponse
{
[JsonProperty("arg")]
public OkxSocketUpdateArgs? Args { get; set; }
[JsonProperty("data")]
public T Data { get; set; } = default!;
}
public class OkxSocketUpdateArgs
{
[JsonProperty("channel")]
public string Channel { get; set; }

[JsonProperty("instId")]
public string Instrument { get; set; }
}

public class OkxOrderBookUpdate
{
Expand Down
97 changes: 50 additions & 47 deletions OKX.Api/OKX.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,63 @@
<PropertyGroup>
<PackageId>OKX.Api</PackageId>
<Authors>Burak Öner</Authors>
<Version>1.2.3</Version>
<FileVersion>1.2.3</FileVersion>
<PackageVersion>1.2.3</PackageVersion>
<AssemblyVersion>1.2.3</AssemblyVersion>
<Version>1.2.4</Version>
<FileVersion>1.2.4</FileVersion>
<PackageVersion>1.2.4</PackageVersion>
<AssemblyVersion>1.2.4</AssemblyVersion>
<Description>OKX V5 Api Wrapper. Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper</Description>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageTags>OKX;OKEX;Binance;BNB;BTC;Api;Client;Rest;Web;Websocket;Socket;Wrapper;Crypto;Currency;Cryptocurrency;Exchange;Trade;Trading;Bitcoin;Spot;Margin;Futures;Derivates;Stock;Options;Swap;</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NeutralLanguage>en</NeutralLanguage>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReleaseNotes>
Version 1.2.3 - 03 Aug 2023
* ApiSharp version updated to 1.4.1

Version 1.2.2 - 28 Jul 2023
* Merged pull request https://github.com/burakoner/OKX.Api/pull/28

Version 1.2.1 - 28 Jul 2023
* Synced with OKX Api 2023-07-26 version
* Added some other missing documentation symbols
* Merged pull request https://github.com/burakoner/OKX.Api/pull/25
* Merged pull request https://github.com/burakoner/OKX.Api/pull/26
* Merged pull request https://github.com/burakoner/OKX.Api/pull/27

Version 1.2.0 - 27 Jul 2023
* Added documentation symbols
* Synced with OKX Api 2023-06-28 version
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/21
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/21
* Merged pull request https://github.com/burakoner/OKX.Api/pull/23
* Merged pull request https://github.com/burakoner/OKX.Api/pull/24

Version 1.1.7 - 26 Jun 2023
* It's possible to subscribe multiple symbols at once on WebSocket
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/16

Version 1.1.6 - 26 Jun 2023
* Updated All Methods and Models, synced with OKX Api 2023-06-20 version
* OKXStreamClient has some parameter and parameter order changes
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/18
* Fixed some typos

Version 1.1.5 - 25 Jun 2023
* Added Grid Trading section endpoints
* ApiSharp updated to v1.3.6
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/11

Version 1.1.0 - 07 May 2023
* Updated All Methods and Models, synced with OKX Api 2023-04-27 version

Version 1.0.6 - 06 May 2023
* Updated WithdrawAsync Method (https://github.com/burakoner/OKEx.Net/issues/97)
* Updated GetInstrumentsAsync Method (https://github.com/burakoner/OKX.Api/issues/7)
</PackageReleaseNotes>
Version 1.2.4 - 05 Aug 2023
* Multiple subscription to index candle instrument name issue solved.

Version 1.2.3 - 03 Aug 2023
* ApiSharp version updated to 1.4.1

Version 1.2.2 - 28 Jul 2023
* Merged pull request https://github.com/burakoner/OKX.Api/pull/28

Version 1.2.1 - 28 Jul 2023
* Synced with OKX Api 2023-07-26 version
* Added some other missing documentation symbols
* Merged pull request https://github.com/burakoner/OKX.Api/pull/25
* Merged pull request https://github.com/burakoner/OKX.Api/pull/26
* Merged pull request https://github.com/burakoner/OKX.Api/pull/27

Version 1.2.0 - 27 Jul 2023
* Added documentation symbols
* Synced with OKX Api 2023-06-28 version
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/21
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/21
* Merged pull request https://github.com/burakoner/OKX.Api/pull/23
* Merged pull request https://github.com/burakoner/OKX.Api/pull/24

Version 1.1.7 - 26 Jun 2023
* It's possible to subscribe multiple symbols at once on WebSocket
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/16

Version 1.1.6 - 26 Jun 2023
* Updated All Methods and Models, synced with OKX Api 2023-06-20 version
* OKXStreamClient has some parameter and parameter order changes
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/18
* Fixed some typos

Version 1.1.5 - 25 Jun 2023
* Added Grid Trading section endpoints
* ApiSharp updated to v1.3.6
* Fixed issue at https://github.com/burakoner/OKX.Api/issues/11

Version 1.1.0 - 07 May 2023
* Updated All Methods and Models, synced with OKX Api 2023-04-27 version

Version 1.0.6 - 06 May 2023
* Updated WithdrawAsync Method (https://github.com/burakoner/OKEx.Net/issues/97)
* Updated GetInstrumentsAsync Method (https://github.com/burakoner/OKX.Api/issues/7)
</PackageReleaseNotes>
<PackageIcon>OKX.png</PackageIcon>
<PackageIconUrl />
<PackageProjectUrl>https://github.com/burakoner/OKX.Api</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion OKX.Api/OKXStreamClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public virtual async Task<CallResult<UpdateSubscription>> SubscribeToCandlestick
{
foreach (var d in data.Data.Data)
{
if (instrumentIds.Count() == 1) d.Instrument = instrumentIds.FirstOrDefault();
d.Instrument = data.Data.Args?.Instrument;
onData(d);
}
});
Expand Down

0 comments on commit fde1f70

Please sign in to comment.