semvec/pypi-packages huggingface dataset:
ctrader-fix 0.1.1
A Python package for interacting with cTrader FIX API
License: MIT
Requires Python: >=3.8,<4.0

# cTraderFixPy


[![PyPI version](https://badge.fury.io/py/ctrader-fix.svg)](https://badge.fury.io/py/ctrader-fix)
![versions](https://img.shields.io/pypi/pyversions/ctrader-fix.svg)
[![GitHub license](https://img.shields.io/github/license/spotware/cTraderFixPy.svg)](https://github.com/spotware/cTraderFixPy/blob/main/LICENSE)

A Python package for interacting with cTrader FIX API.

This package uses Twisted and it works asynchronously.

- Free software: MIT
- Documentation: https://spotware.github.io/cTraderFixPy/.


## Features

* Works asynchronously by using Twisted

* Allows you to easily interact with cTrader FIX API and it manages everything in background

* Generate FIX message by using Python objects

## Insallation

```
pip install ctrader-fix
```

# Config

Config file sample:

```json
{
  "Host": "",
  "Port": 0,
  "SSL": false,
  "Username": "",
  "Password": "",
  "BeginString": "FIX.4.4",
  "SenderCompID": "",
  "SenderSubID": "QUOTE",
  "TargetCompID": "cServer",
  "TargetSubID": "QUOTE",
  "HeartBeat": "30"
}
```

# Usage

```python
from twisted.internet import reactor
import json
from ctrader_fix import *

# Callback for receiving all messages
def onMessageReceived(client, responseMessage):
    print("Received: ", responseMessage.getMessage().replace("", "|"))
    messageType = responseMessage.getFieldValue(35)
    if messageType == "A":
        print("We are logged in")

# Callback for client disconnection
def disconnected(client, reason): 
    print("Disconnected, reason: ", reason)

# Callback for client connection
def connected(client):
    print("Connected")
    logonRequest = LogonRequest(config)
    send(logonRequest)

# you can use two separate config files for QUOTE and TRADE
with open("config-trade.json") as configFile:
    config = json.load(configFile)

client = Client(config["Host"], config["Port"], ssl = config["SSL"])

# Setting client callbacks
client.setConnectedCallback(connected)
client.setDisconnectedCallback(disconnected)
client.setMessageReceivedCallback(onMessageReceived)
# Starting the client service
client.startService()
reactor.run()
```

Please check documentation or samples for a complete example.

## Dependencies

* <a href="https://pypi.org/project/twisted/">Twisted</a>
ExtremeLy 2.3.0
Extrem value Analysis in Python
License: MIT
Requires Python: >=3.8
Keywords: Extreme Value Analysis,Block Maxima,Peak-Over-Threshold,Generalized Extreme Value Distribution (GEV),Generalized Pareto Distribution (GPD)

# ExtremeLy

ExtremeLy is a python package for Extreme Value Analysis. It was found that there are not many packages for EVA in python. 
Among existing packages some of them were incomplete, some of them were internally using R packages and some had only 
basic implementations without any plots for model assessment. So ExtremeLy brings all those packages together, removes 
R dependencies and provides most of the fucntionalities for EVA in pythonwithout being dependent on R packages. Some 
fucntionalities from the already existing packages have been usedas they are, some have been modified to accomodate 
additional requirements and for some just the R dependenciesare replaced with python implementation. 
The three already existing packages that are used here are:

   1. scikit-extremes skextremes - https://scikit-extremes.readthedocs.io/en/latest/
   2. thresholdmodeling - https://github.com/iagolemos1/thresholdmodeling
   3. evt - https://pypi.org/project/evt/#description

## Dependencies
   evt package will be downloaded with ExtremeLy package itself, threshmodeling is not required as it requires R environment 
   to run its functionalities. Those R dependencies have been removed in ExtremeLy. We still need to install skextremes before we can use ExtremeLy. 
   Scikit-extremes (skextremes) also has a dependency called lmoments3 which needs to be installed. These two libraries can be installed this way:
      
      pip install git+https://github.com/OpenHydrology/lmoments3.git

      git clone https://github.com/kikocorreoso/scikit-extremes.git

      cd scikit-extremes

      pip install -e .
 
 Now we are good to go and install ExtremeLy :)
 
 ## Installation
     pip install ExtremeLy
 
 ## Click [here](https://surya-lamichaney.github.io/ExtremeLy/) for the Documentation and [here](https://github.com/SURYA-LAMICHANEY/ExtremeLy/blob/main/Examples.ipynb) for example notebook.