Metadata-Version: 2.2
Name: pricefeed
Version: 0.1.2
Summary: A generic pricefeed generator with configurable deliveries and statistical info on prices generated.
Author-email: Toon Leijtens <toon.leijtens@gmail.com>
Maintainer-email: Toon Leijtens <toon.leijtens@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Toon Leijtens
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: pricefeed,simulator,stock,statistics,price,simulation
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# PriceFeed

This is a generator for random price feeds that can be used to generate a new
price at will or at predefined time intervals. The PriceFeed object will also
maintain statistics on all the prices that it generated.

A typical use-case is in a development environment where you would like to
mimic a pricefeed.

You can install the package via **PyPI** or from **source**.

### Install from PyPI

```bash
pip install pricefeed
```

### Install from Source (GitHub)

```bash
git clone https://github.com/smart-t/pricefeed.git
cd pricefeed
pip install .
```

### Example: How to use this package

```bash
import pricefeed as pf

AAPL_ticker = pf.Pricefeed("AAPL", 235.0, 500, 0.001)
for i in range(10):
  print(f"{i} : {next(AAPL_ticker)}")
```

The above script will generate a new price every 500 miliseconds and completes
a list with 10 simulated 'AAPL' stock prices starting at $235.0. The 4th
argument is used to indicate how volatile the stock movement will be.

The generated prices are designed to stay relatively close to the given start
price.

The third and fourth properties (delay and vol) are optional, and if not
provided they default to `1000ms` (`1sec`) and a volatility of `0.01`.

## Contributions

This is an opensource project where you are invited to contribute and help
evolve the pricefeed as we go.
