You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
12
12
13
13
## Features
14
14
* Establishes a TLS FIX session and performs logon to the Power.Trade exchange.
15
15
* Signs JWTs with your API keys to authenticate FIX connections.
16
-
* Provides utilities for building FIX messages including NewOrderSingleand OrderCancelRequest.
17
-
* Scenariodriven 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.
18
18
* Integration test validates the structure of generated FIX messages without connecting to the exchange.
19
19
20
20
See [list of issues](https://github.com/laisee/client-rust-fix/issues) for the planned set of enhancements and features.
21
21
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')
23
23
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')
25
25
26
26
Power.Trade API home page can be found [here](https://support.power.trade/api/api-overview)
27
27
28
28
## Getting Started
29
29
1. Install Rust on device where client will be running.
30
30
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.
32
32
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.
34
34
35
35
2. Check that Rustup has installed and configured **1.86** as the default version by typing the following command in a console/terminal window
36
36
```
@@ -53,10 +53,18 @@ Power.Trade API home page can be found [here](https://support.power.trade/api/ap
53
53
-`PT_PEM_FILE` - path to your client PEM file
54
54
-`PT_PUBKEY_FILE` - path to your public certificate
55
55
-`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
59
59
-`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
60
68
61
69
5. Build the project
62
70
@@ -77,5 +85,41 @@ Power.Trade API home page can be found [here](https://support.power.trade/api/ap
77
85
cargo run -- --env test
78
86
```
79
87
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