Skip to main content

Add your description here

Project description

Xannounce-parser

Exchange Announce Parser, 使用语法分析(基于 lark)提取交易所公告标题中的币种和公告类型, 例如:

$ uv run xparser 'Market Support for Clearpool(CPOOL) (KRW, BTC, USDT Market)'
> ParserResult(exchange='Upbit', type='New Spot', assets=[Coin(name='Clearpool', symbol='CPOOL')])

优势: 无假阳性, 解析器判别是特定类型就一定是特定类型. 缺陷: 可能有正例未检出

安装

使用 uv(推荐)

uv add xannounce-parser

使用 pip

pip install xannounce-parser

不安装测试

uvx --from xannounce-parser 

为何不用 X?

正则表达式

简单的关键字匹配不够精确, 说实话, 你敢在交易中用正则匹配来的结果吗? 如果写得很复杂, 那为什么不使用特化的工具呢? 比如 Upbit 的英文公告中有四种上架格式:

Market Support for Zora(ZORA) (KRW, BTC, USDT Market)
Market Support for ACS, GO, OBSR, QTCON, RLY (USDT Market)

New Digital Assets Added to USDT Market (AGLD, AHT, ARPA, ASTR, BNT, EGLD, FIL, LWA, NEAR, OXT, RAD, XLM)
New digital asset on KRW Market (MINA)

硬写正则也没问题, 但是一定会比基于 BNF 语法的版本麻烦.

大语言模型

太慢了, 我希望能在 1ms 内得到结果然后发起交易. 不过目前的 https://coin.myuan.fun 上的匹配结果就是基于 GPT-5-nano 的.

小语言模型

有点复杂, 目前 Lark 表现已经很好, 如果未来有必要会考虑.

Roadmap

  • 支持 Upbit 的上架、下架、警告信息
  • 支持 Binance
  • 支持 Bybit
  • 支持 OKX

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xannounce_parser-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xannounce_parser-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file xannounce_parser-0.1.0.tar.gz.

File metadata

  • Download URL: xannounce_parser-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.0

File hashes

Hashes for xannounce_parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f130ba396fd7c186bff747378dc6ec9f37607e06afcc0fb2688fae44da0e65eb
MD5 aaf60a3af6fb32edc7d68cecea3b6baa
BLAKE2b-256 079a0df7cf0d6767221cf85bbf51922f933f8183b036d4353160c58107dc23b4

See more details on using hashes here.

File details

Details for the file xannounce_parser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xannounce_parser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 060670828102d061ff0b9eb8af2c5dc16e5d4e744b76222fd26468cbf50422ef
MD5 1de8048c14a9f64b3fc6fb03083c8c62
BLAKE2b-256 770c253be5f5c4dfaee58f7b5a2320d06c0d240edf3774db4efc4ffbb02aecaf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page