Aphelion DEX Overview

The Aphelion DEX is powered by a fully decentralized smart contract. Funds in the contract always remain under the control of the private key(s) of the depositing address. The contract requires whitelisting of an address to perform deposits, but has no mechanism for inhibiting withdraws held by the exchange contract by the owning address. Users can therefore be certain that their funds will always remain unencumbered and under their control. The order book itself is maintained on chain inside the DEX contract storage.

After an address has been whitelisted, all DEX operations can be performed by directly interacting with the DEX smart contract (without a requirement to interact with any Aphelion servers). Aphelion servers provide an API to simplify interacting with the smart contract.

While Aphelion runs servers to facilitate offer matching, anyone running a full node could keep track of the order book by watching changes to contract storage and examining incoming transactions to the contract sent on the network. This means that while the use of Aphelion servers for order matching is convenient it is not an actual requirement for making trades on the Aphelion DEX.

Introduction to API Documentation

This API documentation is primarily geared toward interacting directly with the Aphelion DEX Smart contract. It also documents rest API calls to the Aphelion servers for operations such as discovering markets, obtaining ticker information and statistics, and obtaining matching orders.

This first iteration of API documentation, documents all the operations using javascript and neon-js. In the future an API library may be provided to reduce the required setup code and improve the user experience. Also, documentation for other languages besides javascript may be made available in the future.

A GitHub node.js project that begins to implement an aphelion-cli will also be made available soon to serve as an example for using this documentation. The aphelion-cli will facilitate calling DEX operations from other languages using a shell call until libraries can be built to provided direct support for DEX operations in other languages.

Use the left pane to navigate through the documentation DEX API documentation.