-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Add support for
ws-orderbook
to Kraken and Gemini Exchanges (
#588) * Linting. Consistent tabs for code formatting. * Add support for ws-orderbooks to Kraken and Gemini.
- Loading branch information
Showing
9 changed files
with
2,139 additions
and
1,886 deletions.
There are no files selected for viewing
629 changes: 317 additions & 312 deletions
629
src/ExchangeSharp/API/Exchanges/Gemini/ExchangeGeminiAPI.cs
Large diffs are not rendered by default.
Oops, something went wrong.
1,496 changes: 823 additions & 673 deletions
1,496
src/ExchangeSharp/API/Exchanges/Kraken/ExchangeKrakenAPI.cs
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/ExchangeSharp/API/Exchanges/Kraken/Models/Request/ChannelAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using ExchangeSharp.API.Exchanges.Kraken.Models.Types; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace ExchangeSharp.API.Exchanges.Kraken.Models.Request | ||
{ | ||
internal class ChannelAction | ||
{ | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
[JsonProperty("event")] | ||
public ActionType Event { get; set; } | ||
|
||
[JsonProperty("pair")] | ||
public List<string> Pairs { get; set; } | ||
|
||
[JsonProperty("subscription")] | ||
public Subscription SubscriptionSettings { get; set; } | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/ExchangeSharp/API/Exchanges/Kraken/Models/Types/ActionType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace ExchangeSharp.API.Exchanges.Kraken.Models.Types | ||
{ | ||
internal enum ActionType | ||
{ | ||
[EnumMember(Value = "subscribe")] | ||
Subscribe, | ||
|
||
[EnumMember(Value = "unsubscribe")] | ||
Unsubscribe | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/ExchangeSharp/API/Exchanges/Kraken/Models/Types/Subscription.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace ExchangeSharp.API.Exchanges.Kraken.Models.Types | ||
{ | ||
internal class Subscription | ||
{ | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("depth")] | ||
public int Depth { get; set; } | ||
} | ||
} |
1,374 changes: 707 additions & 667 deletions
1,374
src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs
Large diffs are not rendered by default.
Oops, something went wrong.
432 changes: 219 additions & 213 deletions
432
src/ExchangeSharp/API/Exchanges/_Base/IExchangeAPI.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters