By Admin on Wednesday, 14 July 2021
Category: All

Delphi CryptoHopper Client

​From sgcWebSockets 4.5.1 CryptoHopper API is partially supported. CryptoHopper it's an automated crypto trading bot that allows to automate trading and portfolio management for Bitcoin, Ethereum, Litecoin and more.

Configuration 

​Requires a Developer Account and once you have been approved you can start to create a new App. The API uses OAuth2 to authenticate, so you can retrieve the client_id and client_secret from your App.

Methods 

CryptoHopper uses HTTPs as the protocol to send Requests to the API. Some methods requires authentication (place orders, retrieve user data...) and some others are public (get exchange data for example).

The functions returns the CryptoHopper response and if there is any error an exception will be raised.

Some of the methods supported are the following:

How update Hopper Configuration 

​Use the UpdateHopper method to update the Hopper Configuration. The method is overloaded so you can pass the JSON string or use the object TsgcHTTPCTHopper and use the properties to enable or disable the Hopper Properties.

How configure Webhook 

Webhook allows to receive notifications when something happens in a hopper. Webhooks require a public HTTPs Server which will listen in a URL address all messages sent by cryptohopper. The public server needs to be protected with a SSL certificate (self-signed certificates are not allowed).

First you must create a webhook, so configure the Webhook property of Cryptohopper client setting the Host and Port when the server will be listening. Then configure the certificate in SSLOptions property.

Example: The public IP address will be 1.1.1.1 and the listening port will be 443. The certificate is stored as PEM file with sgc.pem filename and without password.

Related Posts