-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added restClient.PerpetualFuturesApi.Account.GetIsolatedMarginChangeH…
…istoryAsync endpoint
- Loading branch information
Showing
7 changed files
with
188 additions
and
4 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
BingX.Net.UnitTests/Endpoints/PerpetualFutures/Account/GetIsolatedMarginChangeHistory.txt
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,21 @@ | ||
GET | ||
/openApi/swap/v1/positionMargin/history | ||
true | ||
{ | ||
"code": 0, | ||
"msg": "", | ||
"timestamp": 1702731661854, | ||
"data": { | ||
"records": [ | ||
{ | ||
"symbol": "BTC-USDT", | ||
"positionId": "1847596444958068736", | ||
"changeReason": "OpenPosition", | ||
"marginChange": "7586.46841066", | ||
"marginAfterChange": "7586.46841066", | ||
"time": 1729336294000 | ||
} | ||
], | ||
"total": 4 | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,63 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BingX.Net.Objects.Models | ||
{ | ||
/// <summary> | ||
/// Margin change info | ||
/// </summary> | ||
public record BingXMarginHistory | ||
{ | ||
/// <summary> | ||
/// Records | ||
/// </summary> | ||
[JsonPropertyName("records")] | ||
public IEnumerable<BingXMarginHistoryEntry> Records { get; set; } = Array.Empty<BingXMarginHistoryEntry>(); | ||
/// <summary> | ||
/// Total amount of records | ||
/// </summary> | ||
[JsonPropertyName("total")] | ||
public decimal Total { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Margin change info | ||
/// </summary> | ||
public record BingXMarginHistoryEntry | ||
{ | ||
/// <summary> | ||
/// Symbol | ||
/// </summary> | ||
[JsonPropertyName("symbol")] | ||
public string Symbol { get; set; } = string.Empty; | ||
/// <summary> | ||
/// Position id | ||
/// </summary> | ||
[JsonPropertyName("positionId")] | ||
public string PositionId { get; set; } = string.Empty; | ||
/// <summary> | ||
/// Change reason | ||
/// </summary> | ||
[JsonPropertyName("changeReason")] | ||
public string ChangeReason { get; set; } = string.Empty; | ||
/// <summary> | ||
/// Margin change | ||
/// </summary> | ||
[JsonPropertyName("marginChange")] | ||
public decimal MarginChange { get; set; } | ||
/// <summary> | ||
/// Margin after change | ||
/// </summary> | ||
[JsonPropertyName("marginAfterChange")] | ||
public decimal MarginAfterChange { get; set; } | ||
/// <summary> | ||
/// Time of change | ||
/// </summary> | ||
[JsonPropertyName("time")] | ||
public DateTime Timestamp { get; set; } | ||
} | ||
|
||
|
||
} |