The client CLI allows users to interact and experiment with the server such as placing making, deposits and much more.
npm install @oax/client
npx oax [options] <command> [arguments]
init Creates a config.json with information needed to connect to the OAX Testnet.
Creates a new encrypted wallet and stores its file name in config.json for later use. Make sure to properly secure the wallet file and the password. Note that it is also possible to create an encrypted wallet using MyCrypto or other standard wallet applications.
Enters the CLI console mode. This mode allows users to enter commands without having to reconnect to the server each time. It is the recommended way to use the CLI.
Returns the Ethereum address of the wallet associated with the CLI. This is the address that will need to have funds before depositing into the exchange. It's also the address used to sign add client -> server messages and that will receive withdrawals.
Convenience function to convert test ETH to test OAX or test WETH. This works only against token contracts that allow send Ether to their default payable function in order to receive tokens.
Returns the balance of all assets for the user on the exchange.
Returns the balance of a specific asset in the user wallet, that has not been deposited into the exchange.
Returns the order book for a given asset pair e.g. OAX/WETH.
Returns all the executed trades for the user, for the given asset pair.
Returns the order for the given order ID.
Returns all active and completed orders for the user.
Creates a new buy or sell order for a given asset pair.
Cancels an active order.
Deposits a certain amount of asset from the user's wallet onto the exchange.
Requests a withdrawal from the exchange. This only initiates the request and the operator has a certain amount of time to validate the request.
Confirms a withdrawal and transfers the funds from the exchange to the user's wallet.
Note that all amounts are specified in ether units (eg. 1.25).
© 2019 OAX Foundation