Metadata-Version: 2.4
Name: ddx-python-mocks
Version: 0.1.0
Summary: Mock HTTP services for DDX Python: price‐feed fuzzer & KYC stub
Author: DEX Labs
Keywords: ddx,mock,flask,price-feed,kyc
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Flask
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: ddx-python<1.0.0,>=0.0.0
Requires-Dist: gunicorn<24,>=23.0.0
Requires-Dist: Flask<4.0,>=3.0
Requires-Dist: pydantic>=2.0
Requires-Dist: websockets<13,>=12.0
Requires-Dist: 0x-contract-wrappers<3,>=2.0.0
Requires-Dist: aiohttp<4,>=3.10.3
Requires-Dist: asyncpg<1,>=0.30.0
Requires-Dist: attrs<25,>=24.2.0
Requires-Dist: cattrs<24,>=23.2.3
Requires-Dist: coloredlogs<16,>=15.0.1
Requires-Dist: configargparse<2,>=1.7
Requires-Dist: numpy<3,>=2.2.6
Requires-Dist: pandas<3,>=2.2.2
Requires-Dist: path<18,>=17.0.0
Requires-Dist: pathlib<2,>=1.0.1
Requires-Dist: plotly<6,>=5.23.0
Requires-Dist: psutil<7,>=6.0.0
Requires-Dist: requests<3,>=2.32.3
Requires-Dist: simplejson<4,>=3.19.2
Requires-Dist: sphinx<9,>=8.0.2
Requires-Dist: verboselogs<2,>=1.7
Requires-Dist: btrees<7,>=6.0
Requires-Dist: ccxt<5,>=4.3.79
Requires-Dist: coincurve<21,>=20.0.0
Requires-Dist: dash-bootstrap-components<2,>=1.6.0
Requires-Dist: python-dotenv<2,>=1.0.1
Requires-Dist: sexpdata<2,>=1.0.2
Requires-Dist: web3<7,>=6.20.1
Requires-Dist: werkzeug<4,>=3.0.3
Requires-Dist: gevent<25,>=24.2.1
Requires-Dist: sortedcontainers<3,>=2.4.0
Requires-Dist: aioresponses<0.8,>=0.7.6
Requires-Dist: colorama<0.5,>=0.4.6

# Mock Services

Lightweight Flask mocks for DDX price feeds and KYC endpoints. Used for integration testing.

## Installation

First, ensure that the `ddx-python` dependency is correctly configured.

From the `mocks/` folder:

```bash
python3 -m pip install .
```

## Price Feed Fuzzer

1. Copy the template and edit your config:
   ```bash
   cp price_feed_fuzzer.conf.json.template \
      $CONFIG_DIR/price_feed_fuzzer.conf.json
   ```
2. Set environment variables:
   - `CONFIG_DIR`: path to your JSON config file
   - `CERTS_DIR`: path to `pricefeedfuzzer.crt` and `.key`

### Run

```bash
# direct
python3 -m price_feed_fuzzer

# or with Gunicorn
gunicorn price_feed_fuzzer:gunicorn_app
```

### Endpoints

- `GET /price/<symbol>`  
  → `{ "price": <Decimal>, "symbol": "<symbol>" }`
- `GET /time`  
  → `{ "time": <unix_timestamp> }`

## Mock KYC Service

No config required.

### Run

```bash
# direct
python3 -m mock_kyc

# or with Gunicorn
gunicorn mock_kyc:gunicorn_app
```

### Endpoints

- `GET /api/v3/brokerage/payment_methods/<id>`  
  Stubbed payment‐method JSON.
- `GET /kyc/1.0/connect/beta_derivadex_b7fc6/recordId/<id>`  
  Stubbed KYC status JSON.
