HollaEx®
⚙️ DashboardStart →
  • HollaEx® — The Crypto Exchange Solution
  • ☁️Cloud Operators
    • Launching the Exchange
    • Setting Domain for Cloud Exchanges
    • Easy SMTP for Cloud Exchanges
    • SEO Settings for Cloud Exchanges
      • SEO Advanced Settings
  • ⚙️Operating Your Exchange
    • Operator Control Panel
      • General
      • Users
      • User Profile
      • Assets
      • Markets
      • Stakes
      • Sessions
      • Plugins Apps
      • Trading Fees & Account Tiers
      • Roles
      • Chat
      • Billing
    • Customize Exchange
      • Browser Tools
        • Enter Edit Mode
        • Operator Controls (Visuals)
        • Console
      • Plugins
      • Forked Repo
    • Fiat Controls
      • Initial Setup
      • Setting Up Fiat On/ Off Ramp
      • Editing Deposit & Withdrawal Fees
      • Users Making Fiat Deposit
      • Users Trading With Fiat
      • User Making Fiat Withdrawal
    • Staking
    • OTC Broker
    • P2P
      • P2P Overview
      • P2P Setup
      • P2P Troubleshooting
      • P2P Vendor Flow
    • Smart Chain Trading
    • Assets & Trading Pairs
      • Add New Assets & Trading Pairs
      • Configure Pair Parameters
    • Set up the SMTP Email
      • Set up SMTP with AWS SES
      • Set up SMTP with Mailgun
      • Set up SMTP with SendGrid
      • Test the SMTP with Gmail
    • Enabling reCAPTCHA
    • Email Customization & Audit
    • DeFi Asset Staking Process
  • 🧩Plugins
    • HollaEx Plugins
      • Announcements
      • Bank
      • AWS SNS (Text Messages - SMS)
      • KYC
      • Automatic KYC
      • Messente
      • Advanced Referral
      • CoinMarketCap
      • Guardarian
    • Install Plugins
    • Developing Plugins
      • Development Walkthrough: Hello-Plugin
        • Initialization
        • Configuration
        • Scripting
        • Web View
        • The Final Product & Installation
      • Advanced
        • Initialization
        • Config
        • Server Script
        • Plugin Libraries
        • Web View
        • Final Plugin Product
        • Advanced Tutorial: Using the user meta field
        • Advanced Tutorial: Adding a new database table column
        • Advanced Tutorial: Creating a new database table
      • Simple Wallet Example
      • Web View Development
        • Overview
        • External dependencies
        • Getting started
        • Basic Tutorial: Hello Exchange Plugin web view
        • Advanced Tutorial: KYC Plugin web views
    • Bank Integration
      • Handling Deposits
      • Handling Withdrawals
  • 👷Developers
    • API Guide
      • API Example Scripts
    • Run Dev Mode
    • Build a New Front-end Interface
  • 🧰On-Premise Operators (Advanced Only)
    • On-Premise Exchange Setup
      • Getting Started — Requirements
      • Installation
      • Server Setup
      • Web Setup
      • Production
    • CLI How-Tos
      • Start Exchange
      • Stop Exchange
      • Upgrade Exchange
        • Build and Apply the Code Changes
      • Get Exchange Logs
      • Get a Backup and Restore
      • Exchange Migration
      • Command List
    • Run Exchange on Kubernetes
    • Troubleshooting Guide
  • 🚀Advanced
    • SEO Optimization
    • Nginx
    • Rate Limits
    • Database
      • Upgrade Database
    • Dependencies
    • Contents Delivery Network
      • Cloudflare CDN for HollaEx
      • CloudFront CDN for HollaEx
    • Load Balancer
      • AWS ELB
      • DigitalOcean LB
    • Customize Kubenretes Ingress
    • Exchange Keys
      • Exchange API Keys Troubleshoot
    • HollaEx on non-Linux
      • HollaEx on Windows
      • HollaEx on macOS
    • The Network Tool Library
      • Accessing the Network Tool Library
      • Functions
        • WebSocket
      • Simple Example: Creating a User and Wallet
      • Getting More Interesting: Orders with the Tools
        • Setup: Using the transferAsset function
        • Creating and Monitoring a Sell Order
        • Settling Fees
      • Private HollaEx Network
    • Docker Content Trust (DCT)
    • Revenue Sharing
  • 📦Releases
    • Release Notes
    • Side Notes
  • ➡️External Links
  • Blogs
  • Forum
  • Videos
  • Twitter X
  • Telegram
  • Interactive Demo
  • Discord Community
  • API Documentation
  • Tools Library Documentation
  • Node Library Documentation
  • Plugins Documentation
Powered by GitBook
On this page
  1. Advanced
  2. The Network Tool Library

Getting More Interesting: Orders with the Tools

In this tutorial lets deal with something a little more involved, creating and monitoring trades through two users with the Network Tools

PreviousSimple Example: Creating a User and WalletNextSetup: Using the transferAsset function

Last updated 2 years ago

Let’s try something a bit more fun. Now with users on our exchange, let's see how we can facilitate trades using the network tools.

Since this script will have a little more complexity to it, I am going to be splitting it into a few sections and files so we can see what is going on at each stage.

At the end, a complete script will be provided for enabling and monitoring trade between two users (you can skip to there if you don't want the guided tour).

The possibilities are endless in how you want to integrate the HollaEx Network into your own service, here I will be taking this general hardcoded approach for explanation's sake. The sky is the limit though in how you work with the Tools.

Goals for this Script

For the sake of reference, these are the rough steps we will take in this tutorial.

Some of these steps are not required for facilitating a sell or buy order, but to show off some more of the feature of the network tools, as well as due to the fact I am running these commands on a test exchange and so a little setup is required.

The main commands we are using are also listed, alongside their step.

  1. Interact with three accounts (Admin and two users)

    • Account A and B have been created with a similar script to the previous tutorial and given wallets we need for trades

  2. Transfer from the Admin account XHT to user A, and USDT to user B

    • transerAsset

  3. From account A create a sell order for 10 XHT and a buy order for Account B for 10 XHT

    • createOrder

  4. Observe this order

    • getOrder

    • getOrders

  5. See the values in our users' wallets now the trade has occurred

    • getUser

  6. See our generated fees from the trade

    • getGeneratedFees

  7. Settle these fees to the admin account

    • settleFees

🚀
Our script will be even more simple than this I promise, I just like picture to break up text