Blockchain-based decentralized exchanged (DEX) are slightly different to centralized exchanges and as a consequence, dealing with the DEX programmatically via APIs differs from centralized approaches as well. However, our developers have put quite some efforts into making the DEX as easy to use as their centralized counterparts and offer an API to the public exchange data that is very similar. However, private exchange APIs are different due to the fact that no entity except yourself can access your funds. For this reason, trading in the DEX requires that you have the private key to your account installed in an application that can construct and sign the corresponding transactions for you. One of these applications is the CLI Wallet which, after installation and configuration, offers a your own private API.
The best way to get public data on markets is via websocket connection to a public full-node which provides traders with
- a ticker
- order books
- trade history
- and more.
BitShares Public Full Nodes:
A detailed description of how to interface with Graphene-based blockchain (e.g. BitShares) and a list of available calls can be found here:
As briefly mentioned above, trading in the DEX programmatically requires that you run your own CLI Wallet. The following tutorials gives a brief introduction on how to use the CLI wallet and configure it properly so that it can be used as a private API server:
After installation and configuration of the private API, we can use RPC to create orders, cancel orders, create and adjust call orders, and more. The CLI wallet offers a wide range of calls that can be used to mange your account and trade in the DEX: