Skip to main content

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.2.tar.gz (74.0 kB view details)

Uploaded Source

Built Distribution

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

unicex-0.1.2-py3-none-any.whl (101.4 kB view details)

Uploaded Python 3

File details

Details for the file unicex-0.1.2.tar.gz.

File metadata

  • Download URL: unicex-0.1.2.tar.gz
  • Upload date:
  • Size: 74.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for unicex-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5678134b9a8651a6e122d93e4c048f435cdb2f361843baae2ec40513247b79bd
MD5 8e0b501e40ea1d57ae0876bd27633c49
BLAKE2b-256 ba5fb34e2ce0defc83331369baa6cce00cc950fd2477b90b6e3b9509367e30d4

See more details on using hashes here.

File details

Details for the file unicex-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: unicex-0.1.2-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.12.11

File hashes

Hashes for unicex-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2752b149e919bce32800d3dc8dd22371b67f8513d0ac259fdcd6085aee0b55e4
MD5 a5a9f011f32b4d6edc5c4d10360caf8f
BLAKE2b-256 4bd5ec16ebfa1c5f88d680a58018202e69243d4787ebbd328c0030aee7f519b1

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