Metadata-Version: 2.1
Name: whois-charman
Version: 0.1.4
Summary: A cross-blockchain event prediction exchange arbitrage platform
Home-page: https://git.me/dr/whois-charman
Author: mroy
Author-email: mroy@example.com
Project-URL: Bug Reports, https://git.me/dr/whois-charman/issues
Project-URL: Source, https://git.me/dr/whois-charman
Project-URL: Documentation, https://git.me/dr/whois-charman/docs
Keywords: arbitrage,prediction markets,blockchain,trading,finance,kalshi,polymarket,cryptocurrency,betting,financial analysis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: py-clob-client
Requires-Dist: kalshi-python
Requires-Dist: click>=8.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: cryptography
Requires-Dist: python-dotenv
Requires-Dist: pyreadline3>=3.4.1
Requires-Dist: tabulate>=0.9.0
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn>=0.24.0
Requires-Dist: websockets>=12.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: APScheduler>=3.10.0
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: alembic>=1.12.0
Requires-Dist: PyYAML>=6.0.0
Requires-Dist: loguru
Requires-Dist: web3>=6.0.0
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: urllib3==2.5.0
Requires-Dist: gql==4.0.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: python-multipart==0.0.20
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"



# whois-charman

## 项目描述

一个跨区块链事件预测交易所进行事件查询，并且计算多方赔率总和进行套利的平台。
分为 centry作为中心进行监控事件、提醒、交易等核心功能；agent下的代码针对不同预测事件交易所实现事件爬取，实时获取数据，并统合成统一标准返回

## 核心 

    核心原理是 通过centry 监控各个交易所，找到同一个事件，但正反赔率之和小于1的两个交易所，进行套利。

1. 第一种套利方式
    
    比如 A 交易所中 预测事件1的赔率为（Yes 0.6 ， No 0.4） B 交易所中 预测事件1的赔率为（Yes 0.5 ，No 0.5）
那么购买A交易所的 No 和 B交易所的 Yes，就可以实现套利。

2. 第二种套利方式
    
    在第一种的基础上，发现现在的赔率提高，如 A的No 变成0.5， B的yes变成0.6. 则直接将已购买的No和yes进行平仓进行获利。

3. 第三种套利方式

    对单事件进行扫尾盘监控，如果很快能到平盘，则进行套利。

## 结构

    centry 和 Agents 两个部分都可独立运行， 在centry中配置agent。
    1. agent 负责实现各个交易所的预测事件爬取，并返回统一标准的数据。
    2. centry 负责用户管理，监控各个agent返回的数据，进行事件匹配，并计算赔率，进行套利交易。

## 概念
    
    1. 交易所账户：
        各个预测事件区块链交易所的账户，一般来说，每个交易所账户会有一个API
    2. centry用户：
        指centry系统的使用用户，一个centry用户会有名下多个交易所的交易所账户。

### centry 中

    1. centry用户管理。
        每增加一个agent 都需要配置一个交易所账户和API
    2. 事件监控
    3. 事件提醒
    4. 事件套利交易： 这个交易会委托给agent最终实现。

### agent 中

    1. 交易所账户配置，针对各个交易所单独实现，每个交易所一个agent来
    2. 事件爬取
    3. 事件数据统一标准返回
    4. 最终交易： 交易


