-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Deserialize message frame payload into object and include class…
…es for public responses.
- Loading branch information
1 parent
48ca0d2
commit dc0bc5b
Showing
13 changed files
with
535 additions
and
59 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
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,23 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
/// <summary> | ||
/// Represents the type of L2 information price data. | ||
/// </summary> | ||
public enum ActionType | ||
{ | ||
/// <summary> | ||
/// New data. | ||
/// </summary> | ||
New = 0, | ||
|
||
/// <summary> | ||
/// Updated data. | ||
/// </summary> | ||
Update = 1, | ||
|
||
/// <summary> | ||
/// Deleted data. | ||
/// </summary> | ||
Delete = 2, | ||
} | ||
} |
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,35 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
/// <summary> | ||
/// Return value indicating successful or unsuccessful receipt of a call. | ||
/// </summary> | ||
public enum ErrorCode | ||
{ | ||
Success = 0, | ||
|
||
/// <summary> | ||
/// Not authorized (error code 20) | ||
/// </summary> | ||
NotAuthorized = 20, | ||
|
||
/// <summary> | ||
/// Invalid request (error code 100) | ||
/// </summary> | ||
InvalidRequest = 100, | ||
|
||
/// <summary> | ||
/// Operation failed (error code 101) | ||
/// </summary> | ||
OperationFailed = 101, | ||
|
||
/// <summary> | ||
/// Server error (error code 102) | ||
/// </summary> | ||
ServerError = 102, | ||
|
||
/// <summary> | ||
/// Resource not found (error code 104). | ||
/// </summary> | ||
ResourceNotFound = 104, | ||
} | ||
} |
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,18 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
/// <summary> | ||
/// Represents the type of the instrument. | ||
/// </summary> | ||
public enum InstrumentType | ||
{ | ||
/// <summary> | ||
/// Unknown. An error condition. | ||
/// </summary> | ||
Unknown, | ||
|
||
/// <summary> | ||
/// An exchange of one product for another. | ||
/// </summary> | ||
Standard, | ||
} | ||
} |
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,19 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
/// <summary> | ||
/// The nature of the product. | ||
/// </summary> | ||
public enum ProductType | ||
{ | ||
/// <summary> | ||
/// Unknown. An error condition. | ||
/// </summary> | ||
Unknown = 0, | ||
|
||
NationalCurrency = 1, | ||
|
||
CryptoCurrency = 2, | ||
|
||
Contract = 3 | ||
} | ||
} |
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,11 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
public enum SessionStatus | ||
{ | ||
Unknown = 0, | ||
Running = 1, | ||
Paused = 2, | ||
Stopped = 3, | ||
Starting = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace AlphaPoint.Api.Models | ||
{ | ||
/// <summary> | ||
/// Represents one side of a trade. Every trade has two sides. | ||
/// </summary> | ||
public enum Side | ||
{ | ||
/// <summary> | ||
/// The buy side of a trade.. | ||
/// </summary> | ||
Buy = 0, | ||
|
||
/// <summary> | ||
/// The sell side of a trade. | ||
/// </summary> | ||
Sell = 1, | ||
|
||
/// <summary> | ||
/// Short (reserved for future use). | ||
/// </summary> | ||
Short = 2, | ||
|
||
/// <summary> | ||
/// Unknown (error condition). | ||
/// </summary> | ||
Unknown = 3 | ||
} | ||
} |
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,40 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace AlphaPoint.Api.Models.Responses | ||
{ | ||
/// <summary> | ||
/// A generic response to an API call that verifies that the call was received. | ||
/// </summary> | ||
public class GenericResponse | ||
{ | ||
/// <summary> | ||
/// If the call has been successfully received by the Order Management System, result is true; otherwise, it is false. | ||
/// </summary> | ||
[JsonProperty("result")] | ||
bool Result { get; set; } | ||
|
||
/// <summary> | ||
/// A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages: | ||
/// Not Authorized (errorcode 20) | ||
/// Invalid Request (errorcode 100) | ||
/// Operation Failed (errorcode 101) | ||
/// Server Error (errorcode 102) | ||
/// Resource Not Found (errorcode 104) | ||
/// </summary> | ||
[JsonProperty("errormsg")] | ||
string ErrorMsg { get; set; } | ||
|
||
/// <summary> | ||
/// A successful receipt of the call returns 0. | ||
/// An unsuccessful receipt of the call returns one of the errorcodes shown in the errormsg list. | ||
/// </summary> | ||
[JsonProperty("errorcode")] | ||
ErrorCode ErrorCode { get; set; } | ||
|
||
/// <summary> | ||
/// Message text that the system may send. The content of this parameter is usually null. | ||
/// </summary> | ||
[JsonProperty("detail")] | ||
string Detail { get; set; } | ||
} | ||
} |
Oops, something went wrong.