Jump to content
xrp-overflow

Bot trading with Gatehub

Recommended Posts

1 hour ago, tulo said:

I have zero experience with GUI except C#.


This is a full framework in c#. All the bells and whistles. 

I made my own api that communicates by websockets I highlighted the api in red. It will look very familiar. The api is task based. 

 

void Button5_Clicked (object sender, EventArgs e)
		{

			RippleWallet rw = _rippleWallet;

			string destination_account = comboboxentry1.Entry.Text;

			string amount = comboboxentry2.Entry.Text;
			string currency = comboboxentry3.Entry.Text;
			string issuer = comboboxentry4.Entry.Text;


			Decimal amountd = 0;
			Decimal? dee = RippleCurrency.ParseDecimal (amount);  // Payment amount is not a valid string ect
			if (dee != null) {
				amountd = (decimal)dee;
			} else {
				MessageDialog.ShowMessage ("Payment Amount is formatted incorretly");
				return;
			}

			if (amountd < 0) {
				MessageDialog.ShowMessage ("Sending negative amounts is not supported. Please enter a valid amount");
				return;
			}

			RippleCurrency rc = new RippleCurrency (amountd, issuer, currency);

			//Thread thread = new Thread (
			Task.Run (
				delegate {
					NetworkInterface ni = NetworkController.GetNetworkInterfaceNonGUIThread ();
					if (ni == null) {
						return;
					}
					Task<Response<PathFindResult>> task = PathFind.GetResult (
						rw.GetStoredReceiveAddress (),
						destination_account,
						rc,
						ni

					);


					if (task == null) {
						return;
					}

					task.Wait ();


					Response<PathFindResult> response = task.Result;
					if (response == null) {

						SetInfoBar ("response == null");
						return;
					}

					if (response.HasError ()) {
						StringBuilder stringBuilder = new StringBuilder ();
						stringBuilder.Append (nameof (response.error_code));
						stringBuilder.Append (" : ");
						stringBuilder.Append (response.error_code.ToString () ?? "null");
						stringBuilder.Append (" ");
						stringBuilder.Append (nameof (response.error_message));
						stringBuilder.Append (" : ");
						stringBuilder.Append (response.error_message);

						SetInfoBar (stringBuilder.ToString ());

					}


					PathFindResult result = response.result;
					if (result == null) {
						SetInfoBar ("response == null");
						return;
					}
					this.pathstree1.SetPathFindResult (result);
				}
			);
			//);

			//thread.Start ();











		}

 

ihildawallerman.png

pathfindapi.png

Share this post


Link to post
Share on other sites
22 hours ago, tulo said:

Really? Well no tips for the competitors....joking :).

I'm working on beyond state of the art algorithms for all negatives cycles detection and generalized max flows to build the final arbitrage bot :wizard:. Market making is not going very well...especially on XRPL.

What I find awful right now is the low quality APIs offered by exchanges...any tip on that?

Cheers man. I am glad to hear you are doing well. Yeah market making sounds like ? for the moment. It will come back. 

I do agree with you on the low quality APIs, above all when you know that not every exchange proposes WebSocket... ^^

Edited by Lumpy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...