Skip to content

Commit

Permalink
Refactored response model classes to records
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Jun 18, 2024
1 parent ac70007 commit 81ae889
Show file tree
Hide file tree
Showing 60 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexAlert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Alert
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexAlert
public record BitfinexAlert
{
/// <summary>
/// The key of the alert
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Asset info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexAsset
public record BitfinexAsset
{
/// <summary>
/// The shorthand name of the asset
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexAssetInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Asset info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexAssetInfo
public record BitfinexAssetInfo
{
/// <summary>
/// Method name
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexAvailableBalance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Available balance
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexAvailableBalance
public record BitfinexAvailableBalance
{
/// <summary>
/// The available balance
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexAveragePrice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Average price info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexAveragePrice
public record BitfinexAveragePrice
{
/// <summary>
/// The average price
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexBalance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Balance
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexBalance
public record BitfinexBalance
{
/// <summary>
/// Total Assets Under Management
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexChangeLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Account change log
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexChangeLog
public record BitfinexChangeLog
{
/// <summary>
/// Change timestamp
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexDepositAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Deposit address info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexDepositAddress
public record BitfinexDepositAddress
{
/// <summary>
/// The deposit method
Expand Down
4 changes: 2 additions & 2 deletions Bitfinex.Net/Objects/Models/BitfinexDerivativesFees.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Bitfinex.Net.Objects.Models
/// <summary>
/// Derivatives fee info
/// </summary>
public class BitfinexDerivativesFees
public record BitfinexDerivativesFees
{
/// <summary>
/// Perpetual derivatives fee config
Expand All @@ -17,7 +17,7 @@ public class BitfinexDerivativesFees
/// <summary>
/// Perp derivatives fees
/// </summary>
public class BitfinexPerpDerivativesFees
public record BitfinexPerpDerivativesFees
{
/// <summary>
/// Correction clamp min
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexDerivativesStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Derivatives status
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexDerivativesStatus
public record BitfinexDerivativesStatus
{
/// <summary>
/// The derivative symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Derivatives status
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexDerivativesStatusUpdate
public record BitfinexDerivativesStatusUpdate
{
/// <summary>
/// Timestamp
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexForeingExchangeRate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Exchange rate in a foreign currency
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexForeignExchangeRate
public record BitfinexForeignExchangeRate
{
/// <summary>
/// The current exchange rate
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingAutoRenew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Activate or deactivate auto-renew. Allows you to specify the currency, amount, rate, and period.
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingAutoRenew
public record BitfinexFundingAutoRenew
{
/// <summary>
/// Currency (USD, …)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding auto renew status
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingAutoRenewStatus
public record BitfinexFundingAutoRenewStatus
{
/// <summary>
/// The symbol
Expand Down
4 changes: 2 additions & 2 deletions Bitfinex.Net/Objects/Models/BitfinexFundingCredit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFunding
public record BitfinexFunding
{
/// <summary>
/// The offer id
Expand Down Expand Up @@ -122,7 +122,7 @@ public class BitfinexFunding
/// <summary>
/// Funding credit info
/// </summary>
public class BitfinexFundingCredit: BitfinexFunding
public record BitfinexFundingCredit: BitfinexFunding
{
/// <summary>
/// The pair the currency was used for
Expand Down
4 changes: 2 additions & 2 deletions Bitfinex.Net/Objects/Models/BitfinexFundingInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingInfo
public record BitfinexFundingInfo
{
/// <summary>
/// Type
Expand All @@ -32,7 +32,7 @@ public class BitfinexFundingInfo
/// Funding info details
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingInfoDetails
public record BitfinexFundingInfoDetails
{
/// <summary>
/// The weighted average rate for taken funding
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingOffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding offer info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingOffer
public record BitfinexFundingOffer
{
/// <summary>
/// The offer id
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingOrderBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Bitfinex.Net.Objects.Models
/// <summary>
/// Order book
/// </summary>
public class BitfinexFundingOrderBook
public record BitfinexFundingOrderBook
{
/// <summary>
/// List of bids
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding stats
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingStats
public record BitfinexFundingStats
{
/// <summary>
/// Timestamp
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding ticker information
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingTicker
public record BitfinexFundingTicker
{
/// <summary>
/// The symbol
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexFundingTrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Bitfinex.Net.Objects.Models
/// Funding trade info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexFundingTrade
public record BitfinexFundingTrade
{
/// <summary>
/// The id
Expand Down
12 changes: 6 additions & 6 deletions Bitfinex.Net/Objects/Models/BitfinexIncreasePositionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Increase position info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionInfo
public record BitfinexIncreasePositionInfo
{
/// <summary>
/// Position quantity info
Expand Down Expand Up @@ -35,7 +35,7 @@ public class BitfinexIncreasePositionInfo
/// Position quantity info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionQuantity
public record BitfinexIncreasePositionQuantity
{
/// <summary>
/// Max position
Expand All @@ -53,7 +53,7 @@ public class BitfinexIncreasePositionQuantity
/// Position balances
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionBalances
public record BitfinexIncreasePositionBalances
{
/// <summary>
/// Base asset balance
Expand All @@ -76,7 +76,7 @@ public class BitfinexIncreasePositionBalances
/// Balance info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionBalance
public record BitfinexIncreasePositionBalance
{
/// <summary>
/// Current tradable quote balance
Expand Down Expand Up @@ -104,7 +104,7 @@ public class BitfinexIncreasePositionBalance
/// Funding info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionFundingInfo
public record BitfinexIncreasePositionFundingInfo
{
/// <summary>
/// Funding value
Expand All @@ -122,7 +122,7 @@ public class BitfinexIncreasePositionFundingInfo
/// Funding asset info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexIncreasePositionFundingAssetInfo
public record BitfinexIncreasePositionFundingAssetInfo
{
/// <summary>
/// Funding value asset
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexKeyValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bitfinex.Net.Objects.Models
{
[JsonConverter(typeof(ArrayConverter))]
internal class BitfinexKeyValue<T>
internal record BitfinexKeyValue<T>
{
[ArrayProperty(0)]
public string Key { get; set; } = string.Empty;
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexKline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Kline info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexKline
public record BitfinexKline
{
/// <summary>
/// The timestamp of the kline
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexLedgerEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Ledger entry
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexLedgerEntry
public record BitfinexLedgerEntry
{
/// <summary>
/// The id of the entry
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexLiquidation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Bitfinex.Net.Objects.Models
/// Liquidation info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexLiquidation
public record BitfinexLiquidation
{
/// <summary>
/// Position id
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Login info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexLogin
public record BitfinexLogin
{
/// <summary>
/// Login id
Expand Down
4 changes: 2 additions & 2 deletions Bitfinex.Net/Objects/Models/BitfinexMarginBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Margin base
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMarginBase
public record BitfinexMarginBase
{
/// <summary>
/// Type
Expand All @@ -26,7 +26,7 @@ public class BitfinexMarginBase
/// Margin base info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMarginBaseInfo
public record BitfinexMarginBaseInfo
{
/// <summary>
/// User profit and loss
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexMarginInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Bitfinex.Net.Objects.Models
/// <summary>
/// Margin info
/// </summary>
public class BitfinexMarginInfo
public record BitfinexMarginInfo
{
/// <summary>
/// Conf
Expand Down
4 changes: 2 additions & 2 deletions Bitfinex.Net/Objects/Models/BitfinexMarginSymbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Bitfinex.Net.Objects.Models
/// Margin symbol info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMarginSymbol
public record BitfinexMarginSymbol
{
/// <summary>
/// The topic
Expand All @@ -32,7 +32,7 @@ public class BitfinexMarginSymbol
/// Margin symbol info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMarginSymbolInfo
public record BitfinexMarginSymbolInfo
{
/// <summary>
/// Trade-able balance
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Wallet movement info (deposit/withdraw)
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMovement
public record BitfinexMovement
{
/// <summary>
/// The id of the movement
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexMovementDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Bitfinex.Net.Objects.Models
/// Wallet movement info (deposit/withdraw)
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexMovementDetails
public record BitfinexMovementDetails
{
/// <summary>
/// The id of the movement
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Bitfinex.Net.Objects.Models
/// Order info
/// </summary>
[JsonConverter(typeof(ArrayConverter))]
public class BitfinexOrder
public record BitfinexOrder
{
/// <summary>
/// The id of the order
Expand Down
2 changes: 1 addition & 1 deletion Bitfinex.Net/Objects/Models/BitfinexOrderBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Bitfinex.Net.Objects.Models
/// <summary>
/// Order book
/// </summary>
public class BitfinexOrderBook
public record BitfinexOrderBook
{
/// <summary>
/// List of bids
Expand Down
Loading

0 comments on commit 81ae889

Please sign in to comment.