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.3.tar.gz (74.1 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.3-py3-none-any.whl (101.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unicex-0.1.3.tar.gz
  • Upload date:
  • Size: 74.1 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.3.tar.gz
Algorithm Hash digest
SHA256 0f89750e330beedc90468db197ef6ace40fa39064c8e26d1db2e7c6f47513eef
MD5 d7fa3280c72f0ef324d9f6e5497a2810
BLAKE2b-256 f5ec3541209222ee8e376f2874c154c7a9763cf9807979b6f31d38032da13376

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unicex-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 101.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 94eebfeca122a8a24112ad9e6e637b5614026dc1a558126e51669d5fa72bcf38
MD5 eae7888ddc239ed47da18e2759dd7b6e
BLAKE2b-256 433f028993792c96ecd6ce116dbbfa0878c01afe8fc0b7e6b6a79d5491ca8e79

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