Skip to content

Commit ffb57e7

Browse files
authored
BL3P: move supporting classes to ExchangeBL3PAPI class (#474)
1 parent ebc014b commit ffb57e7

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

ExchangeSharp/API/Exchanges/BL3P/ExchangeBL3PAPI.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Threading.Tasks;
5-
using ExchangeSharp.API.Exchanges.BL3P;
6-
using ExchangeSharp.API.Exchanges.BL3P.Models;
5+
using ExchangeSharp.BL3P;
76
using Newtonsoft.Json;
87
using Newtonsoft.Json.Linq;
98

109
// ReSharper disable once CheckNamespace
1110
namespace ExchangeSharp
1211
{
1312
// ReSharper disable once InconsistentNaming
14-
public sealed class ExchangeBL3PAPI : ExchangeAPI
13+
public sealed partial class ExchangeBL3PAPI : ExchangeAPI
1514
{
1615
public override string BaseUrl { get; set; } = "https://api.bl3p.eu/";
1716

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
using Newtonsoft.Json;
22

3-
namespace ExchangeSharp.API.Exchanges.BL3P.Models
3+
namespace ExchangeSharp
44
{
5-
// ReSharper disable once InconsistentNaming
6-
public class BL3POrder
5+
public sealed partial class ExchangeBL3PAPI : ExchangeAPI
76
{
8-
[JsonProperty("price_int")]
9-
[JsonConverter(typeof(FixedIntDecimalConverter), 5)]
10-
public decimal Price { get; set; }
7+
// ReSharper disable once InconsistentNaming
8+
class BL3POrder
9+
{
10+
[JsonProperty("price_int")]
11+
[JsonConverter(typeof(FixedIntDecimalConverter), 5)]
12+
public decimal Price { get; set; }
1113

1214

13-
[JsonProperty("amount_int")]
14-
[JsonConverter(typeof(FixedIntDecimalConverter), 8)]
15-
public decimal Amount { get; set; }
15+
[JsonProperty("amount_int")]
16+
[JsonConverter(typeof(FixedIntDecimalConverter), 8)]
17+
public decimal Amount { get; set; }
1618

17-
public ExchangeOrderPrice ToExchangeOrder()
18-
{
19-
return new ExchangeOrderPrice
19+
public ExchangeOrderPrice ToExchangeOrder()
2020
{
21-
Amount = Amount,
22-
Price = Price
23-
};
21+
return new ExchangeOrderPrice
22+
{
23+
Amount = Amount,
24+
Price = Price
25+
};
26+
}
2427
}
2528
}
2629
}
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
using Newtonsoft.Json;
22

3-
namespace ExchangeSharp.API.Exchanges.BL3P.Models
3+
namespace ExchangeSharp
44
{
5-
// ReSharper disable once InconsistentNaming
6-
public class BL3POrderBook
5+
public sealed partial class ExchangeBL3PAPI : ExchangeAPI
76
{
8-
[JsonProperty("marketplace")]
9-
public string MarketSymbol { get; set; }
7+
// ReSharper disable once InconsistentNaming
8+
class BL3POrderBook
9+
{
10+
[JsonProperty("marketplace")]
11+
public string MarketSymbol { get; set; }
1012

11-
[JsonProperty("asks")]
12-
public BL3POrder[] Asks { get; set; }
13+
[JsonProperty("asks")]
14+
public BL3POrder[] Asks { get; set; }
1315

14-
[JsonProperty("bids")]
15-
public BL3POrder[] Bids { get; set; }
16+
[JsonProperty("bids")]
17+
public BL3POrder[] Bids { get; set; }
18+
}
1619
}
1720
}

ExchangeSharp/API/Exchanges/BL3P/MultiWebsocketWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Threading.Tasks;
55

6-
namespace ExchangeSharp.API.Exchanges.BL3P
6+
namespace ExchangeSharp.BL3P
77
{
88
internal sealed class MultiWebsocketWrapper : IWebSocket
99
{

0 commit comments

Comments
 (0)