zoomex-php
Описание
This unofficial PHP/Laravel SDK provides a convenient and modern interface for the Zoomex crypto exchange API v3. It offers full REST and WebSocket coverage for market data, trading, positions, and account management. The library is built with PHP 8.1+, features out-of-the-box Laravel support, and allows easy switching between testnet and mainnet.
Языки
- PHP100%
Zoomex PHP Client

This PHP/Laravel SDK provides a convenient way to access the Zoomex crypto exchange API v3. It supports both REST and WebSocket, allowing you to work with market data, trading, positions, account, and assets.
Also available: Zoomex Go Client
GitHub repository: https://github.com/tigusigalpa/zoomex-php
What's inside
- Full Zoomex API v3 coverage: Includes both REST and WebSocket.
- HMAC-SHA256 request signing: Ensures the security of your requests.
- Out-of-the-box Laravel support: Includes a service provider, facade, and configuration.
- Testnet/mainnet switching: Easily switch between test and main networks.
- Modern PHP: Written in PHP 8.1+ with enums and strict types.
- Tested with Pest: Guarantees reliability and stability.
Requirements
- PHP 8.1+
- Composer
- Laravel 9/10/11/12 (optional)
Installation
Setup
Laravel
:
Standalone PHP
Quick examples
Get tickers
Place order
Get positions
Get wallet balance
WebSocket — orderbook stream
WebSocket — private order updates
API Reference
Market (public)
| Method | Endpoint | Description |
|---|---|---|
| | Retrieves the current server time. |
| | Fetches k-line (candlestick) data. |
| | Gets k-line data for the mark price. |
| | Obtains k-line data for the index price. |
| | Retrieves k-line data for the premium index price. |
| | Provides information about the instruments. |
| | Returns the order book. |
| | Gets ticker information. |
| | Shows the funding rate history. |
| | Displays the public trading history. |
| | Provides information on risk limits. |
Trade (private)
| Method | Endpoint | Description |
|---|---|---|
| | Places a new order. |
| | Amends an existing order. |
| | Cancels an order. |
| | Gets a list of open orders. |
| | Cancels all orders. |
| | Shows the order history. |
| | Displays the trade history. |
Position (private)
| Method | Endpoint | Description |
|---|---|---|
| | Gets information about current positions. |
| | Sets the leverage. |
| | Switches between cross and isolated margin. |
| | Sets the Take-Profit/Stop-Loss mode. |
| | Switches the position mode. |
| | Confirms the new risk limit. |
| | Sets a trailing stop. |
| | Enables/disables automatic margin addition. |
| | Adds or reduces margin. |
| | Gets information on closed profit and loss. |
Account (private)
| Method | Endpoint | Description |
|---|---|---|
| | Gets the wallet balance. |
| | Returns information on fees. |
| | Provides account information. |
Asset (private)
| Method | Endpoint | Description |
|---|---|---|
| | Gets coin exchange records. |
| | Returns delivery records. |
| | Shows settlement records. |
| | Provides asset information. |
| | Gets the balance of all coins. |
| | Returns internal transfer records. |
| | Gets a list of sub-accounts. |
| | Creates an internal transfer. |
| | Gets deposit records. |
| | Returns withdrawal records. |
| | Provides coin information. |
| | Creates a withdrawal request. |
| | Cancels a withdrawal request. |
WebSocket Topics
| Channel Type | Topic Pattern | Description |
|---|---|---|
| Public | | Order book (depth: 1, 50, 200, 1000) |
| Public | | Public trades |
| Public | | Ticker |
| Public | | K-lines (candlesticks) |
| Public | | All liquidations |
| Private | | Order updates |
| Private | | Position updates |
| Private | | Execution updates |
| Private | | Wallet updates |
Errors
Two exception types:
— API returned an error (ZoomexApiException)retCode !== 0— HTTP/network failureZoomexRequestException
Rate limits
See the official documentation.
Testing
Contributing
See CONTRIBUTING.md.
Security
Found a vulnerability? Email sovletig@gmail.com (don't open public issues).
Author
License
MIT. See LICENSE.