ctrader-fix 0.4.1

A rust implementation of the cTrader FIX API.
Documentation

cTrader FIX API in Rust

This project is currently in active development and is not yet ready for production use.

This is a Rust implementation of the FIX API for the cTrader trading platform. It's built using the async-std library, providing an asynchronous and simple interface for interacting with the cTrader platform through the Financial Information eXchange (FIX) protocol.

Cargo Features

This crate allows you to use tokio runtime featured in async-std by specifying features in your Cargo.toml. By default, it uses async-std with the attributes feature.

To use the crate with the default configuration, add the following line to your Cargo.toml:

ctrader-fix = "0.4"

To use a specific Tokio configuration, specify the feature like this:

ctrader-fix = { version = "0.4", features = ["tokio1"] }

Available Features

  • default: Uses async-std with the unstable feature.
  • tokio1: Uses async-std with the unstable and tokio1 features.
  • tokio02: Uses async-std with the unstable and tokio02 features.
  • tokio03: Uses async-std with the unstable and tokio03 features.

Please note that you should only enable one of these features at a time.

To-Do

  • Base FixApi Implementation
  • Base Requests
  • Example code
    • Connect
    • Send logon
    • Send logout
    • Disconnect
  • Handle responses
    • Implement response structure
    • Implement response handler - notify
  • Add Error struct using thiserror
  • MarketClient
    • Internal Market data Callback
    • Parsing response message.
    • Subscribe the symbol for spot
    • Implement the check the request has accepted method.
    • Test for parsing market datas
    • Unsubscribe the symbol for spot
    • Subscribe the symbol for depth
    • Unsubscribe the symbol for depth
    • Parsing the spot market data in callback
    • Add quote spot data method
    • Parsing the depth market data in callback
    • Parsing the incremental market data in callback
    • Market data handler in example code.
    • Fix callback method for subscription - waiting constantly in subscription method when market is closed
  • FIXED identify with message type and id - issue identify the response with sequence number
  • FIXED the issue of heartbeat.
  • TradeClient
    • Add fetch methods
    • Implement fetch_security_list to fetch the security list
    • Implement fetch_positions
    • Implement fetch_all_order_status
    • Implement new_market_order
    • Implement new_limit_order
    • Implement new_stop_order
    • Implement parse_func for ExecutionReport
    • Implement cancel_order
    • Implement replace_order
    • Implement adjust_position_size
    • Implement close_position
    • Added timeout in request methods.
    • FIXED issue unhandled trade message (deadlock)
    • Add handler for trade execution.
    • FIXED data parsing issue in Socket.

License

This project is licensed under the MIT License - see the LICENSE file for details.