Crates.io | octopus-engine |
lib.rs | octopus-engine |
version | 0.2.0 |
source | src |
created_at | 2023-06-04 01:38:25.874927 |
updated_at | 2023-06-12 09:26:58.205366 |
description | Trading engine algorithm library 🐙 |
homepage | |
repository | https://github.com/richo225/octopus |
max_upload_size | |
id | 881940 |
size | 47,839 |
Trading CLI and engine for submitting and matching orders. 🐙
Built with Rust, consuming a Warp API and hosted on Railway.
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:
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.
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/
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.
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.
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.
This crate is licensed under the MIT License.