Unified Crypto Exchange API
Project description
Unified Crypto Exchange API
unicex - библиотека для работы с криптовалютными биржами, реализующая унифицированный интерфейс для работы с различными криптовалютными биржами.
✅ Статус реализации:
Sync:
| Exchange | Client | UniClient | Adapter | WebsocketManager | UniWebsocketManager | UserWebsocket |
|---|---|---|---|---|---|---|
| Binance | [x] | [x] | [x] | [x] | [x] | [x] |
| Bybit | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Bitget | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Okx | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Mexc | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Gate | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
Async:
| Exchange | Client | UniClient | Adapter | WebsocketManager | UniWebsocketManager | UserWebsocket |
|---|---|---|---|---|---|---|
| Binance | [x] | [x] | [x] | [x] | [x] | [x] |
| Bybit | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Bitget | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Okx | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Mexc | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
| Gate | [ ] | [ ] | [ ] | [ ] | [ ] | [ ] |
❗️ Возможные проблемы:
- Спот вебсокет на бинансе может отключиться и не переподключиться, потому что renew_listen_key не дает информации о том, когда ключ просрочен.
Блок для разработчика:
📋 Todo
- Добавить открытый интерес в клиента
- Отрефакторить sync user websocket binance
- Добавить веса и рейт лимиты в документацию клиентов
- Привести в порядок обработку ответа после запроса
- Пересмотреть вопрос: должен ли быть адаптер интерфейсом?
- Добавить генерацию ссылок в extra
- Пересмотреть политику Literal в types
- Прокидывать ошибку дальше: 2025-09-24 13:08:06.552 | ERROR | unicex._base.sync.websocket:_on_error:212 - Websocket error: Message queue is overflow
- Потестить bitget
- AdapterError можно сделать красивее и удобнее
2025-09-24 13:14:03.812 | ERROR | unicex._base.sync.websocket:_on_error:212 - Websocket error: Message queue is overflow
2025-09-24 13:14:03.812 | INFO | unicex._base.sync.websocket:stop:121 - Stopping websocket
2025-09-24 13:14:04.291 | ERROR | unicex._base.sync.websocket:stop:144 - Error stopping websocket thread: cannot join current thread
2025-09-24 13:14:09.294 | INFO | unicex._base.sync.websocket:start:87 - Starting websocket
2025-09-24 13:14:09.295 | ERROR | unicex._base.sync.websocket:_on_error:212 - Websocket error: 'NoneType' object has no attribute 'pending'
2025-09-24 13:14:09.296 | INFO | unicex._base.sync.websocket:stop:121 - Stopping websocket
2025-09-24 13:14:10.544 | INFO | unicex._base.sync.websocket:_on_open:187 - Websocket opened
2025-09-24 13:14:10.544 | ERROR | unicex._base.sync.websocket:_on_error:212 - Websocket error: 'NoneType' object has no attribute 'sock'
2025-09-24 13:14:10.544 | INFO | unicex._base.sync.websocket:stop:121 - Stopping websocket
2025-09-24 13:14:10.545 | ERROR | unicex._base.sync.websocket:stop:144 - Error stopping websocket thread: cannot join current thread
📋 Todo 24 september
- Разобраться с логированием
- Написать 1-2 examples
- Написать октрытый интерес на бинанс uni
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unicex-0.1.1.tar.gz
(74.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
unicex-0.1.1-py3-none-any.whl
(101.4 kB
view details)
File details
Details for the file unicex-0.1.1.tar.gz.
File metadata
- Download URL: unicex-0.1.1.tar.gz
- Upload date:
- Size: 74.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41b68288f1b7197e1593f659259e8f93b74b4e9d2d308f8b1aefdc77fa1e9606
|
|
| MD5 |
b4a246b9292459d01f40571b60bd54e2
|
|
| BLAKE2b-256 |
3542bff0f21fcf82bfef89eb37f209fa56555096ab3fec14b985fdf9401f55ce
|
File details
Details for the file unicex-0.1.1-py3-none-any.whl.
File metadata
- Download URL: unicex-0.1.1-py3-none-any.whl
- Upload date:
- Size: 101.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48233eca9e8785390040380800f4551336f12490ff76b83b0436f1de0f8f27e6
|
|
| MD5 |
d1cba1248da381d99aa899ca35b18063
|
|
| BLAKE2b-256 |
c138eec8c162006a774f3a8e24092f02ca3544bbb667d79f0b26b7ba3bce60fc
|