https://github.com/roq-trading/roq-python-samples
Python examples.
https://github.com/roq-trading/roq-python-samples
api demo example python
Last synced: 3 months ago
JSON representation
Python examples.
- Host: GitHub
- URL: https://github.com/roq-trading/roq-python-samples
- Owner: roq-trading
- License: mit
- Created: 2024-05-27T12:09:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-27T10:06:22.000Z (about 1 year ago)
- Last Synced: 2024-12-27T11:18:46.336Z (about 1 year ago)
- Topics: api, demo, example, python
- Language: Python
- Homepage: https://roq-trading.com/
- Size: 60.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# roq-python-samples
Example projects demonstrating how to use Roq's Python bindings.
## Operating Systems
* Linux (x86-64, AArch64)
* macOS (Arm64, x86-64)
## Library/Package Dependencies
* [fastcore](https://github.com/fastai/fastcore) (Apache 2.0 License)
## Installing
If you just want to install the project.
### Stable Channel
```bash
conda install -y --channel https://roq-trading.com/conda/stable roq-python-samples
```
### Unstable Channel
```bash
conda install -y --channel https://roq-trading.com/conda/unstable roq-python-samples
```
## Prerequisites
If you want to build from source.
Install Roq's Python bindings
### Stable Channel
```bash
conda install -y --channel https://roq-trading.com/conda/stable roq-python
```
### Unstable Channel
```bash
conda install -y --channel https://roq-trading.com/conda/unstable roq-python
```
### Third-party
Some examples use the `@typedispatch` decorator from the [fastcore](https://github.com/fastai/fastcore) library
```bash
conda install -y fastcore
```
## Building
If you want to build from source.
```bash
python setup.py clean --all && python -m pip install . -vvv
```
## Using
### Strategy
Demonstrates how to set up a gateway client
* Implements the callback handlers
* Sends requests using the dispatcher interface
```bash
python -m roq_samples.strategy ~/run/deribit.sock
```
### FIX Session
Demonstrates how to set up a FIX client session
```bash
python -m roq_samples.fix_session \
--sender_comp_id xxx \
--target_comp_id yyy \
--username foo \
--password bar \
--network_address $HOME/run/fix-bridge.sock
```
### SBE Receiver
Demonstrates how to maintain market data from SBE incremental / snapshot multicast feeds
```bash
python -m roq_samples.sbe_receiver \
--local_interface 192.168.188.66 \
--multicast_snapshot_address 225.0.0.1 \
--multicast_snapshot_port 1234 \
--multicast_incremental_address 225.0.0.1 \
--multicast_incremental_port 2345
```
## License
The project is released under the terms of the BSD 3-Clause license.
## Links
* [Roq GmbH](https://roq-trading.com/)
* [Documentation](https://roq-trading.com/docs/)
* [Contact us](mailto:info@roq-trading.com)