Write NiceHash bot, make lots of profit
Forum rules
The News forum is only for updates about the Prohashing pool.
Replies to posts in this forum should be related to the news being announced. If you need support on another issue, please post in the forum related to that topic or seek one of the official support options listed in the top right corner of the forums page or on prohashing.com/about.
For the full list of PROHASHING forums rules, please visit https://prohashing.com/help/prohashing- ... rms-forums.
The News forum is only for updates about the Prohashing pool.
Replies to posts in this forum should be related to the news being announced. If you need support on another issue, please post in the forum related to that topic or seek one of the official support options listed in the top right corner of the forums page or on prohashing.com/about.
For the full list of PROHASHING forums rules, please visit https://prohashing.com/help/prohashing- ... rms-forums.
-
- Posts: 3
- Joined: Tue Mar 27, 2018 4:39 am
Re: Write NiceHash bot, make lots of profit
Can someone please provide me with an example on how to subscribe to this WAMP API in C#?
I have a NiceHash bot that i would like to incorporate this API into, however my programming skills are limited, and i'm not sure how i would write this in C#.
Thanks in advance
I have a NiceHash bot that i would like to incorporate this API into, however my programming skills are limited, and i'm not sure how i would write this in C#.
Thanks in advance
Re: Write NiceHash bot, make lots of profit
Think this was a better idea back when you could change multiple times per minute to always pick the highest payout coin to static mine.
Pick a coin, when its not the highest anymore, swap to the new high coin.
But now that the system only allows you to change every 12 mins? or whatever it is now the bot wouldn't be able to swap but 4 times per hour.
With the time constraints put on the system not even worth modifying the bots we did have to keep running with that much of a time lapse.
Pick a coin, when its not the highest anymore, swap to the new high coin.
But now that the system only allows you to change every 12 mins? or whatever it is now the bot wouldn't be able to swap but 4 times per hour.
With the time constraints put on the system not even worth modifying the bots we did have to keep running with that much of a time lapse.
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Write NiceHash bot, make lots of profit
We decided to relax that constraint for this week to see what happens. We discovered other issues that were affecting profits and this issue probably did not cause much impact on dynamic miners' profitability.CSZiggy wrote:Think this was a better idea back when you could change multiple times per minute to always pick the highest payout coin to static mine.
Pick a coin, when its not the highest anymore, swap to the new high coin.
But now that the system only allows you to change every 12 mins? or whatever it is now the bot wouldn't be able to swap but 4 times per hour.
With the time constraints put on the system not even worth modifying the bots we did have to keep running with that much of a time lapse.
We reserve the right to reenable the restrictions next week, depending on what we find.
Re: Write NiceHash bot, make lots of profit
So you can make more by targeting the highest payout coin while being in pps mode? Or are you talking about solo mining? I always thought that all shares were equal in pps mode.CSZiggy wrote:Think this was a better idea back when you could change multiple times per minute to always pick the highest payout coin to static mine.
Pick a coin, when its not the highest anymore, swap to the new high coin.
-
- Posts: 3
- Joined: Tue Mar 27, 2018 4:39 am
Re: Write NiceHash bot, make lots of profit
I am trying to connect to the wamp API using WampSharp implementation, but i am getting "AuthenticationException: A call to SSPI failed, see inner exception." on the line
this is the code i am using to connect. Is anybody able to help?
Code: Select all
IDisposable disposable = RunAsync().Result;
Code: Select all
public static void Main(string[] args)
{
IDisposable disposable = RunAsync().Result;
Console.ReadLine();
disposable.Dispose();
}
private static async Task<IDisposable> RunAsync()
{
DefaultWampChannelFactory channelFactory = new DefaultWampChannelFactory();
IWampClientAuthenticator authenticator;
authenticator = new WampCraClientAuthenticator(authenticationId: "web", secret: "web");
const string serverAddress = "wss://live.prohashing.com:443/ws";
IWampChannel channel =
channelFactory.CreateJsonChannel(serverAddress, "mining", authenticator);
channel.RealmProxy.Monitor.ConnectionEstablished +=
(sender, args) =>
{
Console.WriteLine("connected session with ID " + args.SessionId);
dynamic details = args.WelcomeDetails.OriginalValue.Deserialize<dynamic>();
Console.WriteLine("authenticated using method '{0}' and provider '{1}'", details.authmethod,
details.authprovider);
Console.WriteLine("authenticated with authid '{0}' and authrole '{1}'", details.authid,
details.authrole);
};
channel.RealmProxy.Monitor.ConnectionBroken += (sender, args) =>
{
dynamic details = args.Details.OriginalValue.Deserialize<dynamic>();
Console.WriteLine("disconnected " + args.Reason + " " + details.reason + details);
};
IWampRealmProxy realmProxy = channel.RealmProxy;
await channel.Open().ConfigureAwait(false);
IWampSubject topic =
realmProxy.Services.GetSubject("profitability_updates");
IDisposable disposable =
topic.Subscribe(OnTopic2);
return disposable;
}
private static void OnTopic2(IWampSerializedEvent serializedEvent)
{
int[] arguments =
serializedEvent.Arguments.Select(argument => argument.Deserialize<int>())
.ToArray();
string c =
serializedEvent.ArgumentsKeywords["c"].Deserialize<string>();
ComplexContract d =
serializedEvent.ArgumentsKeywords["d"].Deserialize<ComplexContract>();
var deserializedArguments =
new
{
arguments,
argumentsKeywords = new
{
c,
d
}
};
Console.WriteLine("Got event: args: [{0}], kwargs: {{ {1} }}",
string.Join(", ", deserializedArguments.arguments),
deserializedArguments.argumentsKeywords);
}
public class ComplexContract
{
[JsonProperty("counter")]
public int Counter { get; set; }
[JsonProperty("foo")]
public int[] Foo { get; set; }
public override string ToString()
{
return $"counter: {Counter}, foo: [{string.Join(", ", Foo)}]";
}
}
}
}
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Write NiceHash bot, make lots of profit
Look for the "innerException" property of that .NET exception and read its "message" property. That should tell you more about the issue.bitmonkeys wrote:I am trying to connect to the wamp API using WampSharp implementation, but i am getting "AuthenticationException: A call to SSPI failed, see inner exception." on the linethis is the code i am using to connect. Is anybody able to help?Code: Select all
IDisposable disposable = RunAsync().Result;
Code: Select all
public static void Main(string[] args) { IDisposable disposable = RunAsync().Result; Console.ReadLine(); disposable.Dispose(); } private static async Task<IDisposable> RunAsync() { DefaultWampChannelFactory channelFactory = new DefaultWampChannelFactory(); IWampClientAuthenticator authenticator; authenticator = new WampCraClientAuthenticator(authenticationId: "web", secret: "web"); const string serverAddress = "wss://live.prohashing.com:443/ws"; IWampChannel channel = channelFactory.CreateJsonChannel(serverAddress, "mining", authenticator); channel.RealmProxy.Monitor.ConnectionEstablished += (sender, args) => { Console.WriteLine("connected session with ID " + args.SessionId); dynamic details = args.WelcomeDetails.OriginalValue.Deserialize<dynamic>(); Console.WriteLine("authenticated using method '{0}' and provider '{1}'", details.authmethod, details.authprovider); Console.WriteLine("authenticated with authid '{0}' and authrole '{1}'", details.authid, details.authrole); }; channel.RealmProxy.Monitor.ConnectionBroken += (sender, args) => { dynamic details = args.Details.OriginalValue.Deserialize<dynamic>(); Console.WriteLine("disconnected " + args.Reason + " " + details.reason + details); }; IWampRealmProxy realmProxy = channel.RealmProxy; await channel.Open().ConfigureAwait(false); IWampSubject topic = realmProxy.Services.GetSubject("profitability_updates"); IDisposable disposable = topic.Subscribe(OnTopic2); return disposable; } private static void OnTopic2(IWampSerializedEvent serializedEvent) { int[] arguments = serializedEvent.Arguments.Select(argument => argument.Deserialize<int>()) .ToArray(); string c = serializedEvent.ArgumentsKeywords["c"].Deserialize<string>(); ComplexContract d = serializedEvent.ArgumentsKeywords["d"].Deserialize<ComplexContract>(); var deserializedArguments = new { arguments, argumentsKeywords = new { c, d } }; Console.WriteLine("Got event: args: [{0}], kwargs: {{ {1} }}", string.Join(", ", deserializedArguments.arguments), deserializedArguments.argumentsKeywords); } public class ComplexContract { [JsonProperty("counter")] public int Counter { get; set; } [JsonProperty("foo")] public int[] Foo { get; set; } public override string ToString() { return $"counter: {Counter}, foo: [{string.Join(", ", Foo)}]"; } } } }
-
- Posts: 3
- Joined: Tue Mar 27, 2018 4:39 am
Re: Write NiceHash bot, make lots of profit
Hi Steve,
Thanks for the reply, it's saying "the function requested is not supported". Really not too sure where to go from here. I have added the NuGet packages for WAMPsharp, and followed the examples they have to subscribe to a WAMP API.
Thanks for the reply, it's saying "the function requested is not supported". Really not too sure where to go from here. I have added the NuGet packages for WAMPsharp, and followed the examples they have to subscribe to a WAMP API.
-
- Posts: 13
- Joined: Sat Sep 16, 2017 1:36 am
Re: Write NiceHash bot, make lots of profit
Was anyone able to get a Connection for this to Function?