Skip to content

Commit 9f6edbc

Browse files
committed
updated README
1 parent 70dcf3b commit 9f6edbc

1 file changed

Lines changed: 57 additions & 13 deletions

File tree

README.md

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# **client-rust-fix**
2-
## Rust Client for trading on [https://power.trade](power.trade) crypto exchange
2+
## Rust Client for trading on [power.trade](https://power.trade) crypto exchange
33

44
[![Rust](https://github.com/laisee/client-rust-fix/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/laisee/client-rust-fix/actions/workflows/rust.yml)
55
[![CI](https://github.com/laisee/client-rust-fix/actions/workflows/ci.yml/badge.svg)](https://github.com/laisee/client-rust-fix/actions/workflows/ci.yml)
@@ -8,29 +8,29 @@
88
![MSRV](https://img.shields.io/badge/MSRV-1.86.0-orange)
99

1010
Rust client for power.trade Fix protocol.
11-
Implements authentication and basic order management(add single order, cancel single order).
11+
Implements authentication and basic order management (add single order, cancel single order) and RFQ (Request For Quote) functionality.
1212

1313
## Features
1414
* Establishes a TLS FIX session and performs logon to the Power.Trade exchange.
1515
* Signs JWTs with your API keys to authenticate FIX connections.
16-
* Provides utilities for building FIX messages including NewOrderSingle and OrderCancelRequest.
17-
* Scenario driven main executable that can place or cancel orders or send RFQ messages based on environment variables.
16+
* Provides utilities for building FIX messages including NewOrderSingle, OrderCancelRequest, and RFQ messages.
17+
* Scenario-driven main executable that can place or cancel orders or send RFQ messages based on environment variables.
1818
* Integration test validates the structure of generated FIX messages without connecting to the exchange.
1919

2020
See [list of issues](https://github.com/laisee/client-rust-fix/issues) for the planned set of enhancements and features.
2121

22-
See [here](https://power-trade.github.io/api-docs-source/fix_order_entry.html) for Power.Trade Single Leg Order Fix message specification(Fix MsgType='D')
22+
See [here](https://power-trade.github.io/api-docs-source/fix_order_entry.html) for Power.Trade Single Leg Order Fix message specification (Fix MsgType='D')
2323

24-
See [here](https://power-trade.github.io/api-docs-source/fix_order_entry.html#_introduction) for Power.Trade Drop Copy Fix message specification(Fix MsgType='8')
24+
See [here](https://power-trade.github.io/api-docs-source/fix_order_entry.html#_introduction) for Power.Trade Drop Copy Fix message specification (Fix MsgType='8')
2525

2626
Power.Trade API home page can be found [here](https://support.power.trade/api/api-overview)
2727

2828
## Getting Started
2929
1. Install Rust on device where client will be running.
3030

31-
See [https://www.rust-lang.org/tools/install](here) for instructions on installation using Rustup.
31+
See [Rust installation instructions](https://www.rust-lang.org/tools/install) for instructions on installation using Rustup.
3232

33-
See [https://forge.rust-lang.org/infra/other-installation-methods.html](here) for other installation methods.
33+
See [alternative installation methods](https://forge.rust-lang.org/infra/other-installation-methods.html) for other installation methods.
3434

3535
2. Check that Rustup has installed and configured **1.86** as the default version by typing the following command in a console/terminal window
3636
```
@@ -53,10 +53,18 @@ Power.Trade API home page can be found [here](https://support.power.trade/api/ap
5353
- `PT_PEM_FILE` - path to your client PEM file
5454
- `PT_PUBKEY_FILE` - path to your public certificate
5555
- `PT_SCENARIO` - scenario to run (`ORDER`, `ORDERS`, `RFQ_QUOTE`, `RFQ_LISTEN`)
56-
- `PT_LISTEN_EPOCH` - listen epoch value
57-
- `PT_PUBLISH_EPOCH` - publish epoch value
58-
- `PT_HEARTBEAT_COUNT` - number of heartbeats
56+
- `PT_LISTEN_EPOCH` - number of epochs to listen for responses (for RFQ_LISTEN)
57+
- `PT_PUBLISH_EPOCH` - number of epochs to listen after publishing (for RFQ_QUOTE)
58+
- `PT_HEARTBEAT_COUNT` - number of heartbeats to send
5959
- `PT_HEARTBEAT_INTERVAL` - seconds between heartbeats
60+
- `PT_SYMBOL` - trading symbol (e.g., "BTC-USD")
61+
- `PT_PRICE` - order price
62+
- `PT_QUANTITY` - order quantity
63+
- `PT_SIDE` - order side ("BUY" or "SELL")
64+
- `PT_ORDER_TYPE` - order type ("LIMIT" or "MARKET")
65+
- `PT_CANCEL_ORDER` - whether to cancel the order after placing it ("true" or "false")
66+
- `PT_LOG_FILE` - path to log file
67+
- `PT_TARGET_COMP_ID` - target company ID for FIX messages
6068

6169
5. Build the project
6270

@@ -77,5 +85,41 @@ Power.Trade API home page can be found [here](https://support.power.trade/api/ap
7785
cargo run -- --env test
7886
```
7987
8. Review console output and log files (see `app.log` in the same folder) to view client activity
80-
81-
88+
89+
## Available Scenarios
90+
91+
The client supports several scenarios that can be configured using the `PT_SCENARIO` environment variable:
92+
93+
- `ORDER` - Send a single order based on the configured parameters
94+
- `ORDERS` - Send multiple orders (currently sends a single order, but can be extended)
95+
- `RFQ_QUOTE` - Send an RFQ quote request and listen for responses
96+
- `RFQ_LISTEN` - Subscribe to RFQ updates and listen for incoming quotes
97+
98+
## Command Line Arguments
99+
100+
The client supports the following command line arguments:
101+
102+
- `--env <ENVIRONMENT>` - Set the runtime environment (development, test, production)
103+
104+
Example:
105+
```
106+
cargo run -- --env test
107+
```
108+
109+
## Logging
110+
111+
The client logs information to both the console and a log file specified by the `PT_LOG_FILE` environment variable. The log file contains detailed information about the client's operation, including sent and received FIX messages.
112+
113+
## Development
114+
115+
To contribute to the project, please follow these steps:
116+
117+
1. Fork the repository
118+
2. Create a feature branch
119+
3. Make your changes
120+
4. Run tests and linting: `cargo test && cargo clippy`
121+
5. Submit a pull request
122+
123+
## License
124+
125+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

0 commit comments

Comments
 (0)