-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add agent endpoints #1450
Add agent endpoints #1450
Conversation
Sorry, I only added the endpoints that I need to use. |
brokerId.ValidateNotNull(nameof(brokerId)); | ||
|
||
var parameters = new ParameterCollection(); | ||
parameters.AddOptional("brokerId", brokerId.ToString(CultureInfo.InvariantCulture)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just be parameters.Add("brokerId", brokerId);
It's not optional and it's already a string
|
||
var parameters = new ParameterCollection(); | ||
parameters.AddOptional("brokerId", brokerId.ToString(CultureInfo.InvariantCulture)); | ||
parameters.AddOptional("type", (int)IfNewUserMarginedFuturesType.Coin_margined_Futures); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use parameters.AddEnum("type", IfNewUserMarginedFuturesType.Coin_margined_Futures);
instead
Binance.Net/Clients/CoinFuturesApi/BinanceRestClientCoinFuturesApiAgent.cs
Show resolved
Hide resolved
|
||
#region If New User | ||
|
||
public async Task<WebCallResult<BinanceIfNewUser>> IfNewUser(string apiAgentCode, int? receiveWindow = null, CancellationToken ct = default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments
/// Processing | ||
/// </summary> | ||
[Map("1")] | ||
USDT_margined_Futures = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CamelCasing please, so UsdtMarginedFutures
namespace Binance.Net.Interfaces.Clients.UsdFuturesApi | ||
{ | ||
/// <summary> | ||
/// Binance USD-M futures account endpoints, query user data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect comment
namespace Binance.Net.Interfaces.Clients.CoinFuturesApi | ||
{ | ||
/// <summary> | ||
/// Binance Coin futures account endpoints, query user data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect comment
/// If new user | ||
/// </summary> | ||
[JsonPropertyName("ifNewUser")] | ||
public bool ifNewUser { get; set; } = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IfNewUser
, also default values not needed for bool values as the default is already false
/// If new user | ||
/// </summary> | ||
[JsonPropertyName("ifNewUser")] | ||
public bool ifNewUser { get; set; } = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other model
Please have a look at the comments |
I made some modifications, but "rate limiter" doesn't seem to be in the documentation, except for weight. |
brokerId.ValidateNotNull(nameof(brokerId)); | ||
|
||
var parameters = new ParameterCollection(); | ||
parameters.AddOptional("brokerId", brokerId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed the ToString
, but it still should be parameters.Add
instead of parameters.AddOptional
brokerId.ValidateNotNull(nameof(brokerId)); | ||
|
||
var parameters = new ParameterCollection(); | ||
parameters.AddOptional("brokerId", brokerId.ToString(CultureInfo.InvariantCulture)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, you also still have the ToString here
I see, it's not really clear what the limits are so I guess this is good enough. 2 more small comments. |
Done! |
No description provided.