octopus-cli

Crates.iooctopus-cli
lib.rsoctopus-cli
version0.2.0
sourcesrc
created_at2023-06-04 01:40:38.099791
updated_at2023-06-12 09:29:15.550457
descriptionTrading engine CLI for submitting and matching orders. 🐙
homepage
repositoryhttps://github.com/richo225/octopus
max_upload_size
id881942
size52,030
Richard Bates (richo225)

documentation

README

Octopus

Trading CLI and engine for submitting and matching orders. 🐙

Built with Rust, consuming a Warp API and hosted on Railway.

demo

Installation

Cargo

Install the rust toolchain in order to have cargo installed by using this guide. Then install the cli crate with the following;

cargo install octopus-cli

You can also install the crate by cloning this repository and building it using Cargo. Run the following commands in your terminal:

Build

git clone https://github.com/richo225/octopus.git
cd octopus
cargo build --target octopus_cli --release

After a successful build, the binary will be available in the target/release directory.

Usage

To run the crate, use the following command in your terminal:

octopus-cli

If you would like to run the octopus server locally, execute the binary with:

RUST_LOG=trace cargo run --bin octopus-web

And then run the CLI, pointing to the local server:

cargo run --bin octopus-cli -- http://localhost:8080

Full documentation for the engine can be found at https://docs.rs/octopus-engine/0.1.0/octopus_engine/

Commands

deposit

Allows users to create an account or deposit funds into an existing account.

withdraw

Withdraw funds from a users account.

send

Send funds to another user's account.

submit_order

The submit_order command enables users to submit an order for processing by the engine. A receipt will be returned along with any matches.

orderbook

Retrieves the current order book.

account

Retrieves the user's account balance.

txlog

The txlog command retrieves the entire transaction log on the platform.

Testing

To run the tests for the crate, use the following command in your terminal:

cargo test

This will execute the test cases for both the cli and engine and provide you with the test results.

Contributing

Contributions are welcome! If you find a bug, have a feature request, or want to contribute code, please follow the guidelines in the contributing file.

License

This crate is licensed under the MIT License.

Commit count: 106

cargo fmt