Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Quickly Integrate With A Bitcoin Cryptocurrency Exchange API With Delphi 10.2.2 For Android And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSIntegrating with Bitcoin Cryptocurrency exchange APIs can sound like a daunting task but it was relatively easy to do with Delphi and FireMonkey. Unless you have been living under a rock you probably know that Bitcoin and other cryptocurrency have really seen a surge in value throughout 2017. If you HAVE been living under a rock you can check out this newbies guide to bitcoin and cryptocurrency. GDAX is an exchange owned by the popular Coinbase company. I literally built a REST client that talks to the GDAX API in 5 minutes and was able to start downloading the list of currencies on the exchange and getting price quotes for a currency. This is the first step to building an automated trading client, bot, or AI for cryptocurrencies. In addition to that because I used FireMonkey that same app client will deploy to Android, IOS, Mac, and Windows with a single code base and single UI.

You can check out the documentation for GDAX for yourself to see the rest of the REST API end points. I grabbed the products endpoint and the products book endpoint and used those two endpoints in the REST Debugger┬áto quickly and easily download the data and LiveBind it to controls in my Delphi client. The first /products/ API I used directly because it doesn’t have any parameters. Once you select one of the cryptocurrency pairs at runtime it will use that for the next request to the /products/{currency}/book endpoint. The variable there can be set using code like the below and then it will automatically be filled in when the RESTRequest is executed (it is of type pkURLSEGMENT). The “/products/{currency}/book” string goes in the Resource property of the TRESTRequest component. I ended up only writing three lines of code for the whole app.

procedure TForm1.Button1Click(Sender: TObject);

procedure TForm1.Button2Click(Sender: TObject);
RESTRequest2.Params.ParameterByName('currency').Value := Edit1.Text;

I also applied the Jet premium style (which gives the dark look to the client). As you can see in the screenshot I am also running the new dark theme in Delphi 10.2.2. It is really easy to get started using Delphi as a platform for creating your own bitcoin cryptocurrency AI bot GUI apps. You could also use Python on the back and just have Delphi execute your various Python commands if you already have a command line based Python cryptocurrency trading bot.

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Download the full source code for the GDAX Quotes Bitcoin cryptocurrency REST API client app source code for Delphi 10.2.2 on Android and IOS.


Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed

Leave a Reply