-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added UnifiedApi.Account.GetTransferAsync endpoint
- Loading branch information
Showing
9 changed files
with
236 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
OKX.Net.UnitTests/JsonResponses/Unified/Account/GetTransferAsync.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,17 @@ | ||
{ | ||
"code": "0", | ||
"data": [ | ||
{ | ||
"amt": "1.5", | ||
"ccy": "USDT", | ||
"clientId": "", | ||
"from": "18", | ||
"state": "success", | ||
"subAcct": "test", | ||
"to": "6", | ||
"transId": "1", | ||
"type": "1" | ||
} | ||
], | ||
"msg": "" | ||
} |
9 changes: 9 additions & 0 deletions
9
OKX.Net.UnitTests/JsonResponses/Unified/Account/SetIsolatedMarginModeAsync.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,9 @@ | ||
{ | ||
"code": "0", | ||
"data": [ | ||
{ | ||
"isoMode": "automatic" | ||
} | ||
], | ||
"msg": "" | ||
} |
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,25 @@ | ||
using CryptoExchange.Net.Attributes; | ||
|
||
namespace OKX.Net.Enums; | ||
|
||
/// <summary> | ||
/// Status of a transfer | ||
/// </summary> | ||
public enum OKXTransferStatus | ||
{ | ||
/// <summary> | ||
/// Success | ||
/// </summary> | ||
[Map("success")] | ||
Success, | ||
/// <summary> | ||
/// Pending transfer | ||
/// </summary> | ||
[Map("pending")] | ||
Pending, | ||
/// <summary> | ||
/// Transfer failed | ||
/// </summary> | ||
[Map("failed")] | ||
Failed | ||
} |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
namespace OKX.Net.Enums; | ||
using CryptoExchange.Net.Attributes; | ||
|
||
namespace OKX.Net.Enums; | ||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member | ||
|
||
public enum OKXTransferType | ||
{ | ||
[Map("0")] | ||
TransferWithinAccount, | ||
[Map("1")] | ||
MasterAccountToSubAccount, | ||
[Map("2")] | ||
SubAccountToMasterAccount, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using OKX.Net.Converters; | ||
using OKX.Net.Enums; | ||
|
||
namespace OKX.Net.Objects.Funding; | ||
|
||
/// <summary> | ||
/// Transfer info | ||
/// </summary> | ||
public class OKXTransferInfo | ||
{ | ||
/// <summary> | ||
/// Asset | ||
/// </summary> | ||
[JsonProperty("ccy")] | ||
public string Asset { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Transfer id | ||
/// </summary> | ||
[JsonProperty("transId")] | ||
public long? TransferId { get; set; } | ||
|
||
/// <summary> | ||
/// Quantity | ||
/// </summary> | ||
[JsonProperty("amt")] | ||
public decimal Quantity { get; set; } | ||
|
||
/// <summary> | ||
/// From account | ||
/// </summary> | ||
[JsonProperty("from"), JsonConverter(typeof(AccountConverter))] | ||
public OKXAccount? From { get; set; } | ||
|
||
/// <summary> | ||
/// To account | ||
/// </summary> | ||
[JsonProperty("to"), JsonConverter(typeof(AccountConverter))] | ||
public OKXAccount? To { get; set; } | ||
|
||
/// <summary> | ||
/// Client id | ||
/// </summary> | ||
[JsonProperty("clientId")] | ||
public string? ClientId { get; set; } | ||
|
||
/// <summary> | ||
/// Type of transfer | ||
/// </summary> | ||
[JsonProperty("type")] | ||
[JsonConverter(typeof(EnumConverter))] | ||
public OKXTransferType Type { get; set; } | ||
|
||
/// <summary> | ||
/// Name of the sub account | ||
/// </summary> | ||
[JsonProperty("subAcct")] | ||
public string? SubAccountName { get; set; } | ||
|
||
/// <summary> | ||
/// Type of transfer | ||
/// </summary> | ||
[JsonProperty("state")] | ||
public OKXTransferStatus Status { get; set; } | ||
} |